[FFmpeg-devel] [PATCH]Basic XSUB encoder (take 5)

Michael Niedermayer michaelni
Sun Feb 8 02:39:31 CET 2009


On Sat, Feb 07, 2009 at 03:07:34PM +0100, Reimar D?ffinger wrote:
> 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.

i dont mind the table being used if it is faster/smaller, ive not considered
this.

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090208/61c02557/attachment.pgp>



More information about the ffmpeg-devel mailing list