[FFmpeg-cvslog] r12144 - trunk/libavcodec/mpeg12.c
Rich Felker
dalias
Tue Feb 19 18:19:39 CET 2008
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.
Rich
More information about the ffmpeg-cvslog
mailing list