public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [Query] What is the best way to handle V4L2_PIX_FMT_NV12 buffers?
@ 2011-03-06  4:49 Aguirre, Sergio
  2011-03-06 17:55 ` Andy Walls
  0 siblings, 1 reply; 3+ messages in thread
From: Aguirre, Sergio @ 2011-03-06  4:49 UTC (permalink / raw)
  To: linux-media@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-06 19:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-06  4:49 [Query] What is the best way to handle V4L2_PIX_FMT_NV12 buffers? Aguirre, Sergio
2011-03-06 17:55 ` Andy Walls
2011-03-06 19:13   ` Guennadi Liakhovetski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox