[FFmpeg-cvslog] r22848 - trunk/libavcodec/dca.c

mru subversion
Mon Apr 12 13:14:52 CEST 2010


Author: mru
Date: Mon Apr 12 13:14:51 2010
New Revision: 22848

Log:
DCA: use a local variable for loop boundary

This prevents gcc reloading the value from memory on each iteration
of the loop.

Modified:
   trunk/libavcodec/dca.c

Modified: trunk/libavcodec/dca.c
==============================================================================
--- trunk/libavcodec/dca.c	Mon Apr 12 13:14:48 2010	(r22847)
+++ trunk/libavcodec/dca.c	Mon Apr 12 13:14:51 2010	(r22848)
@@ -757,6 +757,7 @@ static void qmf_32_subbands(DCAContext *
     const float *prCoeff;
     int i;
 
+    int sb_act = s->subband_activity[chans];
     int subindex;
 
     scale *= sqrt(1/8.0);
@@ -770,7 +771,7 @@ static void qmf_32_subbands(DCAContext *
     /* Reconstructed channel sample index */
     for (subindex = 0; subindex < 8; subindex++) {
         /* Load in one sample from each subband and clear inactive subbands */
-        for (i = 0; i < s->subband_activity[chans]; i++){
+        for (i = 0; i < sb_act; i++){
             uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ ((i-1)&2)<<30;
             AV_WN32A(&s->raXin[i], v);
         }



More information about the ffmpeg-cvslog mailing list