Browse Source

Another use of scalar_product_float()

Originally committed as revision 14088 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Vitor Sessak 17 years ago
parent
commit
a5f0f504df
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      libavcodec/ra288.c

+ 2
- 3
libavcodec/ra288.c View File

@@ -69,13 +69,12 @@ static void decode(Real288_internal *glob, float gain, int cb_coef)

sumsum = exp(sum * 0.1151292546497) * gain; /* pow(10.0,sum/20)*f */

sum = 0;
for (x=0; x < 5; x++) {
buffer[x] = codetable[cb_coef][x] * sumsum;
sum += buffer[x] * buffer[x];
}

sum /= 5;
sum = scalar_product_float(buffer, buffer, 5) / 5;

if (sum < 1)
sum = 1;



Loading…
Cancel
Save