summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc_template.c
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2021-01-09 17:27:16 +0100
committerLynne <dev@lynne.ee>2021-01-14 01:44:18 +0100
commit238b2d4155d9779d770fccb3594076bb32742c82 (patch)
tree22c9e2e26fe214cf508bbc248f64b539b726e6e6 /libavcodec/ac3enc_template.c
parent784c08af3005390cb1d74add13b58edf1663cd40 (diff)
ac3enc: halve the MDCT window size by using vector_fmul_reverse
This brings the encoder in-line with the rest of ours and saves on a bit of memory.
Diffstat (limited to 'libavcodec/ac3enc_template.c')
-rw-r--r--libavcodec/ac3enc_template.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c
index 4f1e181e0b..5ecef3b178 100644
--- a/libavcodec/ac3enc_template.c
+++ b/libavcodec/ac3enc_template.c
@@ -92,7 +92,10 @@ static void apply_mdct(AC3EncodeContext *s)
const SampleType *input_samples = &s->planar_samples[ch][blk * AC3_BLOCK_SIZE];
s->fdsp->vector_fmul(s->windowed_samples, input_samples,
- s->mdct_window, AC3_WINDOW_SIZE);
+ s->mdct_window, AC3_BLOCK_SIZE);
+ s->fdsp->vector_fmul_reverse(s->windowed_samples + AC3_BLOCK_SIZE,
+ &input_samples[AC3_BLOCK_SIZE],
+ s->mdct_window, AC3_BLOCK_SIZE);
s->mdct.mdct_calc(&s->mdct, block->mdct_coef[ch+1],
s->windowed_samples);