[FFmpeg-user] Efficient way to extract AVFrame data when linesize > frame width

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Jun 17 23:06:59 CEST 2015


Daniel Moraes <daniel.b.moraes <at> gmail.com> writes:

> I noticed that linesize of an AVFrame can be greater 
> than the width of an YUV video

(I wonder if it isn't always greater.)

> for example. After searching about the reason behind 
> it, I saw that some decoders can be faster when 
> linesize of the frame is multiple of 16, and in some 
> cases, when linesize > frame width. When it happens, 
> the bytestream (frame->data) of an AVFrame has empty 
> spaces, with no pixel information, 

> which gives an right-padded border when the frame is 
> exported to an image file directly.

This makes no sense.

There is a mailing list dedicated to such questions:
http://ffmpeg.org/mailman/listinfo/libav-user
When posting there, please try to explain what you 
want to do: "exporting directly to an image file" 
sounds as if you try to reinvent the wheel (or 
similar).

Carl Eugen



More information about the ffmpeg-user mailing list