summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc_template.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-05-21 12:58:41 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-06-08 13:14:38 -0400
commitd5a7229ba4aabc2b6407c731d9175879ae54c5ea (patch)
tree0596aaae9622f0f7b7e5d689b20ab3dc82f59897 /libavcodec/ac3enc_template.c
parent98db4e2a4e35ccc2406004216270ceaa1c6a7d00 (diff)
Add a float DSP framework to libavutil
Move vector_fmul() from DSPContext to AVFloatDSPContext.
Diffstat (limited to 'libavcodec/ac3enc_template.c')
-rw-r--r--libavcodec/ac3enc_template.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c
index 9427cfe971..6e0a2b6f34 100644
--- a/libavcodec/ac3enc_template.c
+++ b/libavcodec/ac3enc_template.c
@@ -33,7 +33,7 @@
static void scale_coefficients(AC3EncodeContext *s);
-static void apply_window(DSPContext *dsp, SampleType *output,
+static void apply_window(void *dsp, SampleType *output,
const SampleType *input, const SampleType *window,
unsigned int len);
@@ -107,8 +107,13 @@ static void apply_mdct(AC3EncodeContext *s)
AC3Block *block = &s->blocks[blk];
const SampleType *input_samples = &s->planar_samples[ch][blk * AC3_BLOCK_SIZE];
+#if CONFIG_AC3ENC_FLOAT
+ apply_window(&s->fdsp, s->windowed_samples, input_samples,
+ s->mdct_window, AC3_WINDOW_SIZE);
+#else
apply_window(&s->dsp, s->windowed_samples, input_samples,
s->mdct_window, AC3_WINDOW_SIZE);
+#endif
if (s->fixed_point)
block->coeff_shift[ch+1] = normalize_samples(s);