V4L2中两个关于图像占用空间大小的结构体项的理解

1.struct v4l2_pix_format 中的sizeimage
其说明为:   
   Size in bytes of the buffer to hold a complete image, set by the driver.
Usually this is bytesperline times height. When the image consists of variable
length compressed data this is the maximum number of bytes required to hold
an image.
  表示的是当前采集参数下,图像数据需要的最大字节数。

2.struct v4l2_buffer 中的bytesused
其说明为:
   The number of bytes occupied by the data in the buffer.It depends on the
negotiated data format and may change with each buffer for compressed variable
size data like JPEG images. Drivers must set this field when type refers to an
input stream, applications when an output stream.
  表示的是当前,图像数据实际占用的字节数。

发布了20 篇原创文章 · 获赞 12 · 访问量 16万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章