summaryrefslogtreecommitdiff
path: root/libavcodec/aacenc.h
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2016-10-08 15:59:14 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2016-10-18 21:41:18 +0100
commitd2ae5f77c61a29c3c63cc4c41c74ccfca4167649 (patch)
treebd615f22e6807e025da052c411e12e9a7be0852e /libavcodec/aacenc.h
parent3b02f6dd7be880fd6c1bcaf2fd0c1314dcee7aa6 (diff)
downloadffmpeg-d2ae5f77c61a29c3c63cc4c41c74ccfca4167649.tar.gz
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.h')
-rw-r--r--libavcodec/aacenc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h
index 1ace00d2e0..38a9734994 100644
--- a/libavcodec/aacenc.h
+++ b/libavcodec/aacenc.h
@@ -127,11 +127,17 @@ typedef struct AACEncContext {
uint16_t quantize_band_cost_cache_generation;
AACQuantizeBandCostCacheEntry quantize_band_cost_cache[256][128]; ///< memoization area for quantize_band_cost
+ void (*abs_pow34)(float *out, const float *in, const int size);
+ void (*quant_bands)(int *out, const float *in, const float *scaled,
+ int size, int is_signed, int maxval, const float Q34,
+ const float rounding);
+
struct {
float *samples;
} buffer;
} AACEncContext;
+void ff_aac_dsp_init_x86(AACEncContext *s);
void ff_aac_coder_init_mips(AACEncContext *c);
void ff_quantize_band_cost_cache_init(struct AACEncContext *s);