Commit d765df27 authored by James Zern's avatar James Zern
Browse files

consistently name VP9_COMMON variables #3

stragglers

Change-Id: Ib1e853f9a331b7b66639dc34d79568d84d1930f1
parent aa053212
......@@ -13,6 +13,7 @@
#include "vp9_rtcd.h"
#include "vp9/common/vp9_onyxc_int.h"
void vp9_machine_specific_config(VP9_COMMON *ctx) {
void vp9_machine_specific_config(VP9_COMMON *cm) {
(void)cm;
vp9_rtcd();
}
......@@ -16,8 +16,8 @@
void vp9_initialize_common();
void vp9_update_mode_info_border(VP9_COMMON *cpi, MODE_INFO *mi);
void vp9_update_mode_info_in_image(VP9_COMMON *cpi, MODE_INFO *mi);
void vp9_update_mode_info_border(VP9_COMMON *cm, MODE_INFO *mi);
void vp9_update_mode_info_in_image(VP9_COMMON *cm, MODE_INFO *mi);
void vp9_create_common(VP9_COMMON *cm);
void vp9_remove_common(VP9_COMMON *cm);
......
......@@ -22,17 +22,17 @@ static void log_frame_info(VP9_COMMON *cm, const char *str, FILE *f) {
* and uses the passed in member offset to print out the value of an integer
* for each mbmi member value in the mi structure.
*/
static void print_mi_data(VP9_COMMON *common, FILE *file, char *descriptor,
static void print_mi_data(VP9_COMMON *cm, FILE *file, char *descriptor,
size_t member_offset) {
int mi_row;
int mi_col;
int mi_index = 0;
MODE_INFO *mi = common->mi;
int rows = common->mi_rows;
int cols = common->mi_cols;
MODE_INFO *mi = cm->mi;
int rows = cm->mi_rows;
int cols = cm->mi_cols;
char prefix = descriptor[0];
log_frame_info(common, descriptor, file);
log_frame_info(cm, descriptor, file);
mi_index = 0;
for (mi_row = 0; mi_row < rows; mi_row++) {
fprintf(file, "%c ", prefix);
......
......@@ -95,7 +95,7 @@ typedef vp9_prob vp9_coeff_probs[REF_TYPES][COEF_BANDS][PREV_COEF_CONTEXTS]
#define MODULUS_PARAM 13 /* Modulus parameter */
struct VP9Common;
void vp9_default_coef_probs(struct VP9Common *);
void vp9_default_coef_probs(struct VP9Common *cm);
extern DECLARE_ALIGNED(16, const int16_t, vp9_default_scan_4x4[16]);
extern DECLARE_ALIGNED(16, const int16_t, vp9_col_scan_4x4[16]);
......@@ -154,7 +154,7 @@ extern DECLARE_ALIGNED(16, int16_t,
vp9_default_scan_32x32_neighbors[1025 * MAX_NEIGHBORS]);
void vp9_coef_tree_initialize(void);
void vp9_adapt_coef_probs(struct VP9Common *);
void vp9_adapt_coef_probs(struct VP9Common *cm);
static INLINE void reset_skip_context(MACROBLOCKD *xd, BLOCK_SIZE bsize) {
int i;
......
......@@ -58,9 +58,9 @@ void vp9_entropy_mode_init();
void vp9_setup_past_independence(struct VP9Common *cm);
void vp9_init_mbmode_probs(struct VP9Common *x);
void vp9_init_mbmode_probs(struct VP9Common *cm);
void vp9_adapt_mode_probs(struct VP9Common *);
void vp9_adapt_mode_probs(struct VP9Common *cm);
void tx_counts_to_branch_counts_32x32(unsigned int *tx_count_32x32p,
unsigned int (*ct_32x32p)[2]);
......
......@@ -34,6 +34,6 @@ static int round(double x) {
#endif
struct VP9Common;
void vp9_machine_specific_config(struct VP9Common *);
void vp9_machine_specific_config(struct VP9Common *cm);
#endif // VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
......@@ -533,11 +533,11 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
static void write_mb_modes_kf(const VP9_COMP *cpi, MODE_INFO *m,
vp9_writer *bc) {
const VP9_COMMON *const c = &cpi->common;
const VP9_COMMON *const cm = &cpi->common;
const MACROBLOCKD *const xd = &cpi->mb.e_mbd;
const struct segmentation *const seg = &c->seg;
const struct segmentation *const seg = &cm->seg;
const int ym = m->mbmi.mode;
const int mis = c->mode_info_stride;
const int mis = cm->mode_info_stride;
const int segment_id = m->mbmi.segment_id;
if (seg->update_map)
......@@ -545,7 +545,7 @@ static void write_mb_modes_kf(const VP9_COMP *cpi, MODE_INFO *m,
write_skip_coeff(cpi, segment_id, m, bc);
if (m->mbmi.sb_type >= BLOCK_8X8 && c->tx_mode == TX_MODE_SELECT)
if (m->mbmi.sb_type >= BLOCK_8X8 && cm->tx_mode == TX_MODE_SELECT)
write_selected_tx_size(cpi, m->mbmi.tx_size, m->mbmi.sb_type, bc);
if (m->mbmi.sb_type >= BLOCK_8X8) {
......@@ -684,18 +684,18 @@ static void write_modes_sb(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc,
static void write_modes(VP9_COMP *cpi, vp9_writer* const bc,
TOKENEXTRA **tok, TOKENEXTRA *tok_end) {
VP9_COMMON *const c = &cpi->common;
const int mis = c->mode_info_stride;
MODE_INFO *m, *m_ptr = c->mi;
VP9_COMMON *const cm = &cpi->common;
const int mis = cm->mode_info_stride;
MODE_INFO *m, *m_ptr = cm->mi;
int mi_row, mi_col;
m_ptr += c->cur_tile_mi_col_start + c->cur_tile_mi_row_start * mis;
m_ptr += cm->cur_tile_mi_col_start + cm->cur_tile_mi_row_start * mis;
for (mi_row = c->cur_tile_mi_row_start; mi_row < c->cur_tile_mi_row_end;
for (mi_row = cm->cur_tile_mi_row_start; mi_row < cm->cur_tile_mi_row_end;
mi_row += 8, m_ptr += 8 * mis) {
m = m_ptr;
vp9_zero(c->left_seg_context);
for (mi_col = c->cur_tile_mi_col_start; mi_col < c->cur_tile_mi_col_end;
vp9_zero(cm->left_seg_context);
for (mi_col = cm->cur_tile_mi_col_start; mi_col < cm->cur_tile_mi_col_end;
mi_col += MI_BLOCK_SIZE, m += MI_BLOCK_SIZE)
write_modes_sb(cpi, m, bc, tok, tok_end, mi_row, mi_col, BLOCK_64X64);
}
......
......@@ -16,7 +16,7 @@
void vp9_init_mode_costs(VP9_COMP *c) {
VP9_COMMON *x = &c->common;
VP9_COMMON *const cm = &c->common;
const vp9_tree_p KT = vp9_intra_mode_tree;
int i, j;
......@@ -28,16 +28,16 @@ void vp9_init_mode_costs(VP9_COMP *c) {
}
// TODO(rbultje) separate tables for superblock costing?
vp9_cost_tokens(c->mb.mbmode_cost, x->fc.y_mode_prob[1],
vp9_cost_tokens(c->mb.mbmode_cost, cm->fc.y_mode_prob[1],
vp9_intra_mode_tree);
vp9_cost_tokens(c->mb.intra_uv_mode_cost[1],
x->fc.uv_mode_prob[INTRA_MODES - 1], vp9_intra_mode_tree);
cm->fc.uv_mode_prob[INTRA_MODES - 1], vp9_intra_mode_tree);
vp9_cost_tokens(c->mb.intra_uv_mode_cost[0],
vp9_kf_uv_mode_prob[INTRA_MODES - 1],
vp9_intra_mode_tree);
for (i = 0; i <= SWITCHABLE_FILTERS; ++i)
vp9_cost_tokens((int *)c->mb.switchable_interp_costs[i],
x->fc.switchable_interp_prob[i],
cm->fc.switchable_interp_prob[i],
vp9_switchable_interp_tree);
}
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