Cleanup: Remove const for params passed by value
BUG=aomedia:448
Change-Id: Ieff977fca8a5033ddef2871a194870f59301ad8f
diff --git a/aom_dsp/aom_dsp_rtcd_defs.pl b/aom_dsp/aom_dsp_rtcd_defs.pl
index a79b041..3d5f01f 100755
--- a/aom_dsp/aom_dsp_rtcd_defs.pl
+++ b/aom_dsp/aom_dsp_rtcd_defs.pl
@@ -652,13 +652,13 @@
add_proto qw/int aom_satd/, "const int16_t *coeff, int length";
specialize qw/aom_satd sse2 neon/;
- add_proto qw/void aom_int_pro_row/, "int16_t *hbuf, const uint8_t *ref, const int ref_stride, const int height";
+ add_proto qw/void aom_int_pro_row/, "int16_t *hbuf, const uint8_t *ref, int ref_stride, int height";
specialize qw/aom_int_pro_row sse2 neon/;
- add_proto qw/int16_t aom_int_pro_col/, "const uint8_t *ref, const int width";
+ add_proto qw/int16_t aom_int_pro_col/, "const uint8_t *ref, int width";
specialize qw/aom_int_pro_col sse2 neon/;
- add_proto qw/int aom_vector_var/, "const int16_t *ref, const int16_t *src, const int bwl";
+ add_proto qw/int aom_vector_var/, "const int16_t *ref, const int16_t *src, int bwl";
specialize qw/aom_vector_var neon sse2/;
} # CONFIG_AV1_ENCODER
@@ -695,7 +695,7 @@
specialize qw/aom_sad64x32_avg avx2 msa sse2/;
specialize qw/aom_sad32x64_avg avx2 msa sse2/;
specialize qw/aom_sad32x32_avg avx2 msa sse2/;
-specialize qw/aom_sad32x16_avg avx2 msa sse2/;
+specialize qw/aom_sad32x16_avg avx2 msa sse2/;
specialize qw/aom_sad16x32_avg msa sse2/;
specialize qw/aom_sad16x16_avg msa sse2/;
specialize qw/aom_sad16x8_avg msa sse2/;
diff --git a/aom_dsp/arm/avg_neon.c b/aom_dsp/arm/avg_neon.c
index d9ef4f6..e730ccb 100644
--- a/aom_dsp/arm/avg_neon.c
+++ b/aom_dsp/arm/avg_neon.c
@@ -90,8 +90,8 @@
}
}
-void aom_int_pro_row_neon(int16_t hbuf[16], uint8_t const *ref,
- const int ref_stride, const int height) {
+void aom_int_pro_row_neon(int16_t hbuf[16], uint8_t const *ref, int ref_stride,
+ int height) {
int i;
uint16x8_t vec_sum_lo = vdupq_n_u16(0);
uint16x8_t vec_sum_hi = vdupq_n_u16(0);
@@ -159,7 +159,7 @@
// ref, src = [0, 510] - max diff = 16-bits
// bwl = {2, 3, 4}, width = {16, 32, 64}
-int aom_vector_var_neon(int16_t const *ref, int16_t const *src, const int bwl) {
+int aom_vector_var_neon(int16_t const *ref, int16_t const *src, int bwl) {
int width = 4 << bwl;
int32x4_t sse = vdupq_n_s32(0);
int16x8_t total = vdupq_n_s16(0);
diff --git a/aom_dsp/avg.c b/aom_dsp/avg.c
index 70a6178..eb60597 100644
--- a/aom_dsp/avg.c
+++ b/aom_dsp/avg.c
@@ -134,8 +134,8 @@
// Integer projection onto row vectors.
// height: value range {16, 32, 64}.
-void aom_int_pro_row_c(int16_t hbuf[16], const uint8_t *ref,
- const int ref_stride, const int height) {
+void aom_int_pro_row_c(int16_t hbuf[16], const uint8_t *ref, int ref_stride,
+ int height) {
int idx;
const int norm_factor = height >> 1;
for (idx = 0; idx < 16; ++idx) {
@@ -150,7 +150,7 @@
}
// width: value range {16, 32, 64}.
-int16_t aom_int_pro_col_c(const uint8_t *ref, const int width) {
+int16_t aom_int_pro_col_c(const uint8_t *ref, int width) {
int idx;
int16_t sum = 0;
// sum: 14 bit, dynamic range [0, 16320]
@@ -161,7 +161,7 @@
// ref: [0 - 510]
// src: [0 - 510]
// bwl: {2, 3, 4}
-int aom_vector_var_c(const int16_t *ref, const int16_t *src, const int bwl) {
+int aom_vector_var_c(const int16_t *ref, const int16_t *src, int bwl) {
int i;
int width = 4 << bwl;
int sse = 0, mean = 0, var;
diff --git a/aom_dsp/bitreader.h b/aom_dsp/bitreader.h
index bd0a173..9cd34dd 100644
--- a/aom_dsp/bitreader.h
+++ b/aom_dsp/bitreader.h
@@ -143,8 +143,7 @@
}
}
-static INLINE void aom_update_symb_counts(const aom_reader *r,
- const int is_binary) {
+static INLINE void aom_update_symb_counts(const aom_reader *r, int is_binary) {
if (r->accounting != NULL) {
r->accounting->syms.num_multi_syms += !is_binary;
r->accounting->syms.num_binary_syms += !!is_binary;
diff --git a/aom_dsp/x86/avg_intrin_sse2.c b/aom_dsp/x86/avg_intrin_sse2.c
index f25af4c..bcdc20f 100644
--- a/aom_dsp/x86/avg_intrin_sse2.c
+++ b/aom_dsp/x86/avg_intrin_sse2.c
@@ -313,8 +313,8 @@
return _mm_cvtsi128_si32(accum);
}
-void aom_int_pro_row_sse2(int16_t *hbuf, uint8_t const *ref,
- const int ref_stride, const int height) {
+void aom_int_pro_row_sse2(int16_t *hbuf, uint8_t const *ref, int ref_stride,
+ int height) {
int idx;
__m128i zero = _mm_setzero_si128();
__m128i src_line = _mm_loadu_si128((const __m128i *)ref);
@@ -362,7 +362,7 @@
_mm_storeu_si128((__m128i *)hbuf, s1);
}
-int16_t aom_int_pro_col_sse2(uint8_t const *ref, const int width) {
+int16_t aom_int_pro_col_sse2(uint8_t const *ref, int width) {
__m128i zero = _mm_setzero_si128();
__m128i src_line = _mm_load_si128((const __m128i *)ref);
__m128i s0 = _mm_sad_epu8(src_line, zero);
@@ -382,7 +382,7 @@
return _mm_extract_epi16(s0, 0);
}
-int aom_vector_var_sse2(int16_t const *ref, int16_t const *src, const int bwl) {
+int aom_vector_var_sse2(int16_t const *ref, int16_t const *src, int bwl) {
int idx;
int width = 4 << bwl;
int16_t mean;
diff --git a/aom_dsp/x86/fwd_txfm_sse2.h b/aom_dsp/x86/fwd_txfm_sse2.h
index a3d9ce9..26b2db2 100644
--- a/aom_dsp/x86/fwd_txfm_sse2.h
+++ b/aom_dsp/x86/fwd_txfm_sse2.h
@@ -261,8 +261,7 @@
static INLINE __m128i mult_round_shift(const __m128i *pin0, const __m128i *pin1,
const __m128i *pmultiplier,
- const __m128i *prounding,
- const int shift) {
+ const __m128i *prounding, int shift) {
const __m128i u0 = _mm_madd_epi16(*pin0, *pmultiplier);
const __m128i u1 = _mm_madd_epi16(*pin1, *pmultiplier);
const __m128i v0 = _mm_add_epi32(u0, *prounding);
@@ -275,8 +274,8 @@
static INLINE void transpose_and_output8x8(
const __m128i *pin00, const __m128i *pin01, const __m128i *pin02,
const __m128i *pin03, const __m128i *pin04, const __m128i *pin05,
- const __m128i *pin06, const __m128i *pin07, const int pass,
- int16_t *out0_ptr, tran_low_t *out1_ptr) {
+ const __m128i *pin06, const __m128i *pin07, int pass, int16_t *out0_ptr,
+ tran_low_t *out1_ptr) {
// 00 01 02 03 04 05 06 07
// 10 11 12 13 14 15 16 17
// 20 21 22 23 24 25 26 27
diff --git a/aom_dsp/x86/masked_variance_intrin_ssse3.c b/aom_dsp/x86/masked_variance_intrin_ssse3.c
index 30679bc..fe14597 100644
--- a/aom_dsp/x86/masked_variance_intrin_ssse3.c
+++ b/aom_dsp/x86/masked_variance_intrin_ssse3.c
@@ -55,8 +55,7 @@
#endif // CONFIG_HIGHBITDEPTH
static INLINE uint32_t calc_masked_variance(__m128i v_sum_d, __m128i v_sse_q,
- uint32_t *sse, const int w,
- const int h) {
+ uint32_t *sse, int w, int h) {
int64_t sum64;
uint64_t sse64;
@@ -1318,8 +1317,7 @@
#if CONFIG_HIGHBITDEPTH
typedef uint32_t (*highbd_calc_masked_var_t)(__m128i v_sum_d, __m128i v_sse_q,
- uint32_t *sse, const int w,
- const int h);
+ uint32_t *sse, int w, int h);
typedef unsigned int (*highbd_variance_fn_t)(const uint8_t *a8, int a_stride,
const uint8_t *b8, int b_stride,
const uint8_t *m, int m_stride,
@@ -1397,8 +1395,10 @@
*v_sse_q = _mm_add_epi64(*v_sse_q, v_se_q);
}
-static INLINE uint32_t highbd_10_calc_masked_variance(
- __m128i v_sum_d, __m128i v_sse_q, uint32_t *sse, const int w, const int h) {
+static INLINE uint32_t highbd_10_calc_masked_variance(__m128i v_sum_d,
+ __m128i v_sse_q,
+ uint32_t *sse, int w,
+ int h) {
int64_t sum64;
uint64_t sse64;
@@ -1421,8 +1421,10 @@
// Compute the variance
return *sse - (uint32_t)((sum64 * sum64) / (w * h));
}
-static INLINE uint32_t highbd_12_calc_masked_variance(
- __m128i v_sum_d, __m128i v_sse_q, uint32_t *sse, const int w, const int h) {
+static INLINE uint32_t highbd_12_calc_masked_variance(__m128i v_sum_d,
+ __m128i v_sse_q,
+ uint32_t *sse, int w,
+ int h) {
int64_t sum64;
uint64_t sse64;
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index c135a10..7fd96dd 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -1013,11 +1013,11 @@
void av1_setup_block_planes(MACROBLOCKD *xd, int ss_x, int ss_y);
-static INLINE int tx_size_to_depth(const TX_SIZE tx_size) {
+static INLINE int tx_size_to_depth(TX_SIZE tx_size) {
return (int)(tx_size - TX_4X4);
}
-static INLINE TX_SIZE depth_to_tx_size(const int depth) {
+static INLINE TX_SIZE depth_to_tx_size(int depth) {
return (TX_SIZE)(depth + TX_4X4);
}
@@ -1140,7 +1140,7 @@
is_interintra_allowed_ref(mbmi->ref_frame);
}
-static INLINE int is_interintra_allowed_bsize_group(const int group) {
+static INLINE int is_interintra_allowed_bsize_group(int group) {
int i;
for (i = 0; i < BLOCK_SIZES; i++) {
if (size_group_lookup[i] == group &&
@@ -1323,7 +1323,7 @@
}
#endif // CONFIG_GLOBAL_MOTION
-static INLINE PLANE_TYPE get_plane_type(const int plane) {
+static INLINE PLANE_TYPE get_plane_type(int plane) {
return (plane == 0) ? PLANE_TYPE_Y : PLANE_TYPE_UV;
}
diff --git a/av1/common/entropy.h b/av1/common/entropy.h
index b12b171..b02d41b 100644
--- a/av1/common/entropy.h
+++ b/av1/common/entropy.h
@@ -404,22 +404,21 @@
#if CONFIG_EC_ADAPT
void av1_average_tile_coef_cdfs(struct frame_contexts *fc,
struct frame_contexts *ec_ctxs[],
- aom_cdf_prob *cdf_ptrs[], const int num_tiles);
+ aom_cdf_prob *cdf_ptrs[], int num_tiles);
void av1_average_tile_mv_cdfs(struct frame_contexts *fc,
struct frame_contexts *ec_ctxs[],
- aom_cdf_prob *cdf_ptrs[], const int num_tiles);
+ aom_cdf_prob *cdf_ptrs[], int num_tiles);
void av1_average_tile_intra_cdfs(struct frame_contexts *fc,
struct frame_contexts *ec_ctxs[],
- aom_cdf_prob *cdf_ptrs[], const int num_tiles);
+ aom_cdf_prob *cdf_ptrs[], int num_tiles);
void av1_average_tile_inter_cdfs(struct AV1Common *cm,
struct frame_contexts *fc,
struct frame_contexts *ec_ctxs[],
- aom_cdf_prob *cdf_ptrs[], const int num_tiles);
+ aom_cdf_prob *cdf_ptrs[], int num_tiles);
#if CONFIG_PVQ
void av1_default_pvq_probs(struct AV1Common *cm);
void av1_average_tile_pvq_cdfs(struct frame_contexts *fc,
- struct frame_contexts *ec_ctxs[],
- const int num_tiles);
+ struct frame_contexts *ec_ctxs[], int num_tiles);
#endif // CONFIG_PVQ
#endif // CONFIG_EC_ADAPT
#ifdef __cplusplus
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index 41114c5..4d3ae11 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -736,10 +736,8 @@
}
#if CONFIG_CB4X4
-static INLINE int is_chroma_reference(const int mi_row, const int mi_col,
- const BLOCK_SIZE bsize,
- const int subsampling_x,
- const int subsampling_y) {
+static INLINE int is_chroma_reference(int mi_row, int mi_col, BLOCK_SIZE bsize,
+ int subsampling_x, int subsampling_y) {
#if CONFIG_CHROMA_2X2
return 1;
#endif
@@ -751,9 +749,8 @@
return ref_pos;
}
-static INLINE BLOCK_SIZE scale_chroma_bsize(const BLOCK_SIZE bsize,
- const int subsampling_x,
- const int subsampling_y) {
+static INLINE BLOCK_SIZE scale_chroma_bsize(BLOCK_SIZE bsize, int subsampling_x,
+ int subsampling_y) {
BLOCK_SIZE bs = bsize;
if (bs < BLOCK_8X8) {
@@ -847,8 +844,8 @@
#endif
}
-static INLINE int max_block_wide(const MACROBLOCKD *xd, const BLOCK_SIZE bsize,
- const int plane) {
+static INLINE int max_block_wide(const MACROBLOCKD *xd, BLOCK_SIZE bsize,
+ int plane) {
int max_blocks_wide = block_size_wide[bsize];
const struct macroblockd_plane *const pd = &xd->plane[plane];
@@ -859,8 +856,8 @@
return max_blocks_wide >> tx_size_wide_log2[0];
}
-static INLINE int max_block_high(const MACROBLOCKD *xd, const BLOCK_SIZE bsize,
- const int plane) {
+static INLINE int max_block_high(const MACROBLOCKD *xd, BLOCK_SIZE bsize,
+ int plane) {
int max_blocks_high = block_size_high[bsize];
const struct macroblockd_plane *const pd = &xd->plane[plane];
@@ -900,7 +897,7 @@
}
#if CONFIG_VAR_TX
-static INLINE TX_SIZE get_min_tx_size(const TX_SIZE tx_size) {
+static INLINE TX_SIZE get_min_tx_size(TX_SIZE tx_size) {
if (tx_size >= TX_SIZES_ALL) assert(0);
return txsize_sqr_map[tx_size];
}
@@ -910,8 +907,8 @@
for (i = 0; i < len; ++i) txfm_ctx[i] = txs;
}
-static INLINE void set_txfm_ctxs(TX_SIZE tx_size, int n8_w, int n8_h,
- const int skip, const MACROBLOCKD *xd) {
+static INLINE void set_txfm_ctxs(TX_SIZE tx_size, int n8_w, int n8_h, int skip,
+ const MACROBLOCKD *xd) {
uint8_t bw = tx_size_wide[tx_size];
uint8_t bh = tx_size_high[tx_size];
@@ -939,8 +936,7 @@
static INLINE int txfm_partition_context(TXFM_CONTEXT *above_ctx,
TXFM_CONTEXT *left_ctx,
- const BLOCK_SIZE bsize,
- const TX_SIZE tx_size) {
+ BLOCK_SIZE bsize, TX_SIZE tx_size) {
const uint8_t txw = tx_size_wide[tx_size];
const uint8_t txh = tx_size_high[tx_size];
const int above = *above_ctx < txw;
@@ -972,8 +968,8 @@
#endif
static INLINE PARTITION_TYPE get_partition(const AV1_COMMON *const cm,
- const int mi_row, const int mi_col,
- const BLOCK_SIZE bsize) {
+ int mi_row, int mi_col,
+ BLOCK_SIZE bsize) {
if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols) {
return PARTITION_INVALID;
} else {
@@ -1013,7 +1009,7 @@
}
}
-static INLINE void set_sb_size(AV1_COMMON *const cm, const BLOCK_SIZE sb_size) {
+static INLINE void set_sb_size(AV1_COMMON *const cm, BLOCK_SIZE sb_size) {
cm->sb_size = sb_size;
cm->mib_size = mi_size_wide[cm->sb_size];
#if CONFIG_CB4X4
diff --git a/av1/common/tile_common.c b/av1/common/tile_common.c
index f61acab..b8008ac 100644
--- a/av1/common/tile_common.c
+++ b/av1/common/tile_common.c
@@ -56,19 +56,19 @@
#define MAX_TILE_WIDTH_MAX_SB 64
#endif // CONFIG_EXT_PARTITION
-static int get_min_log2_tile_cols(const int max_sb_cols) {
+static int get_min_log2_tile_cols(int max_sb_cols) {
int min_log2 = 0;
while ((MAX_TILE_WIDTH_MAX_SB << min_log2) < max_sb_cols) ++min_log2;
return min_log2;
}
-static int get_max_log2_tile_cols(const int max_sb_cols) {
+static int get_max_log2_tile_cols(int max_sb_cols) {
int max_log2 = 1;
while ((max_sb_cols >> max_log2) >= MIN_TILE_WIDTH_MAX_SB) ++max_log2;
return max_log2 - 1;
}
-void av1_get_tile_n_bits(const int mi_cols, int *min_log2_tile_cols,
+void av1_get_tile_n_bits(int mi_cols, int *min_log2_tile_cols,
int *max_log2_tile_cols) {
const int max_sb_cols =
ALIGN_POWER_OF_TWO(mi_cols, MAX_MIB_SIZE_LOG2) >> MAX_MIB_SIZE_LOG2;
diff --git a/av1/common/tile_common.h b/av1/common/tile_common.h
index 516896a..617dda2 100644
--- a/av1/common/tile_common.h
+++ b/av1/common/tile_common.h
@@ -41,7 +41,7 @@
void av1_tile_set_tg_boundary(TileInfo *tile, const struct AV1Common *cm,
int row, int col);
#endif
-void av1_get_tile_n_bits(const int mi_cols, int *min_log2_tile_cols,
+void av1_get_tile_n_bits(int mi_cols, int *min_log2_tile_cols,
int *max_log2_tile_cols);
void av1_update_boundary_info(const struct AV1Common *cm,
diff --git a/av1/common/warped_motion.c b/av1/common/warped_motion.c
index c74609d..34ae487 100644
--- a/av1/common/warped_motion.c
+++ b/av1/common/warped_motion.c
@@ -1453,7 +1453,7 @@
(((a) * (b)*4 + ((a) + (b)) * 2 * LS_STEP + LS_STEP * LS_STEP * 2) >> 2)
#if LEAST_SQUARES_ORDER == 2
-static int find_affine_int(const int np, int *pts1, int *pts2, BLOCK_SIZE bsize,
+static int find_affine_int(int np, int *pts1, int *pts2, BLOCK_SIZE bsize,
int mvy, int mvx, WarpedMotionParams *wm, int mi_row,
int mi_col) {
int32_t A[2][2] = { { 0, 0 }, { 0, 0 } };
@@ -1586,7 +1586,7 @@
#else
-static int find_affine_int(const int np, int *pts1, int *pts2, BLOCK_SIZE bsize,
+static int find_affine_int(int np, int *pts1, int *pts2, BLOCK_SIZE bsize,
int mvy, int mvx, WarpedMotionParams *wm, int mi_row,
int mi_col) {
int32_t A[3][3] = { { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 } };
@@ -1742,8 +1742,8 @@
}
#endif // LEAST_SQUARES_ORDER == 2
-int find_projection(const int np, int *pts1, int *pts2, BLOCK_SIZE bsize,
- int mvy, int mvx, WarpedMotionParams *wm_params, int mi_row,
+int find_projection(int np, int *pts1, int *pts2, BLOCK_SIZE bsize, int mvy,
+ int mvx, WarpedMotionParams *wm_params, int mi_row,
int mi_col) {
int result = 1;
switch (wm_params->wmtype) {
diff --git a/av1/common/warped_motion.h b/av1/common/warped_motion.h
index dea7cfd..72b511f 100644
--- a/av1/common/warped_motion.h
+++ b/av1/common/warped_motion.h
@@ -89,8 +89,8 @@
int p_height, int p_stride, int subsampling_x,
int subsampling_y, int x_scale, int y_scale, int ref_frm);
-int find_projection(const int np, int *pts1, int *pts2, BLOCK_SIZE bsize,
- int mvy, int mvx, WarpedMotionParams *wm_params, int mi_row,
+int find_projection(int np, int *pts1, int *pts2, BLOCK_SIZE bsize, int mvy,
+ int mvx, WarpedMotionParams *wm_params, int mi_row,
int mi_col);
int get_shear_params(WarpedMotionParams *wm);
diff --git a/av1/common/x86/av1_highbd_convolve_sse4.c b/av1/common/x86/av1_highbd_convolve_sse4.c
index c154c6b..cf6249b 100644
--- a/av1/common/x86/av1_highbd_convolve_sse4.c
+++ b/av1/common/x86/av1_highbd_convolve_sse4.c
@@ -25,7 +25,7 @@
typedef int16_t (*HbdSubpelFilterCoeffs)[8];
-typedef void (*TransposeSave)(const int width, int pixelsNum, uint32_t *src,
+typedef void (*TransposeSave)(int width, int pixelsNum, uint32_t *src,
int src_stride, uint16_t *dst, int dst_stride,
int bd);
@@ -180,14 +180,14 @@
// pixelsNum = 0 : all 4 rows of pixels will be saved.
// pixelsNum = 1/2/3 : residual 1/2/4 rows of pixels will be saved.
-void trans_save_4x4(const int width, int pixelsNum, uint32_t *src,
- int src_stride, uint16_t *dst, int dst_stride, int bd) {
+void trans_save_4x4(int width, int pixelsNum, uint32_t *src, int src_stride,
+ uint16_t *dst, int dst_stride, int bd) {
__m128i u[4];
transClipPixel(src, src_stride, u, bd);
writePixel(u, width, pixelsNum, dst, dst_stride);
}
-void trans_accum_save_4x4(const int width, int pixelsNum, uint32_t *src,
+void trans_accum_save_4x4(int width, int pixelsNum, uint32_t *src,
int src_stride, uint16_t *dst, int dst_stride,
int bd) {
__m128i u[4], v[4];
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 19a96d2..056ff6f 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -1449,8 +1449,8 @@
}
}
-static void set_segment_id_supertx(const AV1_COMMON *const cm, const int mi_row,
- const int mi_col, const BLOCK_SIZE bsize) {
+static void set_segment_id_supertx(const AV1_COMMON *const cm, int mi_row,
+ int mi_col, BLOCK_SIZE bsize) {
const struct segmentation *seg = &cm->seg;
const int miw = AOMMIN(mi_size_wide[bsize], cm->mi_cols - mi_col);
const int mih = AOMMIN(mi_size_high[bsize], cm->mi_rows - mi_row);
@@ -3065,7 +3065,7 @@
#endif
}
-static int mem_get_varsize(const uint8_t *src, const int sz) {
+static int mem_get_varsize(const uint8_t *src, int sz) {
switch (sz) {
case 1: return src[0];
case 2: return mem_get_le16(src);
@@ -4859,9 +4859,8 @@
}
#if CONFIG_EC_ADAPT
-static void make_update_tile_list_dec(AV1Decoder *pbi, const int tile_rows,
- const int tile_cols,
- FRAME_CONTEXT *ec_ctxs[]) {
+static void make_update_tile_list_dec(AV1Decoder *pbi, int tile_rows,
+ int tile_cols, FRAME_CONTEXT *ec_ctxs[]) {
int i;
for (i = 0; i < tile_rows * tile_cols; ++i)
ec_ctxs[i] = &pbi->tile_data[i].tctx;
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;
diff --git a/test/av1_convolve_optimz_test.cc b/test/av1_convolve_optimz_test.cc
index 85edb2d..fd0f6db 100644
--- a/test/av1_convolve_optimz_test.cc
+++ b/test/av1_convolve_optimz_test.cc
@@ -24,12 +24,12 @@
typedef void (*ConvInit)();
typedef void (*conv_filter_t)(const uint8_t *, int, uint8_t *, int, int, int,
- const InterpFilterParams, const int, int,
+ const InterpFilterParams, int, int,
ConvolveParams *);
#if CONFIG_HIGHBITDEPTH
typedef void (*hbd_conv_filter_t)(const uint16_t *, int, uint16_t *, int, int,
- int, const InterpFilterParams, const int, int,
- int, int);
+ int, const InterpFilterParams, int, int, int,
+ int);
#endif
// Test parameter list:
diff --git a/test/av1_quantize_test.cc b/test/av1_quantize_test.cc
index 43acd6f..b5d1531 100644
--- a/test/av1_quantize_test.cc
+++ b/test/av1_quantize_test.cc
@@ -26,7 +26,7 @@
const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr,
const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr,
tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr,
- const int16_t *scan, const int16_t *iscan, const int log_scale);
+ const int16_t *scan, const int16_t *iscan, int log_scale);
struct QuantizeFuncParams {
QuantizeFuncParams(QuantizeFpFunc qF = NULL, QuantizeFpFunc qRefF = NULL,
diff --git a/test/avg_test.cc b/test/avg_test.cc
index 529672d..b040f6a 100644
--- a/test/avg_test.cc
+++ b/test/avg_test.cc
@@ -213,7 +213,7 @@
for (int i = 0; i < satd_size_; ++i) src_[i] = rnd_.Rand16();
}
- void Check(const int expected) {
+ void Check(int expected) {
int total;
ASM_REGISTER_STATE_CHECK(total = satd_func_(src_, satd_size_));
EXPECT_EQ(expected, total);
diff --git a/test/encode_test_driver.cc b/test/encode_test_driver.cc
index a9e1f70..80f155a 100644
--- a/test/encode_test_driver.cc
+++ b/test/encode_test_driver.cc
@@ -120,11 +120,10 @@
passes_ = 1;
}
-static bool compare_plane(const uint8_t *const buf1, const int stride1,
- const uint8_t *const buf2, const int stride2,
- const int w, const int h, int *const mismatch_row,
- int *const mismatch_col, int *const mismatch_pix1,
- int *const mismatch_pix2) {
+static bool compare_plane(const uint8_t *const buf1, int stride1,
+ const uint8_t *const buf2, int stride2, int w, int h,
+ int *const mismatch_row, int *const mismatch_col,
+ int *const mismatch_pix1, int *const mismatch_pix2) {
int r, c;
for (r = 0; r < h; ++r) {