[FFmpeg-devel] [PATCH]Basic XSUB encoder (take 5)
Reimar Döffinger
Reimar.Doeffinger
Sat Feb 7 15:07:34 CET 2009
On Fri, Feb 06, 2009 at 02:59:15AM +0100, Michael Niedermayer wrote:
> > +/** Encode a single color run. At most 16 bits will be used. */
> > +static void put_xsub_rle(PutBitContext *pb, int len, int color)
> > +{
> > + if (len <= 255)
>
> > + put_bits(pb, 2 + ((ff_log2_tab[len] >> 1) << 2), len);
>
> do you really have to access the table directly? cant av_log2() be used?
Of course, but by reading some other code I came to the conclusion that
av_log2 should be used for 32 bit, av_log2_16bit for 16 bit values and
8 bit values should use ff_log2_tab directly.
If you don't like that, at least tiertexseqv.c and xsubdec.c should be
changed, too.
More information about the ffmpeg-devel
mailing list