[FFmpeg-soc] [soc]: r5537 - aac-sbr/aacsbr.c
alexc
subversion at mplayerhq.hu
Tue Dec 15 07:28:54 CET 2009
Author: alexc
Date: Tue Dec 15 07:28:54 2009
New Revision: 5537
Log:
Fix calculation of sbr->gain.
The s_mapped condition was inverted. I.e. when s_mapped is non-zero
e_origmapped / (1 + e_curr) is multiplied by q_mapped / (1 + q_mapped).
Modified:
aac-sbr/aacsbr.c
Modified: aac-sbr/aacsbr.c
==============================================================================
--- aac-sbr/aacsbr.c Mon Dec 14 07:22:01 2009 (r5536)
+++ aac-sbr/aacsbr.c Tue Dec 15 07:28:54 2009 (r5537)
@@ -1448,7 +1448,7 @@ static void sbr_gain_calc(AACContext * a
for (l = 0; l < ch_data->bs_num_env[1]; l++) {
int delta = !((l == l_a[1]) || (l == -(l_a[0] != ch_data->bs_num_env[0])));
for (m = 0; m < sbr->m; m++) {
- if (sbr->s_mapped[l][m]) {
+ if (!sbr->s_mapped[l][m]) {
sbr->gain[l][m] = sqrtf(sbr->e_origmapped[l][m] /
((1.0f + sbr->e_curr[l][m]) *
(1.0f + sbr->q_mapped[l][m] * delta)));
More information about the FFmpeg-soc
mailing list