[Libav-user] Encoding in PIX_FMT_YUYV422
Carl Eugen Hoyos
cehoyos at ag.or.at
Mon Jan 23 16:30:22 CET 2012
<francesco at ...> writes:
> >> locpFrame->data[0] => The buffer containing packetized samples,
> >> Y0,Cr0,Y1,Cb0,Y2,Cr1,Y3,Cb1....
> >
> >This is approximately PIX_FMT_YUYV422, but I suspect you have Cr and Cb
> swapped,
> >please see libavutil/pixfmt.h
> >(Or is the comment wrong there?)
[...]
> why you state that this is "approximately" PIX_FMT_YUYV422 ?
What is unclear about "I suspect you have Cr and Cb swapped"?
(But as said, I don't know if the comment in pixfmt.h is correct.)
> I read libavutil/pixfmt.h but from this header and from the source code
> example it's not clear to me how I should insert data. I start from a raw
> image and would compress it in MPEG2 4:2:2 format.
As said, you cannot use PIX_FMT_YUYV422 because no encoder supports it.
The mpeg2 encoder does support PIX_FMT_YUV422P though.
Carl Eugen
More information about the Libav-user
mailing list