aom: test/*.cc: make some functions static

From 4e1a5d4d08a216d71ecee10c25736abb2ffc2cdc Mon Sep 17 00:00:00 2001
From: James Zern <[EMAIL REDACTED]>
Date: Tue, 28 May 2024 16:37:13 -0700
Subject: [PATCH] test/*.cc: make some functions static

Fixes some -Wmissing-prototypes warnings.

Bug: aomedia:3416
Change-Id: I680a7cfe59bb0f6a275942b05b857c053dc62360
---
 test/av1_txfm_test.cc         |  4 ++--
 test/film_grain_table_test.cc |  4 ++++
 test/scan_test.cc             |  4 ++--
 test/warp_filter_test_util.cc |  3 +++
 test/wiener_test.cc           | 21 +++++++++++----------
 5 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/test/av1_txfm_test.cc b/test/av1_txfm_test.cc
index 77c0ec1071..23e260b32d 100644
--- a/test/av1_txfm_test.cc
+++ b/test/av1_txfm_test.cc
@@ -116,7 +116,7 @@ void get_txfm1d_type(TX_TYPE txfm2d_type, TYPE_TXFM *type0, TYPE_TXFM *type1) {
 double Sqrt2 = pow(2, 0.5);
 double invSqrt2 = 1 / pow(2, 0.5);
 
-double dct_matrix(double n, double k, int size) {
+static double dct_matrix(double n, double k, int size) {
   return cos(PI * (2 * n + 1) * k / (2 * size));
 }
 
@@ -207,7 +207,7 @@ void reference_adst_1d(const double *in, double *out, int size) {
   }
 }
 
-void reference_idtx_1d(const double *in, double *out, int size) {
+static void reference_idtx_1d(const double *in, double *out, int size) {
   double scale = 0;
   if (size == 4)
     scale = Sqrt2;
diff --git a/test/film_grain_table_test.cc b/test/film_grain_table_test.cc
index 808d966feb..2c6906f73b 100644
--- a/test/film_grain_table_test.cc
+++ b/test/film_grain_table_test.cc
@@ -20,6 +20,8 @@
 #include "test/util.h"
 #include "test/video_source.h"
 
+namespace {
+
 void grain_equal(const aom_film_grain_t *expected,
                  const aom_film_grain_t *actual) {
   EXPECT_EQ(expected->apply_grain, actual->apply_grain);
@@ -73,6 +75,8 @@ void grain_equal(const aom_film_grain_t *expected,
   }
 }
 
+}  // namespace
+
 TEST(FilmGrainTableTest, AddAndLookupSingleSegment) {
   aom_film_grain_table_t table;
   memset(&table, 0, sizeof(table));
diff --git a/test/scan_test.cc b/test/scan_test.cc
index 571658ee0a..3ba39de3d5 100644
--- a/test/scan_test.cc
+++ b/test/scan_test.cc
@@ -25,8 +25,8 @@ static int scan_test(const int16_t *scan, const int16_t *iscan, int si, int r,
   }
 }
 
-int scan_order_test(const SCAN_ORDER *scan_order, int w, int h,
-                    SCAN_MODE mode) {
+static int scan_order_test(const SCAN_ORDER *scan_order, int w, int h,
+                           SCAN_MODE mode) {
   const int16_t *scan = scan_order->scan;
   const int16_t *iscan = scan_order->iscan;
   int dim = w + h - 1;
diff --git a/test/warp_filter_test_util.cc b/test/warp_filter_test_util.cc
index 470c980777..b7c60c2fdb 100644
--- a/test/warp_filter_test_util.cc
+++ b/test/warp_filter_test_util.cc
@@ -18,6 +18,7 @@ using std::make_tuple;
 using std::tuple;
 
 namespace libaom_test {
+namespace {
 
 int32_t random_warped_param(libaom_test::ACMRandom *rnd, int bits,
                             int rnd_gen_zeros) {
@@ -114,6 +115,8 @@ void generate_warped_model(libaom_test::ACMRandom *rnd, int32_t *mat,
   }
 }
 
+}  // namespace
+
 namespace AV1WarpFilter {
 ::testing::internal::ParamGenerator<WarpTestParams> BuildParams(
     warp_affine_func filter) {
diff --git a/test/wiener_test.cc b/test/wiener_test.cc
index 4508af227f..77d2769aaa 100644
--- a/test/wiener_test.cc
+++ b/test/wiener_test.cc
@@ -158,11 +158,11 @@ static void compute_stats_win_opt_c(int wiener_win, const uint8_t *dgd,
   }
 }
 
-void compute_stats_opt_c(int wiener_win, const uint8_t *dgd, const uint8_t *src,
-                         int16_t *d, int16_t *s, int h_start, int h_end,
-                         int v_start, int v_end, int dgd_stride, int src_stride,
-                         int64_t *M, int64_t *H,
-                         int use_downsampled_wiener_stats) {
+static void compute_stats_opt_c(int wiener_win, const uint8_t *dgd,
+                                const uint8_t *src, int16_t *d, int16_t *s,
+                                int h_start, int h_end, int v_start, int v_end,
+                                int dgd_stride, int src_stride, int64_t *M,
+                                int64_t *H, int use_downsampled_wiener_stats) {
   if (wiener_win == WIENER_WIN || wiener_win == WIENER_WIN_CHROMA) {
     compute_stats_win_opt_c(wiener_win, dgd, src, d, s, h_start, h_end, v_start,
                             v_end, dgd_stride, src_stride, M, H,
@@ -519,11 +519,12 @@ static void compute_stats_highbd_win_opt_c(int wiener_win, const uint8_t *dgd8,
   }
 }
 
-void compute_stats_highbd_opt_c(int wiener_win, const uint8_t *dgd,
-                                const uint8_t *src, int16_t *d, int16_t *s,
-                                int h_start, int h_end, int v_start, int v_end,
-                                int dgd_stride, int src_stride, int64_t *M,
-                                int64_t *H, aom_bit_depth_t bit_depth) {
+static void compute_stats_highbd_opt_c(int wiener_win, const uint8_t *dgd,
+                                       const uint8_t *src, int16_t *d,
+                                       int16_t *s, int h_start, int h_end,
+                                       int v_start, int v_end, int dgd_stride,
+                                       int src_stride, int64_t *M, int64_t *H,
+                                       aom_bit_depth_t bit_depth) {
   if (wiener_win == WIENER_WIN || wiener_win == WIENER_WIN_CHROMA) {
     compute_stats_highbd_win_opt_c(wiener_win, dgd, src, h_start, h_end,
                                    v_start, v_end, dgd_stride, src_stride, M, H,