[FFmpeg-soc] [soc]: r5516 - aac-sbr/aacsbr.c
alexc
subversion at mplayerhq.hu
Tue Dec 8 23:59:07 CET 2009
Author: alexc
Date: Tue Dec 8 23:59:06 2009
New Revision: 5516
Log:
Simplify noise floor decoding when bs_df_noise = 0.
The bs_df_noise[l] = 0 case of noise floor decoding is just a simple
horizontal accumulation. This is analogous to r5495 for envelope
decoding.
Modified:
aac-sbr/aacsbr.c
Modified: aac-sbr/aacsbr.c
==============================================================================
--- aac-sbr/aacsbr.c Tue Dec 8 23:59:03 2009 (r5515)
+++ aac-sbr/aacsbr.c Tue Dec 8 23:59:06 2009 (r5516)
@@ -970,12 +970,9 @@ static void sbr_env_noise_floors(Spectra
for (k = 0; k < sbr->n_q; k++)
sbr->noise_facs[ch][l + 1][k] = sbr->noise_facs[ch][l][k] + delta * ch_data->bs_data_noise[l][k];
else {
- for (k = 0; k < sbr->n_q; k++) {
- sbr->noise_facs[ch][l + 1][k] = ch_data->bs_data_noise[l][0];
- for (i = 1; i <= k; i++)
- sbr->noise_facs[ch][l + 1][k] += ch_data->bs_data_noise[l][i];
- sbr->noise_facs[ch][l + 1][k] *= delta;
- }
+ sbr->noise_facs[ch][l + 1][0] = delta * ch_data->bs_data_noise[l][0];
+ for (k = 1; k < sbr->n_q; k++)
+ sbr->noise_facs[ch][l + 1][k] = sbr->noise_facs[ch][l + 1][k - 1] + delta * ch_data->bs_data_noise[l][i];
}
}
More information about the FFmpeg-soc
mailing list