summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc_fixed.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-03-20 13:31:36 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-03-22 21:08:30 -0400
commite6e9823488b4cf42778411f1239592f0787e121e (patch)
treedcdb0a902e921957a3e0b912c56a73d7fb67422d /libavcodec/ac3enc_fixed.c
parente971d81364e93feae8c399075a3be2643192e031 (diff)
Add apply_window_int16() to DSPContext with x86-optimized versions and use it
in the ac3_fixed encoder.
Diffstat (limited to 'libavcodec/ac3enc_fixed.c')
-rw-r--r--libavcodec/ac3enc_fixed.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c
index c3c7a63371..46f52e504a 100644
--- a/libavcodec/ac3enc_fixed.c
+++ b/libavcodec/ac3enc_fixed.c
@@ -252,15 +252,9 @@ static void mdct512(AC3MDCTContext *mdct, int32_t *out, int16_t *in)
* Apply KBD window to input samples prior to MDCT.
*/
static void apply_window(DSPContext *dsp, int16_t *output, const int16_t *input,
- const int16_t *window, int n)
+ const int16_t *window, unsigned int len)
{
- int i;
- int n2 = n >> 1;
-
- for (i = 0; i < n2; i++) {
- output[i] = MUL16(input[i], window[i]) >> 15;
- output[n-i-1] = MUL16(input[n-i-1], window[i]) >> 15;
- }
+ dsp->apply_window_int16(output, input, window, len);
}