summaryrefslogtreecommitdiff
path: root/libavcodec/acelp_pitch_delay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-03 11:50:44 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-03 11:50:44 +0000
commit2b150e9a0cb5ffabf771f9a48a3ab22e604b4db1 (patch)
treeaa0ef9755fe33220647a142418fd6e8de2cc41f9 /libavcodec/acelp_pitch_delay.c
parent58cc7dd9fc30eb7fd5fb255b58c2ca6470b31dd0 (diff)
downloadffmpeg-2b150e9a0cb5ffabf771f9a48a3ab22e604b4db1.tar.gz
make sum_of_squares() more generic
Originally committed as revision 14056 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/acelp_pitch_delay.c')
-rw-r--r--libavcodec/acelp_pitch_delay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/acelp_pitch_delay.c b/libavcodec/acelp_pitch_delay.c
index 9b35fcc892..0746588a22 100644
--- a/libavcodec/acelp_pitch_delay.c
+++ b/libavcodec/acelp_pitch_delay.c
@@ -103,7 +103,7 @@ int16_t ff_acelp_decode_gain_code(
mr_energy += quant_energy[i] * ma_prediction_coeff[i];
#ifdef G729_BITEXACT
- mr_energy += (((-6165LL * ff_log2(sum_of_squares(fc_v, subframe_size, 0, 0))) >> 3) & ~0x3ff);
+ mr_energy += (((-6165LL * ff_log2(dot_product(fc_v, fc_v, subframe_size, 0))) >> 3) & ~0x3ff);
mr_energy = (5439 * (mr_energy >> 15)) >> 8; // (0.15) = (0.15) * (7.23)
@@ -113,7 +113,7 @@ int16_t ff_acelp_decode_gain_code(
);
#else
mr_energy = gain_corr_factor * exp(M_LN10 / (20 << 23) * mr_energy) /
- sqrt(sum_of_squares(fc_v, subframe_size, 0, 0));
+ sqrt(dot_product(fc_v, fc_v, subframe_size, 0));
return mr_energy >> 12;
#endif
}