aom: disable av1_filter_intra_predictor_neon w/armv7

From 110978ffa5ef0520406f7f922dbea300488aa468 Mon Sep 17 00:00:00 2001
From: James Zern <[EMAIL REDACTED]>
Date: Tue, 25 Jun 2024 14:05:41 -0700
Subject: [PATCH] disable av1_filter_intra_predictor_neon w/armv7

This function causes a SIGBUS.

Bug: aomedia:349436249
Change-Id: I1578921ff352df2a3be97af1384444f7042da843
---
 av1/common/arm/reconintra_neon.c | 4 ++++
 av1/common/av1_rtcd_defs.pl      | 7 ++++++-
 test/filterintra_test.cc         | 5 +++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/av1/common/arm/reconintra_neon.c b/av1/common/arm/reconintra_neon.c
index a9b52d778..81eb22453 100644
--- a/av1/common/arm/reconintra_neon.c
+++ b/av1/common/arm/reconintra_neon.c
@@ -21,6 +21,9 @@
 
 #define MAX_UPSAMPLE_SZ 16
 
+// TODO(aomedia:349436249): enable for armv7 after SIGBUS is fixed.
+#if AOM_ARCH_AARCH64
+
 // These kernels are a transposed version of those defined in reconintra.c,
 // with the absolute value of the negatives taken in the top row.
 DECLARE_ALIGNED(16, const uint8_t,
@@ -209,6 +212,7 @@ void av1_filter_intra_predictor_neon(uint8_t *dst, ptrdiff_t stride,
     } while (r < height + 1);
   }
 }
+#endif  // AOM_ARCH_AARCH64
 
 void av1_filter_intra_edge_neon(uint8_t *p, int sz, int strength) {
   if (!strength) return;
diff --git a/av1/common/av1_rtcd_defs.pl b/av1/common/av1_rtcd_defs.pl
index 86f83a69e..e9f6cbc61 100644
--- a/av1/common/av1_rtcd_defs.pl
+++ b/av1/common/av1_rtcd_defs.pl
@@ -126,7 +126,12 @@ ()
 
 # FILTER_INTRA predictor functions
 add_proto qw/void av1_filter_intra_predictor/, "uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint8_t *above, const uint8_t *left, int mode";
-specialize qw/av1_filter_intra_predictor sse4_1 neon/;
+# TODO(aomedia:349436249): 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_filter_intra_predictor sse4_1/;
+} else {
+  specialize qw/av1_filter_intra_predictor sse4_1 neon/;
+}
 
 # High bitdepth functions
 
diff --git a/test/filterintra_test.cc b/test/filterintra_test.cc
index 5d9b839c1..1d6c7f798 100644
--- a/test/filterintra_test.cc
+++ b/test/filterintra_test.cc
@@ -171,6 +171,8 @@ INSTANTIATE_TEST_SUITE_P(
 #endif  // HAVE_SSE4_1
 
 #if HAVE_NEON
+// TODO(aomedia:349436249): enable for armv7 after SIGBUS is fixed.
+#if AOM_ARCH_AARCH64
 const PredFuncMode kPredFuncMdArrayNEON[] = {
   make_tuple(&av1_filter_intra_predictor_c, &av1_filter_intra_predictor_neon,
              FILTER_DC_PRED),
@@ -192,6 +194,9 @@ INSTANTIATE_TEST_SUITE_P(
     NEON, AV1FilterIntraPredTest,
     ::testing::Combine(::testing::ValuesIn(kPredFuncMdArrayNEON),
                        ::testing::ValuesIn(kTxSizeNEON)));
+#else   // !AOM_ARCH_AARCH64
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AV1FilterIntraPredTest);
+#endif  // AOM_ARCH_AARCH64
 #endif  // HAVE_NEON
 
 }  // namespace