summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-12-19 02:00:33 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-12-19 02:00:33 +0000
commit1aea5d35e5e70d788526856c2683471ddb48e1fb (patch)
tree0cef4fef68f0823c094245356ad41027d1eba5f6 /libavcodec
parent7cfca0dfd858512a10ee9bb21e7ecca58bb88330 (diff)
Simplify ctx update in decode_cabac_mb_dqp().
no speed change Originally committed as revision 16232 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 729412324d..54c66a177a 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4959,10 +4959,7 @@ static int decode_cabac_mb_dqp( H264Context *h) {
int val = 0;
while( get_cabac_noinline( &h->cabac, &h->cabac_state[60 + ctx] ) ) {
- if( ctx < 2 )
- ctx = 2;
- else
- ctx = 3;
+ ctx= 2+(ctx>>1);
val++;
if(val > 102) //prevent infinite loop
return INT_MIN;