Commit 7b95f9bf authored by Dmitry Kovalev's avatar Dmitry Kovalev

Renaming BLOCK_SIZE_TYPE to BLOCK_SIZE in the encoder.

Change-Id: I62bb07c377f947cb72fac68add7a6b199e42c6b9
parent ba10aed8
......@@ -40,8 +40,6 @@ typedef enum BLOCK_SIZE {
BLOCK_INVALID = BLOCK_SIZES
} BLOCK_SIZE;
typedef BLOCK_SIZE BLOCK_SIZE_TYPE;
typedef enum PARTITION_TYPE {
PARTITION_NONE,
PARTITION_HORZ,
......
......@@ -199,7 +199,7 @@ static void update_mbintra_mode_probs(VP9_COMP* const cpi,
}
static void write_selected_tx_size(const VP9_COMP *cpi, TX_SIZE tx_size,
BLOCK_SIZE_TYPE bsize, vp9_writer *w) {
BLOCK_SIZE bsize, vp9_writer *w) {
const MACROBLOCKD *const xd = &cpi->mb.e_mbd;
const vp9_prob *tx_probs = get_tx_probs2(xd, &cpi->common.fc.tx_probs);
vp9_write(w, tx_size != TX_4X4, tx_probs[0]);
......@@ -407,7 +407,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
const MB_PREDICTION_MODE mode = mi->mode;
const int segment_id = mi->segment_id;
int skip_coeff;
const BLOCK_SIZE_TYPE bsize = mi->sb_type;
const BLOCK_SIZE bsize = mi->sb_type;
const int allow_hp = xd->allow_high_precision_mv;
x->partition_info = x->pi + (m - pc->mi);
......@@ -606,8 +606,7 @@ static void write_modes_b(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc,
static void write_modes_sb(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc,
TOKENEXTRA **tok, TOKENEXTRA *tok_end,
int mi_row, int mi_col,
BLOCK_SIZE_TYPE bsize) {
int mi_row, int mi_col, BLOCK_SIZE bsize) {
VP9_COMMON *const cm = &cpi->common;
MACROBLOCKD *xd = &cpi->mb.e_mbd;
const int mis = cm->mode_info_stride;
......@@ -615,7 +614,7 @@ static void write_modes_sb(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc,
int bs = (1 << bsl) / 4; // mode_info step for subsize
int n;
PARTITION_TYPE partition = PARTITION_NONE;
BLOCK_SIZE_TYPE subsize;
BLOCK_SIZE subsize;
if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols)
return;
......
......@@ -170,10 +170,10 @@ struct macroblock {
PICK_MODE_CONTEXT sb64_context;
int partition_cost[NUM_PARTITION_CONTEXTS][PARTITION_TYPES];
BLOCK_SIZE_TYPE b_partitioning[4][4][4];
BLOCK_SIZE_TYPE mb_partitioning[4][4];
BLOCK_SIZE_TYPE sb_partitioning[4];
BLOCK_SIZE_TYPE sb64_partitioning;
BLOCK_SIZE b_partitioning[4][4][4];
BLOCK_SIZE mb_partitioning[4][4];
BLOCK_SIZE sb_partitioning[4];
BLOCK_SIZE sb64_partitioning;
void (*fwd_txm4x4)(int16_t *input, int16_t *output, int pitch);
void (*fwd_txm8x4)(int16_t *input, int16_t *output, int pitch);
......
This diff is collapsed.
......@@ -14,7 +14,7 @@
#include "vp9/encoder/vp9_onyx_int.h"
int vp9_encode_intra(MACROBLOCK *x, int use_16x16_pred);
void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg);
#endif // VP9_ENCODER_VP9_ENCODEINTRA_H_
......@@ -69,7 +69,7 @@ static void inverse_transform_b_16x16_add(int eob,
vp9_short_idct16x16_add(dqcoeff, dest, stride);
}
static void subtract_plane(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize, int plane) {
static void subtract_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
struct macroblock_plane *const p = &x->plane[plane];
const MACROBLOCKD *const xd = &x->e_mbd;
const struct macroblockd_plane *const pd = &xd->plane[plane];
......@@ -81,18 +81,18 @@ static void subtract_plane(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize, int plane) {
pd->dst.buf, pd->dst.stride);
}
void vp9_subtract_sby(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
void vp9_subtract_sby(MACROBLOCK *x, BLOCK_SIZE bsize) {
subtract_plane(x, bsize, 0);
}
void vp9_subtract_sbuv(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
void vp9_subtract_sbuv(MACROBLOCK *x, BLOCK_SIZE bsize) {
int i;
for (i = 1; i < MAX_MB_PLANE; i++)
subtract_plane(x, bsize, i);
}
void vp9_subtract_sb(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
void vp9_subtract_sb(MACROBLOCK *x, BLOCK_SIZE bsize) {
vp9_subtract_sby(x, bsize);
vp9_subtract_sbuv(x, bsize);
}
......@@ -142,7 +142,7 @@ static int trellis_get_coeff_context(const int16_t *scan,
}
static void optimize_b(MACROBLOCK *mb,
int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
int plane, int block, BLOCK_SIZE plane_bsize,
ENTROPY_CONTEXT *a, ENTROPY_CONTEXT *l,
TX_SIZE tx_size) {
MACROBLOCKD *const xd = &mb->e_mbd;
......@@ -370,7 +370,7 @@ static void optimize_b(MACROBLOCK *mb,
*a = *l = (final_eob > 0);
}
void vp9_optimize_b(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
void vp9_optimize_b(int plane, int block, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, MACROBLOCK *mb, struct optimize_ctx *ctx) {
int x, y;
txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &x, &y);
......@@ -378,11 +378,11 @@ void vp9_optimize_b(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
&ctx->ta[plane][x], &ctx->tl[plane][y], tx_size);
}
static void optimize_init_b(int plane, BLOCK_SIZE_TYPE bsize,
static void optimize_init_b(int plane, BLOCK_SIZE bsize,
struct encode_b_args *args) {
const MACROBLOCKD *xd = &args->x->e_mbd;
const struct macroblockd_plane* const pd = &xd->plane[plane];
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 MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi;
......@@ -419,7 +419,7 @@ static void optimize_init_b(int plane, BLOCK_SIZE_TYPE bsize,
}
}
void vp9_xform_quant(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
void vp9_xform_quant(int plane, int block, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg) {
struct encode_b_args* const args = arg;
MACROBLOCK* const x = args->x;
......@@ -492,7 +492,7 @@ void vp9_xform_quant(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
}
}
static void encode_block(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg) {
struct encode_b_args *const args = arg;
MACROBLOCK *const x = args->x;
......@@ -536,7 +536,7 @@ static void encode_block(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
}
}
void vp9_encode_sby(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
void vp9_encode_sby(MACROBLOCK *x, BLOCK_SIZE bsize) {
MACROBLOCKD *const xd = &x->e_mbd;
struct optimize_ctx ctx;
struct encode_b_args arg = {x, &ctx};
......@@ -548,7 +548,7 @@ void vp9_encode_sby(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
foreach_transformed_block_in_plane(xd, bsize, 0, encode_block, &arg);
}
void vp9_encode_sb(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
void vp9_encode_sb(MACROBLOCK *x, BLOCK_SIZE bsize) {
MACROBLOCKD *const xd = &x->e_mbd;
struct optimize_ctx ctx;
struct encode_b_args arg = {x, &ctx};
......@@ -564,7 +564,7 @@ void vp9_encode_sb(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
foreach_transformed_block(xd, bsize, encode_block, &arg);
}
void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg) {
struct encode_b_args* const args = arg;
MACROBLOCK *const x = args->x;
......@@ -714,7 +714,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
}
}
void vp9_encode_intra_block_y(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
void vp9_encode_intra_block_y(MACROBLOCK *x, BLOCK_SIZE bsize) {
MACROBLOCKD* const xd = &x->e_mbd;
struct optimize_ctx ctx;
struct encode_b_args arg = {x, &ctx};
......@@ -722,7 +722,7 @@ void vp9_encode_intra_block_y(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
foreach_transformed_block_in_plane(xd, bsize, 0, vp9_encode_block_intra,
&arg);
}
void vp9_encode_intra_block_uv(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
void vp9_encode_intra_block_uv(MACROBLOCK *x, BLOCK_SIZE bsize) {
MACROBLOCKD* const xd = &x->e_mbd;
struct optimize_ctx ctx;
struct encode_b_args arg = {x, &ctx};
......
......@@ -32,18 +32,18 @@ struct encode_b_args {
struct optimize_ctx *ctx;
};
void vp9_encode_sb(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize);
void vp9_encode_sby(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize);
void vp9_encode_sb(MACROBLOCK *x, BLOCK_SIZE bsize);
void vp9_encode_sby(MACROBLOCK *x, BLOCK_SIZE bsize);
void vp9_xform_quant(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
void vp9_xform_quant(int plane, int block, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg);
void vp9_subtract_sby(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize);
void vp9_subtract_sbuv(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize);
void vp9_subtract_sb(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize);
void vp9_subtract_sby(MACROBLOCK *x, BLOCK_SIZE bsize);
void vp9_subtract_sbuv(MACROBLOCK *x, BLOCK_SIZE bsize);
void vp9_subtract_sb(MACROBLOCK *x, BLOCK_SIZE bsize);
void vp9_encode_intra_block_y(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize);
void vp9_encode_intra_block_uv(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize);
void vp9_encode_intra_block_y(MACROBLOCK *x, BLOCK_SIZE bsize);
void vp9_encode_intra_block_uv(MACROBLOCK *x, BLOCK_SIZE bsize);
#endif // VP9_ENCODER_VP9_ENCODEMB_H_
......@@ -273,12 +273,12 @@ typedef struct {
int use_square_partition_only;
int unused_mode_skip_lvl;
int reference_masking;
BLOCK_SIZE_TYPE always_this_block_size;
BLOCK_SIZE always_this_block_size;
int auto_min_max_partition_size;
int auto_min_max_partition_interval;
int auto_min_max_partition_count;
BLOCK_SIZE_TYPE min_partition_size;
BLOCK_SIZE_TYPE max_partition_size;
BLOCK_SIZE min_partition_size;
BLOCK_SIZE max_partition_size;
int adjust_partitioning_from_last_frame;
int last_partitioning_redo_frequency;
int disable_splitmv;
......
This diff is collapsed.
......@@ -20,12 +20,12 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi, int qindex);
void vp9_initialize_me_consts(VP9_COMP *cpi, int qindex);
void vp9_rd_pick_intra_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
int *r, int64_t *d, BLOCK_SIZE_TYPE bsize,
int *r, int64_t *d, BLOCK_SIZE bsize,
PICK_MODE_CONTEXT *ctx, int64_t best_rd);
int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
int mi_row, int mi_col,
int *r, int64_t *d, BLOCK_SIZE_TYPE bsize,
int *r, int64_t *d, BLOCK_SIZE bsize,
PICK_MODE_CONTEXT *ctx, int64_t best_rd);
void vp9_init_me_luts();
......
......@@ -138,7 +138,7 @@ static void count_segs(VP9_COMP *cpi, MODE_INFO *mi,
// Temporal prediction not allowed on key frames
if (cm->frame_type != KEY_FRAME) {
const BLOCK_SIZE_TYPE bsize = mi->mbmi.sb_type;
const BLOCK_SIZE bsize = mi->mbmi.sb_type;
// Test to see if the segment id matches the predicted value.
const int pred_segment_id = vp9_get_segment_id(cm, cm->last_frame_seg_map,
bsize, mi_row, mi_col);
......@@ -161,7 +161,7 @@ static void count_segs_sb(VP9_COMP *cpi, MODE_INFO *mi,
int (*temporal_predictor_count)[2],
int *t_unpred_seg_counts,
int mi_row, int mi_col,
BLOCK_SIZE_TYPE bsize) {
BLOCK_SIZE bsize) {
const VP9_COMMON *const cm = &cpi->common;
const int mis = cm->mode_info_stride;
int bw, bh;
......@@ -187,7 +187,7 @@ static void count_segs_sb(VP9_COMP *cpi, MODE_INFO *mi,
count_segs(cpi, mi + hbs, no_pred_segcounts, temporal_predictor_count,
t_unpred_seg_counts, hbs, bs, mi_row, mi_col + hbs);
} else {
const BLOCK_SIZE_TYPE subsize = subsize_lookup[PARTITION_SPLIT][bsize];
const BLOCK_SIZE subsize = subsize_lookup[PARTITION_SPLIT][bsize];
int n;
assert(bw < bs && bh < bs);
......
......@@ -97,8 +97,7 @@ struct tokenize_b_args {
TX_SIZE tx_size;
};
static void set_entropy_context_b(int plane, int block,
BLOCK_SIZE_TYPE plane_bsize,
static void set_entropy_context_b(int plane, int block, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg) {
struct tokenize_b_args* const args = arg;
MACROBLOCKD *const xd = args->xd;
......@@ -108,7 +107,7 @@ static void set_entropy_context_b(int plane, int block,
set_contexts(xd, pd, plane_bsize, tx_size, pd->eobs[block] > 0, aoff, loff);
}
static void tokenize_b(int plane, int block, BLOCK_SIZE_TYPE plane_bsize,
static void tokenize_b(int plane, int block, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg) {
struct tokenize_b_args* const args = arg;
VP9_COMP *cpi = args->cpi;
......@@ -222,20 +221,20 @@ struct is_skippable_args {
};
static void is_skippable(int plane, int block,
BLOCK_SIZE_TYPE plane_bsize, TX_SIZE tx_size,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
void *argv) {
struct is_skippable_args *args = argv;
args->skippable[0] &= (!args->xd->plane[plane].eobs[block]);
}
int vp9_sb_is_skippable(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) {
int vp9_sb_is_skippable(MACROBLOCKD *xd, BLOCK_SIZE bsize) {
int result = 1;
struct is_skippable_args args = {xd, &result};
foreach_transformed_block(xd, bsize, is_skippable, &args);
return result;
}
int vp9_is_skippable_in_plane(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize,
int vp9_is_skippable_in_plane(MACROBLOCKD *xd, BLOCK_SIZE bsize,
int plane) {
int result = 1;
struct is_skippable_args args = {xd, &result};
......@@ -244,7 +243,7 @@ int vp9_is_skippable_in_plane(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize,
}
void vp9_tokenize_sb(VP9_COMP *cpi, TOKENEXTRA **t, int dry_run,
BLOCK_SIZE_TYPE bsize) {
BLOCK_SIZE bsize) {
VP9_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &cpi->mb.e_mbd;
MB_MODE_INFO *const mbmi = &xd->mode_info_context->mbmi;
......
......@@ -31,13 +31,13 @@ typedef struct {
typedef int64_t vp9_coeff_accum[REF_TYPES][COEF_BANDS][PREV_COEF_CONTEXTS]
[MAX_ENTROPY_TOKENS + 1];
int vp9_sb_is_skippable(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize);
int vp9_is_skippable_in_plane(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize,
int vp9_sb_is_skippable(MACROBLOCKD *xd, BLOCK_SIZE bsize);
int vp9_is_skippable_in_plane(MACROBLOCKD *xd, BLOCK_SIZE bsize,
int plane);
struct VP9_COMP;
void vp9_tokenize_sb(struct VP9_COMP *cpi, TOKENEXTRA **t, int dry_run,
BLOCK_SIZE_TYPE bsize);
BLOCK_SIZE bsize);
#ifdef ENTROPY_STATS
void init_context_counters();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment