[FFmpeg-devel] [patch] support decoding png 1,2,4 bits

Reimar Döffinger Reimar.Doeffinger
Thu Feb 14 15:36:07 CET 2008


Hello,
On Thu, Feb 14, 2008 at 02:38:02PM +0100, Julien Reichel wrote:
> > In addition if speed does not matter (much), just using the 
> > bitstream reader would be much simpler as well (maybe 4 lines 
> > of code to handle _all_ cases), though it would require src 
> > to be padded, not idea if that is the case currently.
> Well, I have no clue how to do that. But I'll be happy to try. Anyhow
> patch was done, so here it is.

    GetBitContext gb;
    init_get_bits(&gb, src, row_size * 8);
    while (width-- > 0)
      *dst++ = get_bits(gb, bit_depth);

or similarly.

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list