[Ffmpeg-devel] Pixel Formats question
Eduardo Morras
nec556
Thu Apr 26 23:58:15 CEST 2007
Hello:
How are planar pixel formats passed to my encode_frame function? In YUV 4:4:4, has AVFrame.[0] the Ys, AVFrame.[1] the Us/Crs and AVFrame.[2] the Vs/Cbs? Or all data is on AVFrame.data[0]? I have readed the PixelFormat description at avutil.h and AVFrame (ff_common_frame) at avcodec.h and it's a bit confusing. I ask because i get noise when do a compress/decompress cycle for testing and want to delimitate what fails.
I do:
GogContext *s = avctx->priv_data;
AVFrame *const p = &s->picture;
....
if (s->RGBA32==0){
encode_plane(s, width, height, p->data[0],0); //Y
encode_plane(s, chroma_width, chroma_height, p->data[1],1); //Cr
encode_plane(s, chroma_width, chroma_height, p->data[2],2); //Cb
Thanks
More information about the ffmpeg-devel
mailing list