summaryrefslogtreecommitdiffstats
path: root/libavcodec/flacenc.c
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2007-09-29 01:54:25 +0000
committerLoren Merritt <lorenm@u.washington.edu>2007-09-29 01:54:25 +0000
commitf6215b1b069680a782ca28058b3ec6d9bb4a45e1 (patch)
treecf04b6c3cd85e95a3b7911590d468e63a0fdaecf /libavcodec/flacenc.c
parent551109d48a16e6d8cbddbdb608bb2ddd36278b67 (diff)
downloadffmpeg-streaming-f6215b1b069680a782ca28058b3ec6d9bb4a45e1.zip
ffmpeg-streaming-f6215b1b069680a782ca28058b3ec6d9bb4a45e1.tar.gz
gcc isn't smart enough to factor out duplicate stores
Originally committed as revision 10611 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flacenc.c')
-rw-r--r--libavcodec/flacenc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index b2b3c84..e997bca 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -499,10 +499,11 @@ static void calc_sums(int pmin, int pmax, uint32_t *data, int n, int pred_order,
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 */
OpenPOWER on IntegriCloud