summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-09-14 19:31:00 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-09-14 19:31:00 +0000
commitc8da311de4224e48da5099bc9adec046710f75c6 (patch)
tree207f995e37633bb58bf97e3a7d41f38c87b4ceb4
parente98ee2d696a90042756b98aa2585e33e5e536725 (diff)
downloadrockbox-c8da311de4224e48da5099bc9adec046710f75c6.tar.gz
rockbox-c8da311de4224e48da5099bc9adec046710f75c6.tar.bz2
rockbox-c8da311de4224e48da5099bc9adec046710f75c6.zip
Fix scaling error that was introduced with r28069. With this fix the level of the hf-spectrum will be correct when decoding aac-he files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28081 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/libfaad/sbr_hfadj.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/codecs/libfaad/sbr_hfadj.c b/apps/codecs/libfaad/sbr_hfadj.c
index ab712dcd45..4984eaf1c4 100644
--- a/apps/codecs/libfaad/sbr_hfadj.c
+++ b/apps/codecs/libfaad/sbr_hfadj.c
@@ -156,10 +156,10 @@ static void estimate_current_envelope(sbr_info *sbr, sbr_hfadj_info *adj,
for (i = l_i + sbr->tHFAdj; i < u_i + sbr->tHFAdj; i++)
{
tmp = QMF_RE(Xsbr[i][m + sbr->kx]);
- nrg += MUL_R(tmp, tmp);
+ nrg += MUL_R(tmp, (tmp>>REAL_BITS));
#ifndef SBR_LOW_POWER
tmp = QMF_IM(Xsbr[i][m + sbr->kx]);
- nrg += MUL_R(tmp, tmp);
+ nrg += MUL_R(tmp, (tmp>>REAL_BITS));
#endif
}
@@ -192,10 +192,10 @@ static void estimate_current_envelope(sbr_info *sbr, sbr_hfadj_info *adj,
for (j = k_l; j < k_h; j++)
{
tmp = QMF_RE(Xsbr[i][j]);
- nrg += MUL_R(tmp, tmp);
+ nrg += MUL_R(tmp, (tmp>>REAL_BITS));
#ifndef SBR_LOW_POWER
tmp = QMF_IM(Xsbr[i][j]);
- nrg += MUL_R(tmp, tmp);
+ nrg += MUL_R(tmp, (tmp>>REAL_BITS));
#endif
}
}