aom: Remove _c suffix in most k-means functions.

From bfaea872f5f79a4f94280df253421998fc480823 Mon Sep 17 00:00:00 2001
From: Vincent Rabaud <[EMAIL REDACTED]>
Date: Fri, 2 Feb 2024 10:58:32 +0100
Subject: [PATCH] Remove _c suffix in most k-means functions.

Only keep it for av1_calc_indices.

Bug: b/217457388

Change-Id: Ifaea534a553002b56433daea64010ae7349f1401
---
 av1/encoder/k_means_template.h | 10 ++++++++--
 av1/encoder/palette.h          |  2 +-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/av1/encoder/k_means_template.h b/av1/encoder/k_means_template.h
index 4be2038a6f..239029345d 100644
--- a/av1/encoder/k_means_template.h
+++ b/av1/encoder/k_means_template.h
@@ -24,6 +24,9 @@
 
 #define RENAME_(x, y) AV1_K_MEANS_RENAME(x, y)
 #define RENAME(x) RENAME_(x, AV1_K_MEANS_DIM)
+#define K_MEANS_RENAME_C(x, y) x##_dim##y##_c
+#define RENAME_C_(x, y) K_MEANS_RENAME_C(x, y)
+#define RENAME_C(x) RENAME_C_(x, AV1_K_MEANS_DIM)
 
 // Though we want to compute the smallest L2 norm, in 1 dimension,
 // it is equivalent to find the smallest L1 norm and then square it.
@@ -41,8 +44,8 @@ static int RENAME(calc_dist)(const int16_t *p1, const int16_t *p2) {
 #endif
 }
 
-void RENAME(av1_calc_indices)(const int16_t *data, const int16_t *centroids,
-                              uint8_t *indices, int64_t *dist, int n, int k) {
+void RENAME_C(av1_calc_indices)(const int16_t *data, const int16_t *centroids,
+                                uint8_t *indices, int64_t *dist, int n, int k) {
   if (dist) {
     *dist = 0;
   }
@@ -149,3 +152,6 @@ void RENAME(av1_k_means)(const int16_t *data, int16_t *centroids,
 }
 #undef RENAME_
 #undef RENAME
+#undef K_MEANS_RENAME_C
+#undef RENAME_C_
+#undef RENAME_C
diff --git a/av1/encoder/palette.h b/av1/encoder/palette.h
index 7da863a0cc..30886d37ae 100644
--- a/av1/encoder/palette.h
+++ b/av1/encoder/palette.h
@@ -26,7 +26,7 @@ struct PICK_MODE_CONTEXT;
 struct macroblock;
 
 /*!\cond */
-#define AV1_K_MEANS_RENAME(func, dim) func##_dim##dim##_c
+#define AV1_K_MEANS_RENAME(func, dim) func##_dim##dim
 
 void AV1_K_MEANS_RENAME(av1_k_means, 1)(const int16_t *data, int16_t *centroids,
                                         uint8_t *indices, int n, int k,