summaryrefslogtreecommitdiff
path: root/libavcodec/aacenc_is.c
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_is.c
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_is.c')
-rw-r--r--libavcodec/aacenc_is.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/aacenc_is.c b/libavcodec/aacenc_is.c
index 473897b1d0..2f5b7eb8dc 100644
--- a/libavcodec/aacenc_is.c
+++ b/libavcodec/aacenc_is.c
@@ -59,9 +59,9 @@ struct AACISError ff_aac_is_encoding_err(AACEncContext *s, ChannelElement *cpe,
float minthr = FFMIN(band0->threshold, band1->threshold);
for (i = 0; i < sce0->ics.swb_sizes[g]; i++)
IS[i] = (L[start+(w+w2)*128+i] + phase*R[start+(w+w2)*128+i])*sqrt(ener0/ener01);
- abs_pow34_v(L34, &L[start+(w+w2)*128], sce0->ics.swb_sizes[g]);
- abs_pow34_v(R34, &R[start+(w+w2)*128], sce0->ics.swb_sizes[g]);
- abs_pow34_v(I34, IS, sce0->ics.swb_sizes[g]);
+ s->abs_pow34(L34, &L[start+(w+w2)*128], sce0->ics.swb_sizes[g]);
+ s->abs_pow34(R34, &R[start+(w+w2)*128], sce0->ics.swb_sizes[g]);
+ s->abs_pow34(I34, IS, sce0->ics.swb_sizes[g]);
maxval = find_max_val(1, sce0->ics.swb_sizes[g], I34);
is_band_type = find_min_book(maxval, is_sf_idx);
dist1 += quantize_band_cost(s, &L[start + (w+w2)*128], L34,