Renaming BLOCK_SIZE_TYPE to BLOCK_SIZE in the common/decoder.

Adding temporary "typedef BLOCK_SIZE BLOCK_SIZE_TYPE" which will go away
after encoder's patch.

Change-Id: I06ec6a6f079401439843ec981d1496234fd7775c
This commit is contained in:
Dmitry Kovalev 2013-08-26 11:33:16 -07:00
parent 5eed6e2224
commit 45870619f3
14 changed files with 83 additions and 93 deletions

View File

@ -39,8 +39,8 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
// FIXME(rbultje) split in its own file
for (BLOCK_SIZE_TYPE bsize = BLOCK_4X4; bsize < BLOCK_SIZES;
bsize = static_cast<BLOCK_SIZE_TYPE>(static_cast<int>(bsize) + 1)) {
for (BLOCK_SIZE bsize = BLOCK_4X4; bsize < BLOCK_SIZES;
bsize = static_cast<BLOCK_SIZE>(static_cast<int>(bsize) + 1)) {
const int block_width = 4 << b_width_log2(bsize);
const int block_height = 4 << b_height_log2(bsize);
int16_t *diff = reinterpret_cast<int16_t *>(

View File

@ -115,18 +115,18 @@ typedef enum {
MAX_REF_FRAMES = 4
} MV_REFERENCE_FRAME;
static INLINE int b_width_log2(BLOCK_SIZE_TYPE sb_type) {
static INLINE int b_width_log2(BLOCK_SIZE sb_type) {
return b_width_log2_lookup[sb_type];
}
static INLINE int b_height_log2(BLOCK_SIZE_TYPE sb_type) {
static INLINE int b_height_log2(BLOCK_SIZE sb_type) {
return b_height_log2_lookup[sb_type];
}
static INLINE int mi_width_log2(BLOCK_SIZE_TYPE sb_type) {
static INLINE int mi_width_log2(BLOCK_SIZE sb_type) {
return mi_width_log2_lookup[sb_type];
}
static INLINE int mi_height_log2(BLOCK_SIZE_TYPE sb_type) {
static INLINE int mi_height_log2(BLOCK_SIZE sb_type) {
return mi_height_log2_lookup[sb_type];
}
@ -153,7 +153,7 @@ typedef struct {
INTERPOLATIONFILTERTYPE interp_filter;
BLOCK_SIZE_TYPE sb_type;
BLOCK_SIZE sb_type;
} MB_MODE_INFO;
typedef struct {
@ -245,7 +245,7 @@ typedef struct macroblockd {
} MACROBLOCKD;
static INLINE unsigned char *get_sb_index(MACROBLOCKD *xd, BLOCK_SIZE_TYPE subsize) {
static INLINE unsigned char *get_sb_index(MACROBLOCKD *xd, BLOCK_SIZE subsize) {
switch (subsize) {
case BLOCK_64X64:
case BLOCK_64X32:
@ -270,9 +270,8 @@ static INLINE unsigned char *get_sb_index(MACROBLOCKD *xd, BLOCK_SIZE_TYPE subsi
}
}
static INLINE void update_partition_context(MACROBLOCKD *xd,
BLOCK_SIZE_TYPE sb_type,
BLOCK_SIZE_TYPE sb_size) {
static INLINE void update_partition_context(MACROBLOCKD *xd, BLOCK_SIZE sb_type,
BLOCK_SIZE sb_size) {
const int bsl = b_width_log2(sb_size), bs = (1 << bsl) / 2;
const int bwl = b_width_log2(sb_type);
const int bhl = b_height_log2(sb_type);
@ -290,8 +289,7 @@ static INLINE void update_partition_context(MACROBLOCKD *xd,
vpx_memset(xd->left_seg_context, pcvalue[bhl == bsl], bs);
}
static INLINE int partition_plane_context(MACROBLOCKD *xd,
BLOCK_SIZE_TYPE sb_type) {
static INLINE int partition_plane_context(MACROBLOCKD *xd, BLOCK_SIZE sb_type) {
int bsl = mi_width_log2(sb_type), bs = 1 << bsl;
int above = 0, left = 0, i;
int boffset = mi_width_log2(BLOCK_64X64) - bsl;
@ -311,9 +309,8 @@ static INLINE int partition_plane_context(MACROBLOCKD *xd,
return (left * 2 + above) + bsl * PARTITION_PLOFFSET;
}
static BLOCK_SIZE_TYPE get_subsize(BLOCK_SIZE_TYPE bsize,
PARTITION_TYPE partition) {
const BLOCK_SIZE_TYPE subsize = subsize_lookup[partition][bsize];
static BLOCK_SIZE get_subsize(BLOCK_SIZE bsize, PARTITION_TYPE partition) {
const BLOCK_SIZE subsize = subsize_lookup[partition][bsize];
assert(subsize < BLOCK_SIZES);
return subsize;
}
@ -366,31 +363,30 @@ static INLINE TX_SIZE get_uv_tx_size(const MB_MODE_INFO *mbmi) {
return MIN(mbmi->txfm_size, max_uv_txsize_lookup[mbmi->sb_type]);
}
static BLOCK_SIZE_TYPE get_plane_block_size(BLOCK_SIZE_TYPE bsize,
const struct macroblockd_plane *pd) {
BLOCK_SIZE_TYPE bs = ss_size_lookup[bsize]
[pd->subsampling_x][pd->subsampling_y];
static BLOCK_SIZE get_plane_block_size(BLOCK_SIZE bsize,
const struct macroblockd_plane *pd) {
BLOCK_SIZE bs = ss_size_lookup[bsize][pd->subsampling_x][pd->subsampling_y];
assert(bs < BLOCK_SIZES);
return bs;
}
static INLINE int plane_block_width(BLOCK_SIZE_TYPE bsize,
static INLINE int plane_block_width(BLOCK_SIZE bsize,
const struct macroblockd_plane* plane) {
return 4 << (b_width_log2(bsize) - plane->subsampling_x);
}
static INLINE int plane_block_height(BLOCK_SIZE_TYPE bsize,
static INLINE int plane_block_height(BLOCK_SIZE bsize,
const struct macroblockd_plane* plane) {
return 4 << (b_height_log2(bsize) - plane->subsampling_y);
}
typedef void (*foreach_transformed_block_visitor)(int plane, int block,
BLOCK_SIZE_TYPE plane_bsize,
BLOCK_SIZE plane_bsize,
TX_SIZE tx_size,
void *arg);
static INLINE void foreach_transformed_block_in_plane(
const MACROBLOCKD *const xd, BLOCK_SIZE_TYPE bsize, int plane,
const MACROBLOCKD *const xd, BLOCK_SIZE bsize, int plane,
foreach_transformed_block_visitor visit, void *arg) {
const struct macroblockd_plane *const pd = &xd->plane[plane];
const MB_MODE_INFO* mbmi = &xd->mode_info_context->mbmi;
@ -399,7 +395,7 @@ static INLINE void foreach_transformed_block_in_plane(
// transform size varies per plane, look it up in a common way.
const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi)
: mbmi->txfm_size;
const BLOCK_SIZE_TYPE plane_bsize = get_plane_block_size(bsize, pd);
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
const int num_4x4_w = num_4x4_blocks_wide_lookup[plane_bsize];
const int num_4x4_h = num_4x4_blocks_high_lookup[plane_bsize];
const int step = 1 << (tx_size << 1);
@ -440,7 +436,7 @@ static INLINE void foreach_transformed_block_in_plane(
}
static INLINE void foreach_transformed_block(
const MACROBLOCKD* const xd, BLOCK_SIZE_TYPE bsize,
const MACROBLOCKD* const xd, BLOCK_SIZE bsize,
foreach_transformed_block_visitor visit, void *arg) {
int plane;
@ -449,7 +445,7 @@ static INLINE void foreach_transformed_block(
}
static INLINE void foreach_transformed_block_uv(
const MACROBLOCKD* const xd, BLOCK_SIZE_TYPE bsize,
const MACROBLOCKD* const xd, BLOCK_SIZE bsize,
foreach_transformed_block_visitor visit, void *arg) {
int plane;
@ -457,25 +453,25 @@ static INLINE void foreach_transformed_block_uv(
foreach_transformed_block_in_plane(xd, bsize, plane, visit, arg);
}
static int raster_block_offset(BLOCK_SIZE_TYPE plane_bsize,
static int raster_block_offset(BLOCK_SIZE plane_bsize,
int raster_block, int stride) {
const int bw = b_width_log2(plane_bsize);
const int y = 4 * (raster_block >> bw);
const int x = 4 * (raster_block & ((1 << bw) - 1));
return y * stride + x;
}
static int16_t* raster_block_offset_int16(BLOCK_SIZE_TYPE plane_bsize,
static int16_t* raster_block_offset_int16(BLOCK_SIZE plane_bsize,
int raster_block, int16_t *base) {
const int stride = 4 << b_width_log2(plane_bsize);
return base + raster_block_offset(plane_bsize, raster_block, stride);
}
static uint8_t* raster_block_offset_uint8(BLOCK_SIZE_TYPE plane_bsize,
static uint8_t* raster_block_offset_uint8(BLOCK_SIZE plane_bsize,
int raster_block, uint8_t *base,
int stride) {
return base + raster_block_offset(plane_bsize, raster_block, stride);
}
static int txfrm_block_to_raster_block(BLOCK_SIZE_TYPE plane_bsize,
static int txfrm_block_to_raster_block(BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, int block) {
const int bwl = b_width_log2(plane_bsize);
const int tx_cols_log2 = bwl - tx_size;
@ -486,7 +482,7 @@ static int txfrm_block_to_raster_block(BLOCK_SIZE_TYPE plane_bsize,
return x + (y << bwl);
}
static void txfrm_block_to_raster_xy(BLOCK_SIZE_TYPE plane_bsize,
static void txfrm_block_to_raster_xy(BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, int block,
int *x, int *y) {
const int bwl = b_width_log2(plane_bsize);
@ -497,7 +493,7 @@ static void txfrm_block_to_raster_xy(BLOCK_SIZE_TYPE plane_bsize,
*y = (raster_mb >> tx_cols_log2) << tx_size;
}
static void extend_for_intra(MACROBLOCKD* const xd, BLOCK_SIZE_TYPE plane_bsize,
static void extend_for_intra(MACROBLOCKD* const xd, BLOCK_SIZE plane_bsize,
int plane, int block, TX_SIZE tx_size) {
struct macroblockd_plane *const pd = &xd->plane[plane];
uint8_t *const buf = pd->dst.buf;
@ -536,7 +532,7 @@ static void extend_for_intra(MACROBLOCKD* const xd, BLOCK_SIZE_TYPE plane_bsize,
}
static void set_contexts_on_border(MACROBLOCKD *xd,
struct macroblockd_plane *pd,
BLOCK_SIZE_TYPE plane_bsize,
BLOCK_SIZE plane_bsize,
int tx_size_in_blocks, int has_eob,
int aoff, int loff,
ENTROPY_CONTEXT *A, ENTROPY_CONTEXT *L) {
@ -573,7 +569,7 @@ static void set_contexts_on_border(MACROBLOCKD *xd,
}
static void set_contexts(MACROBLOCKD *xd, struct macroblockd_plane *pd,
BLOCK_SIZE_TYPE plane_bsize, TX_SIZE tx_size,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
int has_eob, int aoff, int loff) {
ENTROPY_CONTEXT *const A = pd->above_context + aoff;
ENTROPY_CONTEXT *const L = pd->left_context + loff;

View File

@ -74,7 +74,7 @@ const PARTITION_TYPE partition_lookup[][BLOCK_SIZES] = {
}
};
const BLOCK_SIZE_TYPE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES] = {
const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES] = {
{ // PARTITION_NONE
BLOCK_4X4, BLOCK_4X8, BLOCK_8X4,
BLOCK_8X8, BLOCK_8X16, BLOCK_16X8,
@ -115,7 +115,7 @@ const TX_SIZE max_uv_txsize_lookup[BLOCK_SIZES] = {
TX_16X16, TX_16X16, TX_16X16, TX_32X32
};
const BLOCK_SIZE_TYPE ss_size_lookup[BLOCK_SIZES][2][2] = {
const BLOCK_SIZE ss_size_lookup[BLOCK_SIZES][2][2] = {
// ss_x == 0 ss_x == 0 ss_x == 1 ss_x == 1
// ss_y == 0 ss_y == 1 ss_y == 0 ss_y == 1
{{BLOCK_4X4, BLOCK_INVALID}, {BLOCK_INVALID, BLOCK_INVALID}},

View File

@ -24,9 +24,9 @@ extern const int num_4x4_blocks_wide_lookup[BLOCK_SIZES];
extern const int size_group_lookup[BLOCK_SIZES];
extern const int num_pels_log2_lookup[BLOCK_SIZES];
extern const PARTITION_TYPE partition_lookup[][BLOCK_SIZES];
extern const BLOCK_SIZE_TYPE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES];
extern const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES];
extern const TX_SIZE max_txsize_lookup[BLOCK_SIZES];
extern const TX_SIZE max_uv_txsize_lookup[BLOCK_SIZES];
extern const BLOCK_SIZE_TYPE ss_size_lookup[BLOCK_SIZES][2][2];
extern const BLOCK_SIZE ss_size_lookup[BLOCK_SIZES][2][2];
#endif // VP9_COMMON_VP9_COMMON_DATA_H

View File

@ -156,11 +156,11 @@ extern DECLARE_ALIGNED(16, int16_t,
void vp9_coef_tree_initialize(void);
void vp9_adapt_coef_probs(struct VP9Common *);
static INLINE void reset_skip_context(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) {
static INLINE void reset_skip_context(MACROBLOCKD *xd, BLOCK_SIZE bsize) {
int i;
for (i = 0; i < MAX_MB_PLANE; i++) {
struct macroblockd_plane *const pd = &xd->plane[i];
const BLOCK_SIZE_TYPE plane_bsize = get_plane_block_size(bsize, pd);
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
vpx_memset(pd->above_context, 0, sizeof(ENTROPY_CONTEXT) *
num_4x4_blocks_wide_lookup[plane_bsize]);
vpx_memset(pd->left_context, 0, sizeof(ENTROPY_CONTEXT) *

View File

@ -22,7 +22,7 @@
#define MI_MASK (MI_BLOCK_SIZE - 1)
typedef enum BLOCK_SIZE_TYPE {
typedef enum BLOCK_SIZE {
BLOCK_4X4,
BLOCK_4X8,
BLOCK_8X4,
@ -38,7 +38,9 @@ typedef enum BLOCK_SIZE_TYPE {
BLOCK_64X64,
BLOCK_SIZES,
BLOCK_INVALID = BLOCK_SIZES
} BLOCK_SIZE_TYPE;
} BLOCK_SIZE;
typedef BLOCK_SIZE BLOCK_SIZE_TYPE;
typedef enum PARTITION_TYPE {
PARTITION_NONE,

View File

@ -383,7 +383,7 @@ unsigned char vp9_get_pred_context_tx_size(const MACROBLOCKD *xd) {
return above_context + left_context > max_tx_size;
}
void vp9_set_pred_flag_seg_id(VP9_COMMON *cm, BLOCK_SIZE_TYPE bsize,
void vp9_set_pred_flag_seg_id(VP9_COMMON *cm, BLOCK_SIZE bsize,
int mi_row, int mi_col, uint8_t pred_flag) {
MODE_INFO *mi = &cm->mi[mi_row * cm->mode_info_stride + mi_col];
const int bw = 1 << mi_width_log2(bsize);
@ -397,7 +397,7 @@ void vp9_set_pred_flag_seg_id(VP9_COMMON *cm, BLOCK_SIZE_TYPE bsize,
mi[y * cm->mode_info_stride + x].mbmi.seg_id_predicted = pred_flag;
}
void vp9_set_pred_flag_mbskip(VP9_COMMON *cm, BLOCK_SIZE_TYPE bsize,
void vp9_set_pred_flag_mbskip(VP9_COMMON *cm, BLOCK_SIZE bsize,
int mi_row, int mi_col, uint8_t pred_flag) {
MODE_INFO *mi = &cm->mi[mi_row * cm->mode_info_stride + mi_col];
const int bw = 1 << mi_width_log2(bsize);
@ -412,7 +412,7 @@ void vp9_set_pred_flag_mbskip(VP9_COMMON *cm, BLOCK_SIZE_TYPE bsize,
}
int vp9_get_segment_id(VP9_COMMON *cm, const uint8_t *segment_ids,
BLOCK_SIZE_TYPE bsize, int mi_row, int mi_col) {
BLOCK_SIZE bsize, int mi_row, int mi_col) {
const int mi_offset = mi_row * cm->mi_cols + mi_col;
const int bw = 1 << mi_width_log2(bsize);
const int bh = 1 << mi_height_log2(bsize);

View File

@ -15,7 +15,7 @@
#include "vp9/common/vp9_onyxc_int.h"
int vp9_get_segment_id(VP9_COMMON *cm, const uint8_t *segment_ids,
BLOCK_SIZE_TYPE bsize, int mi_row, int mi_col);
BLOCK_SIZE bsize, int mi_row, int mi_col);
static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
@ -32,7 +32,7 @@ static INLINE vp9_prob vp9_get_pred_prob_seg_id(struct segmentation *seg,
return seg->pred_probs[vp9_get_pred_context_seg_id(xd)];
}
void vp9_set_pred_flag_seg_id(VP9_COMMON *cm, BLOCK_SIZE_TYPE bsize,
void vp9_set_pred_flag_seg_id(VP9_COMMON *cm, BLOCK_SIZE bsize,
int mi_row, int mi_col, uint8_t pred_flag);
static INLINE int vp9_get_pred_context_mbskip(const MACROBLOCKD *xd) {
@ -53,7 +53,7 @@ static INLINE unsigned char vp9_get_pred_flag_mbskip(const MACROBLOCKD *xd) {
return xd->mode_info_context->mbmi.skip_coeff;
}
void vp9_set_pred_flag_mbskip(VP9_COMMON *cm, BLOCK_SIZE_TYPE bsize,
void vp9_set_pred_flag_mbskip(VP9_COMMON *cm, BLOCK_SIZE bsize,
int mi_row, int mi_col, uint8_t pred_flag);
unsigned char vp9_get_pred_context_switchable_interp(const MACROBLOCKD *xd);
@ -103,7 +103,7 @@ static INLINE vp9_prob vp9_get_pred_prob_single_ref_p2(const VP9_COMMON *cm,
unsigned char vp9_get_pred_context_tx_size(const MACROBLOCKD *xd);
static const vp9_prob *get_tx_probs(BLOCK_SIZE_TYPE bsize, uint8_t context,
static const vp9_prob *get_tx_probs(BLOCK_SIZE bsize, uint8_t context,
const struct tx_probs *tx_probs) {
if (bsize < BLOCK_16X16)
return tx_probs->p8x8[context];
@ -115,12 +115,12 @@ static const vp9_prob *get_tx_probs(BLOCK_SIZE_TYPE bsize, uint8_t context,
static const vp9_prob *get_tx_probs2(const MACROBLOCKD *xd,
const struct tx_probs *tx_probs) {
const BLOCK_SIZE_TYPE bsize = xd->mode_info_context->mbmi.sb_type;
const BLOCK_SIZE bsize = xd->mode_info_context->mbmi.sb_type;
const int context = vp9_get_pred_context_tx_size(xd);
return get_tx_probs(bsize, context, tx_probs);
}
static void update_tx_counts(BLOCK_SIZE_TYPE bsize, uint8_t context,
static void update_tx_counts(BLOCK_SIZE bsize, uint8_t context,
TX_SIZE tx_size, struct tx_counts *tx_counts) {
if (bsize >= BLOCK_32X32)
tx_counts->p32x32[context][tx_size]++;

View File

@ -117,8 +117,7 @@ struct build_inter_predictors_args {
int x, y;
};
static void build_inter_predictors(int plane, int block,
BLOCK_SIZE_TYPE bsize,
static void build_inter_predictors(int plane, int block, BLOCK_SIZE bsize,
int pred_w, int pred_h,
void *argv) {
const struct build_inter_predictors_args* const arg = argv;
@ -174,14 +173,14 @@ static void build_inter_predictors(int plane, int block,
}
// TODO(jkoleszar): In principle, pred_w, pred_h are unnecessary, as we could
// calculate the subsampled BLOCK_SIZE_TYPE, but that type isn't defined for
// calculate the subsampled BLOCK_SIZE, but that type isn't defined for
// sizes smaller than 16x16 yet.
typedef void (*foreach_predicted_block_visitor)(int plane, int block,
BLOCK_SIZE_TYPE bsize,
BLOCK_SIZE bsize,
int pred_w, int pred_h,
void *arg);
static INLINE void foreach_predicted_block_in_plane(
const MACROBLOCKD* const xd, BLOCK_SIZE_TYPE bsize, int plane,
const MACROBLOCKD* const xd, BLOCK_SIZE bsize, int plane,
foreach_predicted_block_visitor visit, void *arg) {
int i, x, y;
@ -216,8 +215,7 @@ static INLINE void foreach_predicted_block_in_plane(
}
}
static void build_inter_predictors_for_planes(MACROBLOCKD *xd,
BLOCK_SIZE_TYPE bsize,
static void build_inter_predictors_for_planes(MACROBLOCKD *xd, BLOCK_SIZE bsize,
int mi_row, int mi_col,
int plane_from, int plane_to) {
int plane;
@ -231,16 +229,16 @@ static void build_inter_predictors_for_planes(MACROBLOCKD *xd,
}
void vp9_build_inter_predictors_sby(MACROBLOCKD *xd, int mi_row, int mi_col,
BLOCK_SIZE_TYPE bsize) {
BLOCK_SIZE bsize) {
build_inter_predictors_for_planes(xd, bsize, mi_row, mi_col, 0, 0);
}
void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd, int mi_row, int mi_col,
BLOCK_SIZE_TYPE bsize) {
BLOCK_SIZE bsize) {
build_inter_predictors_for_planes(xd, bsize, mi_row, mi_col, 1,
MAX_MB_PLANE - 1);
}
void vp9_build_inter_predictors_sb(MACROBLOCKD *xd, int mi_row, int mi_col,
BLOCK_SIZE_TYPE bsize) {
BLOCK_SIZE bsize) {
build_inter_predictors_for_planes(xd, bsize, mi_row, mi_col, 0,
MAX_MB_PLANE - 1);
}

View File

@ -15,19 +15,14 @@
#include "vp9/common/vp9_onyxc_int.h"
struct subpix_fn_table;
void vp9_build_inter_predictors_sby(MACROBLOCKD *xd,
int mb_row,
int mb_col,
BLOCK_SIZE_TYPE bsize);
void vp9_build_inter_predictors_sby(MACROBLOCKD *xd, int mi_row, int mi_col,
BLOCK_SIZE bsize);
void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd,
int mb_row,
int mb_col,
BLOCK_SIZE_TYPE bsize);
void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd, int mi_row, int mi_col,
BLOCK_SIZE bsize);
void vp9_build_inter_predictors_sb(MACROBLOCKD *mb,
int mb_row, int mb_col,
BLOCK_SIZE_TYPE bsize);
void vp9_build_inter_predictors_sb(MACROBLOCKD *xd, int mi_row, int mi_col,
BLOCK_SIZE bsize);
void vp9_setup_interp_filters(MACROBLOCKD *xd,
INTERPOLATIONFILTERTYPE filter,

View File

@ -43,7 +43,7 @@ static int read_segment_id(vp9_reader *r, const struct segmentation *seg) {
}
static TX_SIZE read_selected_tx_size(VP9_COMMON *cm, MACROBLOCKD *xd,
BLOCK_SIZE_TYPE bsize, vp9_reader *r) {
BLOCK_SIZE bsize, vp9_reader *r) {
const uint8_t context = vp9_get_pred_context_tx_size(xd);
const vp9_prob *tx_probs = get_tx_probs(bsize, context, &cm->fc.tx_probs);
TX_SIZE tx_size = vp9_read(r, tx_probs[0]);
@ -58,7 +58,7 @@ static TX_SIZE read_selected_tx_size(VP9_COMMON *cm, MACROBLOCKD *xd,
}
static TX_SIZE read_tx_size(VP9D_COMP *pbi, TX_MODE tx_mode,
BLOCK_SIZE_TYPE bsize, int allow_select,
BLOCK_SIZE bsize, int allow_select,
vp9_reader *r) {
VP9_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
@ -75,7 +75,7 @@ static TX_SIZE read_tx_size(VP9D_COMP *pbi, TX_MODE tx_mode,
return TX_4X4;
}
static void set_segment_id(VP9_COMMON *cm, BLOCK_SIZE_TYPE bsize,
static void set_segment_id(VP9_COMMON *cm, BLOCK_SIZE bsize,
int mi_row, int mi_col, int segment_id) {
const int mi_offset = mi_row * cm->mi_cols + mi_col;
const int bw = 1 << mi_width_log2(bsize);
@ -95,7 +95,7 @@ static int read_intra_segment_id(VP9D_COMP *pbi, int mi_row, int mi_col,
vp9_reader *r) {
MACROBLOCKD *const xd = &pbi->mb;
struct segmentation *const seg = &pbi->common.seg;
const BLOCK_SIZE_TYPE bsize = xd->mode_info_context->mbmi.sb_type;
const BLOCK_SIZE bsize = xd->mode_info_context->mbmi.sb_type;
int segment_id;
if (!seg->enabled)
@ -114,7 +114,7 @@ static int read_inter_segment_id(VP9D_COMP *pbi, int mi_row, int mi_col,
VP9_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
struct segmentation *const seg = &cm->seg;
const BLOCK_SIZE_TYPE bsize = xd->mode_info_context->mbmi.sb_type;
const BLOCK_SIZE bsize = xd->mode_info_context->mbmi.sb_type;
int pred_segment_id, segment_id;
if (!seg->enabled)
@ -155,7 +155,7 @@ static void read_intra_frame_mode_info(VP9D_COMP *pbi, MODE_INFO *m,
VP9_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
MB_MODE_INFO *const mbmi = &m->mbmi;
const BLOCK_SIZE_TYPE bsize = mbmi->sb_type;
const BLOCK_SIZE bsize = mbmi->sb_type;
const int mis = cm->mode_info_stride;
mbmi->segment_id = read_intra_segment_id(pbi, mi_row, mi_col, r);
@ -381,7 +381,7 @@ static void read_intra_block_mode_info(VP9D_COMP *pbi, MODE_INFO *mi,
vp9_reader *r) {
VP9_COMMON *const cm = &pbi->common;
MB_MODE_INFO *const mbmi = &mi->mbmi;
const BLOCK_SIZE_TYPE bsize = mi->mbmi.sb_type;
const BLOCK_SIZE bsize = mi->mbmi.sb_type;
mbmi->ref_frame[0] = INTRA_FRAME;
mbmi->ref_frame[1] = NONE;
@ -439,7 +439,7 @@ static void read_inter_block_mode_info(VP9D_COMP *pbi, MODE_INFO *mi,
MB_MODE_INFO *const mbmi = &mi->mbmi;
int_mv *const mv0 = &mbmi->mv[0];
int_mv *const mv1 = &mbmi->mv[1];
const BLOCK_SIZE_TYPE bsize = mbmi->sb_type;
const BLOCK_SIZE bsize = mbmi->sb_type;
const int allow_hp = xd->allow_high_precision_mv;
int_mv nearest, nearby, best_mv;
@ -668,7 +668,7 @@ void vp9_read_mode_info(VP9D_COMP* pbi, int mi_row, int mi_col, vp9_reader *r) {
VP9_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
MODE_INFO *mi = xd->mode_info_context;
const BLOCK_SIZE_TYPE bsize = mi->mbmi.sb_type;
const BLOCK_SIZE bsize = mi->mbmi.sb_type;
const int bw = 1 << mi_width_log2(bsize);
const int bh = 1 << mi_height_log2(bsize);
const int y_mis = MIN(bh, cm->mi_rows - mi_row);

View File

@ -87,7 +87,7 @@ static void init_dequantizer(VP9_COMMON *cm, MACROBLOCKD *xd) {
xd->plane[i].dequant = cm->uv_dequant[xd->q_index];
}
static void decode_block(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
static void decode_block(int plane, int block, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg) {
MACROBLOCKD* const xd = arg;
struct macroblockd_plane *const pd = &xd->plane[plane];
@ -123,8 +123,7 @@ static void decode_block(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
}
}
static void decode_block_intra(int plane, int block,
BLOCK_SIZE_TYPE plane_bsize,
static void decode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg) {
MACROBLOCKD* const xd = arg;
struct macroblockd_plane *const pd = &xd->plane[plane];
@ -158,7 +157,7 @@ static void decode_block_intra(int plane, int block,
decode_block(plane, block, plane_bsize, tx_size, arg);
}
static int decode_tokens(VP9D_COMP *pbi, BLOCK_SIZE_TYPE bsize, vp9_reader *r) {
static int decode_tokens(VP9D_COMP *pbi, BLOCK_SIZE bsize, vp9_reader *r) {
MACROBLOCKD *const xd = &pbi->mb;
if (xd->mode_info_context->mbmi.skip_coeff) {
@ -173,7 +172,7 @@ static int decode_tokens(VP9D_COMP *pbi, BLOCK_SIZE_TYPE bsize, vp9_reader *r) {
}
}
static void set_offsets(VP9D_COMP *pbi, BLOCK_SIZE_TYPE bsize,
static void set_offsets(VP9D_COMP *pbi, BLOCK_SIZE bsize,
int mi_row, int mi_col) {
VP9_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
@ -215,7 +214,7 @@ static void set_ref(VP9D_COMP *pbi, int i, int mi_row, int mi_col) {
}
static void decode_modes_b(VP9D_COMP *pbi, int mi_row, int mi_col,
vp9_reader *r, BLOCK_SIZE_TYPE bsize) {
vp9_reader *r, BLOCK_SIZE bsize) {
VP9_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
const int less8x8 = bsize < BLOCK_8X8;
@ -265,12 +264,12 @@ static void decode_modes_b(VP9D_COMP *pbi, int mi_row, int mi_col,
}
static void decode_modes_sb(VP9D_COMP *pbi, int mi_row, int mi_col,
vp9_reader* r, BLOCK_SIZE_TYPE bsize) {
vp9_reader* r, BLOCK_SIZE bsize) {
VP9_COMMON *const pc = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
const int bs = (1 << mi_width_log2(bsize)) / 2;
PARTITION_TYPE partition = PARTITION_NONE;
BLOCK_SIZE_TYPE subsize;
BLOCK_SIZE subsize;
if (mi_row >= pc->mi_rows || mi_col >= pc->mi_cols)
return;

View File

@ -249,7 +249,7 @@ struct decode_block_args {
int *eobtotal;
};
static void decode_block(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
static void decode_block(int plane, int block, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *argv) {
const struct decode_block_args* const arg = argv;
@ -275,7 +275,7 @@ static void decode_block(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
*arg->eobtotal += eob;
}
int vp9_decode_tokens(VP9D_COMP *pbi, vp9_reader *r, BLOCK_SIZE_TYPE bsize) {
int vp9_decode_tokens(VP9D_COMP *pbi, vp9_reader *r, BLOCK_SIZE bsize) {
int eobtotal = 0;
struct decode_block_args args = {pbi, r, &eobtotal};
foreach_transformed_block(&pbi->mb, bsize, decode_block, &args);

View File

@ -15,6 +15,6 @@
#include "vp9/decoder/vp9_onyxd_int.h"
#include "vp9/decoder/vp9_dboolhuff.h"
int vp9_decode_tokens(VP9D_COMP* pbi, vp9_reader *r, BLOCK_SIZE_TYPE bsize);
int vp9_decode_tokens(VP9D_COMP* pbi, vp9_reader *r, BLOCK_SIZE bsize);
#endif // VP9_DECODER_VP9_DETOKENIZE_H_