Another use of scalar_product_float()

Originally committed as revision 14088 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Vitor Sessak 17 years ago
parent a03a6db1af
commit a5f0f504df
  1. 5
      libavcodec/ra288.c

@ -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 */ sumsum = exp(sum * 0.1151292546497) * gain; /* pow(10.0,sum/20)*f */
sum = 0;
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 += buffer[x] * buffer[x];
} }
sum /= 5; sum = scalar_product_float(buffer, buffer, 5) / 5;
if (sum < 1) if (sum < 1)
sum = 1; sum = 1;

Loading…
Cancel
Save