diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2016-10-08 17:59:14 +0300 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2016-10-18 23:41:18 +0300 |
commit | d2ae5f77c61a29c3c63cc4c41c74ccfca4167649 (patch) | |
tree | bd615f22e6807e025da052c411e12e9a7be0852e /libavcodec/aacenc_quantization.h | |
parent | 3b02f6dd7be880fd6c1bcaf2fd0c1314dcee7aa6 (diff) |
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 <atomnuker@gmail.com>
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/aacenc_quantization.h')
-rw-r--r-- | libavcodec/aacenc_quantization.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/aacenc_quantization.h b/libavcodec/aacenc_quantization.h index 425040748c..fc5a46b875 100644 --- a/libavcodec/aacenc_quantization.h +++ b/libavcodec/aacenc_quantization.h @@ -74,10 +74,10 @@ static av_always_inline float quantize_and_encode_band_cost_template( return cost * lambda; } if (!scaled) { - abs_pow34_v(s->scoefs, in, size); + s->abs_pow34(s->scoefs, in, size); scaled = s->scoefs; } - quantize_bands(s->qcoefs, in, scaled, size, Q34, !BT_UNSIGNED, aac_cb_maxval[cb], ROUNDING); + s->quant_bands(s->qcoefs, in, scaled, size, !BT_UNSIGNED, aac_cb_maxval[cb], Q34, ROUNDING); if (BT_UNSIGNED) { off = 0; } else { |