aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ra288.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-07-14 14:41:01 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-07-14 14:41:01 +0000
commit0e3510a31ffd3c383dcbcd9debb19affa350e06c (patch)
tree46ecc9daaf90370ec1b736c39baa3cd4f46a1c61 /libavcodec/ra288.c
parente44bbf623ebe7f45374b1ff5ad51113c96d2103a (diff)
downloadffmpeg-0e3510a31ffd3c383dcbcd9debb19affa350e06c.tar.gz
Revert r14218. FFMAX is a macro, so
sum = FFMAX(1, scalar_product(...)); might calculate the scalar product twice, which is slower. Originally committed as revision 14230 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ra288.c')
-rw-r--r--libavcodec/ra288.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index 0a1d2e4965..60e985498a 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -69,7 +69,9 @@ static void decode(Real288_internal *glob, float gain, int cb_coef)
for (x=0; x < 5; x++)
buffer[x] = codetable[cb_coef][x] * sumsum;
- sum = FFMAX(1, scalar_product_float(buffer, buffer, 5) / 5);
+ sum = scalar_product_float(buffer, buffer, 5) / 5;
+
+ sum = FFMAX(sum, 1);
/* shift and store */
memmove(glob->lhist, glob->lhist - 1, 10 * sizeof(*glob->lhist));