Commit fc7cbd1f authored by Yaowu Xu's avatar Yaowu Xu
Browse files

VP9_COMMON -> VP10->COMMON

Change-Id: I651b7bee90f33581368853da81f9622805ccc0ea
parent 2dcefd9c
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include "vp10/common/entropymv.h" #include "vp10/common/entropymv.h"
#include "vp10/common/onyxc_int.h" #include "vp10/common/onyxc_int.h"
void vp10_set_mb_mi(VP9_COMMON *cm, int width, int height) { void vp10_set_mb_mi(VP10_COMMON *cm, int width, int height) {
const int aligned_width = ALIGN_POWER_OF_TWO(width, MI_SIZE_LOG2); const int aligned_width = ALIGN_POWER_OF_TWO(width, MI_SIZE_LOG2);
const int aligned_height = ALIGN_POWER_OF_TWO(height, MI_SIZE_LOG2); const int aligned_height = ALIGN_POWER_OF_TWO(height, MI_SIZE_LOG2);
...@@ -30,7 +30,7 @@ void vp10_set_mb_mi(VP9_COMMON *cm, int width, int height) { ...@@ -30,7 +30,7 @@ void vp10_set_mb_mi(VP9_COMMON *cm, int width, int height) {
cm->MBs = cm->mb_rows * cm->mb_cols; cm->MBs = cm->mb_rows * cm->mb_cols;
} }
static int alloc_seg_map(VP9_COMMON *cm, int seg_map_size) { static int alloc_seg_map(VP10_COMMON *cm, int seg_map_size) {
int i; int i;
for (i = 0; i < NUM_PING_PONG_BUFFERS; ++i) { for (i = 0; i < NUM_PING_PONG_BUFFERS; ++i) {
...@@ -51,7 +51,7 @@ static int alloc_seg_map(VP9_COMMON *cm, int seg_map_size) { ...@@ -51,7 +51,7 @@ static int alloc_seg_map(VP9_COMMON *cm, int seg_map_size) {
return 0; return 0;
} }
static void free_seg_map(VP9_COMMON *cm) { static void free_seg_map(VP10_COMMON *cm) {
int i; int i;
for (i = 0; i < NUM_PING_PONG_BUFFERS; ++i) { for (i = 0; i < NUM_PING_PONG_BUFFERS; ++i) {
...@@ -81,7 +81,7 @@ void vp10_free_ref_frame_buffers(BufferPool *pool) { ...@@ -81,7 +81,7 @@ void vp10_free_ref_frame_buffers(BufferPool *pool) {
} }
} }
void vp10_free_postproc_buffers(VP9_COMMON *cm) { void vp10_free_postproc_buffers(VP10_COMMON *cm) {
#if CONFIG_VP9_POSTPROC #if CONFIG_VP9_POSTPROC
vp9_free_frame_buffer(&cm->post_proc_buffer); vp9_free_frame_buffer(&cm->post_proc_buffer);
vp9_free_frame_buffer(&cm->post_proc_buffer_int); vp9_free_frame_buffer(&cm->post_proc_buffer_int);
...@@ -90,7 +90,7 @@ void vp10_free_postproc_buffers(VP9_COMMON *cm) { ...@@ -90,7 +90,7 @@ void vp10_free_postproc_buffers(VP9_COMMON *cm) {
#endif #endif
} }
void vp10_free_context_buffers(VP9_COMMON *cm) { void vp10_free_context_buffers(VP10_COMMON *cm) {
cm->free_mi(cm); cm->free_mi(cm);
free_seg_map(cm); free_seg_map(cm);
vpx_free(cm->above_context); vpx_free(cm->above_context);
...@@ -99,7 +99,7 @@ void vp10_free_context_buffers(VP9_COMMON *cm) { ...@@ -99,7 +99,7 @@ void vp10_free_context_buffers(VP9_COMMON *cm) {
cm->above_seg_context = NULL; cm->above_seg_context = NULL;
} }
int vp10_alloc_context_buffers(VP9_COMMON *cm, int width, int height) { int vp10_alloc_context_buffers(VP10_COMMON *cm, int width, int height) {
int new_mi_size; int new_mi_size;
vp10_set_mb_mi(cm, width, height); vp10_set_mb_mi(cm, width, height);
...@@ -138,7 +138,7 @@ int vp10_alloc_context_buffers(VP9_COMMON *cm, int width, int height) { ...@@ -138,7 +138,7 @@ int vp10_alloc_context_buffers(VP9_COMMON *cm, int width, int height) {
return 1; return 1;
} }
void vp10_remove_common(VP9_COMMON *cm) { void vp10_remove_common(VP10_COMMON *cm) {
vp10_free_context_buffers(cm); vp10_free_context_buffers(cm);
vpx_free(cm->fc); vpx_free(cm->fc);
...@@ -147,13 +147,13 @@ void vp10_remove_common(VP9_COMMON *cm) { ...@@ -147,13 +147,13 @@ void vp10_remove_common(VP9_COMMON *cm) {
cm->frame_contexts = NULL; cm->frame_contexts = NULL;
} }
void vp10_init_context_buffers(VP9_COMMON *cm) { void vp10_init_context_buffers(VP10_COMMON *cm) {
cm->setup_mi(cm); cm->setup_mi(cm);
if (cm->last_frame_seg_map && !cm->frame_parallel_decode) if (cm->last_frame_seg_map && !cm->frame_parallel_decode)
memset(cm->last_frame_seg_map, 0, cm->mi_rows * cm->mi_cols); memset(cm->last_frame_seg_map, 0, cm->mi_rows * cm->mi_cols);
} }
void vp10_swap_current_and_last_seg_map(VP9_COMMON *cm) { void vp10_swap_current_and_last_seg_map(VP10_COMMON *cm) {
// Swap indices. // Swap indices.
const int tmp = cm->seg_map_idx; const int tmp = cm->seg_map_idx;
cm->seg_map_idx = cm->prev_seg_map_idx; cm->seg_map_idx = cm->prev_seg_map_idx;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "vp10/common/blockd.h" #include "vp10/common/blockd.h"
#include "vp10/common/onyxc_int.h" #include "vp10/common/onyxc_int.h"
static void log_frame_info(VP9_COMMON *cm, const char *str, FILE *f) { static void log_frame_info(VP10_COMMON *cm, const char *str, FILE *f) {
fprintf(f, "%s", str); fprintf(f, "%s", str);
fprintf(f, "(Frame %d, Show:%d, Q:%d): \n", cm->current_video_frame, fprintf(f, "(Frame %d, Show:%d, Q:%d): \n", cm->current_video_frame,
cm->show_frame, cm->base_qindex); cm->show_frame, cm->base_qindex);
...@@ -22,7 +22,7 @@ static void log_frame_info(VP9_COMMON *cm, const char *str, FILE *f) { ...@@ -22,7 +22,7 @@ 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 * and uses the passed in member offset to print out the value of an integer
* for each mbmi member value in the mi structure. * for each mbmi member value in the mi structure.
*/ */
static void print_mi_data(VP9_COMMON *cm, FILE *file, const char *descriptor, static void print_mi_data(VP10_COMMON *cm, FILE *file, const char *descriptor,
size_t member_offset) { size_t member_offset) {
int mi_row, mi_col; int mi_row, mi_col;
MODE_INFO **mi = cm->mi_grid_visible; MODE_INFO **mi = cm->mi_grid_visible;
...@@ -45,7 +45,7 @@ static void print_mi_data(VP9_COMMON *cm, FILE *file, const char *descriptor, ...@@ -45,7 +45,7 @@ static void print_mi_data(VP9_COMMON *cm, FILE *file, const char *descriptor,
fprintf(file, "\n"); fprintf(file, "\n");
} }
void vp10_print_modes_and_motion_vectors(VP9_COMMON *cm, const char *file) { void vp10_print_modes_and_motion_vectors(VP10_COMMON *cm, const char *file) {
int mi_row; int mi_row;
int mi_col; int mi_col;
FILE *mvs = fopen(file, "a"); FILE *mvs = fopen(file, "a");
......
...@@ -753,7 +753,7 @@ void vp10_model_to_full_probs(const vpx_prob *model, vpx_prob *full) { ...@@ -753,7 +753,7 @@ void vp10_model_to_full_probs(const vpx_prob *model, vpx_prob *full) {
extend_to_full_distribution(&full[UNCONSTRAINED_NODES], model[PIVOT_NODE]); extend_to_full_distribution(&full[UNCONSTRAINED_NODES], model[PIVOT_NODE]);
} }
void vp10_default_coef_probs(VP9_COMMON *cm) { void vp10_default_coef_probs(VP10_COMMON *cm) {
vp10_copy(cm->fc->coef_probs[TX_4X4], default_coef_probs_4x4); vp10_copy(cm->fc->coef_probs[TX_4X4], default_coef_probs_4x4);
vp10_copy(cm->fc->coef_probs[TX_8X8], default_coef_probs_8x8); vp10_copy(cm->fc->coef_probs[TX_8X8], default_coef_probs_8x8);
vp10_copy(cm->fc->coef_probs[TX_16X16], default_coef_probs_16x16); vp10_copy(cm->fc->coef_probs[TX_16X16], default_coef_probs_16x16);
...@@ -767,7 +767,7 @@ void vp10_default_coef_probs(VP9_COMMON *cm) { ...@@ -767,7 +767,7 @@ void vp10_default_coef_probs(VP9_COMMON *cm) {
#define COEF_COUNT_SAT_AFTER_KEY 24 #define COEF_COUNT_SAT_AFTER_KEY 24
#define COEF_MAX_UPDATE_FACTOR_AFTER_KEY 128 #define COEF_MAX_UPDATE_FACTOR_AFTER_KEY 128
static void adapt_coef_probs(VP9_COMMON *cm, TX_SIZE tx_size, static void adapt_coef_probs(VP10_COMMON *cm, TX_SIZE tx_size,
unsigned int count_sat, unsigned int count_sat,
unsigned int update_factor) { unsigned int update_factor) {
const FRAME_CONTEXT *pre_fc = &cm->frame_contexts[cm->frame_context_idx]; const FRAME_CONTEXT *pre_fc = &cm->frame_contexts[cm->frame_context_idx];
...@@ -798,7 +798,7 @@ static void adapt_coef_probs(VP9_COMMON *cm, TX_SIZE tx_size, ...@@ -798,7 +798,7 @@ static void adapt_coef_probs(VP9_COMMON *cm, TX_SIZE tx_size,
} }
} }
void vp10_adapt_coef_probs(VP9_COMMON *cm) { void vp10_adapt_coef_probs(VP10_COMMON *cm) {
TX_SIZE t; TX_SIZE t;
unsigned int count_sat, update_factor; unsigned int count_sat, update_factor;
......
...@@ -334,7 +334,7 @@ const vpx_tree_index vp10_switchable_interp_tree ...@@ -334,7 +334,7 @@ const vpx_tree_index vp10_switchable_interp_tree
-EIGHTTAP_SMOOTH, -EIGHTTAP_SHARP -EIGHTTAP_SMOOTH, -EIGHTTAP_SHARP
}; };
void vp10_adapt_mode_probs(VP9_COMMON *cm) { void vp10_adapt_mode_probs(VP10_COMMON *cm) {
int i, j; int i, j;
FRAME_CONTEXT *fc = cm->fc; FRAME_CONTEXT *fc = cm->fc;
const FRAME_CONTEXT *pre_fc = &cm->frame_contexts[cm->frame_context_idx]; const FRAME_CONTEXT *pre_fc = &cm->frame_contexts[cm->frame_context_idx];
...@@ -420,7 +420,7 @@ static void set_default_lf_deltas(struct loopfilter *lf) { ...@@ -420,7 +420,7 @@ static void set_default_lf_deltas(struct loopfilter *lf) {
lf->mode_deltas[1] = 0; lf->mode_deltas[1] = 0;
} }
void vp10_setup_past_independence(VP9_COMMON *cm) { void vp10_setup_past_independence(VP10_COMMON *cm) {
// Reset the segment feature data to the default stats: // Reset the segment feature data to the default stats:
// Features disabled, 0, with delta coding (Default state). // Features disabled, 0, with delta coding (Default state).
struct loopfilter *const lf = &cm->lf; struct loopfilter *const lf = &cm->lf;
......
...@@ -176,7 +176,7 @@ void vp10_inc_mv(const MV *mv, nmv_context_counts *counts) { ...@@ -176,7 +176,7 @@ void vp10_inc_mv(const MV *mv, nmv_context_counts *counts) {
} }
} }
void vp10_adapt_mv_probs(VP9_COMMON *cm, int allow_hp) { void vp10_adapt_mv_probs(VP10_COMMON *cm, int allow_hp) {
int i, j; int i, j;
nmv_context *fc = &cm->fc->nmvc; nmv_context *fc = &cm->fc->nmvc;
...@@ -213,6 +213,6 @@ void vp10_adapt_mv_probs(VP9_COMMON *cm, int allow_hp) { ...@@ -213,6 +213,6 @@ void vp10_adapt_mv_probs(VP9_COMMON *cm, int allow_hp) {
} }
} }
void vp10_init_mv_probs(VP9_COMMON *cm) { void vp10_init_mv_probs(VP10_COMMON *cm) {
cm->fc->nmvc = default_nmv_context; cm->fc->nmvc = default_nmv_context;
} }
...@@ -236,7 +236,7 @@ static uint8_t get_filter_level(const loop_filter_info_n *lfi_n, ...@@ -236,7 +236,7 @@ static uint8_t get_filter_level(const loop_filter_info_n *lfi_n,
[mode_lf_lut[mbmi->mode]]; [mode_lf_lut[mbmi->mode]];
} }
void vp10_loop_filter_init(VP9_COMMON *cm) { void vp10_loop_filter_init(VP10_COMMON *cm) {
loop_filter_info_n *lfi = &cm->lf_info; loop_filter_info_n *lfi = &cm->lf_info;
struct loopfilter *lf = &cm->lf; struct loopfilter *lf = &cm->lf;
int lvl; int lvl;
...@@ -250,7 +250,7 @@ void vp10_loop_filter_init(VP9_COMMON *cm) { ...@@ -250,7 +250,7 @@ void vp10_loop_filter_init(VP9_COMMON *cm) {
memset(lfi->lfthr[lvl].hev_thr, (lvl >> 4), SIMD_WIDTH); memset(lfi->lfthr[lvl].hev_thr, (lvl >> 4), SIMD_WIDTH);
} }
void vp10_loop_filter_frame_init(VP9_COMMON *cm, int default_filt_lvl) { void vp10_loop_filter_frame_init(VP10_COMMON *cm, int default_filt_lvl) {
int seg_id; int seg_id;
// n_shift is the multiplier for lf_deltas // n_shift is the multiplier for lf_deltas
// the multiplier is 1 for when filter_lvl is between 0 and 31; // the multiplier is 1 for when filter_lvl is between 0 and 31;
...@@ -827,7 +827,7 @@ static void build_y_mask(const loop_filter_info_n *const lfi_n, ...@@ -827,7 +827,7 @@ static void build_y_mask(const loop_filter_info_n *const lfi_n,
// This function sets up the bit masks for the entire 64x64 region represented // This function sets up the bit masks for the entire 64x64 region represented
// by mi_row, mi_col. // by mi_row, mi_col.
// TODO(JBB): This function only works for yv12. // TODO(JBB): This function only works for yv12.
void vp10_setup_mask(VP9_COMMON *const cm, const int mi_row, const int mi_col, void vp10_setup_mask(VP10_COMMON *const cm, const int mi_row, const int mi_col,
MODE_INFO **mi, const int mode_info_stride, MODE_INFO **mi, const int mode_info_stride,
LOOP_FILTER_MASK *lfm) { LOOP_FILTER_MASK *lfm) {
int idx_32, idx_16, idx_8; int idx_32, idx_16, idx_8;
...@@ -1151,7 +1151,7 @@ static void highbd_filter_selectively_vert(uint16_t *s, int pitch, ...@@ -1151,7 +1151,7 @@ static void highbd_filter_selectively_vert(uint16_t *s, int pitch,
} }
#endif // CONFIG_VP9_HIGHBITDEPTH #endif // CONFIG_VP9_HIGHBITDEPTH
void vp10_filter_block_plane_non420(VP9_COMMON *cm, void vp10_filter_block_plane_non420(VP10_COMMON *cm,
struct macroblockd_plane *plane, struct macroblockd_plane *plane,
MODE_INFO **mi_8x8, MODE_INFO **mi_8x8,
int mi_row, int mi_col) { int mi_row, int mi_col) {
...@@ -1328,7 +1328,7 @@ void vp10_filter_block_plane_non420(VP9_COMMON *cm, ...@@ -1328,7 +1328,7 @@ void vp10_filter_block_plane_non420(VP9_COMMON *cm,
} }
} }
void vp10_filter_block_plane_ss00(VP9_COMMON *const cm, void vp10_filter_block_plane_ss00(VP10_COMMON *const cm,
struct macroblockd_plane *const plane, struct macroblockd_plane *const plane,
int mi_row, int mi_row,
LOOP_FILTER_MASK *lfm) { LOOP_FILTER_MASK *lfm) {
...@@ -1420,7 +1420,7 @@ void vp10_filter_block_plane_ss00(VP9_COMMON *const cm, ...@@ -1420,7 +1420,7 @@ void vp10_filter_block_plane_ss00(VP9_COMMON *const cm,
} }
} }
void vp10_filter_block_plane_ss11(VP9_COMMON *const cm, void vp10_filter_block_plane_ss11(VP10_COMMON *const cm,
struct macroblockd_plane *const plane, struct macroblockd_plane *const plane,
int mi_row, int mi_row,
LOOP_FILTER_MASK *lfm) { LOOP_FILTER_MASK *lfm) {
...@@ -1529,7 +1529,7 @@ void vp10_filter_block_plane_ss11(VP9_COMMON *const cm, ...@@ -1529,7 +1529,7 @@ void vp10_filter_block_plane_ss11(VP9_COMMON *const cm,
} }
void vp10_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, void vp10_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer,
VP9_COMMON *cm, VP10_COMMON *cm,
struct macroblockd_plane planes[MAX_MB_PLANE], struct macroblockd_plane planes[MAX_MB_PLANE],
int start, int stop, int y_only) { int start, int stop, int y_only) {
const int num_planes = y_only ? 1 : MAX_MB_PLANE; const int num_planes = y_only ? 1 : MAX_MB_PLANE;
...@@ -1578,7 +1578,7 @@ void vp10_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, ...@@ -1578,7 +1578,7 @@ void vp10_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer,
} }
void vp10_loop_filter_frame(YV12_BUFFER_CONFIG *frame, void vp10_loop_filter_frame(YV12_BUFFER_CONFIG *frame,
VP9_COMMON *cm, MACROBLOCKD *xd, VP10_COMMON *cm, MACROBLOCKD *xd,
int frame_filter_level, int frame_filter_level,
int y_only, int partial_frame) { int y_only, int partial_frame) {
int start_mi_row, end_mi_row, mi_rows_to_filter; int start_mi_row, end_mi_row, mi_rows_to_filter;
......
...@@ -214,7 +214,7 @@ static int mfqe_decision(MODE_INFO *mi, BLOCK_SIZE cur_bs) { ...@@ -214,7 +214,7 @@ static int mfqe_decision(MODE_INFO *mi, BLOCK_SIZE cur_bs) {
} }
// Process each partiton in a super block, recursively. // Process each partiton in a super block, recursively.
static void mfqe_partition(VP9_COMMON *cm, MODE_INFO *mi, BLOCK_SIZE bs, static void mfqe_partition(VP10_COMMON *cm, MODE_INFO *mi, BLOCK_SIZE bs,
const uint8_t *y, const uint8_t *u, const uint8_t *y, const uint8_t *u,
const uint8_t *v, int y_stride, int uv_stride, const uint8_t *v, int y_stride, int uv_stride,
uint8_t *yd, uint8_t *ud, uint8_t *vd, uint8_t *yd, uint8_t *ud, uint8_t *vd,
...@@ -349,7 +349,7 @@ static void mfqe_partition(VP9_COMMON *cm, MODE_INFO *mi, BLOCK_SIZE bs, ...@@ -349,7 +349,7 @@ static void mfqe_partition(VP9_COMMON *cm, MODE_INFO *mi, BLOCK_SIZE bs,
} }
} }
void vp10_mfqe(VP9_COMMON *cm) { void vp10_mfqe(VP10_COMMON *cm) {
int mi_row, mi_col; int mi_row, mi_col;
// Current decoded frame. // Current decoded frame.
const YV12_BUFFER_CONFIG *show = cm->frame_to_show; const YV12_BUFFER_CONFIG *show = cm->frame_to_show;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// This function searches the neighbourhood of a given MB/SB // This function searches the neighbourhood of a given MB/SB
// to try and find candidate reference vectors. // to try and find candidate reference vectors.
static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd, static void find_mv_refs_idx(const VP10_COMMON *cm, const MACROBLOCKD *xd,
MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame, MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
int_mv *mv_ref_list, int_mv *mv_ref_list,
int block, int mi_row, int mi_col, int block, int mi_row, int mi_col,
...@@ -146,7 +146,7 @@ static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd, ...@@ -146,7 +146,7 @@ static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
clamp_mv_ref(&mv_ref_list[i].as_mv, xd); clamp_mv_ref(&mv_ref_list[i].as_mv, xd);
} }
void vp10_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd, void vp10_find_mv_refs(const VP10_COMMON *cm, const MACROBLOCKD *xd,
MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame, MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
int_mv *mv_ref_list, int_mv *mv_ref_list,
int mi_row, int mi_col, int mi_row, int mi_col,
...@@ -179,7 +179,7 @@ void vp10_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp, ...@@ -179,7 +179,7 @@ void vp10_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp,
*near_mv = mvlist[1]; *near_mv = mvlist[1];
} }
void vp10_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd, void vp10_append_sub8x8_mvs_for_idx(VP10_COMMON *cm, MACROBLOCKD *xd,
int block, int ref, int mi_row, int mi_col, int block, int ref, int mi_row, int mi_col,
int_mv *nearest_mv, int_mv *near_mv, int_mv *nearest_mv, int_mv *near_mv,
uint8_t *mode_context) { uint8_t *mode_context) {
......
...@@ -208,7 +208,7 @@ static INLINE void clamp_mv2(MV *mv, const MACROBLOCKD *xd) { ...@@ -208,7 +208,7 @@ static INLINE void clamp_mv2(MV *mv, const MACROBLOCKD *xd) {
} }
typedef void (*find_mv_refs_sync)(void *const data, int mi_row); typedef void (*find_mv_refs_sync)(void *const data, int mi_row);
void vp10_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd, void vp10_find_mv_refs(const VP10_COMMON *cm, const MACROBLOCKD *xd,
MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame, MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
int_mv *mv_ref_list, int mi_row, int mi_col, int_mv *mv_ref_list, int mi_row, int mi_col,
find_mv_refs_sync sync, void *const data, find_mv_refs_sync sync, void *const data,
...@@ -220,7 +220,7 @@ void vp10_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd, ...@@ -220,7 +220,7 @@ void vp10_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd,
void vp10_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp, void vp10_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp,
int_mv *mvlist, int_mv *nearest_mv, int_mv *near_mv); int_mv *mvlist, int_mv *nearest_mv, int_mv *near_mv);
void vp10_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd, void vp10_append_sub8x8_mvs_for_idx(VP10_COMMON *cm, MACROBLOCKD *xd,
int block, int ref, int mi_row, int mi_col, int block, int ref, int mi_row, int mi_col,
int_mv *nearest_mv, int_mv *near_mv, int_mv *nearest_mv, int_mv *near_mv,
uint8_t *mode_context); uint8_t *mode_context);
......
...@@ -275,7 +275,7 @@ typedef struct VP9Common { ...@@ -275,7 +275,7 @@ typedef struct VP9Common {
PARTITION_CONTEXT *above_seg_context; PARTITION_CONTEXT *above_seg_context;
ENTROPY_CONTEXT *above_context; ENTROPY_CONTEXT *above_context;
int above_context_alloc_cols; int above_context_alloc_cols;
} VP9_COMMON; } VP10_COMMON;
// TODO(hkuang): Don't need to lock the whole pool after implementing atomic // TODO(hkuang): Don't need to lock the whole pool after implementing atomic
// frame reference count. // frame reference count.
...@@ -295,7 +295,7 @@ static void unlock_buffer_pool(BufferPool *const pool) { ...@@ -295,7 +295,7 @@ static void unlock_buffer_pool(BufferPool *const pool) {
#endif #endif
} }
static INLINE YV12_BUFFER_CONFIG *get_ref_frame(VP9_COMMON *cm, int index) { static INLINE YV12_BUFFER_CONFIG *get_ref_frame(VP10_COMMON *cm, int index) {
if (index < 0 || index >= REF_FRAMES) if (index < 0 || index >= REF_FRAMES)
return NULL; return NULL;
if (cm->ref_frame_map[index] < 0) if (cm->ref_frame_map[index] < 0)
...@@ -304,11 +304,11 @@ static INLINE YV12_BUFFER_CONFIG *get_ref_frame(VP9_COMMON *cm, int index) { ...@@ -304,11 +304,11 @@ static INLINE YV12_BUFFER_CONFIG *get_ref_frame(VP9_COMMON *cm, int index) {
return &cm->buffer_pool->frame_bufs[cm->ref_frame_map[index]].buf; return &cm->buffer_pool->frame_bufs[cm->ref_frame_map[index]].buf;
} }
static INLINE YV12_BUFFER_CONFIG *get_frame_new_buffer(VP9_COMMON *cm) { static INLINE YV12_BUFFER_CONFIG *get_frame_new_buffer(VP10_COMMON *cm) {
return &cm->buffer_pool->frame_bufs[cm->new_fb_idx].buf; return &cm->buffer_pool->frame_bufs[cm->new_fb_idx].buf;
} }
static INLINE int get_free_fb(VP9_COMMON *cm) { static INLINE int get_free_fb(VP10_COMMON *cm) {
RefCntBuffer *const frame_bufs = cm->buffer_pool->frame_bufs; RefCntBuffer *const frame_bufs = cm->buffer_pool->frame_bufs;
int i; int i;
...@@ -343,11 +343,11 @@ static INLINE int mi_cols_aligned_to_sb(int n_mis) { ...@@ -343,11 +343,11 @@ static INLINE int mi_cols_aligned_to_sb(int n_mis) {
return ALIGN_POWER_OF_TWO(n_mis, MI_BLOCK_SIZE_LOG2); return ALIGN_POWER_OF_TWO(n_mis, MI_BLOCK_SIZE_LOG2);
} }
static INLINE int frame_is_intra_only(const VP9_COMMON *const cm) { static INLINE int frame_is_intra_only(const VP10_COMMON *const cm) {
return cm->frame_type == KEY_FRAME || cm->intra_only; return cm->frame_type == KEY_FRAME || cm->intra_only;
} }
static INLINE void set_partition_probs(const VP9_COMMON *const cm, static INLINE void set_partition_probs(const VP10_COMMON *const cm,
MACROBLOCKD *const xd) { MACROBLOCKD *const xd) {
xd->partition_probs = xd->partition_probs =
frame_is_intra_only(cm) ? frame_is_intra_only(cm) ?
...@@ -355,7 +355,7 @@ static INLINE void set_partition_probs(const VP9_COMMON *const cm, ...@@ -355,7 +355,7 @@ static INLINE void set_partition_probs(const VP9_COMMON *const cm,
(const vpx_prob (*)[PARTITION_TYPES - 1])cm->fc->partition_prob; (const vpx_prob (*)[PARTITION_TYPES - 1])cm->fc->partition_prob;
} }
static INLINE void vp10_init_macroblockd(VP9_COMMON *cm, MACROBLOCKD *xd, static INLINE void vp10_init_macroblockd(VP10_COMMON *cm, MACROBLOCKD *xd,
tran_low_t *dqcoeff) { tran_low_t *dqcoeff) {
int i; int i;
......
...@@ -612,7 +612,7 @@ void vp10_plane_add_noise_c(uint8_t *start, char *noise, ...@@ -612,7 +612,7 @@ void vp10_plane_add_noise_c(uint8_t *start, char *noise,
} }
} }
static void swap_mi_and_prev_mi(VP9_COMMON *cm) { static void swap_mi_and_prev_mi(VP10_COMMON *cm) {
// Current mip will be the prev_mip for the next frame. // Current mip will be the prev_mip for the next frame.
MODE_INFO *temp = cm->postproc_state.prev_mip; MODE_INFO *temp = cm->postproc_state.prev_mip;
cm->postproc_state.prev_mip = cm->mip; cm->postproc_state.prev_mip = cm->mip;
......
...@@ -61,7 +61,7 @@ int vp10_get_intra_inter_context(const MACROBLOCKD *xd) { ...@@ -61,7 +61,7 @@ int vp10_get_intra_inter_context(const MACROBLOCKD *xd) {
} }
} }
int vp10_get_reference_mode_context(const VP9_COMMON *cm, int vp10_get_reference_mode_context(const VP10_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
int ctx; int ctx;
const MB_MODE_INFO *const above_mbmi = xd->above_mbmi; const MB_MODE_INFO *const above_mbmi = xd->above_mbmi;
...@@ -104,7 +104,7 @@ int vp10_get_reference_mode_context(const VP9_COMMON *cm, ...@@ -104,7 +104,7 @@ int vp10_get_reference_mode_context(const VP9_COMMON *cm,
} }
// Returns a context number for the given MB prediction signal // Returns a context number for the given MB prediction signal
int vp10_get_pred_context_comp_ref_p(const VP9_COMMON *cm, int vp10_get_pred_context_comp_ref_p(const VP10_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
int pred_context; int pred_context;
const MB_MODE_INFO *const above_mbmi = xd->above_mbmi; const MB_MODE_INFO *const above_mbmi = xd->above_mbmi;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
extern "C" { extern "C" {
#endif #endif
static INLINE int get_segment_id(const VP9_COMMON *cm, static INLINE int get_segment_id(const VP10_COMMON *cm,
const uint8_t *segment_ids, const uint8_t *segment_ids,
BLOCK_SIZE 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 mi_offset = mi_row * cm->mi_cols + mi_col;
...@@ -60,7 +60,7 @@ static INLINE int vp10_get_skip_context(const MACROBLOCKD *xd) { ...@@ -60,7 +60,7 @@ static INLINE int vp10_get_skip_context(const MACROBLOCKD *xd) {
return above_skip + left_skip; return above_skip + left_skip;
} }
static INLINE vpx_prob vp10_get_skip_prob(const VP9_COMMON *cm, static INLINE vpx_prob vp10_get_skip_prob(const VP10_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {