From d2ae5f77c61a29c3c63cc4c41c74ccfca4167649 Mon Sep 17 00:00:00 2001 From: Rostislav Pehlivanov Date: Sat, 8 Oct 2016 15:59:14 +0100 Subject: aacenc: add SIMD optimizations for abs_pow34 and quantization Performance improvements: quant_bands: with: 681 decicycles in quant_bands, 8388453 runs, 155 skips without: 1190 decicycles in quant_bands, 8388386 runs, 222 skips Around 42% for the function Twoloop coder: abs_pow34: with/without: 7.82s/8.17s Around 4% for the entire encoder Both: with/without: 7.15s/8.17s Around 12% for the entire encoder Fast coder: abs_pow34: with/without: 3.40s/3.77s Around 10% for the entire encoder Both: with/without: 3.02s/3.77s Around 20% faster for the entire encoder Signed-off-by: Rostislav Pehlivanov Tested-by: Michael Niedermayer Reviewed-by: James Almer --- libavcodec/aacenc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libavcodec/aacenc.c') diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index ee3cbf80b0..363ed0537b 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -1033,6 +1033,12 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) ff_lpc_init(&s->lpc, 2*avctx->frame_size, TNS_MAX_ORDER, FF_LPC_TYPE_LEVINSON); s->random_state = 0x1f2e3d4c; + s->abs_pow34 = abs_pow34_v; + s->quant_bands = quantize_bands; + + if (ARCH_X86) + ff_aac_dsp_init_x86(s); + if (HAVE_MIPSDSP) ff_aac_coder_init_mips(s); -- cgit v1.2.3