aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/me_cmp.c
diff options
context:
space:
mode:
authorHubert Mazur <hum@semihalf.com>2022-09-20 13:01:56 +0200
committerMartin Storsjö <martin@martin.st>2022-09-21 12:57:56 +0300
commit0ee535b1db392a340a86ce0581dff94624c2da06 (patch)
tree7654c8c760ebdef327a106f729982ef3898b7842 /libavcodec/me_cmp.c
parentacbb2777e28c462d38f774d317e6cd3ad2a0b215 (diff)
downloadffmpeg-0ee535b1db392a340a86ce0581dff94624c2da06.tar.gz
lavc/aarch64: Add neon implementation for pix_median_abs16
Provide optimized implementation for pix_median_abs16 function. Performance comparison tests are shown below. - median_sad_0_c: 720.5 - median_sad_0_neon: 127.2 Benchmarks and tests run with checkasm tool on AWS Graviton 3. Signed-off-by: Hubert Mazur <hum@semihalf.com> Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/me_cmp.c')
-rw-r--r--libavcodec/me_cmp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/me_cmp.c b/libavcodec/me_cmp.c
index 4242fbc6e4..e2f9f84b05 100644
--- a/libavcodec/me_cmp.c
+++ b/libavcodec/me_cmp.c
@@ -1048,6 +1048,9 @@ av_cold void ff_me_cmp_init(MECmpContext *c, AVCodecContext *avctx)
ff_dsputil_init_dwt(c);
#endif
+ c->median_sad[0] = pix_median_abs16_c;
+ c->median_sad[1] = pix_median_abs8_c;
+
#if ARCH_AARCH64
ff_me_cmp_init_aarch64(c, avctx);
#elif ARCH_ALPHA
@@ -1062,6 +1065,4 @@ av_cold void ff_me_cmp_init(MECmpContext *c, AVCodecContext *avctx)
ff_me_cmp_init_mips(c, avctx);
#endif
- c->median_sad[0] = pix_median_abs16_c;
- c->median_sad[1] = pix_median_abs8_c;
}