[FFmpeg-devel] [RFC] Request for pixdesc API review

Stefano Sabatini stefano.sabatini-lala
Mon Nov 9 22:40:23 CET 2009


On date Monday 2009-11-09 12:05:15 -0500, Ronald S. Bultje encoded:
> Hi,
> 
> On Sun, Nov 8, 2009 at 12:35 PM, Stefano Sabatini
> <stefano.sabatini-lala at poste.it> wrote:
> > we recently got completed all the definitions for the pixel format
> > descriptors in libavutil/pixdesc.{h,c}.
> 
> Seems pretty sane on a first glance. What exactly are you looking for
> in our comments?

If it is clear, if it is expressive enough to do what we currently do
with PixFmtInfo (that's already true) and possibly more, for example I
would like to avoid all that switch (pix_fmt) case PIX_FMT_FOO stuff,
if it can be managed more generically.

For example adding a pixel format shouldn't require to edit all the
functions dealing with pixel format stuff, it should be sufficient to
hook up the description to the pixel format descriptions array.

That would also make a lot easier to implement more generic lavfi
filters.

I suspect it still lacks something in that regard, but I feel like
we'll discover it only re-implementing imgconvert.c functions making
use of it.

> What is the BITSTREAM flag? Is it the same as "no padding to align
> each pixel to the byte"? Some explanation there would help me, I'd
> have to look at the code to see what it does.

Yes a bitstream format is basically a format for which the component
associated to a pixel is not byte aligned, typical examples are
monowhite and monoblack, this flag also affects how some fields are
interpreted (for example step_minus1).
 
> Any timeline on when swscale will use this?

Well, once pixdesc API will be public it should be possible to
trivially remove duplicated code (e.g. USE_PAL() and
sws_format_name()), and should be possible to use the pixdesc
descriptions to perform operations in a more generic way, note that
I'm not volunteering for this so it won't depend on me.

> Thanks!

Regards.
-- 
FFmpeg = Faithful and Frenzy Magnificient Powered Elaborated Gospel



More information about the ffmpeg-devel mailing list