changeset 7184:9a8278d65858 libavcodec

Use get_cabac_bypass_sign instead of an if/else.
author astrange
date Wed, 02 Jul 2008 22:25:17 +0000
parents db32d2544050
children 82ab987bca8a
files h264.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Wed Jul 02 22:20:06 2008 +0000
+++ b/h264.c	Wed Jul 02 22:25:17 2008 +0000
@@ -5549,11 +5549,9 @@
             }
 
             if( is_dc ) {
-                if( get_cabac_bypass( CC ) ) block[j] = -coeff_abs;
-                else                                block[j] =  coeff_abs;
+                block[j] = get_cabac_bypass_sign( CC, -coeff_abs );
             }else{
-                if( get_cabac_bypass( CC ) ) block[j] = (-coeff_abs * qmul[j] + 32) >> 6;
-                else                                block[j] = ( coeff_abs * qmul[j] + 32) >> 6;
+                block[j] = (get_cabac_bypass_sign( CC, -coeff_abs ) * qmul[j] + 32) >> 6;
             }
         }
     }