summaryrefslogtreecommitdiff
path: root/src/libfaad/sbr_hfadj.c
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2004-01-11 15:44:04 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2004-01-11 15:44:04 +0000
commitba65efaad16ddd1347de7af98f9494cee7a39419 (patch)
tree630d2e9b4581f45cbe85815ec881705be9cc045b /src/libfaad/sbr_hfadj.c
parent14019fd4a433078fb4466e910cd432489dd60bbc (diff)
downloadxine-lib-ba65efaad16ddd1347de7af98f9494cee7a39419.tar.gz
xine-lib-ba65efaad16ddd1347de7af98f9494cee7a39419.tar.bz2
the faad project accepted a huge compiler warning patch I sent them,
merging their CVS back to our copy everyone please check, if your AAC samples still work CVS patchset: 6024 CVS date: 2004/01/11 15:44:04
Diffstat (limited to 'src/libfaad/sbr_hfadj.c')
-rw-r--r--src/libfaad/sbr_hfadj.c21
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 };