Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2016-10-08 17:59:14 +0300
committerRostislav Pehlivanov <atomnuker@gmail.com>2016-10-18 23:41:18 +0300
commitd2ae5f77c61a29c3c63cc4c41c74ccfca4167649 (patch)
treebd615f22e6807e025da052c411e12e9a7be0852e /libavcodec/aacenc_pred.c
parent3b02f6dd7be880fd6c1bcaf2fd0c1314dcee7aa6 (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_pred.c')
-rw-r--r--libavcodec/aacenc_pred.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/aacenc_pred.c b/libavcodec/aacenc_pred.c
index e77a3de987..d111192f06 100644
--- a/libavcodec/aacenc_pred.c
+++ b/libavcodec/aacenc_pred.c
@@ -270,7 +270,7 @@ void ff_aac_search_for_pred(AACEncContext *s, SingleChannelElement *sce)
continue;
/* Normal coefficients */
- abs_pow34_v(O34, &sce->coeffs[start_coef], num_coeffs);
+ s->abs_pow34(O34, &sce->coeffs[start_coef], num_coeffs);
dist1 = quantize_and_encode_band_cost(s, NULL, &sce->coeffs[start_coef], NULL,
O34, num_coeffs, sce->sf_idx[sfb],
cb_n, s->lambda / band->threshold, INFINITY, &cost1, NULL, 0);
@@ -279,7 +279,7 @@ void ff_aac_search_for_pred(AACEncContext *s, SingleChannelElement *sce)
/* Encoded coefficients - needed for #bits, band type and quant. error */
for (i = 0; i < num_coeffs; i++)
SENT[i] = sce->coeffs[start_coef + i] - sce->prcoeffs[start_coef + i];
- abs_pow34_v(S34, SENT, num_coeffs);
+ s->abs_pow34(S34, SENT, num_coeffs);
if (cb_n < RESERVED_BT)
cb_p = av_clip(find_min_book(find_max_val(1, num_coeffs, S34), sce->sf_idx[sfb]), cb_min, cb_max);
else
@@ -291,7 +291,7 @@ void ff_aac_search_for_pred(AACEncContext *s, SingleChannelElement *sce)
/* Reconstructed coefficients - needed for distortion measurements */
for (i = 0; i < num_coeffs; i++)
sce->prcoeffs[start_coef + i] += QERR[i] != 0.0f ? (sce->prcoeffs[start_coef + i] - QERR[i]) : 0.0f;
- abs_pow34_v(P34, &sce->prcoeffs[start_coef], num_coeffs);
+ s->abs_pow34(P34, &sce->prcoeffs[start_coef], num_coeffs);
if (cb_n < RESERVED_BT)
cb_p = av_clip(find_min_book(find_max_val(1, num_coeffs, P34), sce->sf_idx[sfb]), cb_min, cb_max);
else