summaryrefslogtreecommitdiff
path: root/libavcodec/aacsbr.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-01-27 15:20:43 +0000
committerMichael Niedermayer <michaelni@gmx.at>2011-01-28 03:15:35 +0100
commit733dbe7d18c267728ef03762d83e9e1b086668cd (patch)
tree41345c1989e46631e4209c3b09206b0fd45bc54a /libavcodec/aacsbr.c
parent2f7d8977bcdeb2c39fd9acbd753d605298824db8 (diff)
downloadffmpeg-733dbe7d18c267728ef03762d83e9e1b086668cd.tar.gz
Remove the add bias hack for the C version of DSPContext.float_to_int16_*().
(cherry picked from commit 9d06d7bce3babb82ed650c13ed13a57f6f626a71)
Diffstat (limited to 'libavcodec/aacsbr.c')
-rw-r--r--libavcodec/aacsbr.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
index 050305a3fe..9b10bf25fe 100644
--- a/libavcodec/aacsbr.c
+++ b/libavcodec/aacsbr.c
@@ -1175,12 +1175,10 @@ static void sbr_qmf_analysis(DSPContext *dsp, FFTContext *mdct, const float *in,
static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct,
float *out, float X[2][38][64],
float mdct_buf[2][64],
- float *v0, int *v_off, const unsigned int div,
- float bias, float scale)
+ float *v0, int *v_off, const unsigned int div)
{
int i, n;
const float *sbr_qmf_window = div ? sbr_qmf_window_ds : sbr_qmf_window_us;
- int scale_and_bias = scale != 1.0f || bias != 0.0f;
float *v;
for (i = 0; i < 32; i++) {
if (*v_off == 0) {
@@ -1222,9 +1220,6 @@ static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct,
dsp->vector_fmul_add(out, v + ( 960 >> div), sbr_qmf_window + (448 >> div), out , 64 >> div);
dsp->vector_fmul_add(out, v + (1024 >> div), sbr_qmf_window + (512 >> div), out , 64 >> div);
dsp->vector_fmul_add(out, v + (1216 >> div), sbr_qmf_window + (576 >> div), out , 64 >> div);
- if (scale_and_bias)
- for (n = 0; n < 64 >> div; n++)
- out[n] = out[n] * scale + bias;
out += 64 >> div;
}
}
@@ -1760,12 +1755,10 @@ void ff_sbr_apply(AACContext *ac, SpectralBandReplication *sbr, int id_aac,
sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, L, sbr->X[0], sbr->qmf_filter_scratch,
sbr->data[0].synthesis_filterbank_samples,
&sbr->data[0].synthesis_filterbank_samples_offset,
- downsampled,
- ac->add_bias, -1024 * ac->sf_scale);
+ downsampled);
if (nch == 2)
sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, R, sbr->X[1], sbr->qmf_filter_scratch,
sbr->data[1].synthesis_filterbank_samples,
&sbr->data[1].synthesis_filterbank_samples_offset,
- downsampled,
- ac->add_bias, -1024 * ac->sf_scale);
+ downsampled);
}