aom: disable av1_highbd_warp_affine_neon w/armv7

From 8f8e1e1bdd169997e2e808cad9cdc5bfa0e0b4fe Mon Sep 17 00:00:00 2001
From: James Zern <[EMAIL REDACTED]>
Date: Tue, 25 Jun 2024 15:41:01 -0700
Subject: [PATCH] disable av1_highbd_warp_affine_neon w/armv7

This function causes a SIGBUS.

Bug: aomedia:349455146
Change-Id: If6aed35237c1f78043b7d3207337e6efecc0a847
---
 av1/av1.cmake               | 6 +++++-
 av1/common/av1_rtcd_defs.pl | 7 ++++++-
 test/warp_filter_test.cc    | 5 +++++
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/av1/av1.cmake b/av1/av1.cmake
index bed6ab922..6713f1462 100644
--- a/av1/av1.cmake
+++ b/av1/av1.cmake
@@ -487,8 +487,12 @@ if(CONFIG_AV1_HIGHBITDEPTH)
               "${AOM_ROOT}/av1/common/arm/highbd_convolve_scale_neon.c"
               "${AOM_ROOT}/av1/common/arm/highbd_reconinter_neon.c"
               "${AOM_ROOT}/av1/common/arm/highbd_reconintra_neon.c"
-              "${AOM_ROOT}/av1/common/arm/highbd_warp_plane_neon.c"
               "${AOM_ROOT}/av1/common/arm/highbd_wiener_convolve_neon.c")
+  # TODO(aomedia:349455146): enable this for armv7 after SIGBUS is fixed.
+  if(AOM_ARCH_AARCH64)
+    list(APPEND AOM_AV1_COMMON_INTRIN_NEON
+                "${AOM_ROOT}/av1/common/arm/highbd_warp_plane_neon.c")
+  endif()
 
   list(APPEND AOM_AV1_COMMON_INTRIN_SVE2
               "${AOM_ROOT}/av1/common/arm/highbd_compound_convolve_sve2.c"
diff --git a/av1/common/av1_rtcd_defs.pl b/av1/common/av1_rtcd_defs.pl
index c19c483c1..0dde8b941 100644
--- a/av1/common/av1_rtcd_defs.pl
+++ b/av1/common/av1_rtcd_defs.pl
@@ -534,7 +534,12 @@ ()
 # WARPED_MOTION / GLOBAL_MOTION functions
 if (aom_config("CONFIG_AV1_HIGHBITDEPTH") eq "yes") {
   add_proto qw/void av1_highbd_warp_affine/, "const int32_t *mat, const uint16_t *ref, int width, int height, int stride, uint16_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, int bd, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta";
-  specialize qw/av1_highbd_warp_affine sse4_1 avx2 neon sve/;
+  # TODO(aomedia:349450845): enable NEON for armv7 after SIGBUS is fixed.
+  if (aom_config("AOM_ARCH_ARM") eq "yes" && aom_config("AOM_ARCH_AARCH64") eq "") {
+    specialize qw/av1_highbd_warp_affine sse4_1 avx2 sve/;
+  } else {
+    specialize qw/av1_highbd_warp_affine sse4_1 avx2 neon sve/;
+  }
 }
 
 add_proto qw/bool av1_resize_vert_dir/, "uint8_t *intbuf, uint8_t *output, int out_stride, int height, int height2, int width2, int start_col";
diff --git a/test/warp_filter_test.cc b/test/warp_filter_test.cc
index bade6799b..56e1022dd 100644
--- a/test/warp_filter_test.cc
+++ b/test/warp_filter_test.cc
@@ -72,9 +72,14 @@ INSTANTIATE_TEST_SUITE_P(
     libaom_test::AV1WarpFilter::BuildParams(av1_warp_affine_neon));
 
 #if CONFIG_AV1_HIGHBITDEPTH
+#if AOM_ARCH_AARCH64
+// TODO(aomedia:349455146): enable for armv7 after SIGBUS is fixed.
 INSTANTIATE_TEST_SUITE_P(
     NEON, AV1HighbdWarpFilterTest,
     libaom_test::AV1HighbdWarpFilter::BuildParams(av1_highbd_warp_affine_neon));
+#else   // !AOM_ARCH_AARCH64
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AV1HighbdWarpFilterTest);
+#endif  // AOM_ARCH_AARCH64
 #endif  // CONFIG_AV1_HIGHBITDEPTH
 #endif  // HAVE_NEON