Commit 4ff59b55 authored by Yaowu Xu's avatar Yaowu Xu

Cleanup: Remove const for params passed by value

BUG=aomedia:448

Change-Id: Ieff977fca8a5033ddef2871a194870f59301ad8f
parent 6160df29
......@@ -652,13 +652,13 @@ if (aom_config("CONFIG_AV1_ENCODER") eq "yes") {
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_sad64x64_avg avx2 msa sse2/;
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/;
......
......@@ -90,8 +90,8 @@ int aom_satd_neon(const int16_t *coeff, int length) {
}
}
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 @@ int16_t aom_int_pro_col_neon(uint8_t const *ref, const int width) {
// 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);
......
......@@ -134,8 +134,8 @@ int aom_satd_c(const int16_t *coeff, int length) {
// 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 @@ void aom_int_pro_row_c(int16_t hbuf[16], const uint8_t *ref,
}
// 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 @@ int16_t aom_int_pro_col_c(const uint8_t *ref, const int width) {
// 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;
......
......@@ -143,8 +143,7 @@ static INLINE void aom_process_accounting(const aom_reader *r ACCT_STR_PARAM) {
}
}
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;
......
......@@ -313,8 +313,8 @@ int aom_satd_sse2(const int16_t *coeff, int length) {
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 @@ void aom_int_pro_row_sse2(int16_t *hbuf, uint8_t const *ref,
_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 @@ int16_t aom_int_pro_col_sse2(uint8_t const *ref, const int width) {
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;
......
......@@ -261,8 +261,7 @@ static INLINE void store_output(const __m128i *poutput, tran_low_t *dst_ptr) {
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 __m128i mult_round_shift(const __m128i *pin0, const __m128i *pin1,
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
......
......@@ -55,8 +55,7 @@ static INLINE int64_t hsum_epi32_si64(__m128i v_d) {
#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 @@ MASK_SUBPIX_VAR_LARGE(128, 128)
#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 @@ static void highbd_sum_and_sse(const __m128i v_a_w, const __m128i v_b_w,
*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 @@ static INLINE uint32_t highbd_10_calc_masked_variance(
// 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;
......
......@@ -1013,11 +1013,11 @@ static INLINE TX_TYPE get_tx_type(PLANE_TYPE plane_type, const MACROBLOCKD *xd,
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 @@ static INLINE int is_interintra_allowed(const MB_MODE_INFO *mbmi) {
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 @@ static INLINE int is_nontrans_global_motion(const MACROBLOCKD *xd) {
}
#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;
}
......
......@@ -404,22 +404,21 @@ static INLINE aom_prob av1_mode_mv_merge_probs(aom_prob pre_prob,
#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
......
......@@ -736,10 +736,8 @@ static INLINE void update_partition_context(MACROBLOCKD *xd, int mi_row,
}
#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 @@ static INLINE int is_chroma_reference(const int mi_row, const int mi_col,
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 @@ static INLINE int partition_plane_context(const MACROBLOCKD *xd, int mi_row,
#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 @@ static INLINE int max_block_wide(const MACROBLOCKD *xd, const BLOCK_SIZE bsize,
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 @@ static INLINE void av1_zero_left_context(MACROBLOCKD *const xd) {
}
#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 @@ static INLINE void set_txfm_ctx(TXFM_CONTEXT *txfm_ctx, uint8_t txs, int len) {
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 void txfm_partition_update(TXFM_CONTEXT *above_ctx,
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 @@ static INLINE int txfm_partition_context(TXFM_CONTEXT *above_ctx,
#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 PARTITION_TYPE get_partition(const AV1_COMMON *const cm,
}
}
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
......
......@@ -56,19 +56,19 @@ void av1_tile_init(TileInfo *tile, const AV1_COMMON *cm, int row, int col) {
#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;
......
......@@ -41,7 +41,7 @@ void av1_tile_set_col(TileInfo *tile, const struct AV1Common *cm, int col);
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,
......
......@@ -1453,7 +1453,7 @@ void av1_warp_plane(WarpedMotionParams *wm,
(((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 @@ static int find_affine_int(const int np, int *pts1, int *pts2, BLOCK_SIZE bsize,
#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 @@ static int find_affine_int(const int np, int *pts1, int *pts2, BLOCK_SIZE bsize,
}
#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) {
......
......@@ -89,8 +89,8 @@ void av1_warp_plane(WarpedMotionParams *wm,
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);
......
......@@ -25,7 +25,7 @@ DECLARE_ALIGNED(16, static int16_t, subpel_temporalfilter[15][6][8]);
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 @@ static void transClipPixel(uint32_t *src, int src_stride, __m128i *u, int bd) {
// 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];
......
......@@ -1449,8 +1449,8 @@ static void dec_predict_sb_complex(AV1Decoder *const pbi, MACROBLOCKD *const xd,
}
}
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 @@ static void read_tile_info(AV1Decoder *const pbi,
#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 @@ BITSTREAM_PROFILE av1_read_profile(struct aom_read_bit_buffer *rb) {
}
#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;
......
......@@ -43,8 +43,8 @@ typedef enum AV1_XFORM_QUANT {
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_block_intra(int plane, int block, int blk_row, int blk_col,
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,
......
......@@ -848,7 +848,7 @@ static INLINE void set_ref_ptrs(const AV1_COMMON *cm, MACROBLOCKD *xd,
&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;
}
......
......@@ -560,7 +560,7 @@ static void update_and_record_txb_context(int plane, int block, int blk_row,
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;
......
......@@ -362,7 +362,7 @@ static unsigned int setup_center_error(
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);
}
......
......@@ -569,8 +569,7 @@ static void denormalize_translation_reorder(double *params, double *T1,
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 @@ static int find_translation(const int np, double *pts1, double *pts2,
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 @@ static int find_rotzoom(const int np, double *pts1, double *pts2, double *mat) {
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 @@ static int find_affine(const int np, double *pts1, double *pts2, double *mat) {
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 @@ static int find_vertrapezoid(const int np, double *pts1, double *pts2,
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 @@ static int find_hortrapezoid(const int np, double *pts1, double *pts2,
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);
......
......@@ -1535,7 +1535,7 @@ static INLINE void load_buffer_32x32(const int16_t *input, int stride,
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;
......
......@@ -24,12 +24,12 @@ using libaom_test::ACMRandom;
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:
......
......@@ -26,7 +26,7 @@ typedef void (*QuantizeFpFunc)(
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,
......
......@@ -213,7 +213,7 @@ class SatdTest : public ::testing::Test,
for (int i = 0; i < satd_size_; ++i) src_[i] = rnd_.Rand16();
}
void Check(const int expected) {