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

来源:互联网 发布:skycc软件费用 编辑:程序博客网 时间:2024/05/01 05:35

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.
  表示的是当前,图像数据实际占用的字节数。

原创粉丝点击