On Sun, 2010-07-04 at 02:59 -0700, Thomas Worth wrote:
> I've noticed that AVFrame->data returns all non-planar YCbCr data as
> one element (data[0]), but planar (4:2:0 in this case) is represented
> by data[0],data[1] and data[2]. Can I rely on this working this way
> only when planar data is encountered? I guess my question really is
> what determines whether data[] uses multiple elements or just one? Is
> it strictly a planar/non-planar issue?

Yes, planar data uses data[0..3] while packed formats use only data[0]
(as far as I've seen).
For more information, check out libavutil/pixdesc.c. More specifically,
AVComponentDescriptor::plane. If you want your code to be maximally
generic wrt. pix_fmt you should probably rely on av_pix_fmt_descriptors.

/Tomas

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to