diff options
author | Jonathan Wright <jonathan.wright@arm.com> | 2023-04-12 14:48:21 +0100 |
---|---|---|
committer | Jonathan Wright <jonathan.wright@arm.com> | 2023-04-19 00:57:08 +0100 |
commit | 05b244af52e87ff7dacce78a6db3eab1765e84c8 (patch) | |
tree | eb1a096314ccdb646d2cf8576cc54b25420caeb5 /vpx_dsp | |
parent | 7b7f84fe148168532bbf9add7b738d125588c926 (diff) | |
download | libvpx-05b244af52e87ff7dacce78a6db3eab1765e84c8.tar libvpx-05b244af52e87ff7dacce78a6db3eab1765e84c8.tar.gz libvpx-05b244af52e87ff7dacce78a6db3eab1765e84c8.tar.bz2 libvpx-05b244af52e87ff7dacce78a6db3eab1765e84c8.zip |
Add Neon implementation of vpx_highbd_sad_skip_<w>x<h> functions
Add Neon implementations of high bitdepth downsampling SAD functions
for all block sizes.
Also add corresponding unit tests.
Change-Id: I56ea656e9bb5f8b2aedfdc4637c9ab4e1951b31b
Diffstat (limited to 'vpx_dsp')
-rw-r--r-- | vpx_dsp/arm/highbd_sad_neon.c | 30 | ||||
-rw-r--r-- | vpx_dsp/vpx_dsp_rtcd_defs.pl | 23 |
2 files changed, 43 insertions, 10 deletions
diff --git a/vpx_dsp/arm/highbd_sad_neon.c b/vpx_dsp/arm/highbd_sad_neon.c index 813710040..b99bac66c 100644 --- a/vpx_dsp/arm/highbd_sad_neon.c +++ b/vpx_dsp/arm/highbd_sad_neon.c @@ -179,6 +179,36 @@ HBD_SAD_WXH_NEON(32, 64) HBD_SAD_WXH_NEON(64, 32) HBD_SAD_WXH_NEON(64, 64) +#undef HBD_SAD_WXH_NEON + +#define HBD_SAD_SKIP_WXH_NEON(w, h) \ + unsigned int vpx_highbd_sad_skip_##w##x##h##_neon( \ + const uint8_t *src, int src_stride, const uint8_t *ref, \ + int ref_stride) { \ + return 2 * highbd_sad##w##xh_neon(src, 2 * src_stride, ref, \ + 2 * ref_stride, (h) / 2); \ + } + +HBD_SAD_SKIP_WXH_NEON(4, 4) +HBD_SAD_SKIP_WXH_NEON(4, 8) + +HBD_SAD_SKIP_WXH_NEON(8, 4) +HBD_SAD_SKIP_WXH_NEON(8, 8) +HBD_SAD_SKIP_WXH_NEON(8, 16) + +HBD_SAD_SKIP_WXH_NEON(16, 8) +HBD_SAD_SKIP_WXH_NEON(16, 16) +HBD_SAD_SKIP_WXH_NEON(16, 32) + +HBD_SAD_SKIP_WXH_NEON(32, 16) +HBD_SAD_SKIP_WXH_NEON(32, 32) +HBD_SAD_SKIP_WXH_NEON(32, 64) + +HBD_SAD_SKIP_WXH_NEON(64, 32) +HBD_SAD_SKIP_WXH_NEON(64, 64) + +#undef HBD_SAD_SKIP_WXH_NEON + static INLINE uint32_t highbd_sad4xh_avg_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, diff --git a/vpx_dsp/vpx_dsp_rtcd_defs.pl b/vpx_dsp/vpx_dsp_rtcd_defs.pl index 05d031b8c..7bea73895 100644 --- a/vpx_dsp/vpx_dsp_rtcd_defs.pl +++ b/vpx_dsp/vpx_dsp_rtcd_defs.pl @@ -1068,40 +1068,43 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") { specialize qw/vpx_highbd_sad4x4 neon/; add_proto qw/unsigned int vpx_highbd_sad_skip_64x64/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad_skip_64x64 sse2 avx2/; + specialize qw/vpx_highbd_sad_skip_64x64 neon sse2 avx2/; add_proto qw/unsigned int vpx_highbd_sad_skip_64x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad_skip_64x32 sse2 avx2/; + specialize qw/vpx_highbd_sad_skip_64x32 neon sse2 avx2/; add_proto qw/unsigned int vpx_highbd_sad_skip_32x64/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad_skip_32x64 sse2 avx2/; + specialize qw/vpx_highbd_sad_skip_32x64 neon sse2 avx2/; add_proto qw/unsigned int vpx_highbd_sad_skip_32x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad_skip_32x32 sse2 avx2/; + specialize qw/vpx_highbd_sad_skip_32x32 neon sse2 avx2/; add_proto qw/unsigned int vpx_highbd_sad_skip_32x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad_skip_32x16 sse2 avx2/; + specialize qw/vpx_highbd_sad_skip_32x16 neon sse2 avx2/; add_proto qw/unsigned int vpx_highbd_sad_skip_16x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad_skip_16x32 sse2 avx2/; + specialize qw/vpx_highbd_sad_skip_16x32 neon sse2 avx2/; add_proto qw/unsigned int vpx_highbd_sad_skip_16x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad_skip_16x16 sse2 avx2/; + specialize qw/vpx_highbd_sad_skip_16x16 neon sse2 avx2/; add_proto qw/unsigned int vpx_highbd_sad_skip_16x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad_skip_16x8 sse2 avx2/; + specialize qw/vpx_highbd_sad_skip_16x8 neon sse2 avx2/; add_proto qw/unsigned int vpx_highbd_sad_skip_8x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad_skip_8x16 sse2/; + specialize qw/vpx_highbd_sad_skip_8x16 neon sse2/; add_proto qw/unsigned int vpx_highbd_sad_skip_8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad_skip_8x8 sse2/; + specialize qw/vpx_highbd_sad_skip_8x8 neon sse2/; add_proto qw/unsigned int vpx_highbd_sad_skip_8x4/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/vpx_highbd_sad_skip_8x4 neon/; add_proto qw/unsigned int vpx_highbd_sad_skip_4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/vpx_highbd_sad_skip_4x8 neon/; add_proto qw/unsigned int vpx_highbd_sad_skip_4x4/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/vpx_highbd_sad_skip_4x4 neon/; # # Avg |