diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2007-09-29 01:54:25 +0000 |
---|---|---|
committer | Loren Merritt <lorenm@u.washington.edu> | 2007-09-29 01:54:25 +0000 |
commit | f6215b1b069680a782ca28058b3ec6d9bb4a45e1 (patch) | |
tree | cf04b6c3cd85e95a3b7911590d468e63a0fdaecf /libavcodec/flacenc.c | |
parent | 551109d48a16e6d8cbddbdb608bb2ddd36278b67 (diff) | |
download | ffmpeg-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index b2b3c84e69..e997bca129 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 */ |