From: Jason Garrett-Glaser Date: Thu, 18 Dec 2008 15:51:32 +0000 (+0000) Subject: Replace i by trailing_ones, part of a patch by dark shikari. X-Git-Tag: v0.5~1574 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93445d16171a1bb9ddfdd207ae251a90b5b623c1;p=platform%2Fupstream%2Flibav.git Replace i by trailing_ones, part of a patch by dark shikari. No speed change meassureable with START/STOP_TIMER, but this is needed for future optimizations. Originally committed as revision 16218 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavcodec/h264.c b/libavcodec/h264.c index aa7473a..d3a8e56 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -4091,7 +4091,7 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in level[i]= 1 - 2*get_bits1(gb); } - if(i 10 && trailing_ones < 3; int prefix= get_level_prefix(gb); @@ -4120,11 +4120,10 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in if(level_code > 5) suffix_length++; mask= -(level_code&1); - level[i]= (((2+level_code)>>1) ^ mask) - mask; - i++; + level[trailing_ones]= (((2+level_code)>>1) ^ mask) - mask; //remaining coefficients have suffix_length > 0 - for(;i