aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-01-24 18:23:46 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-01-24 18:23:46 +0000
commit7abc860323cc92b81bdc1e7c83bc8f7144f3b45d (patch)
tree770c0ed7fff14f93f1a5f552b6a7dfdb31938844
parenteeb1e92feb67f95af32ab1dea01208200aa981b9 (diff)
downloadffmpeg-7abc860323cc92b81bdc1e7c83bc8f7144f3b45d.tar.gz
Optimize suffix_length computation, 1 cpu cycle speedup.
Originally committed as revision 21431 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/h264_cavlc.c4
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];
}
}