diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-01-24 18:18:08 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-01-24 18:18:08 +0000 |
commit | eeb1e92feb67f95af32ab1dea01208200aa981b9 (patch) | |
tree | 1d576512aa0f8549d27d8d34197e7ef0578b8de2 /libavcodec/h264_cavlc.c | |
parent | 725b3da981c81dd17e846b70acba183413741193 (diff) | |
download | ffmpeg-eeb1e92feb67f95af32ab1dea01208200aa981b9.tar.gz |
Simplify suffix_length computation, same speed.
Originally committed as revision 21430 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 9440ce03eb..e4181603fa 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -443,9 +443,7 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in }else{ level_code += ((level_code>>31)|1) & -(trailing_ones < 3); - suffix_length = 1; - if(level_code + 3U > 6U) - suffix_length++; + suffix_length = 1 + (level_code + 3U > 6U); level[trailing_ones]= level_code; } |