Cleanup. Adding const to function pointer arguments.

Change-Id: I12c67c8c0fa1aa7fb3f7d6cc2ef65be29c4ea292
This commit is contained in:
Dmitry Kovalev 2013-10-31 14:34:21 -07:00
parent d515716140
commit 7c524bbef4
6 changed files with 18 additions and 19 deletions

View File

@ -421,7 +421,7 @@ static void txfrm_block_to_raster_xy(BLOCK_SIZE plane_bsize,
*y = (raster_mb >> tx_cols_log2) << tx_size; *y = (raster_mb >> tx_cols_log2) << tx_size;
} }
static void extend_for_intra(MACROBLOCKD* const xd, BLOCK_SIZE plane_bsize, static void extend_for_intra(MACROBLOCKD *xd, BLOCK_SIZE plane_bsize,
int plane, int block, TX_SIZE tx_size) { int plane, int block, TX_SIZE tx_size) {
struct macroblockd_plane *const pd = &xd->plane[plane]; struct macroblockd_plane *const pd = &xd->plane[plane];
uint8_t *const buf = pd->dst.buf; uint8_t *const buf = pd->dst.buf;
@ -461,7 +461,7 @@ static void extend_for_intra(MACROBLOCKD* const xd, BLOCK_SIZE plane_bsize,
} }
} }
} }
static void set_contexts_on_border(MACROBLOCKD *xd, static void set_contexts_on_border(const MACROBLOCKD *xd,
struct macroblockd_plane *pd, struct macroblockd_plane *pd,
BLOCK_SIZE plane_bsize, BLOCK_SIZE plane_bsize,
int tx_size_in_blocks, int has_eob, int tx_size_in_blocks, int has_eob,
@ -499,7 +499,7 @@ static void set_contexts_on_border(MACROBLOCKD *xd,
L[pt] = 0; L[pt] = 0;
} }
static void set_contexts(MACROBLOCKD *xd, struct macroblockd_plane *pd, static void set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size, BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
int has_eob, int aoff, int loff) { int has_eob, int aoff, int loff) {
ENTROPY_CONTEXT *const A = pd->above_context + aoff; ENTROPY_CONTEXT *const A = pd->above_context + aoff;

View File

@ -153,8 +153,8 @@ typedef unsigned int vp9_coeff_count_model[REF_TYPES][COEF_BANDS]
void vp9_model_to_full_probs(const vp9_prob *model, vp9_prob *full); void vp9_model_to_full_probs(const vp9_prob *model, vp9_prob *full);
static int get_entropy_context(TX_SIZE tx_size, static int get_entropy_context(TX_SIZE tx_size, const ENTROPY_CONTEXT *a,
ENTROPY_CONTEXT *a, ENTROPY_CONTEXT *l) { const ENTROPY_CONTEXT *l) {
ENTROPY_CONTEXT above_ec = 0, left_ec = 0; ENTROPY_CONTEXT above_ec = 0, left_ec = 0;
switch (tx_size) { switch (tx_size) {
@ -163,16 +163,16 @@ static int get_entropy_context(TX_SIZE tx_size,
left_ec = l[0] != 0; left_ec = l[0] != 0;
break; break;
case TX_8X8: case TX_8X8:
above_ec = !!*(uint16_t *)a; above_ec = !!*(const uint16_t *)a;
left_ec = !!*(uint16_t *)l; left_ec = !!*(const uint16_t *)l;
break; break;
case TX_16X16: case TX_16X16:
above_ec = !!*(uint32_t *)a; above_ec = !!*(const uint32_t *)a;
left_ec = !!*(uint32_t *)l; left_ec = !!*(const uint32_t *)l;
break; break;
case TX_32X32: case TX_32X32:
above_ec = !!*(uint64_t *)a; above_ec = !!*(const uint64_t *)a;
left_ec = !!*(uint64_t *)l; left_ec = !!*(const uint64_t *)l;
break; break;
default: default:
assert(!"Invalid transform size."); assert(!"Invalid transform size.");

View File

@ -369,7 +369,7 @@ static void build_intra_predictors(const uint8_t *ref, int ref_stride,
} }
} }
void vp9_predict_intra_block(MACROBLOCKD *xd, int block_idx, int bwl_in, void vp9_predict_intra_block(const MACROBLOCKD *xd, int block_idx, int bwl_in,
TX_SIZE tx_size, int mode, TX_SIZE tx_size, int mode,
const uint8_t *ref, int ref_stride, const uint8_t *ref, int ref_stride,
uint8_t *dst, int dst_stride) { uint8_t *dst, int dst_stride) {

View File

@ -14,8 +14,8 @@
#include "vpx/vpx_integer.h" #include "vpx/vpx_integer.h"
#include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_blockd.h"
void vp9_predict_intra_block(MACROBLOCKD *xd, int block_idx, int bwl_in, void vp9_predict_intra_block(const MACROBLOCKD *xd, int block_idx, int bwl_in,
TX_SIZE tx_size, int mode, TX_SIZE tx_size, int mode,
const uint8_t *ref, int ref_stride, const uint8_t *ref, int ref_stride,
uint8_t *dst, int dst_stride); uint8_t *dst, int dst_stride);
#endif // VP9_COMMON_VP9_RECONINTRA_H_ #endif // VP9_COMMON_VP9_RECONINTRA_H_

View File

@ -191,8 +191,7 @@ static INLINE const int16_t* get_iscan_16x16(TX_TYPE tx_type) {
} }
static INLINE int get_coef_context(const int16_t *neighbors, static INLINE int get_coef_context(const int16_t *neighbors,
uint8_t *token_cache, const uint8_t *token_cache, int c) {
int c) {
return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] + return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >> 1; token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >> 1;
} }

View File

@ -221,7 +221,7 @@ int vp9_prob_diff_update_savings_search_model(const unsigned int *ct,
} }
void vp9_cond_prob_diff_update(vp9_writer *w, vp9_prob *oldp, void vp9_cond_prob_diff_update(vp9_writer *w, vp9_prob *oldp,
unsigned int *ct) { const unsigned int ct[2]) {
const vp9_prob upd = DIFF_UPDATE_PROB; const vp9_prob upd = DIFF_UPDATE_PROB;
vp9_prob newp = get_binary_prob(ct[0], ct[1]); vp9_prob newp = get_binary_prob(ct[0], ct[1]);
const int savings = vp9_prob_diff_update_savings_search(ct, *oldp, &newp, const int savings = vp9_prob_diff_update_savings_search(ct, *oldp, &newp,