[SCM] libav/experimental: Revert r14218. FFMAX is a macro, so sum = FFMAX(1, scalar_product(...)); might calculate the scalar product twice, which is slower.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:25:21 UTC 2013
The following commit has been merged in the experimental branch:
commit 0e3510a31ffd3c383dcbcd9debb19affa350e06c
Author: Vitor Sessak <vitor1001 at gmail.com>
Date: Mon Jul 14 14:41:01 2008 +0000
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
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index 0a1d2e4..60e9854 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));
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list