1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

Another use of scalar_product_float()

Originally committed as revision 14088 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Vitor Sessak 2008-07-06 10:32:29 +00:00
parent a03a6db1af
commit a5f0f504df

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;