[FFmpeg-devel] zlib decoder

Måns Rullgård mans
Fri Jul 6 01:04:28 CEST 2007


M?ns Rullg?rd <mans at mansr.com> writes:

> static inline unsigned int
> rev_bits16(unsigned int v, unsigned int nb)
> {
>     unsigned int r;
>
>     if (nb <= 8)
>         return ff_reverse[v] >> (8 - nb);
>
>     r = ff_reverse[v & 255] << 8;
>     r |= ff_reverse[v >> 8];
>     return r >> (16 - nb);
> }

This is generic enough that it should perhaps be added somewhere more
centrally.  If so, where?

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list