Browse Source

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
tags/v0.5
Vitor Sessak 17 years ago
parent
commit
0e3510a31f
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavcodec/ra288.c

+ 3
- 1
libavcodec/ra288.c View File

@@ -69,7 +69,9 @@ static void decode(Real288_internal *glob, float gain, int cb_coef)
for (x=0; x < 5; x++) for (x=0; x < 5; x++)
buffer[x] = codetable[cb_coef][x] * sumsum; 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 */ /* shift and store */
memmove(glob->lhist, glob->lhist - 1, 10 * sizeof(*glob->lhist)); memmove(glob->lhist, glob->lhist - 1, 10 * sizeof(*glob->lhist));


Loading…
Cancel
Save