changeset 4016:29ea06410ce7 libavcodec

simplify escape decoding
author michael
date Fri, 13 Oct 2006 16:19:15 +0000
parents 17aaeec7cd5f
children b1a1fb651bf5
files h264.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Fri Oct 13 16:04:41 2006 +0000
+++ b/h264.c	Fri Oct 13 16:19:15 2006 +0000
@@ -6164,14 +6164,14 @@
             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 ) {