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

alexc subversion at mplayerhq.hu
Sat Dec 5 15:58:02 CET 2009


Author: alexc
Date: Sat Dec  5 15:58:01 2009
New Revision: 5495

Log:
The bs_df_env[l] = 0 case of SBR envelope and noise floor decoding is a simple
horizontal accumulation.

Modified:
   aac-sbr/aacsbr.c

Modified: aac-sbr/aacsbr.c
==============================================================================
--- aac-sbr/aacsbr.c	Sat Dec  5 15:58:00 2009	(r5494)
+++ aac-sbr/aacsbr.c	Sat Dec  5 15:58:01 2009	(r5495)
@@ -964,12 +964,9 @@ static void sbr_env_noise_floors(Spectra
                 }
             }
         } else {
-            for (k = 0; k < sbr->n[ch_data->bs_freq_res[l + 1]]; k++) {
-                sbr->env_facs[ch][l + 1][k] = ch_data->bs_data_env[l][0];
-                for (i = 1; i <= k; i++)
-                    sbr->env_facs[ch][l + 1][k] += ch_data->bs_data_env[l][i];
-                sbr->env_facs[ch][l + 1][k] *= delta;
-            }
+            sbr->env_facs[ch][l + 1][0] = delta * ch_data->bs_data_env[l][0];
+            for (k = 1; k < sbr->n[ch_data->bs_freq_res[l + 1]]; k++)
+                sbr->env_facs[ch][l + 1][k] = sbr->env_facs[ch][l + 1][k - 1] + delta * ch_data->bs_data_env[l][k];
         }
     }
 


More information about the FFmpeg-soc mailing list