[FFmpeg-soc] [soc]: r5514 - aac-sbr/aacsbr.c

alexc subversion at mplayerhq.hu
Tue Dec 8 23:59:01 CET 2009


Author: alexc
Date: Tue Dec  8 23:59:00 2009
New Revision: 5514

Log:
Fix the indexing of (env|noise)_facs.

Both are indexed from 1. 0 holds the last envelope/noise floor of the
previous frame.

Modified:
   aac-sbr/aacsbr.c

Modified: aac-sbr/aacsbr.c
==============================================================================
--- aac-sbr/aacsbr.c	Tue Dec  8 23:58:58 2009	(r5513)
+++ aac-sbr/aacsbr.c	Tue Dec  8 23:59:00 2009	(r5514)
@@ -1333,13 +1333,13 @@ static void sbr_mapping(AACContext *ac, 
 
         for (i = 0; i < ilim; i++)
             for (m = table[i]; m < table[i + 1]; m++)
-                sbr->e_origmapped[l][m - sbr->k[3]] = sbr->env_facs[ch][l][i];
+                sbr->e_origmapped[l][m - sbr->k[3]] = sbr->env_facs[ch][l+1][i];
 
         // ch_data->bs_num_noise > 1 => 2 noise floors
         k = (ch_data->bs_num_noise > 1) && (sbr->t_env[ch][l] >= sbr->t_q[ch][1]);
         for (i = 0; i < sbr->n_q; i++)
             for (m = table[i]; m < table[i + 1]; m++)
-                sbr->q_mapped[l][m - sbr->k[3]] = sbr->noise_facs[ch][k][i];
+                sbr->q_mapped[l][m - sbr->k[3]] = sbr->noise_facs[ch][k+1][i];
 
         for (i = 0; i < sbr->n[1]; i++) {
             memset(&sbr->s_indexmapped[l + 1][sbr->f_tablehigh[i] - sbr->k[3]], 0,


More information about the FFmpeg-soc mailing list