# HG changeset patch # User michael # Date 1160756355 0 # Node ID 29ea06410ce795af3b7a28b9bfe40feb4f00c36c # Parent 17aaeec7cd5f1f1401149c3871489e3a92a734cc simplify escape decoding diff -r 17aaeec7cd5f -r 29ea06410ce7 h264.c --- 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 ) {