aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacsbr.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2010-03-13 21:12:10 +0000
committerAlex Converse <alex.converse@gmail.com>2010-03-13 21:12:10 +0000
commitf8a93a2036c8b1d82c39925880e9dad9bbb7c3b5 (patch)
tree079caee644527849fa2393ffd462a506c09f99c5 /libavcodec/aacsbr.c
parent7c074320ba4a16e8d47cc9b3510bd28885b8dd4c (diff)
downloadffmpeg-f8a93a2036c8b1d82c39925880e9dad9bbb7c3b5.tar.gz
aac: Don't bias output during the IMDCT if SBR will be used.
Originally committed as revision 22515 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aacsbr.c')
-rw-r--r--libavcodec/aacsbr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
index 6915152eca..23823aa715 100644
--- a/libavcodec/aacsbr.c
+++ b/libavcodec/aacsbr.c
@@ -1126,14 +1126,14 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
*/
static void sbr_qmf_analysis(DSPContext *dsp, RDFTContext *rdft, const float *in, float *x,
float z[320], float W[2][32][32][2],
- float bias, float scale)
+ float scale)
{
int i, k;
memcpy(W[0], W[1], sizeof(W[0]));
memcpy(x , x+1024, (320-32)*sizeof(x[0]));
- if (scale != 1.0f || bias != 0.0f)
+ if (scale != 1.0f)
for (i = 0; i < 1024; i++)
- x[288 + i] = (in[i] - bias) * scale;
+ x[288 + i] = in[i] * scale;
else
memcpy(x+288, in, 1024*sizeof(*x));
for (i = 0; i < 32; i++) { // numTimeSlots*RATE = 16*2 as 960 sample frames
@@ -1719,7 +1719,7 @@ void ff_sbr_apply(AACContext *ac, SpectralBandReplication *sbr, int ch,
/* decode channel */
sbr_qmf_analysis(&ac->dsp, &sbr->rdft, in, sbr->data[ch].analysis_filterbank_samples,
(float*)sbr->qmf_filter_scratch,
- sbr->data[ch].W, ac->add_bias, 1/(-1024 * ac->sf_scale));
+ sbr->data[ch].W, 1/(-1024 * ac->sf_scale));
sbr_lf_gen(ac, sbr, sbr->X_low, sbr->data[ch].W);
if (sbr->start) {
sbr_hf_inverse_filter(sbr->alpha0, sbr->alpha1, sbr->X_low, sbr->k[0]);