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

alexc subversion at mplayerhq.hu
Sun Dec 13 05:24:02 CET 2009


Author: alexc
Date: Sun Dec 13 05:24:02 2009
New Revision: 5532

Log:
Fix an off by one error in envelope estimation.

The spec's k_h is equal to table[p+1] - 1.

Modified:
   aac-sbr/aacsbr.c

Modified: aac-sbr/aacsbr.c
==============================================================================
--- aac-sbr/aacsbr.c	Sun Dec 13 05:24:00 2009	(r5531)
+++ aac-sbr/aacsbr.c	Sun Dec 13 05:24:02 2009	(r5532)
@@ -1403,7 +1403,7 @@ static void sbr_env_estimate(float (*e_c
 
             for (p = 0; p < sbr->n[ch_data->bs_freq_res[l + 1]]; p++) {
                 float sum = 0.0f;
-                const int den = env_size * (table[p + 1] - table[p] + 1);
+                const int den = env_size * (table[p + 1] - table[p]);
 
                 for (k = table[p]; k < table[p + 1]; k++) {
                     for (i = ilb; i < iub; i++) {


More information about the FFmpeg-soc mailing list