[Libav-user] Encoding in PIX_FMT_YUYV422

francesco at bltitalia.com francesco at bltitalia.com
Mon Jan 23 14:52:19 CET 2012


At 12.04 23/01/2012 +0000, you wrote:
> <francesco at ...> writes:
>
>> I'm attempting to encode in PIX_FMT_YUYV422 using libavcodec.
>> It's not clear to me the format of input raw data.  I understood that
>> all pixel should be in 16 Bit format, but in buffer, how should be inserted
>> data ?  That is, if locpFrame is a pointer to an AVFrame, I should insert;
>> 
>> locpFrame->data[0] => The buffer containing only luma samples (Y0,Y1,Y2..)
>> locpFrame->data[1] => The buffer containing only Chroma 1 samples
>> (Cr0,Cr1,Cr2..)
>> locpFrame->data[2] => The buffer containing only Chroma 2 samples
>> (Cb0,Cb1,Cb2...)
>
>I suspect this would PIX_FMT_YUV422P
>
>> or:
>> 
>> 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?)
>
>Carl Eugen
>
>_______________________________________________
>Libav-user mailing list
>Libav-user at ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/libav-user
>
>
>__________ Informazioni da ESET NOD32 Antivirus, versione del database
delle firme digitali 6817 (20120122) __________
>
>Il messaggio è stato controllato da ESET NOD32 Antivirus.
>
>www.nod32.it
>
>
>
>
Hi Mr Eugen
why you state that this is "approximately" PIX_FMT_YUYV422 ? 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.  Where I can find some examples ?
Tnaks



More information about the Libav-user mailing list