diff h264.c @ 4016:29ea06410ce7 libavcodec

simplify escape decoding
author michael
date Fri, 13 Oct 2006 16:19:15 +0000
parents e5f7797e53c7
children 53be304c7f54
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 ) {