[Libav-user] Encoding in PIX_FMT_YUYV422
Carl Eugen Hoyos
cehoyos at ag.or.at
Tue Jan 24 21:10:18 CET 2012
<francesco at ...> writes:
the comment is not clear
> too. It says :
> ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
> even though the two Croma are inverted, the difference will be in colors.
> If they are swapped (little endian instead of big endian due to the fact
> that is in 16 bit format), the final image will have wrong colors.
You misunderstand (on average, a pixel uses 16bit, but you cannot relate 16bit
data to a specific pixel), there is nothing endian specific about
> What I haven't understood is how to pass data to encoder. That is, should I
> use three different buffers (for luma, Cr and Cb) or a single buffer?
For planar formats, you have to provide as many buffers as there are planes,
three for PIX_FMT_YUV422P, for packed formats, one buffer is needed.
More information about the Libav-user