aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-10-13 16:19:15 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-10-13 16:19:15 +0000
commitb566bd65e211beecfc7fbeb22bae732d3a5d26a4 (patch)
tree003b9c45bc9ed23a1374d378b9136ca12ad89240 /libavcodec/h264.c
parenta88fc5c0408f78d78d96d298fdc15213e6bfb541 (diff)
downloadffmpeg-b566bd65e211beecfc7fbeb22bae732d3a5d26a4.tar.gz
simplify escape decoding
Originally committed as revision 6685 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 59a5b1faee..37e373f1ef 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -6164,14 +6164,14 @@ static int decode_cabac_residual( H264Context *h, DCTELEM *block, int cat, int n
if( coeff_abs >= 15 ) {
int j = 0;
while( get_cabac_bypass( &h->cabac ) ) {
- coeff_abs += 1 << j;
j++;
}
+ coeff_abs=1;
while( j-- ) {
- if( get_cabac_bypass( &h->cabac ) )
- coeff_abs += 1 << j ;
+ coeff_abs += coeff_abs + get_cabac_bypass( &h->cabac );
}
+ coeff_abs+= 14;
}
if( !qmul ) {