[FFmpeg-cvslog] r10611 - trunk/libavcodec/flacenc.c

lorenm subversion
Sat Sep 29 03:54:26 CEST 2007


Author: lorenm
Date: Sat Sep 29 03:54:25 2007
New Revision: 10611

Log:
gcc isn't smart enough to factor out duplicate stores


Modified:
   trunk/libavcodec/flacenc.c

Modified: trunk/libavcodec/flacenc.c
==============================================================================
--- trunk/libavcodec/flacenc.c	(original)
+++ trunk/libavcodec/flacenc.c	Sat Sep 29 03:54:25 2007
@@ -499,10 +499,11 @@ static void calc_sums(int pmin, int pmax
     res = &data[pred_order];
     res_end = &data[n >> pmax];
     for(i=0; i<parts; i++) {
-        sums[pmax][i] = 0;
+        uint32_t sum = 0;
         while(res < res_end){
-            sums[pmax][i] += *(res++);
+            sum += *(res++);
         }
+        sums[pmax][i] = sum;
         res_end+= n >> pmax;
     }
     /* sums for lower levels */




More information about the ffmpeg-cvslog mailing list