diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-08 02:28:40 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-08 02:51:45 +0100 |
commit | bf807a5e874442aa3fe1b475459cdd509e34bff4 (patch) | |
tree | f8067bfb5e99b8b8e2716a7ea8519a4aaa8ac60f /libavcodec/sbrdsp.c | |
parent | 4cda8aa1c5bc58f8a7f53a21a19b03e7379bbcdc (diff) | |
parent | 6eda85e15b38863a627fd0602098aa3250174698 (diff) | |
download | ffmpeg-bf807a5e874442aa3fe1b475459cdd509e34bff4.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
sbrdsp.asm: convert all instructions to float/SSE ones.
dv: cosmetics.
dv: check buffer size before reading profile.
Revert "AAC SBR: group some writes."
udp: Print an error message if bind fails
cook: extend channel uncoupling tables so the full bit range is covered.
roqvideo: cosmetics.
roqvideo: convert to bytestream2 API.
dca: don't use av_clip_uintp2().
wmall: fix build with -DDEBUG enabled.
smc: port to bytestream2 API.
AAC SBR: group some writes.
dsputil: remove shift parameter from scalarproduct_int16
SBR DSP: unroll sum_square
rv34: remove dead code in intra availability check
rv34: clean a bit availability checks.
v4l2: update documentation
tgq: convert to bytestream2 API.
parser: remove forward declaration of MpegEncContext
dca: prevent accessing static arrays with invalid indexes.
...
Conflicts:
doc/indevs.texi
libavcodec/Makefile
libavcodec/dca.c
libavcodec/dvdata.c
libavcodec/eatgq.c
libavcodec/mmvideo.c
libavcodec/roqvideodec.c
libavcodec/smc.c
libswscale/output.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/sbrdsp.c')
-rw-r--r-- | libavcodec/sbrdsp.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libavcodec/sbrdsp.c b/libavcodec/sbrdsp.c index f942759aa7..8c88fb3329 100644 --- a/libavcodec/sbrdsp.c +++ b/libavcodec/sbrdsp.c @@ -35,13 +35,18 @@ static void sbr_sum64x5_c(float *z) static float sbr_sum_square_c(float (*x)[2], int n) { - float sum = 0.0f; + float sum0 = 0.0f, sum1 = 0.0f; int i; - for (i = 0; i < n; i++) - sum += x[i][0] * x[i][0] + x[i][1] * x[i][1]; + for (i = 0; i < n; i += 2) + { + sum0 += x[i + 0][0] * x[i + 0][0]; + sum1 += x[i + 0][1] * x[i + 0][1]; + sum0 += x[i + 1][0] * x[i + 1][0]; + sum1 += x[i + 1][1] * x[i + 1][1]; + } - return sum; + return sum0 + sum1; } static void sbr_neg_odd_64_c(float *x) |