[Query] What is the best way to handle V4L2_PIX_FMT_NV12 buffers?

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

 



Hi,

I was curious in how to handle properly buffers of pixelformat V4L2_PIX_FMT_NV12.

I see that the standard convention for determining a bytesize of an image buffer is:

bytesperline * height

However, for NV12 case, the bytes per line is equal to the width, _but_ the actual buffer size is:

For the Y buffer: width * height
For the UV buffer: width * (height / 2)
Total size = width * (height + height / 2)

Which I think renders the bytesperline * height formula not valid for this case.

Any ideas how this should be properly handled?

NOTE: See here for more details: http://www.fourcc.org/yuv.php#NV12

Regards,
Sergio--
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