Mercurial > libavcodec.hg
comparison h264.c @ 8398:5ffdec2cd80c libavcodec
Simplify ctx update in decode_cabac_mb_dqp().
no speed change
author | michael |
---|---|
date | Fri, 19 Dec 2008 02:00:33 +0000 |
parents | 81c6cec28a62 |
children | 3019af3f98fa |
comparison
equal
deleted
inserted
replaced
8397:81c6cec28a62 | 8398:5ffdec2cd80c |
---|---|
4957 static int decode_cabac_mb_dqp( H264Context *h) { | 4957 static int decode_cabac_mb_dqp( H264Context *h) { |
4958 int ctx= h->last_qscale_diff != 0; | 4958 int ctx= h->last_qscale_diff != 0; |
4959 int val = 0; | 4959 int val = 0; |
4960 | 4960 |
4961 while( get_cabac_noinline( &h->cabac, &h->cabac_state[60 + ctx] ) ) { | 4961 while( get_cabac_noinline( &h->cabac, &h->cabac_state[60 + ctx] ) ) { |
4962 if( ctx < 2 ) | 4962 ctx= 2+(ctx>>1); |
4963 ctx = 2; | |
4964 else | |
4965 ctx = 3; | |
4966 val++; | 4963 val++; |
4967 if(val > 102) //prevent infinite loop | 4964 if(val > 102) //prevent infinite loop |
4968 return INT_MIN; | 4965 return INT_MIN; |
4969 } | 4966 } |
4970 | 4967 |