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

alexc subversion at mplayerhq.hu
Wed Dec 9 18:45:27 CET 2009


Author: alexc
Date: Wed Dec  9 18:45:27 2009
New Revision: 5522

Log:
Fix f_tablelim addressing.

N_L as seen in the spec is our n_lim NOT n[0].

Modified:
   aac-sbr/aacsbr.c

Modified: aac-sbr/aacsbr.c
==============================================================================
--- aac-sbr/aacsbr.c	Wed Dec  9 18:45:25 2009	(r5521)
+++ aac-sbr/aacsbr.c	Wed Dec  9 18:45:27 2009	(r5522)
@@ -1458,7 +1458,7 @@ static void sbr_gain_calc(AACContext * a
     }
 
     for (l = 0; l < ch_data->bs_num_env[1]; l++) {
-        for (k = 0; k < sbr->n[0]; k++) {
+        for (k = 0; k < sbr->n_lim; k++) {
             float sum[2] = { 0.0f, 0.0f };
             for (i = sbr->f_tablelim[k] - sbr->k[3]; i < sbr->f_tablelim[k + 1] - sbr->k[3]; i++) {
                 sum[0] += sbr->e_origmapped[l][i];
@@ -1483,7 +1483,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 (k = 0; k < sbr->n[0]; k++) {
+        for (k = 0; k < sbr->n_lim; k++) {
             float sum[2] = { 0.0f, 0.0f };
             for (i = sbr->f_tablelim[k] - sbr->k[3]; i < sbr->f_tablelim[k + 1] - sbr->k[3]; i++) {
                 sum[0] += sbr->e_origmapped[l][i];


More information about the FFmpeg-soc mailing list