[FFmpeg-cvslog] r12144 - trunk/libavcodec/mpeg12.c

Michael Niedermayer michaelni
Tue Feb 19 18:37:25 CET 2008


On Tue, Feb 19, 2008 at 12:19:39PM -0500, Rich Felker wrote:
> On Tue, Feb 19, 2008 at 04:55:14PM +0100, michael wrote:
> > Author: michael
> > Date: Tue Feb 19 16:55:14 2008
> > New Revision: 12144
> > 
> > Log:
> > Reduce the number of senselessly scanned bytes.
> > 
> > 
> > Modified:
> >    trunk/libavcodec/mpeg12.c
> > 
> > Modified: trunk/libavcodec/mpeg12.c
> > ==============================================================================
> > --- trunk/libavcodec/mpeg12.c	(original)
> > +++ trunk/libavcodec/mpeg12.c	Tue Feb 19 16:55:14 2008
> > @@ -1869,7 +1869,7 @@ static int mpeg_decode_slice(Mpeg1Contex
> >          }
> >      }
> >  eos: // end of slice
> > -    *buf += get_bits_count(&s->gb)/8 - 1;
> > +    *buf += (get_bits_count(&s->gb)-1)/8;
> 
> Have you checked what code gcc generates for this /8?? I suspect it's
> a division!! Use >>3 or fix get_bits_count to return unsigned instead
> of int.

Feel free to change it to a shift.

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

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- 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-cvslog/attachments/20080219/5bab8409/attachment.pgp>



More information about the ffmpeg-cvslog mailing list