diff options
Diffstat (limited to 'src/libfaad/sbr_hfadj.c')
-rw-r--r-- | src/libfaad/sbr_hfadj.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/libfaad/sbr_hfadj.c b/src/libfaad/sbr_hfadj.c index 7dd53f3e0..5e0faab93 100644 --- a/src/libfaad/sbr_hfadj.c +++ b/src/libfaad/sbr_hfadj.c @@ -1,6 +1,6 @@ /* ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding -** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com +** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ ** Commercial non-GPL licensing of this software is possible. ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com. ** -** $Id: sbr_hfadj.c,v 1.1 2003/12/30 02:00:11 miguelfreitas Exp $ +** $Id: sbr_hfadj.c,v 1.2 2004/01/11 15:44:05 mroi Exp $ **/ /* High Frequency adjustment */ @@ -37,13 +37,27 @@ #include "sbr_noise.h" + +/* static function delcarations */ +static void map_noise_data(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch); +static void map_sinusoids(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch); +static void estimate_current_envelope(sbr_info *sbr, sbr_hfadj_info *adj, + qmf_t Xsbr[MAX_NTSRHFG][64], uint8_t ch); +static void calculate_gain(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch); +#ifdef SBR_LOW_POWER +static void calc_gain_groups(sbr_info *sbr, sbr_hfadj_info *adj, real_t *deg, uint8_t ch); +static void aliasing_reduction(sbr_info *sbr, sbr_hfadj_info *adj, real_t *deg, uint8_t ch); +#endif +static void hf_assembly(sbr_info *sbr, sbr_hfadj_info *adj, qmf_t Xsbr[MAX_NTSRHFG][64], uint8_t ch); + + void hf_adjustment(sbr_info *sbr, qmf_t Xsbr[MAX_NTSRHFG][64] #ifdef SBR_LOW_POWER ,real_t *deg /* aliasing degree */ #endif ,uint8_t ch) { - ALIGN sbr_hfadj_info adj = {0}; + ALIGN sbr_hfadj_info adj = {{{0}}}; map_noise_data(sbr, &adj, ch); map_sinusoids(sbr, &adj, ch); @@ -267,6 +281,7 @@ static void estimate_current_envelope(sbr_info *sbr, sbr_hfadj_info *adj, #define ONE (1) + static void calculate_gain(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch) { static real_t limGain[] = { 0.5, 1.0, 2.0, 1e10 }; |