[FFmpeg-devel] [PATCH] lavu/imgutils: create misc functions for dealing with buffers
stefasab at gmail.com
Tue Jun 19 18:07:40 CEST 2012
On date Tuesday 2012-06-19 15:14:18 +0200, Michael Niedermayer encoded:
> On Tue, Jun 19, 2012 at 01:48:27PM +0200, Stefano Sabatini wrote:
> > Move the lavc/imgconvert functions and rename them as follows:
> > avpicture_get_size -> av_image_get_size()
> > avpicture_fill -> av_image_fill()
> > avpicture_layout -> av_image_fill_buffer()
> > The new functions have an align parameter, which allows to define the
> > alignment buffer in the buffer (which is set or read).
> > + */
> > +int av_image_get_size(enum PixelFormat pix_fmt, int width, int height, int align);
> > +
> > +/**
> > + * Copy image data from an image into a buffer.
> why is the function not called ...copy... ?
We have already av_image_copy().
Bikeshed time: the patchset now contains the names:
av_image_fill() fill data/linesize given a buffer
av_image_fill_buffer() copy data to a buffer
av_image_get_size() return the size required for a buffer to contain a given image
Alternatives for av_image_fill():
Alternatives for av_image_fill_buffer() (which now I realize is a bad
Alternatives for av_image_get_size():
My personal choice is for:
which is also consistent with the samplefmt API.
FFmpeg = Frightening and Foolish Magical Pure Elegant Gorilla
More information about the ffmpeg-devel