From 3883dab0a2dedbcf636e91064c38040af744bc90 Mon Sep 17 00:00:00 2001 From: John Koleszar Date: Wed, 17 Oct 2012 14:51:27 -0700 Subject: [PATCH] cosmetic: fix '= & ' construct remove useless space after address-of operator. Change-Id: I1fb9e82e8d6cf87558fbd454fb5c0f87599ca2ab --- vp8/decoder/decodemv.c | 24 ++++++++++++------------ vp8/decoder/decodframe.c | 22 +++++++++++----------- vp8/encoder/bitstream.c | 36 ++++++++++++++++++------------------ vp8/encoder/encodeframe.c | 20 ++++++++++---------- vp8/encoder/encodemv.c | 6 +++--- vp8/encoder/firstpass.c | 10 +++++----- vp8/encoder/onyx_if.c | 4 ++-- vp8/encoder/ratectrl.c | 4 ++-- vp8/encoder/rdopt.c | 2 +- vp8/encoder/segmentation.c | 4 ++-- 10 files changed, 66 insertions(+), 66 deletions(-) diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c index f72fc3f..29b689f 100644 --- a/vp8/decoder/decodemv.c +++ b/vp8/decoder/decodemv.c @@ -77,7 +77,7 @@ static void vp8_kfread_modes(VP8D_COMP *pbi, 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; @@ -97,7 +97,7 @@ static void vp8_kfread_modes(VP8D_COMP *pbi, 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, @@ -458,7 +458,7 @@ static MV_REFERENCE_FRAME read_ref_frame(VP8D_COMP *pbi, 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, @@ -598,8 +598,8 @@ static const unsigned char mbsplit_fill_offset[4][16] = { #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) { @@ -613,14 +613,14 @@ static void read_switchable_interp_probs(VP8D_COMP *pbi) { #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) @@ -677,8 +677,8 @@ static void mb_mode_mv_init(VP8D_COMP *pbi, vp8_reader *bc) { // 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; @@ -749,7 +749,7 @@ static void read_mb_segment_id(VP8D_COMP *pbi, 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 @@ -757,10 +757,10 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, 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; diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c index 4d12d7a..f966a06 100644 --- a/vp8/decoder/decodframe.c +++ b/vp8/decoder/decodframe.c @@ -77,7 +77,7 @@ static vp8_prob read_prob_diff_update(vp8_reader *const bc, int oldp) { 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); @@ -98,7 +98,7 @@ void vp8cx_init_de_quantizer(VP8D_COMP *pbi) { 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 @@ -815,8 +815,8 @@ static void setup_token_decoder(VP8D_COMP *pbi, } 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 */ @@ -893,8 +893,8 @@ static void init_frame(VP8D_COMP *pbi) { 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); @@ -936,8 +936,8 @@ static void read_coef_probs2(VP8D_COMP *pbi) { 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)) { @@ -1061,9 +1061,9 @@ static void read_coef_probs(VP8D_COMP *pbi) { } 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; diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c index d696506..49f2bb9 100644 --- a/vp8/encoder/bitstream.c +++ b/vp8/encoder/bitstream.c @@ -224,9 +224,9 @@ static void update_mode( } 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]; @@ -252,7 +252,7 @@ static __inline int get_prob(int num, int den) { } 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; @@ -276,8 +276,8 @@ void update_skip_probs(VP8_COMP *cpi) { #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) { @@ -329,7 +329,7 @@ void update_switchable_interp_probs(VP8_COMP *cpi) { // 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]; @@ -818,7 +818,7 @@ static void encode_ref_frame(vp8_writer *const w, // 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]; @@ -850,8 +850,8 @@ static void update_ref_probs(VP8_COMP *const cpi) { 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 @@ -914,7 +914,7 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) { continue; } - mi = & m->mbmi; + mi = &m->mbmi; rf = mi->ref_frame; mode = mi->mode; segment_id = mi->segment_id; @@ -1399,8 +1399,8 @@ static void write_mb_modes_kf(const VP8_COMMON *c, } 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; @@ -1641,7 +1641,7 @@ void build_coeff_contexts(VP8_COMP *cpi) { 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; @@ -1808,7 +1808,7 @@ static void update_coef_probs2(VP8_COMP *cpi) { 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; @@ -2357,7 +2357,7 @@ static void segment_reference_frames(VP8_COMP *cpi) { 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++) { @@ -2374,9 +2374,9 @@ static void segment_reference_frames(VP8_COMP *cpi) { 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; diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c index 44e1f9a..afabd71 100644 --- a/vp8/encoder/encodeframe.c +++ b/vp8/encoder/encodeframe.c @@ -221,7 +221,7 @@ static void calc_av_activity(VP8_COMP *cpi, int64_t activity_sum) { #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; @@ -275,9 +275,9 @@ static void calc_activity_index(VP8_COMP *cpi, MACROBLOCK *x) { // 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]; @@ -1218,9 +1218,9 @@ void encode_sb_row(VP8_COMP *cpi, } 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; @@ -1289,9 +1289,9 @@ void init_encode_frame_mb_context(VP8_COMP *cpi) { 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; @@ -1721,7 +1721,7 @@ void vp8_build_block_offsets(MACROBLOCK *x) { } 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; diff --git a/vp8/encoder/encodemv.c b/vp8/encoder/encodemv.c index 1289d89..4f7e9f1 100644 --- a/vp8/encoder/encodemv.c +++ b/vp8/encoder/encodemv.c @@ -358,7 +358,7 @@ static void add_nmvcount(nmv_context_counts *dst, nmv_context_counts *src) { #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]; @@ -832,7 +832,7 @@ static void write_component_probs( } 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 @@ -1108,7 +1108,7 @@ static void write_component_probs_hp( } 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 diff --git a/vp8/encoder/firstpass.c b/vp8/encoder/firstpass.c index bad50b6..95f6d97 100644 --- a/vp8/encoder/firstpass.c +++ b/vp8/encoder/firstpass.c @@ -350,7 +350,7 @@ void vp8_end_first_pass(VP8_COMP *cpi) { } 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]; @@ -371,7 +371,7 @@ static void first_pass_motion_search(VP8_COMP *cpi, MACROBLOCK *x, 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; @@ -436,9 +436,9 @@ static void first_pass_motion_search(VP8_COMP *cpi, MACROBLOCK *x, 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]; diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index 21fff74..fc35757 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -608,7 +608,7 @@ static void init_seg_features(VP8_COMP *cpi) { // 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; @@ -1282,7 +1282,7 @@ static int vp8_alloc_partition_data(VP8_COMP *cpi) { } 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; diff --git a/vp8/encoder/ratectrl.c b/vp8/encoder/ratectrl.c index 2b5f699..570bedf 100644 --- a/vp8/encoder/ratectrl.c +++ b/vp8/encoder/ratectrl.c @@ -123,7 +123,7 @@ int vp8_bits_per_mb(FRAME_TYPE frame_type, int qindex) { 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; @@ -195,7 +195,7 @@ void vp8_save_coding_context(VP8_COMP *cpi) { } 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; diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index 73e71f8..91f3f1a 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -2116,7 +2116,7 @@ static int labels2mode( 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; diff --git a/vp8/encoder/segmentation.c b/vp8/encoder/segmentation.c index e88b80d..e85bb45 100644 --- a/vp8/encoder/segmentation.c +++ b/vp8/encoder/segmentation.c @@ -161,8 +161,8 @@ static int cost_segmap(MACROBLOCKD *xd, } 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; -- 2.7.4