[FFmpeg-devel] BFI Demuxer

Sisir Koppaka sisir.koppaka
Tue Apr 1 19:36:28 CEST 2008


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...also, I assumed this makes the colours more
vibrant/thus improving the contrast because it draws upon a much broader
spectrum of R,G and B combinations....was I wrong in assuming thus?
Still in search of a better comment for this one...
Thanks everyone!
-----------------
Sisir Koppaka




More information about the ffmpeg-devel mailing list