[FFmpeg-devel] BFI Demuxer

Ivo ivop
Tue Apr 1 17:51:08 CEST 2008


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.

--Ivo




More information about the ffmpeg-devel mailing list