[FFmpeg-devel] [PATCH/RFC] ALT_BITSTREAMREADER optimizations?for the platforms with strict alignment

Michael Niedermayer michaelni
Mon Dec 8 23:33:14 CET 2008


On Tue, Dec 09, 2008 at 12:17:03AM +0200, Siarhei Siamashka wrote:
> On Monday 08 December 2008, Michael Niedermayer wrote:
> > On Mon, Dec 08, 2008 at 12:12:41PM +0200, Siarhei Siamashka wrote:
[...]
> > > Index: libavcodec/svq1dec.c
> > > ===================================================================
> > > --- libavcodec/svq1dec.c	(revision 16028)
> > > +++ libavcodec/svq1dec.c	(working copy)
> > > @@ -195,7 +195,7 @@
> > >
> > >  #define SVQ1_CALC_CODEBOOK_ENTRIES(cbook)\
> > >        codebook = (const uint32_t *) cbook[level];\
> > > -      bit_cache = get_bits (bitbuf, 4*stages);\
> > > +      bit_cache = get_bits_long (bitbuf, 4*stages);\
> > >        /* calculate codebook entries for this vector */\
> > >        for (j=0; j < stages; j++) {\
> > >          entries[j] = (((bit_cache >> (4*(stages - j - 1))) & 0xF) +
> > > 16*j) << (level + 1);\
> >
> > this code (not only the patch) looks like it needs some work, and such
> > work (cleanup) would likely make the 17bit problem go away as a side
> > effect.
> 
> Is anybody going to do this cleanup in the near future? I just wonder whether
> you are suggesting me to do this work or whatever.

at the risk of a flamewar with you, yes i suggest you do clean these 4 lines
up instead of making the code alot slower.

You dont have to of course but iam sure you will unerstand that i wont
accept a workaround instead of a proper fix.
And i doubt you would if you where making the decission and someone
else did propose it.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- 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/20081208/a1ff0721/attachment.pgp>



More information about the ffmpeg-devel mailing list