remove useless space after address-of operator.
Change-Id: I1fb9e82e8d6cf87558fbd454fb5c0f87599ca2ab
MODE_INFO *m,
int mb_row,
int mb_col) {
- VP8_COMMON *const cm = & pbi->common;
+ VP8_COMMON *const cm = &pbi->common;
vp8_reader *const bc = pbi->mb.current_bc;
const int mis = pbi->common.mode_info_stride;
int map_index = mb_row * pbi->common.mb_cols + mb_col;
m->mbmi.segment_id, SEG_LVL_EOB) ||
(get_segdata(&pbi->mb,
m->mbmi.segment_id, SEG_LVL_EOB) != 0))) {
- MACROBLOCKD *const xd = & pbi->mb;
+ MACROBLOCKD *const xd = &pbi->mb;
m->mbmi.mb_skip_coeff = vp8_read(bc, get_pred_prob(cm, xd, PRED_MBSKIP));
} else {
if (segfeature_active(&pbi->mb,
int seg_ref_active;
int seg_ref_count = 0;
- VP8_COMMON *const cm = & pbi->common;
+ VP8_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
seg_ref_active = segfeature_active(xd,
#if CONFIG_SWITCHABLE_INTERP
static void read_switchable_interp_probs(VP8D_COMP *pbi) {
- VP8_COMMON *const cm = & pbi->common;
- vp8_reader *const bc = & pbi->bc;
+ VP8_COMMON *const cm = &pbi->common;
+ vp8_reader *const bc = &pbi->bc;
int i, j;
for (j = 0; j <= VP8_SWITCHABLE_FILTERS; ++j) {
//for (j = 0; j <= 0; ++j) {
#endif
static void mb_mode_mv_init(VP8D_COMP *pbi, vp8_reader *bc) {
- VP8_COMMON *const cm = & pbi->common;
+ VP8_COMMON *const cm = &pbi->common;
#if CONFIG_NEWMVENTROPY
nmv_context *const nmvc = &pbi->common.fc.nmvc;
#else
MV_CONTEXT *const mvc = pbi->common.fc.mvc;
MV_CONTEXT_HP *const mvc_hp = pbi->common.fc.mvc_hp;
#endif
- MACROBLOCKD *const xd = & pbi->mb;
+ MACROBLOCKD *const xd = &pbi->mb;
if (cm->frame_type == KEY_FRAME) {
if (!cm->kf_ymode_probs_update)
// value
static void read_mb_segment_id(VP8D_COMP *pbi,
int mb_row, int mb_col) {
- VP8_COMMON *const cm = & pbi->common;
- MACROBLOCKD *const xd = & pbi->mb;
+ VP8_COMMON *const cm = &pbi->common;
+ MACROBLOCKD *const xd = &pbi->mb;
vp8_reader *const bc = xd->current_bc;
MODE_INFO *mi = xd->mode_info_context;
MB_MODE_INFO *mbmi = &mi->mbmi;
static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
MODE_INFO *prev_mi,
int mb_row, int mb_col) {
- VP8_COMMON *const cm = & pbi->common;
+ VP8_COMMON *const cm = &pbi->common;
#if CONFIG_NEWMVENTROPY
nmv_context *const nmvc = &pbi->common.fc.nmvc;
#else
MV_CONTEXT_HP *const mvc_hp = pbi->common.fc.mvc_hp;
#endif
const int mis = pbi->common.mode_info_stride;
- MACROBLOCKD *const xd = & pbi->mb;
+ MACROBLOCKD *const xd = &pbi->mb;
vp8_reader *const bc = xd->current_bc;
- int_mv *const mv = & mbmi->mv;
+ int_mv *const mv = &mbmi->mv;
int mb_to_left_edge;
int mb_to_right_edge;
int mb_to_top_edge;
void vp8cx_init_de_quantizer(VP8D_COMP *pbi) {
int i;
int Q;
- VP8_COMMON *const pc = & pbi->common;
+ VP8_COMMON *const pc = &pbi->common;
for (Q = 0; Q < QINDEX_RANGE; Q++) {
pc->Y1dequant[Q][0] = (short)vp8_dc_quant(Q, pc->y1dc_delta_q);
void mb_init_dequantizer(VP8D_COMP *pbi, MACROBLOCKD *xd) {
int i;
int QIndex;
- VP8_COMMON *const pc = & pbi->common;
+ VP8_COMMON *const pc = &pbi->common;
int segment_id = xd->mode_info_context->mbmi.segment_id;
// Set the Q baseline allowing for any segment level adjustment
}
static void init_frame(VP8D_COMP *pbi) {
- VP8_COMMON *const pc = & pbi->common;
- MACROBLOCKD *const xd = & pbi->mb;
+ VP8_COMMON *const pc = &pbi->common;
+ MACROBLOCKD *const xd = &pbi->mb;
if (pc->frame_type == KEY_FRAME) {
/* Various keyframe initializations */
static void read_coef_probs2(VP8D_COMP *pbi) {
const vp8_prob grpupd = 192;
int i, j, k, l;
- vp8_reader *const bc = & pbi->bc;
- VP8_COMMON *const pc = & pbi->common;
+ vp8_reader *const bc = &pbi->bc;
+ VP8_COMMON *const pc = &pbi->common;
for (l = 0; l < ENTROPY_NODES; l++) {
if (vp8_read(bc, grpupd)) {
// printf("Decoding %d\n", l);
static void read_coef_probs(VP8D_COMP *pbi) {
int i, j, k, l;
- vp8_reader *const bc = & pbi->bc;
- VP8_COMMON *const pc = & pbi->common;
+ vp8_reader *const bc = &pbi->bc;
+ VP8_COMMON *const pc = &pbi->common;
{
if (vp8_read_bit(bc)) {
}
int vp8_decode_frame(VP8D_COMP *pbi) {
- vp8_reader *const bc = & pbi->bc;
- VP8_COMMON *const pc = & pbi->common;
- MACROBLOCKD *const xd = & pbi->mb;
+ vp8_reader *const bc = &pbi->bc;
+ VP8_COMMON *const pc = &pbi->common;
+ MACROBLOCKD *const xd = &pbi->mb;
const unsigned char *data = (const unsigned char *)pbi->Source;
const unsigned char *data_end = data + pbi->source_sz;
ptrdiff_t first_partition_length_in_bytes = 0;
}
static void update_mbintra_mode_probs(VP8_COMP *cpi) {
- VP8_COMMON *const cm = & cpi->common;
+ VP8_COMMON *const cm = &cpi->common;
- vp8_writer *const w = & cpi->bc;
+ vp8_writer *const w = &cpi->bc;
{
vp8_prob Pnew [VP8_YMODES - 1];
}
void update_skip_probs(VP8_COMP *cpi) {
- VP8_COMMON *const pc = & cpi->common;
+ VP8_COMMON *const pc = &cpi->common;
int prob_skip_false[3] = {0, 0, 0};
int k;
#if CONFIG_SWITCHABLE_INTERP
void update_switchable_interp_probs(VP8_COMP *cpi) {
- VP8_COMMON *const pc = & cpi->common;
- vp8_writer *const w = & cpi->bc;
+ VP8_COMMON *const pc = &cpi->common;
+ vp8_writer *const w = &cpi->bc;
unsigned int branch_ct[32][2];
int i, j;
for (j = 0; j <= VP8_SWITCHABLE_FILTERS; ++j) {
// This function updates the reference frame prediction stats
static void update_refpred_stats(VP8_COMP *cpi) {
- VP8_COMMON *const cm = & cpi->common;
+ VP8_COMMON *const cm = &cpi->common;
int i;
int tot_count;
vp8_prob new_pred_probs[PREDICTION_PROBS];
// Update the probabilities used to encode reference frame data
static void update_ref_probs(VP8_COMP *const cpi) {
- VP8_COMMON *const cm = & cpi->common;
+ VP8_COMMON *const cm = &cpi->common;
const int *const rfct = cpi->count_mb_ref_frame_usage;
const int rf_intra = rfct[INTRA_FRAME];
static void pack_inter_mode_mvs(VP8_COMP *const cpi) {
int i;
- VP8_COMMON *const pc = & cpi->common;
- vp8_writer *const w = & cpi->bc2;
+ VP8_COMMON *const pc = &cpi->common;
+ vp8_writer *const w = &cpi->bc2;
#if CONFIG_NEWMVENTROPY
const nmv_context *nmvc = &pc->fc.nmvc;
#else
continue;
}
- mi = & m->mbmi;
+ mi = &m->mbmi;
rf = mi->ref_frame;
mode = mi->mode;
segment_id = mi->segment_id;
}
static void write_kfmodes(VP8_COMP *cpi) {
- vp8_writer *const bc = & cpi->bc2;
- VP8_COMMON *const c = & cpi->common;
+ vp8_writer *const bc = &cpi->bc2;
+ VP8_COMMON *const c = &cpi->common;
const int mis = c->mode_info_stride;
MACROBLOCKD *xd = &cpi->mb.e_mbd;
MODE_INFO *m;
static void update_coef_probs2(VP8_COMP *cpi) {
const vp8_prob grpupd = 192;
int i, j, k, t;
- vp8_writer *const w = & cpi->bc;
+ vp8_writer *const w = &cpi->bc;
int update[2];
int savings;
static void update_coef_probs(VP8_COMP *cpi) {
int i, j, k, t;
- vp8_writer *const w = & cpi->bc;
+ vp8_writer *const w = &cpi->bc;
int update[2] = {0, 0};
int savings;
int ref[MAX_MB_SEGMENTS] = {0};
int i, j;
int mb_index = 0;
- MACROBLOCKD *const xd = & cpi->mb.e_mbd;
+ MACROBLOCKD *const xd = &cpi->mb.e_mbd;
for (i = 0; i < oci->mb_rows; i++) {
for (j = 0; j < oci->mb_cols; j++, mb_index++) {
void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned long *size) {
int i, j;
VP8_HEADER oh;
- VP8_COMMON *const pc = & cpi->common;
- vp8_writer *const bc = & cpi->bc;
- MACROBLOCKD *const xd = & cpi->mb.e_mbd;
+ VP8_COMMON *const pc = &cpi->common;
+ vp8_writer *const bc = &cpi->bc;
+ MACROBLOCKD *const xd = &cpi->mb.e_mbd;
int extra_bytes_packed = 0;
unsigned char *cx_data = dest;
#if USE_ACT_INDEX
// Calculate and activity index for each mb
static void calc_activity_index(VP8_COMP *cpi, MACROBLOCK *x) {
- VP8_COMMON *const cm = & cpi->common;
+ VP8_COMMON *const cm = &cpi->common;
int mb_row, mb_col;
int64_t act;
// Loop through all MBs. Note activity of each, average activity and
// calculate a normalized activity for each
static void build_activity_map(VP8_COMP *cpi) {
- MACROBLOCK *const x = & cpi->mb;
+ MACROBLOCK *const x = &cpi->mb;
MACROBLOCKD *xd = &x->e_mbd;
- VP8_COMMON *const cm = & cpi->common;
+ VP8_COMMON *const cm = &cpi->common;
#if ALT_ACT_MEASURE
YV12_BUFFER_CONFIG *new_yv12 = &cm->yv12_fb[cm->new_fb_idx];
}
void init_encode_frame_mb_context(VP8_COMP *cpi) {
- MACROBLOCK *const x = & cpi->mb;
- VP8_COMMON *const cm = & cpi->common;
- MACROBLOCKD *const xd = & x->e_mbd;
+ MACROBLOCK *const x = &cpi->mb;
+ VP8_COMMON *const cm = &cpi->common;
+ MACROBLOCKD *const xd = &x->e_mbd;
// GF active flags data structure
x->gf_active_ptr = (signed char *)cpi->gf_active_flags;
static void encode_frame_internal(VP8_COMP *cpi) {
int mb_row;
- MACROBLOCK *const x = & cpi->mb;
- VP8_COMMON *const cm = & cpi->common;
- MACROBLOCKD *const xd = & x->e_mbd;
+ MACROBLOCK *const x = &cpi->mb;
+ VP8_COMMON *const cm = &cpi->common;
+ MACROBLOCKD *const xd = &x->e_mbd;
TOKENEXTRA *tp = cpi->tok;
int totalrate;
}
static void sum_intra_stats(VP8_COMP *cpi, MACROBLOCK *x) {
- const MACROBLOCKD *xd = & x->e_mbd;
+ const MACROBLOCKD *xd = &x->e_mbd;
const MB_PREDICTION_MODE m = xd->mode_info_context->mbmi.mode;
const MB_PREDICTION_MODE uvm = xd->mode_info_context->mbmi.uv_mode;
#endif
void vp8_write_nmvprobs(VP8_COMP * cpi, int usehp) {
- vp8_writer *const w = & cpi->bc;
+ vp8_writer *const w = &cpi->bc;
int i, j;
nmv_context prob;
unsigned int branch_ct_joint[MV_JOINTS - 1][2];
}
void vp8_write_mvprobs(VP8_COMP *cpi) {
- vp8_writer *const w = & cpi->bc;
+ vp8_writer *const w = &cpi->bc;
MV_CONTEXT *mvc = cpi->common.fc.mvc;
int flags[2] = {0, 0};
#ifdef ENTROPY_STATS
}
void vp8_write_mvprobs_hp(VP8_COMP *cpi) {
- vp8_writer *const w = & cpi->bc;
+ vp8_writer *const w = &cpi->bc;
MV_CONTEXT_HP *mvc = cpi->common.fc.mvc_hp;
int flags[2] = {0, 0};
#ifdef ENTROPY_STATS
}
static void zz_motion_search(VP8_COMP *cpi, MACROBLOCK *x, YV12_BUFFER_CONFIG *recon_buffer, int *best_motion_err, int recon_yoffset) {
- MACROBLOCKD *const xd = & x->e_mbd;
+ MACROBLOCKD *const xd = &x->e_mbd;
BLOCK *b = &x->block[0];
BLOCKD *d = &x->e_mbd.block[0];
int_mv *ref_mv, MV *best_mv,
YV12_BUFFER_CONFIG *recon_buffer,
int *best_motion_err, int recon_yoffset) {
- MACROBLOCKD *const xd = & x->e_mbd;
+ MACROBLOCKD *const xd = &x->e_mbd;
BLOCK *b = &x->block[0];
BLOCKD *d = &x->e_mbd.block[0];
int num00;
void vp8_first_pass(VP8_COMP *cpi) {
int mb_row, mb_col;
- MACROBLOCK *const x = & cpi->mb;
- VP8_COMMON *const cm = & cpi->common;
- MACROBLOCKD *const xd = & x->e_mbd;
+ MACROBLOCK *const x = &cpi->mb;
+ VP8_COMMON *const cm = &cpi->common;
+ MACROBLOCKD *const xd = &x->e_mbd;
int recon_yoffset, recon_uvoffset;
YV12_BUFFER_CONFIG *lst_yv12 = &cm->yv12_fb[cm->lst_fb_idx];
// DEBUG: Print out the segment id of each MB in the current frame.
static void print_seg_map(VP8_COMP *cpi) {
- VP8_COMMON *cm = & cpi->common;
+ VP8_COMMON *cm = &cpi->common;
int row, col;
int map_index = 0;
FILE *statsfile;
}
void vp8_alloc_compressor_data(VP8_COMP *cpi) {
- VP8_COMMON *cm = & cpi->common;
+ VP8_COMMON *cm = &cpi->common;
int width = cm->Width;
int height = cm->Height;
void vp8_save_coding_context(VP8_COMP *cpi) {
- CODING_CONTEXT *const cc = & cpi->coding_context;
+ CODING_CONTEXT *const cc = &cpi->coding_context;
VP8_COMMON *cm = &cpi->common;
MACROBLOCKD *xd = &cpi->mb.e_mbd;
}
void vp8_restore_coding_context(VP8_COMP *cpi) {
- CODING_CONTEXT *const cc = & cpi->coding_context;
+ CODING_CONTEXT *const cc = &cpi->coding_context;
VP8_COMMON *cm = &cpi->common;
MACROBLOCKD *xd = &cpi->mb.e_mbd;
int_mv *best_ref_mv,
int_mv *second_best_ref_mv,
DEC_MVCOSTS) {
- MACROBLOCKD *const xd = & x->e_mbd;
+ MACROBLOCKD *const xd = &x->e_mbd;
MODE_INFO *const mic = xd->mode_info_context;
MB_MODE_INFO * mbmi = &mic->mbmi;
const int mis = xd->mode_info_stride;
}
void choose_segmap_coding_method(VP8_COMP *cpi) {
- VP8_COMMON *const cm = & cpi->common;
- MACROBLOCKD *const xd = & cpi->mb.e_mbd;
+ VP8_COMMON *const cm = &cpi->common;
+ MACROBLOCKD *const xd = &cpi->mb.e_mbd;
int i;
int tot_count;