[FFmpeg-soc] [soc]: r837 - dirac/libavcodec/dirac_arith.c

marco subversion at mplayerhq.hu
Thu Aug 16 12:12:36 CEST 2007


Author: marco
Date: Thu Aug 16 12:12:36 2007
New Revision: 837

Log:
merge if statements

Modified:
   dirac/libavcodec/dirac_arith.c

Modified: dirac/libavcodec/dirac_arith.c
==============================================================================
--- dirac/libavcodec/dirac_arith.c	(original)
+++ dirac/libavcodec/dirac_arith.c	Thu Aug 16 12:12:36 2007
@@ -171,16 +171,12 @@ void dirac_arith_put_bit(dirac_arith_sta
 
     if (bit == 0) {
         arith->range  = (arith->range * prob_zero) >> 16;
+        arith->contexts[context] -= arith_lookup[arith->contexts[context] >> 8];
     } else {
         arith->low   += (arith->range * prob_zero) >> 16;
         arith->range -= (arith->range * prob_zero) >> 16;
-    }
-
-    /* Update contexts. */
-    if (bit)
-        arith->contexts[context] -= arith_lookup[arith->contexts[context] >> 8];
-    else
         arith->contexts[context] += arith_lookup[255 - (arith->contexts[context] >> 8)];
+    }
 
     /* Renormalisation and output.  */
     while (arith->range <= 0x4000) {



More information about the FFmpeg-soc mailing list