aom: *_neon.c: add missing rtcd includes & CONFIG check

From b44333201ba1d792c3bcb70603d730925d5f748a Mon Sep 17 00:00:00 2001
From: James Zern <[EMAIL REDACTED]>
Date: Fri, 3 May 2024 15:54:22 -0700
Subject: [PATCH] *_neon.c: add missing rtcd includes & CONFIG check

fixes some -Wmissing-prototypes warnings.

Bug: aomedia:3416
Change-Id: Ia4f30b2d061b8c03ac0c0dac40d7fc4004705125
---
 aom_dsp/arm/fwd_txfm_neon.c             | 3 +++
 aom_dsp/arm/highbd_quantize_neon.c      | 1 +
 aom_dsp/arm/intrapred_neon.c            | 1 +
 aom_dsp/arm/subtract_neon.c             | 1 +
 av1/common/arm/highbd_reconintra_neon.c | 1 +
 av1/common/arm/reconintra_neon.c        | 1 +
 av1/common/arm/resize_neon.c            | 1 +
 av1/encoder/arm/av1_error_neon.c        | 3 ++-
 av1/encoder/arm/av1_k_means_neon.c      | 2 +-
 av1/encoder/arm/hash_arm_crc32.c        | 1 +
 av1/encoder/arm/hybrid_fwd_txfm_neon.c  | 1 +
 11 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/aom_dsp/arm/fwd_txfm_neon.c b/aom_dsp/arm/fwd_txfm_neon.c
index a4d6322f24..c87acfb86f 100644
--- a/aom_dsp/arm/fwd_txfm_neon.c
+++ b/aom_dsp/arm/fwd_txfm_neon.c
@@ -12,6 +12,7 @@
 #include <arm_neon.h>
 
 #include "config/aom_config.h"
+#include "config/aom_dsp_rtcd.h"
 
 #include "aom_dsp/txfm_common.h"
 #include "aom_dsp/arm/mem_neon.h"
@@ -115,6 +116,7 @@ void aom_fdct4x4_lp_neon(const int16_t *input, int16_t *final_output,
   vst1q_s16(final_output + 1 * 8, out_23);
 }
 
+#if CONFIG_INTERNAL_STATS
 void aom_fdct8x8_neon(const int16_t *input, int16_t *final_output, int stride) {
   // stage 1
   int16x8_t input_0 = vshlq_n_s16(vld1q_s16(&input[0 * stride]), 2);
@@ -302,3 +304,4 @@ void aom_fdct8x8_neon(const int16_t *input, int16_t *final_output, int stride) {
     vst1q_s16(&final_output[7 * 8], input_7);
   }
 }
+#endif  // CONFIG_INTERNAL_STATS
diff --git a/aom_dsp/arm/highbd_quantize_neon.c b/aom_dsp/arm/highbd_quantize_neon.c
index 6149c9f13e..b3514296af 100644
--- a/aom_dsp/arm/highbd_quantize_neon.c
+++ b/aom_dsp/arm/highbd_quantize_neon.c
@@ -14,6 +14,7 @@
 #include <string.h>
 
 #include "config/aom_config.h"
+#include "config/aom_dsp_rtcd.h"
 
 #include "aom_dsp/quantize.h"
 
diff --git a/aom_dsp/arm/intrapred_neon.c b/aom_dsp/arm/intrapred_neon.c
index c3716b3a78..55d7eb13a7 100644
--- a/aom_dsp/arm/intrapred_neon.c
+++ b/aom_dsp/arm/intrapred_neon.c
@@ -15,6 +15,7 @@
 
 #include "config/aom_config.h"
 #include "config/aom_dsp_rtcd.h"
+#include "config/av1_rtcd.h"
 
 #include "aom/aom_integer.h"
 #include "aom_dsp/arm/mem_neon.h"
diff --git a/aom_dsp/arm/subtract_neon.c b/aom_dsp/arm/subtract_neon.c
index a195c40d19..01ae835be0 100644
--- a/aom_dsp/arm/subtract_neon.c
+++ b/aom_dsp/arm/subtract_neon.c
@@ -12,6 +12,7 @@
 #include <arm_neon.h>
 
 #include "config/aom_config.h"
+#include "config/aom_dsp_rtcd.h"
 
 #include "aom/aom_integer.h"
 #include "aom_ports/mem.h"
diff --git a/av1/common/arm/highbd_reconintra_neon.c b/av1/common/arm/highbd_reconintra_neon.c
index 170491b504..8fd4a9941f 100644
--- a/av1/common/arm/highbd_reconintra_neon.c
+++ b/av1/common/arm/highbd_reconintra_neon.c
@@ -13,6 +13,7 @@
 #include <assert.h>
 
 #include "aom_dsp/arm/sum_neon.h"
+#include "config/av1_rtcd.h"
 
 #define MAX_UPSAMPLE_SZ 16
 
diff --git a/av1/common/arm/reconintra_neon.c b/av1/common/arm/reconintra_neon.c
index 3db39987a6..d31c4a9443 100644
--- a/av1/common/arm/reconintra_neon.c
+++ b/av1/common/arm/reconintra_neon.c
@@ -13,6 +13,7 @@
 #include <assert.h>
 
 #include "config/aom_config.h"
+#include "config/av1_rtcd.h"
 
 #include "aom/aom_integer.h"
 #include "aom_dsp/arm/mem_neon.h"
diff --git a/av1/common/arm/resize_neon.c b/av1/common/arm/resize_neon.c
index b00ebd1fc2..a6d4b62964 100644
--- a/av1/common/arm/resize_neon.c
+++ b/av1/common/arm/resize_neon.c
@@ -16,6 +16,7 @@
 #include "aom_dsp/arm/transpose_neon.h"
 #include "av1/common/resize.h"
 #include "config/av1_rtcd.h"
+#include "config/aom_dsp_rtcd.h"
 #include "config/aom_scale_rtcd.h"
 
 static INLINE int16x4_t convolve8_4(const int16x4_t s0, const int16x4_t s1,
diff --git a/av1/encoder/arm/av1_error_neon.c b/av1/encoder/arm/av1_error_neon.c
index 26d06b46fe..1d4299fec9 100644
--- a/av1/encoder/arm/av1_error_neon.c
+++ b/av1/encoder/arm/av1_error_neon.c
@@ -13,6 +13,7 @@
 #include <assert.h>
 
 #include "config/aom_config.h"
+#include "config/av1_rtcd.h"
 
 #include "aom_dsp/aom_dsp_common.h"
 #include "aom_dsp/arm/mem_neon.h"
@@ -63,7 +64,7 @@ int64_t av1_block_error_neon(const tran_low_t *coeff, const tran_low_t *dqcoeff,
 }
 
 int64_t av1_block_error_lp_neon(const int16_t *coeff, const int16_t *dqcoeff,
-                                int block_size) {
+                                intptr_t block_size) {
   uint64x2_t err_u64 = vdupq_n_u64(0);
 
   assert(block_size >= 16);
diff --git a/av1/encoder/arm/av1_k_means_neon.c b/av1/encoder/arm/av1_k_means_neon.c
index d13cc65ae0..586376970f 100644
--- a/av1/encoder/arm/av1_k_means_neon.c
+++ b/av1/encoder/arm/av1_k_means_neon.c
@@ -12,7 +12,7 @@
 
 #include "aom_dsp/arm/sum_neon.h"
 #include "config/aom_config.h"
-#include "config/aom_dsp_rtcd.h"
+#include "config/av1_rtcd.h"
 
 static int32x4_t k_means_multiply_add_neon(const int16x8_t a) {
   const int32x4_t l = vmull_s16(vget_low_s16(a), vget_low_s16(a));
diff --git a/av1/encoder/arm/hash_arm_crc32.c b/av1/encoder/arm/hash_arm_crc32.c
index 91fc1e00a5..6417839ede 100644
--- a/av1/encoder/arm/hash_arm_crc32.c
+++ b/av1/encoder/arm/hash_arm_crc32.c
@@ -19,6 +19,7 @@
 #include <stdint.h>
 
 #include "config/aom_config.h"
+#include "config/av1_rtcd.h"
 
 #define CRC_LOOP(op, crc, type, buf, len) \
   while ((len) >= sizeof(type)) {         \
diff --git a/av1/encoder/arm/hybrid_fwd_txfm_neon.c b/av1/encoder/arm/hybrid_fwd_txfm_neon.c
index 6cf835a243..1d83bec168 100644
--- a/av1/encoder/arm/hybrid_fwd_txfm_neon.c
+++ b/av1/encoder/arm/hybrid_fwd_txfm_neon.c
@@ -12,6 +12,7 @@
 #include <arm_neon.h>
 
 #include "aom_dsp/txfm_common.h"
+#include "config/av1_rtcd.h"
 
 static void transpose4x4(int16x8_t in[2], int16x4_t out[4]) {
   int32x4x2_t b0 =