Cleanup: Remove const for params passed by value
BUG=aomedia:448
Change-Id: Ieff977fca8a5033ddef2871a194870f59301ad8f
diff --git a/av1/encoder/encodemb.h b/av1/encoder/encodemb.h
index fe54690..73fde1d 100644
--- a/av1/encoder/encodemb.h
+++ b/av1/encoder/encodemb.h
@@ -43,8 +43,8 @@
AV1_XFORM_QUANT_TYPES,
} AV1_XFORM_QUANT;
-void av1_encode_sb(AV1_COMMON *cm, MACROBLOCK *x, BLOCK_SIZE bsize,
- const int mi_row, const int mi_col);
+void av1_encode_sb(AV1_COMMON *cm, MACROBLOCK *x, BLOCK_SIZE bsize, int mi_row,
+ int mi_col);
#if CONFIG_SUPERTX
void av1_encode_sb_supertx(AV1_COMMON *cm, MACROBLOCK *x, BLOCK_SIZE bsize);
#endif // CONFIG_SUPERTX
@@ -69,8 +69,8 @@
void av1_encode_intra_block_plane(AV1_COMMON *cm, MACROBLOCK *x,
BLOCK_SIZE bsize, int plane,
- int enable_optimize_b, const int mi_row,
- const int mi_col);
+ int enable_optimize_b, int mi_row,
+ int mi_col);
#if CONFIG_PVQ
PVQ_SKIP_TYPE av1_pvq_encode_helper(MACROBLOCK *x, tran_low_t *const coeff,
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 7e5a661..d746264 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -848,7 +848,7 @@
&cm->frame_refs[ref1 >= LAST_FRAME ? ref1 - LAST_FRAME : 0];
}
-static INLINE int get_chessboard_index(const int frame_index) {
+static INLINE int get_chessboard_index(int frame_index) {
return frame_index & 0x1;
}
diff --git a/av1/encoder/encodetxb.c b/av1/encoder/encodetxb.c
index d0ce9a6..3f71a44 100644
--- a/av1/encoder/encodetxb.c
+++ b/av1/encoder/encodetxb.c
@@ -560,7 +560,7 @@
void av1_update_txb_context(const AV1_COMP *cpi, ThreadData *td,
RUN_TYPE dry_run, BLOCK_SIZE bsize, int *rate,
- const int mi_row, const int mi_col) {
+ int mi_row, int mi_col) {
const AV1_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index d8fab61..f5745f2 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -362,7 +362,7 @@
return besterr;
}
-static INLINE int divide_and_round(const int n, const int d) {
+static INLINE int divide_and_round(int n, int d) {
return ((n < 0) ^ (d < 0)) ? ((n - d / 2) / d) : ((n + d / 2) / d);
}
diff --git a/av1/encoder/ransac.c b/av1/encoder/ransac.c
index 198bc39..976e52d 100644
--- a/av1/encoder/ransac.c
+++ b/av1/encoder/ransac.c
@@ -569,8 +569,7 @@
params[6] = params[7] = 0;
}
-static int find_translation(const int np, double *pts1, double *pts2,
- double *mat) {
+static int find_translation(int np, double *pts1, double *pts2, double *mat) {
int i;
double sx, sy, dx, dy;
double sumx, sumy;
@@ -596,7 +595,7 @@
return 0;
}
-static int find_rotzoom(const int np, double *pts1, double *pts2, double *mat) {
+static int find_rotzoom(int np, double *pts1, double *pts2, double *mat) {
const int np2 = np * 2;
double *a = (double *)aom_malloc(sizeof(*a) * np2 * 9);
double *b = a + np2 * 4;
@@ -636,7 +635,7 @@
return 0;
}
-static int find_affine(const int np, double *pts1, double *pts2, double *mat) {
+static int find_affine(int np, double *pts1, double *pts2, double *mat) {
const int np2 = np * 2;
double *a = (double *)aom_malloc(sizeof(*a) * np2 * 13);
double *b = a + np2 * 6;
@@ -680,8 +679,7 @@
return 0;
}
-static int find_vertrapezoid(const int np, double *pts1, double *pts2,
- double *mat) {
+static int find_vertrapezoid(int np, double *pts1, double *pts2, double *mat) {
const int np3 = np * 3;
double *a = (double *)aom_malloc(sizeof(*a) * np3 * 14);
double *U = a + np3 * 7;
@@ -750,8 +748,7 @@
return 0;
}
-static int find_hortrapezoid(const int np, double *pts1, double *pts2,
- double *mat) {
+static int find_hortrapezoid(int np, double *pts1, double *pts2, double *mat) {
const int np3 = np * 3;
double *a = (double *)aom_malloc(sizeof(*a) * np3 * 14);
double *U = a + np3 * 7;
@@ -820,8 +817,7 @@
return 0;
}
-static int find_homography(const int np, double *pts1, double *pts2,
- double *mat) {
+static int find_homography(int np, double *pts1, double *pts2, double *mat) {
// Implemented from Peter Kovesi's normalized implementation
const int np3 = np * 3;
double *a = (double *)aom_malloc(sizeof(*a) * np3 * 18);
diff --git a/av1/encoder/x86/hybrid_fwd_txfm_avx2.c b/av1/encoder/x86/hybrid_fwd_txfm_avx2.c
index 53e970f..198e4e4 100644
--- a/av1/encoder/x86/hybrid_fwd_txfm_avx2.c
+++ b/av1/encoder/x86/hybrid_fwd_txfm_avx2.c
@@ -1535,7 +1535,7 @@
load_buffer_16x16(botR, stride, flipud, fliplr, in1 + 16);
}
-static INLINE void right_shift_32x32_16col(const int bit, __m256i *in) {
+static INLINE void right_shift_32x32_16col(int bit, __m256i *in) {
int i = 0;
const __m256i rounding = _mm256_set1_epi16((1 << bit) >> 1);
__m256i sign;