diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-01-24 21:23:46 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-01-24 21:23:46 +0300 |
commit | 7abc860323cc92b81bdc1e7c83bc8f7144f3b45d (patch) | |
tree | 770c0ed7fff14f93f1a5f552b6a7dfdb31938844 /libavcodec/h264_cavlc.c | |
parent | eeb1e92feb67f95af32ab1dea01208200aa981b9 (diff) |
Optimize suffix_length computation, 1 cpu cycle speedup.
Originally committed as revision 21431 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264_cavlc.c')
-rw-r--r-- | libavcodec/h264_cavlc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c index e4181603fa..d00cbeb25c 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -470,9 +470,7 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in level_code= (((2+level_code)>>1) ^ mask) - mask; } level[i]= level_code; - - if(suffix_limit[suffix_length] + level_code > 2U*suffix_limit[suffix_length]) - suffix_length++; + suffix_length+= suffix_limit[suffix_length] + level_code > 2U*suffix_limit[suffix_length]; } } |