Move functions used only by encoder out of common

Change-Id: I8a00f95a03e173b7117bbadf2e8c5ec75cfe6b8c
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 990cacf..470f34a 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -1203,10 +1203,6 @@
   return tx_size_2d[tx_size];
 }
 
-static INLINE int av1_pixels_to_mi(int pixels) {
-  return ALIGN_POWER_OF_TWO(pixels, 3) >> MI_SIZE_LOG2;
-}
-
 #ifdef __cplusplus
 }  // extern "C"
 #endif
diff --git a/av1/common/resize.h b/av1/common/resize.h
index 7bfb73c..43bea58 100644
--- a/av1/common/resize.h
+++ b/av1/common/resize.h
@@ -102,12 +102,6 @@
   return !(cm->width == cm->superres_upscaled_width);
 }
 
-static INLINE int av1_coded_to_superres_mi(int mi_col, int denom) {
-  const int mi_col_sr =
-      (mi_col * denom + SCALE_NUMERATOR / 2) / SCALE_NUMERATOR;
-  return mi_col_sr;
-}
-
 #define UPSCALE_NORMATIVE_TAPS 8
 extern const int16_t av1_resize_filter_normative[1 << RS_SUBPEL_BITS]
                                                 [UPSCALE_NORMATIVE_TAPS];
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 4fea761..03abf55 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -3560,6 +3560,10 @@
 #undef NUM_SIMPLE_MOTION_FEATURES
 
 #if !CONFIG_REALTIME_ONLY
+static INLINE int coded_to_superres_mi(int mi_col, int denom) {
+  return (mi_col * denom + SCALE_NUMERATOR / 2) / SCALE_NUMERATOR;
+}
+
 static int get_rdmult_delta(AV1_COMP *cpi, BLOCK_SIZE bsize, int analysis_type,
                             int mi_row, int mi_col, int orig_rdmult) {
   AV1_COMMON *const cm = &cpi->common;
@@ -3585,9 +3589,9 @@
 #endif  // !USE_TPL_CLASSIC_MODEL
   int mi_count = 0;
   const int mi_col_sr =
-      av1_coded_to_superres_mi(mi_col, cm->superres_scale_denominator);
-  const int mi_col_end_sr = av1_coded_to_superres_mi(
-      mi_col + mi_wide, cm->superres_scale_denominator);
+      coded_to_superres_mi(mi_col, cm->superres_scale_denominator);
+  const int mi_col_end_sr =
+      coded_to_superres_mi(mi_col + mi_wide, cm->superres_scale_denominator);
   const int mi_cols_sr = av1_pixels_to_mi(cm->superres_upscaled_width);
   const int step = 1 << cpi->tpl_stats_block_mis_log2;
   for (int row = mi_row; row < mi_row + mi_high; row += step) {
@@ -3670,9 +3674,9 @@
 
   int mi_count = 0;
   const int mi_col_sr =
-      av1_coded_to_superres_mi(mi_col, cm->superres_scale_denominator);
-  const int mi_col_end_sr = av1_coded_to_superres_mi(
-      mi_col + mi_wide, cm->superres_scale_denominator);
+      coded_to_superres_mi(mi_col, cm->superres_scale_denominator);
+  const int mi_col_end_sr =
+      coded_to_superres_mi(mi_col + mi_wide, cm->superres_scale_denominator);
   const int mi_cols_sr = av1_pixels_to_mi(cm->superres_upscaled_width);
 
   // TPL store unit size is not the same as the motion estimation unit size.
@@ -3733,9 +3737,9 @@
 #endif  // !USE_TPL_CLASSIC_MODEL
   int mi_count = 0;
   const int mi_col_sr =
-      av1_coded_to_superres_mi(mi_col, cm->superres_scale_denominator);
-  const int mi_col_end_sr = av1_coded_to_superres_mi(
-      mi_col + mi_wide, cm->superres_scale_denominator);
+      coded_to_superres_mi(mi_col, cm->superres_scale_denominator);
+  const int mi_col_end_sr =
+      coded_to_superres_mi(mi_col + mi_wide, cm->superres_scale_denominator);
   const int mi_cols_sr = av1_pixels_to_mi(cm->superres_upscaled_width);
   const int step = 1 << cpi->tpl_stats_block_mis_log2;
   for (int row = mi_row; row < mi_row + mi_high; row += step) {
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 3526429..581f3e7 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -1499,6 +1499,10 @@
   return gf_group->update_type[gf_group->index];
 }
 
+static INLINE int av1_pixels_to_mi(int pixels) {
+  return ALIGN_POWER_OF_TWO(pixels, 3) >> MI_SIZE_LOG2;
+}
+
 #if CONFIG_COLLECT_PARTITION_STATS == 2
 static INLINE void av1_print_partition_stats(PartitionStats *part_stats) {
   FILE *f = fopen("partition_stats.csv", "w");