[FFmpeg-devel] [PATCH] Is gray8 a paletted format?

Stefano Sabatini stefano.sabatini-lala
Tue Feb 16 01:18:15 CET 2010


On date Monday 2010-02-01 20:44:36 +0100, Stefano Sabatini encoded:
> On date Monday 2010-02-01 02:28:17 +0100, Michael Niedermayer encoded:
> > On Sun, Jan 31, 2010 at 06:04:16PM +0100, Stefano Sabatini wrote:
> > > On date Monday 2009-11-16 01:07:09 +0100, Michael Niedermayer encoded:
> > > > On Sun, Nov 15, 2009 at 11:36:03PM +0100, Stefano Sabatini wrote:
> > > > > Hi all,
> > > > > 
> > > > > I see that in imgconvert.c gray8 is treated like a paletted format:
> > > > > check for example ff_set_systematic_pal() and ff_fill_pointer(), where
> > > > > it is allocated space for its palette.
> > > > > 
> > > > > If gray8 can be considered a paletted format, then I suggest to apply
> > > > > the attached patch, updating both the pixdesc array and the lsws
> > > > > macro.
> > > > > 
> > > > > Regards.
> > > > > -- 
> > > > > FFmpeg = Fundamental and Fantastic Most Porno Erudite Gadget
> > > > 
> > > > >  libavutil/pixdesc.c  |    1 +
> > > > >  libswscale/swscale.c |    1 +
> > > > >  2 files changed, 2 insertions(+)
> > > > > d4e555c7f6b51930b736b49221f546314265ec41  gray-is-pal.patch
> > > > 
> > > > This is ok in principle but it has some potential to uncover bugs
> > > > id like you to make sure that this works before comiting.
> > > > Also please make sure by benchmark that this causes no slowdown
> > > 
> > > Can you suggest what I should benchmark?
> > 
> > id put some START/STOP_TIMER in swscale-test and look at the gray8 cases
> > and see if one changes by a large amount
> 
> I used my lite version swscale-test and an ad-hoc script, the results
> are in attachment.
> 
> Conversion in some cases is ~10% slower.
> 
> An alternative solution would be to make gray *non*-paletted, and
> eventually add a gray8-pal variant.

Ping.

Michael, would to elaborate more on the benchmark results help to get
this patch reviewed?

Regards.
-- 
FFmpeg = Foolish and Fierce Meaningful Problematic Erudite Genius



More information about the ffmpeg-devel mailing list