[FFmpeg-devel] BFI Demuxer

Reimar Döffinger Reimar.Doeffinger
Tue Apr 1 19:57:45 CEST 2008


On Tue, Apr 01, 2008 at 11:06:28PM +0530, Sisir Koppaka wrote:
> On Tue, Apr 1, 2008 at 9:21 PM, Ivo <ivop at euronet.nl> wrote:
> 
> > On Tuesday 01 April 2008 13:09, Sisir Koppaka wrote:
> > > > > +    /*Improving colour depth */
> > > > > +    for (i = 0; i < vstream->codec->extradata_size; i++)
> > > > > +        ((uint8_t *) vstream->codec->extradata)[i] =
> > > > > +            ((uint8_t *) vstream->codec->extradata)[i] << 2;
> > > >
> > > > senseless casts, and the comment makes no sense.
> > >
> > > I've replaced the above comment with this one - is this ok?
> > >  /* Converts the given 6-bit palette values(0-63) to 8-bit values(0-255)
> > > to improve the contrast. */
> >
> > What Michael said, plus the conversion is not right. For example:
> >
> > 6-bit max = 0x3f, 8-bit max = 0xff
> >
> > but with your conversion routine 8-bit max = 0xfc.
> >
> > v = v<<2 | v>>4
> >
> > is more accurate.
> >
> >
> Nice :) Modifying this...

But this essentially is a colourspace-conversion, and IMO just has no
place at all at least in the demuxer. Adding a 6-bit-palette
colourspace-format probably is overkill, so it would have to be done in
the decoder though.




More information about the ffmpeg-devel mailing list