Query the meaning of variable in v4l2_pix_format and v4l2_plane

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm not sure the meaning of variables in v4l2_pix_format and v4l2_plane.
Especially bytesperline, sizeimage, length and bytesused.

v4l2_pix_format.width		= width
v4l2_pix_format.height		= height
v4l2_pix_format.bytesperline	= bytesperline [in bytes]
v4l2_pix_format.sizeimage	= bytesperline * buf height  -> Is this
right ?

v4l2_plane.length	= bytesperline * buf height  -> Is this right ?
I don't which is right.
v4l2_plane.bytesused	= bytesperline * (top + height)
v4l2_plane.bytesused	= bytesperline * height
v4l2_plane.bytesused	= width * height * bytesperpixel
v4l2_plane.bytesused	= bytesperline * (top + height) - (pixelperline -
(left + width)) * bytesperpixel

I assumed the following buffer.

|                                                          |
|<--------------------- bytesperline --------------------->|
|                                                          |
+----------------------------------------------------------+-----
|          ^                                               |  ^
|          |                                               |  |
|                                                          |  |
|          t                                               |  |
|          o                                               |  |
|          p                                               |  |
|                                                          |  |
|          |                                               |  |
|          V |<--------- width ---------->|                |  |
|<-- left -->+----------------------------+ -              |  |
|            |                            | ^              |
|            |                            | |              |  b
|            |                            | |              |  u
|            |                            |                |  f
|            |                            | h              |
|            |                            | e              |  h
|            |                            | i              |  e
|            |                            | g              |  i
|            |                            | h              |  g
|            |                            | t              |  h
|            |                            |                |  t
|            |                            | |              |  
|            |                            | |              |  |
|            |                            | v              |  |
|            +----------------------------+ -              |  |
|                                                          |  |
|                                                          |  |
|                                                          |  v
+----------------------------------------------------------+-----


Best regards,


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux