On Oct 4, 2013, at 11:43 AM, MXWendler LibAV <[email protected]> wrote:

> Is there a reliable way to derive the line size from eg. resolution and / or 
> pixel format? Like eg. PIX_FMT_YUV420P has three line entries (ycbcr), and 
> the Y stride is XX and the cb/cr stride is half of that?

No, there isn't. You can reliably work out the minimum number of bytes for a 
given format, but you won't know how many padding bytes are on each line. 
There's commonly padding to make alignment to 32 or 64 bits, for instance.

I tend to do copies line by line, then I get to a known linesize - I can 
predict my own line sizes.

Bruce
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to