aom: mcomp.c: make several av1_init_*_compensation*() static

From a6f6232bc5a2211e3bb1f25b89b45feb4a9d78b3 Mon Sep 17 00:00:00 2001
From: James Zern <[EMAIL REDACTED]>
Date: Tue, 20 Aug 2024 18:19:08 -0700
Subject: [PATCH] mcomp.c: make several av1_init_*_compensation*() static

av1_init_dsmotion_compensation(), av1_init_motion_compensation_bigdia(),
av1_init_motion_compensation_hex(),
av1_init_motion_compensation_nstep(), and
av1_init_motion_compensation_square() are only used to populate
av1_init_motion_compensation[].

Bug: aomedia:3416
Change-Id: Id2b8a15c7ebaf0d303ac3e0e5ca95ec660984bf1
---
 av1/encoder/mcomp.c | 28 ++++++++++++++--------------
 av1/encoder/mcomp.h | 16 ----------------
 2 files changed, 14 insertions(+), 30 deletions(-)

diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index 1a5e5c531..0709e9baa 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -350,8 +350,8 @@ static inline int mvsad_err_cost_(const FULLPEL_MV *mv,
 
 // Search site initialization for DIAMOND / CLAMPED_DIAMOND search methods.
 // level = 0: DIAMOND, level = 1: CLAMPED_DIAMOND.
-void av1_init_dsmotion_compensation(search_site_config *cfg, int stride,
-                                    int level) {
+static void init_dsmotion_compensation(search_site_config *cfg, int stride,
+                                       int level) {
   int num_search_steps = 0;
   int stage_index = MAX_MVSEARCH_STEPS - 1;
 
@@ -433,8 +433,8 @@ void av1_init_motion_fpf(search_site_config *cfg, int stride) {
 
 // Search site initialization for NSTEP / NSTEP_8PT search methods.
 // level = 0: NSTEP, level = 1: NSTEP_8PT.
-void av1_init_motion_compensation_nstep(search_site_config *cfg, int stride,
-                                        int level) {
+static void init_motion_compensation_nstep(search_site_config *cfg, int stride,
+                                           int level) {
   int num_search_steps = 0;
   int stage_index = 0;
   cfg->stride = stride;
@@ -479,8 +479,8 @@ void av1_init_motion_compensation_nstep(search_site_config *cfg, int stride,
 
 // Search site initialization for BIGDIA / FAST_BIGDIA / FAST_DIAMOND
 // search methods.
-void av1_init_motion_compensation_bigdia(search_site_config *cfg, int stride,
-                                         int level) {
+static void init_motion_compensation_bigdia(search_site_config *cfg, int stride,
+                                            int level) {
   (void)level;
   cfg->stride = stride;
   // First scale has 4-closest points, the rest have 8 points in diamond
@@ -534,8 +534,8 @@ void av1_init_motion_compensation_bigdia(search_site_config *cfg, int stride,
 }
 
 // Search site initialization for SQUARE search method.
-void av1_init_motion_compensation_square(search_site_config *cfg, int stride,
-                                         int level) {
+static void init_motion_compensation_square(search_site_config *cfg, int stride,
+                                            int level) {
   (void)level;
   cfg->stride = stride;
   // All scales have 8 closest points in square shape.
@@ -588,8 +588,8 @@ void av1_init_motion_compensation_square(search_site_config *cfg, int stride,
 }
 
 // Search site initialization for HEX / FAST_HEX search methods.
-void av1_init_motion_compensation_hex(search_site_config *cfg, int stride,
-                                      int level) {
+static void init_motion_compensation_hex(search_site_config *cfg, int stride,
+                                         int level) {
   (void)level;
   cfg->stride = stride;
   // First scale has 8-closest points, the rest have 6 points in hex shape
@@ -638,10 +638,10 @@ void av1_init_motion_compensation_hex(search_site_config *cfg, int stride,
 
 const av1_init_search_site_config
     av1_init_motion_compensation[NUM_DISTINCT_SEARCH_METHODS] = {
-      av1_init_dsmotion_compensation,     av1_init_motion_compensation_nstep,
-      av1_init_motion_compensation_nstep, av1_init_dsmotion_compensation,
-      av1_init_motion_compensation_hex,   av1_init_motion_compensation_bigdia,
-      av1_init_motion_compensation_square
+      init_dsmotion_compensation,     init_motion_compensation_nstep,
+      init_motion_compensation_nstep, init_dsmotion_compensation,
+      init_motion_compensation_hex,   init_motion_compensation_bigdia,
+      init_motion_compensation_square
     };
 
 // Checks whether the mv is within range of the mv_limits
diff --git a/av1/encoder/mcomp.h b/av1/encoder/mcomp.h
index f55d8690f..05cbf870d 100644
--- a/av1/encoder/mcomp.h
+++ b/av1/encoder/mcomp.h
@@ -151,24 +151,8 @@ void av1_make_default_fullpel_ms_params(
 void av1_set_ms_to_intra_mode(FULLPEL_MOTION_SEARCH_PARAMS *ms_params,
                               const IntraBCMVCosts *dv_costs);
 
-// Sets up configs for fullpixel DIAMOND / CLAMPED_DIAMOND search method.
-void av1_init_dsmotion_compensation(search_site_config *cfg, int stride,
-                                    int level);
 // Sets up configs for firstpass motion search.
 void av1_init_motion_fpf(search_site_config *cfg, int stride);
-// Sets up configs for NSTEP / NSTEP_8PT motion search method.
-void av1_init_motion_compensation_nstep(search_site_config *cfg, int stride,
-                                        int level);
-// Sets up configs for BIGDIA / FAST_DIAMOND / FAST_BIGDIA
-// motion search method.
-void av1_init_motion_compensation_bigdia(search_site_config *cfg, int stride,
-                                         int level);
-// Sets up configs for HEX or FAST_HEX motion search method.
-void av1_init_motion_compensation_hex(search_site_config *cfg, int stride,
-                                      int level);
-// Sets up configs for SQUARE motion search method.
-void av1_init_motion_compensation_square(search_site_config *cfg, int stride,
-                                         int level);
 
 /*! Function pointer to search site config initialization of different search
  * method functions. */