[FFmpeg-soc] [soc]: r4304 - wmapro/wma3dec.c

faust3 subversion at mplayerhq.hu
Sat May 23 20:04:58 CEST 2009


Author: faust3
Date: Sat May 23 20:04:58 2009
New Revision: 4304

Log:
get rid of a branch in the run length decoding loop

Modified:
   wmapro/wma3dec.c

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	Sat May 23 20:00:43 2009	(r4303)
+++ wmapro/wma3dec.c	Sat May 23 20:04:58 2009	(r4304)
@@ -818,6 +818,7 @@ static int wma_decode_coeffs(WMA3DecodeC
     }
 
     if(rl_mode){
+        unsigned int coeff_mask = s->subframe_len - 1;
         while(cur_coeff < s->subframe_len){
             unsigned int idx;
             int sign;
@@ -844,8 +845,7 @@ static int wma_decode_coeffs(WMA3DecodeC
                 }
             }
             sign = get_bits(&s->getbit,1) - 1;
-            if(cur_coeff < s->subframe_len)
-                ci->coeffs[cur_coeff] = (val^sign) - sign;
+            ci->coeffs[cur_coeff & coeff_mask] = (val^sign) - sign;
             ++cur_coeff;
         }
     }


More information about the FFmpeg-soc mailing list