aom: add missing CONFIG_AV1_HIGHBITDEPTH checks

From 34b0b9b2bb75ef9321bb9b3f193d4e453cdf6d95 Mon Sep 17 00:00:00 2001
From: James Zern <[EMAIL REDACTED]>
Date: Tue, 18 Jun 2024 18:22:53 -0700
Subject: [PATCH] add missing CONFIG_AV1_HIGHBITDEPTH checks

This fixes some -Wmissing-prototypes warnings.

Bug: aomedia:3416
Change-Id: I86180d51b0bec015a2bd76bfa3f301ca3a47a40f
---
 aom_dsp/intrapred.c     | 7 +++++++
 aom_dsp/variance.c      | 2 ++
 av1/common/convolve.c   | 2 ++
 av1/common/reconinter.c | 2 ++
 av1/encoder/pickrst.c   | 8 ++++++++
 5 files changed, 21 insertions(+)

diff --git a/aom_dsp/intrapred.c b/aom_dsp/intrapred.c
index 8a9dbae08..a1c48ccb6 100644
--- a/aom_dsp/intrapred.c
+++ b/aom_dsp/intrapred.c
@@ -360,6 +360,8 @@ void aom_dc_predictor_64x32_c(uint8_t *dst, ptrdiff_t stride,
 #undef DC_MULTIPLIER_1X2
 #undef DC_MULTIPLIER_1X4
 
+#if CONFIG_AV1_HIGHBITDEPTH
+
 static INLINE void highbd_v_predictor(uint16_t *dst, ptrdiff_t stride, int bw,
                                       int bh, const uint16_t *above,
                                       const uint16_t *left, int bd) {
@@ -704,6 +706,7 @@ void aom_highbd_dc_predictor_64x32_c(uint16_t *dst, ptrdiff_t stride,
 
 #undef HIGHBD_DC_MULTIPLIER_1X2
 #undef HIGHBD_DC_MULTIPLIER_1X4
+#endif  // CONFIG_AV1_HIGHBITDEPTH
 
 // This serves as a wrapper function, so that all the prediction functions
 // can be unified and accessed as a pointer array. Note that the boundary
@@ -715,12 +718,16 @@ void aom_highbd_dc_predictor_64x32_c(uint16_t *dst, ptrdiff_t stride,
     type##_predictor(dst, stride, width, height, above, left); \
   }
 
+#if CONFIG_AV1_HIGHBITDEPTH
 #define intra_pred_highbd_sized(type, width, height)                        \
   void aom_highbd_##type##_predictor_##width##x##height##_c(                \
       uint16_t *dst, ptrdiff_t stride, const uint16_t *above,               \
       const uint16_t *left, int bd) {                                       \
     highbd_##type##_predictor(dst, stride, width, height, above, left, bd); \
   }
+#else  // !CONFIG_AV1_HIGHBITDEPTH
+#define intra_pred_highbd_sized(type, width, height)
+#endif  // CONFIG_AV1_HIGHBITDEPTH
 
 /* clang-format off */
 #define intra_pred_rectangular(type) \
diff --git a/aom_dsp/variance.c b/aom_dsp/variance.c
index 27587cd1f..7d64b6300 100644
--- a/aom_dsp/variance.c
+++ b/aom_dsp/variance.c
@@ -1216,6 +1216,7 @@ uint64_t aom_mse_16xh_16bit_c(uint8_t *dst, int dstride, uint16_t *src, int w,
   return sum;
 }
 
+#if CONFIG_AV1_HIGHBITDEPTH
 uint64_t aom_mse_wxh_16bit_highbd_c(uint16_t *dst, int dstride, uint16_t *src,
                                     int sstride, int w, int h) {
   uint64_t sum = 0;
@@ -1227,3 +1228,4 @@ uint64_t aom_mse_wxh_16bit_highbd_c(uint16_t *dst, int dstride, uint16_t *src,
   }
   return sum;
 }
+#endif  // CONFIG_AV1_HIGHBITDEPTH
diff --git a/av1/common/convolve.c b/av1/common/convolve.c
index 3203e31c8..92c2e2a0d 100644
--- a/av1/common/convolve.c
+++ b/av1/common/convolve.c
@@ -48,6 +48,7 @@ void av1_convolve_horiz_rs_c(const uint8_t *src, int src_stride, uint8_t *dst,
   }
 }
 
+#if CONFIG_AV1_HIGHBITDEPTH
 void av1_highbd_convolve_horiz_rs_c(const uint16_t *src, int src_stride,
                                     uint16_t *dst, int dst_stride, int w, int h,
                                     const int16_t *x_filters, int x0_qn,
@@ -72,6 +73,7 @@ void av1_highbd_convolve_horiz_rs_c(const uint16_t *src, int src_stride,
     dst += dst_stride;
   }
 }
+#endif  // CONFIG_AV1_HIGHBITDEPTH
 
 void av1_convolve_2d_sr_c(const uint8_t *src, int src_stride, uint8_t *dst,
                           int dst_stride, int w, int h,
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c
index d4d5f9848..418ed75ba 100644
--- a/av1/common/reconinter.c
+++ b/av1/common/reconinter.c
@@ -358,6 +358,7 @@ void av1_build_compound_diffwtd_mask_c(uint8_t *mask,
   }
 }
 
+#if CONFIG_AV1_HIGHBITDEPTH
 static AOM_FORCE_INLINE void diffwtd_mask_highbd(
     uint8_t *mask, int which_inverse, int mask_base, const uint16_t *src0,
     int src0_stride, const uint16_t *src1, int src1_stride, int h, int w,
@@ -437,6 +438,7 @@ void av1_build_compound_diffwtd_mask_highbd_c(
     default: assert(0);
   }
 }
+#endif  // CONFIG_AV1_HIGHBITDEPTH
 
 static AOM_INLINE void init_wedge_master_masks(void) {
   int i, j;
diff --git a/av1/encoder/pickrst.c b/av1/encoder/pickrst.c
index d35848fa5..3bb6e6ba6 100644
--- a/av1/encoder/pickrst.c
+++ b/av1/encoder/pickrst.c
@@ -498,6 +498,7 @@ static AOM_INLINE void calc_proj_params_r0_r1_c(
   C[1] /= size;
 }
 
+#if CONFIG_AV1_HIGHBITDEPTH
 static AOM_INLINE void calc_proj_params_r0_r1_high_bd_c(
     const uint8_t *src8, int width, int height, int src_stride,
     const uint8_t *dat8, int dat_stride, int32_t *flt0, int flt0_stride,
@@ -526,6 +527,7 @@ static AOM_INLINE void calc_proj_params_r0_r1_high_bd_c(
   C[0] /= size;
   C[1] /= size;
 }
+#endif  // CONFIG_AV1_HIGHBITDEPTH
 
 static AOM_INLINE void calc_proj_params_r0_c(const uint8_t *src8, int width,
                                              int height, int src_stride,
@@ -550,6 +552,7 @@ static AOM_INLINE void calc_proj_params_r0_c(const uint8_t *src8, int width,
   C[0] /= size;
 }
 
+#if CONFIG_AV1_HIGHBITDEPTH
 static AOM_INLINE void calc_proj_params_r0_high_bd_c(
     const uint8_t *src8, int width, int height, int src_stride,
     const uint8_t *dat8, int dat_stride, int32_t *flt0, int flt0_stride,
@@ -570,6 +573,7 @@ static AOM_INLINE void calc_proj_params_r0_high_bd_c(
   H[0][0] /= size;
   C[0] /= size;
 }
+#endif  // CONFIG_AV1_HIGHBITDEPTH
 
 static AOM_INLINE void calc_proj_params_r1_c(const uint8_t *src8, int width,
                                              int height, int src_stride,
@@ -594,6 +598,7 @@ static AOM_INLINE void calc_proj_params_r1_c(const uint8_t *src8, int width,
   C[1] /= size;
 }
 
+#if CONFIG_AV1_HIGHBITDEPTH
 static AOM_INLINE void calc_proj_params_r1_high_bd_c(
     const uint8_t *src8, int width, int height, int src_stride,
     const uint8_t *dat8, int dat_stride, int32_t *flt1, int flt1_stride,
@@ -614,6 +619,7 @@ static AOM_INLINE void calc_proj_params_r1_high_bd_c(
   H[1][1] /= size;
   C[1] /= size;
 }
+#endif  // CONFIG_AV1_HIGHBITDEPTH
 
 // The function calls 3 subfunctions for the following cases :
 // 1) When params->r[0] > 0 and params->r[1] > 0. In this case all elements
@@ -639,6 +645,7 @@ void av1_calc_proj_params_c(const uint8_t *src8, int width, int height,
   }
 }
 
+#if CONFIG_AV1_HIGHBITDEPTH
 void av1_calc_proj_params_high_bd_c(const uint8_t *src8, int width, int height,
                                     int src_stride, const uint8_t *dat8,
                                     int dat_stride, int32_t *flt0,
@@ -658,6 +665,7 @@ void av1_calc_proj_params_high_bd_c(const uint8_t *src8, int width, int height,
                                   dat_stride, flt1, flt1_stride, H, C);
   }
 }
+#endif  // CONFIG_AV1_HIGHBITDEPTH
 
 static AOM_INLINE void get_proj_subspace(const uint8_t *src8, int width,
                                          int height, int src_stride,