summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2015-08-13 09:36:53 -0700
committerYaowu Xu <yaowu@google.com>2015-08-13 09:58:26 -0700
commitfc7cbd1f606c7746d9444d18e487cac27ee98212 (patch)
treee3e1875d8c4b6c9587486e16486142a8a8dcfe4b
parent2dcefd9c7fdc08f28f8276f2a41df453c1f0a020 (diff)
downloadlibvpx-fc7cbd1f606c7746d9444d18e487cac27ee98212.tar
libvpx-fc7cbd1f606c7746d9444d18e487cac27ee98212.tar.gz
libvpx-fc7cbd1f606c7746d9444d18e487cac27ee98212.tar.bz2
libvpx-fc7cbd1f606c7746d9444d18e487cac27ee98212.zip
VP9_COMMON -> VP10->COMMON
Change-Id: I651b7bee90f33581368853da81f9622805ccc0ea
-rw-r--r--vp10/common/alloccommon.c18
-rw-r--r--vp10/common/debugmodes.c6
-rw-r--r--vp10/common/entropy.c6
-rw-r--r--vp10/common/entropymode.c4
-rw-r--r--vp10/common/entropymv.c4
-rw-r--r--vp10/common/loopfilter.c16
-rw-r--r--vp10/common/mfqe.c4
-rw-r--r--vp10/common/mvref_common.c6
-rw-r--r--vp10/common/mvref_common.h4
-rw-r--r--vp10/common/onyxc_int.h14
-rw-r--r--vp10/common/postproc.c2
-rw-r--r--vp10/common/pred_common.c4
-rw-r--r--vp10/common/pred_common.h19
-rw-r--r--vp10/common/thread_common.c10
-rw-r--r--vp10/common/tile_common.c6
-rw-r--r--vp10/decoder/decodeframe.c47
-rw-r--r--vp10/decoder/decodemv.c42
-rw-r--r--vp10/decoder/decoder.c18
-rw-r--r--vp10/decoder/decoder.h6
-rw-r--r--vp10/decoder/dthread.c4
-rw-r--r--vp10/encoder/aq_complexity.c4
-rw-r--r--vp10/encoder/aq_cyclicrefresh.c20
-rw-r--r--vp10/encoder/aq_variance.c2
-rw-r--r--vp10/encoder/bitstream.c46
-rw-r--r--vp10/encoder/context_tree.c6
-rw-r--r--vp10/encoder/encodeframe.c78
-rw-r--r--vp10/encoder/encodemv.c2
-rw-r--r--vp10/encoder/encodemv.h2
-rw-r--r--vp10/encoder/encoder.c94
-rw-r--r--vp10/encoder/encoder.h12
-rw-r--r--vp10/encoder/ethread.c4
-rw-r--r--vp10/encoder/firstpass.c14
-rw-r--r--vp10/encoder/mbgraph.c8
-rw-r--r--vp10/encoder/picklpf.c6
-rw-r--r--vp10/encoder/pickmode.c8
-rw-r--r--vp10/encoder/quantize.c6
-rw-r--r--vp10/encoder/ratectrl.c30
-rw-r--r--vp10/encoder/rd.c6
-rw-r--r--vp10/encoder/rdopt.c26
-rw-r--r--vp10/encoder/segmentation.c6
-rw-r--r--vp10/encoder/segmentation.h2
-rw-r--r--vp10/encoder/skin_detection.c2
-rw-r--r--vp10/encoder/speed_features.c12
-rw-r--r--vp10/encoder/temporal_filter.c2
-rw-r--r--vp10/encoder/tokenize.c2
-rw-r--r--vp10/vp10_dx_iface.c12
46 files changed, 327 insertions, 325 deletions
diff --git a/vp10/common/alloccommon.c b/vp10/common/alloccommon.c
index 409af985e..ecb10dee5 100644
--- a/vp10/common/alloccommon.c
+++ b/vp10/common/alloccommon.c
@@ -17,7 +17,7 @@
#include "vp10/common/entropymv.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_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) {
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;
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) {
return 0;
}
-static void free_seg_map(VP9_COMMON *cm) {
+static void free_seg_map(VP10_COMMON *cm) {
int i;
for (i = 0; i < NUM_PING_PONG_BUFFERS; ++i) {
@@ -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
vp9_free_frame_buffer(&cm->post_proc_buffer);
vp9_free_frame_buffer(&cm->post_proc_buffer_int);
@@ -90,7 +90,7 @@ void vp10_free_postproc_buffers(VP9_COMMON *cm) {
#endif
}
-void vp10_free_context_buffers(VP9_COMMON *cm) {
+void vp10_free_context_buffers(VP10_COMMON *cm) {
cm->free_mi(cm);
free_seg_map(cm);
vpx_free(cm->above_context);
@@ -99,7 +99,7 @@ void vp10_free_context_buffers(VP9_COMMON *cm) {
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;
vp10_set_mb_mi(cm, width, height);
@@ -138,7 +138,7 @@ int vp10_alloc_context_buffers(VP9_COMMON *cm, int width, int height) {
return 1;
}
-void vp10_remove_common(VP9_COMMON *cm) {
+void vp10_remove_common(VP10_COMMON *cm) {
vp10_free_context_buffers(cm);
vpx_free(cm->fc);
@@ -147,13 +147,13 @@ void vp10_remove_common(VP9_COMMON *cm) {
cm->frame_contexts = NULL;
}
-void vp10_init_context_buffers(VP9_COMMON *cm) {
+void vp10_init_context_buffers(VP10_COMMON *cm) {
cm->setup_mi(cm);
if (cm->last_frame_seg_map && !cm->frame_parallel_decode)
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.
const int tmp = cm->seg_map_idx;
cm->seg_map_idx = cm->prev_seg_map_idx;
diff --git a/vp10/common/debugmodes.c b/vp10/common/debugmodes.c
index 4c927d8d7..10fc4d633 100644
--- a/vp10/common/debugmodes.c
+++ b/vp10/common/debugmodes.c
@@ -13,7 +13,7 @@
#include "vp10/common/blockd.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, "(Frame %d, Show:%d, Q:%d): \n", cm->current_video_frame,
cm->show_frame, cm->base_qindex);
@@ -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
* 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) {
int mi_row, mi_col;
MODE_INFO **mi = cm->mi_grid_visible;
@@ -45,7 +45,7 @@ static void print_mi_data(VP9_COMMON *cm, FILE *file, const char *descriptor,
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_col;
FILE *mvs = fopen(file, "a");
diff --git a/vp10/common/entropy.c b/vp10/common/entropy.c
index ab1f0b26e..56dd73a4a 100644
--- a/vp10/common/entropy.c
+++ b/vp10/common/entropy.c
@@ -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]);
}
-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_8X8], default_coef_probs_8x8);
vp10_copy(cm->fc->coef_probs[TX_16X16], default_coef_probs_16x16);
@@ -767,7 +767,7 @@ void vp10_default_coef_probs(VP9_COMMON *cm) {
#define COEF_COUNT_SAT_AFTER_KEY 24
#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 update_factor) {
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,
}
}
-void vp10_adapt_coef_probs(VP9_COMMON *cm) {
+void vp10_adapt_coef_probs(VP10_COMMON *cm) {
TX_SIZE t;
unsigned int count_sat, update_factor;
diff --git a/vp10/common/entropymode.c b/vp10/common/entropymode.c
index cd68d5b86..cdb6ab9ea 100644
--- a/vp10/common/entropymode.c
+++ b/vp10/common/entropymode.c
@@ -334,7 +334,7 @@ const vpx_tree_index vp10_switchable_interp_tree
-EIGHTTAP_SMOOTH, -EIGHTTAP_SHARP
};
-void vp10_adapt_mode_probs(VP9_COMMON *cm) {
+void vp10_adapt_mode_probs(VP10_COMMON *cm) {
int i, j;
FRAME_CONTEXT *fc = cm->fc;
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) {
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:
// Features disabled, 0, with delta coding (Default state).
struct loopfilter *const lf = &cm->lf;
diff --git a/vp10/common/entropymv.c b/vp10/common/entropymv.c
index 3d765a625..ebf7a079b 100644
--- a/vp10/common/entropymv.c
+++ b/vp10/common/entropymv.c
@@ -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;
nmv_context *fc = &cm->fc->nmvc;
@@ -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;
}
diff --git a/vp10/common/loopfilter.c b/vp10/common/loopfilter.c
index 40b6d760f..36854819b 100644
--- a/vp10/common/loopfilter.c
+++ b/vp10/common/loopfilter.c
@@ -236,7 +236,7 @@ static uint8_t get_filter_level(const loop_filter_info_n *lfi_n,
[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;
struct loopfilter *lf = &cm->lf;
int lvl;
@@ -250,7 +250,7 @@ void vp10_loop_filter_init(VP9_COMMON *cm) {
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;
// n_shift is the multiplier for lf_deltas
// 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,
// This function sets up the bit masks for the entire 64x64 region represented
// by mi_row, mi_col.
// 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,
LOOP_FILTER_MASK *lfm) {
int idx_32, idx_16, idx_8;
@@ -1151,7 +1151,7 @@ static void highbd_filter_selectively_vert(uint16_t *s, int pitch,
}
#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,
MODE_INFO **mi_8x8,
int mi_row, int mi_col) {
@@ -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,
int mi_row,
LOOP_FILTER_MASK *lfm) {
@@ -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,
int mi_row,
LOOP_FILTER_MASK *lfm) {
@@ -1529,7 +1529,7 @@ void vp10_filter_block_plane_ss11(VP9_COMMON *const cm,
}
void vp10_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer,
- VP9_COMMON *cm,
+ VP10_COMMON *cm,
struct macroblockd_plane planes[MAX_MB_PLANE],
int start, int stop, int y_only) {
const int num_planes = y_only ? 1 : MAX_MB_PLANE;
@@ -1578,7 +1578,7 @@ void vp10_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer,
}
void vp10_loop_filter_frame(YV12_BUFFER_CONFIG *frame,
- VP9_COMMON *cm, MACROBLOCKD *xd,
+ VP10_COMMON *cm, MACROBLOCKD *xd,
int frame_filter_level,
int y_only, int partial_frame) {
int start_mi_row, end_mi_row, mi_rows_to_filter;
diff --git a/vp10/common/mfqe.c b/vp10/common/mfqe.c
index 49a3c7643..c715ef73e 100644
--- a/vp10/common/mfqe.c
+++ b/vp10/common/mfqe.c
@@ -214,7 +214,7 @@ static int mfqe_decision(MODE_INFO *mi, BLOCK_SIZE cur_bs) {
}
// 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 *v, int y_stride, int uv_stride,
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,
}
}
-void vp10_mfqe(VP9_COMMON *cm) {
+void vp10_mfqe(VP10_COMMON *cm) {
int mi_row, mi_col;
// Current decoded frame.
const YV12_BUFFER_CONFIG *show = cm->frame_to_show;
diff --git a/vp10/common/mvref_common.c b/vp10/common/mvref_common.c
index d8c150742..c0a84567f 100644
--- a/vp10/common/mvref_common.c
+++ b/vp10/common/mvref_common.c
@@ -13,7 +13,7 @@
// This function searches the neighbourhood of a given MB/SB
// 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,
int_mv *mv_ref_list,
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,
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,
int_mv *mv_ref_list,
int mi_row, int mi_col,
@@ -179,7 +179,7 @@ void vp10_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp,
*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_mv *nearest_mv, int_mv *near_mv,
uint8_t *mode_context) {
diff --git a/vp10/common/mvref_common.h b/vp10/common/mvref_common.h
index 9af26e206..8e918b83a 100644
--- a/vp10/common/mvref_common.h
+++ b/vp10/common/mvref_common.h
@@ -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);
-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,
int_mv *mv_ref_list, int mi_row, int mi_col,
find_mv_refs_sync sync, void *const data,
@@ -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,
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_mv *nearest_mv, int_mv *near_mv,
uint8_t *mode_context);
diff --git a/vp10/common/onyxc_int.h b/vp10/common/onyxc_int.h
index 93f021bc0..2e3016714 100644
--- a/vp10/common/onyxc_int.h
+++ b/vp10/common/onyxc_int.h
@@ -275,7 +275,7 @@ typedef struct VP9Common {
PARTITION_CONTEXT *above_seg_context;
ENTROPY_CONTEXT *above_context;
int above_context_alloc_cols;
-} VP9_COMMON;
+} VP10_COMMON;
// TODO(hkuang): Don't need to lock the whole pool after implementing atomic
// frame reference count.
@@ -295,7 +295,7 @@ static void unlock_buffer_pool(BufferPool *const pool) {
#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)
return NULL;
if (cm->ref_frame_map[index] < 0)
@@ -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;
}
-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;
}
-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;
int i;
@@ -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);
}
-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;
}
-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) {
xd->partition_probs =
frame_is_intra_only(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;
}
-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) {
int i;
diff --git a/vp10/common/postproc.c b/vp10/common/postproc.c
index 3bc1b5717..b3bf65e0f 100644
--- a/vp10/common/postproc.c
+++ b/vp10/common/postproc.c
@@ -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.
MODE_INFO *temp = cm->postproc_state.prev_mip;
cm->postproc_state.prev_mip = cm->mip;
diff --git a/vp10/common/pred_common.c b/vp10/common/pred_common.c
index 1b60a094e..2e79e0de3 100644
--- a/vp10/common/pred_common.c
+++ b/vp10/common/pred_common.c
@@ -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) {
int ctx;
const MB_MODE_INFO *const above_mbmi = xd->above_mbmi;
@@ -104,7 +104,7 @@ int vp10_get_reference_mode_context(const VP9_COMMON *cm,
}
// 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) {
int pred_context;
const MB_MODE_INFO *const above_mbmi = xd->above_mbmi;
diff --git a/vp10/common/pred_common.h b/vp10/common/pred_common.h
index ec833420f..9345c6bf3 100644
--- a/vp10/common/pred_common.h
+++ b/vp10/common/pred_common.h
@@ -18,7 +18,7 @@
extern "C" {
#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,
BLOCK_SIZE bsize, int mi_row, int 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) {
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) {
return cm->fc->skip_probs[vp10_get_skip_context(xd)];
}
@@ -69,22 +69,23 @@ int vp10_get_pred_context_switchable_interp(const MACROBLOCKD *xd);
int vp10_get_intra_inter_context(const MACROBLOCKD *xd);
-static INLINE vpx_prob vp10_get_intra_inter_prob(const VP9_COMMON *cm,
+static INLINE vpx_prob vp10_get_intra_inter_prob(const VP10_COMMON *cm,
const MACROBLOCKD *xd) {
return cm->fc->intra_inter_prob[vp10_get_intra_inter_context(xd)];
}
-int vp10_get_reference_mode_context(const VP9_COMMON *cm, const MACROBLOCKD *xd);
+int vp10_get_reference_mode_context(const VP10_COMMON *cm,
+ const MACROBLOCKD *xd);
-static INLINE vpx_prob vp10_get_reference_mode_prob(const VP9_COMMON *cm,
+static INLINE vpx_prob vp10_get_reference_mode_prob(const VP10_COMMON *cm,
const MACROBLOCKD *xd) {
return cm->fc->comp_inter_prob[vp10_get_reference_mode_context(cm, xd)];
}
-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);
-static INLINE vpx_prob vp10_get_pred_prob_comp_ref_p(const VP9_COMMON *cm,
+static INLINE vpx_prob vp10_get_pred_prob_comp_ref_p(const VP10_COMMON *cm,
const MACROBLOCKD *xd) {
const int pred_context = vp10_get_pred_context_comp_ref_p(cm, xd);
return cm->fc->comp_ref_prob[pred_context];
@@ -92,14 +93,14 @@ static INLINE vpx_prob vp10_get_pred_prob_comp_ref_p(const VP9_COMMON *cm,
int vp10_get_pred_context_single_ref_p1(const MACROBLOCKD *xd);
-static INLINE vpx_prob vp10_get_pred_prob_single_ref_p1(const VP9_COMMON *cm,
+static INLINE vpx_prob vp10_get_pred_prob_single_ref_p1(const VP10_COMMON *cm,
const MACROBLOCKD *xd) {
return cm->fc->single_ref_prob[vp10_get_pred_context_single_ref_p1(xd)][0];
}
int vp10_get_pred_context_single_ref_p2(const MACROBLOCKD *xd);
-static INLINE vpx_prob vp10_get_pred_prob_single_ref_p2(const VP9_COMMON *cm,
+static INLINE vpx_prob vp10_get_pred_prob_single_ref_p2(const VP10_COMMON *cm,
const MACROBLOCKD *xd) {
return cm->fc->single_ref_prob[vp10_get_pred_context_single_ref_p2(xd)][1];
}
diff --git a/vp10/common/thread_common.c b/vp10/common/thread_common.c
index 088589e4d..69c6471ff 100644
--- a/vp10/common/thread_common.c
+++ b/vp10/common/thread_common.c
@@ -88,7 +88,7 @@ static INLINE void sync_write(VP9LfSync *const lf_sync, int r, int c,
// Implement row loopfiltering for each thread.
static INLINE
void thread_loop_filter_rows(const YV12_BUFFER_CONFIG *const frame_buffer,
- VP9_COMMON *const cm,
+ VP10_COMMON *const cm,
struct macroblockd_plane planes[MAX_MB_PLANE],
int start, int stop, int y_only,
VP9LfSync *const lf_sync) {
@@ -154,7 +154,7 @@ static int loop_filter_row_worker(VP9LfSync *const lf_sync,
}
static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame,
- VP9_COMMON *cm,
+ VP10_COMMON *cm,
struct macroblockd_plane planes[MAX_MB_PLANE],
int start, int stop, int y_only,
VPxWorker *workers, int nworkers,
@@ -214,7 +214,7 @@ static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame,
}
void vp10_loop_filter_frame_mt(YV12_BUFFER_CONFIG *frame,
- VP9_COMMON *cm,
+ VP10_COMMON *cm,
struct macroblockd_plane planes[MAX_MB_PLANE],
int frame_filter_level,
int y_only, int partial_frame,
@@ -253,7 +253,7 @@ static INLINE int get_sync_range(int width) {
}
// Allocate memory for lf row synchronization
-void vp10_loop_filter_alloc(VP9LfSync *lf_sync, VP9_COMMON *cm, int rows,
+void vp10_loop_filter_alloc(VP9LfSync *lf_sync, VP10_COMMON *cm, int rows,
int width, int num_workers) {
lf_sync->rows = rows;
#if CONFIG_MULTITHREAD
@@ -317,7 +317,7 @@ void vp10_loop_filter_dealloc(VP9LfSync *lf_sync) {
}
// Accumulate frame counts.
-void vp10_accumulate_frame_counts(VP9_COMMON *cm, FRAME_COUNTS *counts,
+void vp10_accumulate_frame_counts(VP10_COMMON *cm, FRAME_COUNTS *counts,
int is_dec) {
int i, j, k, l, m;
diff --git a/vp10/common/tile_common.c b/vp10/common/tile_common.c
index fb7fac663..821a5e8e0 100644
--- a/vp10/common/tile_common.c
+++ b/vp10/common/tile_common.c
@@ -21,17 +21,17 @@ static int get_tile_offset(int idx, int mis, int log2) {
return MIN(offset, mis);
}
-void vp10_tile_set_row(TileInfo *tile, const VP9_COMMON *cm, int row) {
+void vp10_tile_set_row(TileInfo *tile, const VP10_COMMON *cm, int row) {
tile->mi_row_start = get_tile_offset(row, cm->mi_rows, cm->log2_tile_rows);
tile->mi_row_end = get_tile_offset(row + 1, cm->mi_rows, cm->log2_tile_rows);
}
-void vp10_tile_set_col(TileInfo *tile, const VP9_COMMON *cm, int col) {
+void vp10_tile_set_col(TileInfo *tile, const VP10_COMMON *cm, int col) {
tile->mi_col_start = get_tile_offset(col, cm->mi_cols, cm->log2_tile_cols);
tile->mi_col_end = get_tile_offset(col + 1, cm->mi_cols, cm->log2_tile_cols);
}
-void vp10_tile_init(TileInfo *tile, const VP9_COMMON *cm, int row, int col) {
+void vp10_tile_init(TileInfo *tile, const VP10_COMMON *cm, int row, int col) {
vp10_tile_set_row(tile, cm, row);
vp10_tile_set_col(tile, cm, col);
}
diff --git a/vp10/decoder/decodeframe.c b/vp10/decoder/decodeframe.c
index 8814f9691..70a57d8f0 100644
--- a/vp10/decoder/decodeframe.c
+++ b/vp10/decoder/decodeframe.c
@@ -44,7 +44,7 @@
#define MAX_VP9_HEADER_SIZE 80
-static int is_compound_reference_allowed(const VP9_COMMON *cm) {
+static int is_compound_reference_allowed(const VP10_COMMON *cm) {
int i;
for (i = 1; i < REFS_PER_FRAME; ++i)
if (cm->ref_frame_sign_bias[i + 1] != cm->ref_frame_sign_bias[1])
@@ -53,7 +53,7 @@ static int is_compound_reference_allowed(const VP9_COMMON *cm) {
return 0;
}
-static void setup_compound_reference_mode(VP9_COMMON *cm) {
+static void setup_compound_reference_mode(VP10_COMMON *cm) {
if (cm->ref_frame_sign_bias[LAST_FRAME] ==
cm->ref_frame_sign_bias[GOLDEN_FRAME]) {
cm->comp_fixed_ref = ALTREF_FRAME;
@@ -117,7 +117,7 @@ static void read_inter_mode_probs(FRAME_CONTEXT *fc, vpx_reader *r) {
vp10_diff_update_prob(r, &fc->inter_mode_probs[i][j]);
}
-static REFERENCE_MODE read_frame_reference_mode(const VP9_COMMON *cm,
+static REFERENCE_MODE read_frame_reference_mode(const VP10_COMMON *cm,
vpx_reader *r) {
if (is_compound_reference_allowed(cm)) {
return vpx_read_bit(r) ? (vpx_read_bit(r) ? REFERENCE_MODE_SELECT
@@ -128,7 +128,7 @@ static REFERENCE_MODE read_frame_reference_mode(const VP9_COMMON *cm,
}
}
-static void read_frame_reference_mode_probs(VP9_COMMON *cm, vpx_reader *r) {
+static void read_frame_reference_mode_probs(VP10_COMMON *cm, vpx_reader *r) {
FRAME_CONTEXT *const fc = cm->fc;
int i;
@@ -781,7 +781,7 @@ static void set_plane_n4(MACROBLOCKD *const xd, int bw, int bh, int bwl,
}
}
-static MB_MODE_INFO *set_offsets(VP9_COMMON *const cm, MACROBLOCKD *const xd,
+static MB_MODE_INFO *set_offsets(VP10_COMMON *const cm, MACROBLOCKD *const xd,
BLOCK_SIZE bsize, int mi_row, int mi_col,
int bw, int bh, int x_mis, int y_mis,
int bwl, int bhl) {
@@ -815,7 +815,7 @@ static void decode_block(VP9Decoder *const pbi, MACROBLOCKD *const xd,
int mi_row, int mi_col,
vpx_reader *r, BLOCK_SIZE bsize,
int bwl, int bhl) {
- VP9_COMMON *const cm = &pbi->common;
+ VP10_COMMON *const cm = &pbi->common;
const int less8x8 = bsize < BLOCK_8X8;
const int bw = 1 << (bwl - 1);
const int bh = 1 << (bhl - 1);
@@ -950,7 +950,7 @@ static PARTITION_TYPE read_partition(MACROBLOCKD *xd, int mi_row, int mi_col,
static void decode_partition(VP9Decoder *const pbi, MACROBLOCKD *const xd,
int mi_row, int mi_col,
vpx_reader* r, BLOCK_SIZE bsize, int n4x4_l2) {
- VP9_COMMON *const cm = &pbi->common;
+ VP10_COMMON *const cm = &pbi->common;
const int n8x8_l2 = n4x4_l2 - 1;
const int num_8x8_wh = 1 << n8x8_l2;
const int hbs = num_8x8_wh >> 1;
@@ -1127,7 +1127,7 @@ static INLINE int read_delta_q(struct vpx_read_bit_buffer *rb) {
return vpx_rb_read_bit(rb) ? vpx_rb_read_signed_literal(rb, 4) : 0;
}
-static void setup_quantization(VP9_COMMON *const cm, MACROBLOCKD *const xd,
+static void setup_quantization(VP10_COMMON *const cm, MACROBLOCKD *const xd,
struct vpx_read_bit_buffer *rb) {
cm->base_qindex = vpx_rb_read_literal(rb, QINDEX_BITS);
cm->y_dc_delta_q = read_delta_q(rb);
@@ -1144,7 +1144,7 @@ static void setup_quantization(VP9_COMMON *const cm, MACROBLOCKD *const xd,
#endif
}
-static void setup_segmentation_dequant(VP9_COMMON *const cm) {
+static void setup_segmentation_dequant(VP10_COMMON *const cm) {
// Build y/uv dequant values based on segmentation.
if (cm->seg.enabled) {
int i;
@@ -1180,14 +1180,15 @@ static INTERP_FILTER read_interp_filter(struct vpx_read_bit_buffer *rb) {
: literal_to_filter[vpx_rb_read_literal(rb, 2)];
}
-static void setup_display_size(VP9_COMMON *cm, struct vpx_read_bit_buffer *rb) {
+static void setup_display_size(VP10_COMMON *cm,
+ struct vpx_read_bit_buffer *rb) {
cm->display_width = cm->width;
cm->display_height = cm->height;
if (vpx_rb_read_bit(rb))
vp10_read_frame_size(rb, &cm->display_width, &cm->display_height);
}
-static void resize_mv_buffer(VP9_COMMON *cm) {
+static void resize_mv_buffer(VP10_COMMON *cm) {
vpx_free(cm->cur_frame->mvs);
cm->cur_frame->mi_rows = cm->mi_rows;
cm->cur_frame->mi_cols = cm->mi_cols;
@@ -1195,7 +1196,7 @@ static void resize_mv_buffer(VP9_COMMON *cm) {
sizeof(*cm->cur_frame->mvs));
}
-static void resize_context_buffers(VP9_COMMON *cm, int width, int height) {
+static void resize_context_buffers(VP10_COMMON *cm, int width, int height) {
#if CONFIG_SIZE_LIMIT
if (width > DECODE_WIDTH_LIMIT || height > DECODE_HEIGHT_LIMIT)
vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
@@ -1227,7 +1228,7 @@ static void resize_context_buffers(VP9_COMMON *cm, int width, int height) {
}
}
-static void setup_frame_size(VP9_COMMON *cm, struct vpx_read_bit_buffer *rb) {
+static void setup_frame_size(VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) {
int width, height;
BufferPool *const pool = cm->buffer_pool;
vp10_read_frame_size(rb, &width, &height);
@@ -1265,7 +1266,7 @@ static INLINE int valid_ref_frame_img_fmt(vpx_bit_depth_t ref_bit_depth,
ref_yss == this_yss;
}
-static void setup_frame_size_with_refs(VP9_COMMON *cm,
+static void setup_frame_size_with_refs(VP10_COMMON *cm,
struct vpx_read_bit_buffer *rb) {
int width, height;
int found = 0, i;
@@ -1338,7 +1339,7 @@ static void setup_frame_size_with_refs(VP9_COMMON *cm,
pool->frame_bufs[cm->new_fb_idx].buf.color_space = cm->color_space;
}
-static void setup_tile_info(VP9_COMMON *cm, struct vpx_read_bit_buffer *rb) {
+static void setup_tile_info(VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) {
int min_log2_tile_cols, max_log2_tile_cols, max_ones;
vp10_get_tile_n_bits(cm->mi_cols, &min_log2_tile_cols, &max_log2_tile_cols);
@@ -1421,7 +1422,7 @@ static void get_tile_buffers(VP9Decoder *pbi,
static const uint8_t *decode_tiles(VP9Decoder *pbi,
const uint8_t *data,
const uint8_t *data_end) {
- VP9_COMMON *const cm = &pbi->common;
+ VP10_COMMON *const cm = &pbi->common;
const VPxWorkerInterface *const winterface = vpx_get_worker_interface();
const int aligned_cols = mi_cols_aligned_to_sb(cm->mi_cols);
const int tile_cols = 1 << cm->log2_tile_cols;
@@ -1597,7 +1598,7 @@ static int compare_tile_buffers(const void *a, const void *b) {
static const uint8_t *decode_tiles_mt(VP9Decoder *pbi,
const uint8_t *data,
const uint8_t *data_end) {
- VP9_COMMON *const cm = &pbi->common;
+ VP10_COMMON *const cm = &pbi->common;
const VPxWorkerInterface *const winterface = vpx_get_worker_interface();
const uint8_t *bit_reader_end = NULL;
const int aligned_mi_cols = mi_cols_aligned_to_sb(cm->mi_cols);
@@ -1754,12 +1755,12 @@ static const uint8_t *decode_tiles_mt(VP9Decoder *pbi,
}
static void error_handler(void *data) {
- VP9_COMMON *const cm = (VP9_COMMON *)data;
+ VP10_COMMON *const cm = (VP10_COMMON *)data;
vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Truncated packet");
}
static void read_bitdepth_colorspace_sampling(
- VP9_COMMON *cm, struct vpx_read_bit_buffer *rb) {
+ VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) {
if (cm->profile >= PROFILE_2) {
cm->bit_depth = vpx_rb_read_bit(rb) ? VPX_BITS_12 : VPX_BITS_10;
#if CONFIG_VP9_HIGHBITDEPTH
@@ -1803,7 +1804,7 @@ static void read_bitdepth_colorspace_sampling(
static size_t read_uncompressed_header(VP9Decoder *pbi,
struct vpx_read_bit_buffer *rb) {
- VP9_COMMON *const cm = &pbi->common;
+ VP10_COMMON *const cm = &pbi->common;
BufferPool *const pool = cm->buffer_pool;
RefCntBuffer *const frame_bufs = pool->frame_bufs;
int i, mask, ref_index = 0;
@@ -2005,7 +2006,7 @@ static size_t read_uncompressed_header(VP9Decoder *pbi,
static int read_compressed_header(VP9Decoder *pbi, const uint8_t *data,
size_t partition_size) {
- VP9_COMMON *const cm = &pbi->common;
+ VP10_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
FRAME_CONTEXT *const fc = cm->fc;
vpx_reader r;
@@ -2060,7 +2061,7 @@ static int read_compressed_header(VP9Decoder *pbi, const uint8_t *data,
#else // !NDEBUG
// Counts should only be incremented when frame_parallel_decoding_mode and
// error_resilient_mode are disabled.
-static void debug_check_frame_counts(const VP9_COMMON *const cm) {
+static void debug_check_frame_counts(const VP10_COMMON *const cm) {
FRAME_COUNTS zero_counts;
vp10_zero(zero_counts);
assert(cm->frame_parallel_decoding_mode || cm->error_resilient_mode);
@@ -2138,7 +2139,7 @@ BITSTREAM_PROFILE vp10_read_profile(struct vpx_read_bit_buffer *rb) {
void vp10_decode_frame(VP9Decoder *pbi,
const uint8_t *data, const uint8_t *data_end,
const uint8_t **p_data_end) {
- VP9_COMMON *const cm = &pbi->common;
+ VP10_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
struct vpx_read_bit_buffer rb;
int context_updated = 0;
diff --git a/vp10/decoder/decodemv.c b/vp10/decoder/decodemv.c
index 439b82937..6bc0b1437 100644
--- a/vp10/decoder/decodemv.c
+++ b/vp10/decoder/decodemv.c
@@ -26,7 +26,7 @@ static PREDICTION_MODE read_intra_mode(vpx_reader *r, const vpx_prob *p) {
return (PREDICTION_MODE)vpx_read_tree(r, vp10_intra_mode_tree, p);
}
-static PREDICTION_MODE read_intra_mode_y(VP9_COMMON *cm, MACROBLOCKD *xd,
+static PREDICTION_MODE read_intra_mode_y(VP10_COMMON *cm, MACROBLOCKD *xd,
vpx_reader *r, int size_group) {
const PREDICTION_MODE y_mode =
read_intra_mode(r, cm->fc->y_mode_prob[size_group]);
@@ -36,7 +36,7 @@ static PREDICTION_MODE read_intra_mode_y(VP9_COMMON *cm, MACROBLOCKD *xd,
return y_mode;
}
-static PREDICTION_MODE read_intra_mode_uv(VP9_COMMON *cm, MACROBLOCKD *xd,
+static PREDICTION_MODE read_intra_mode_uv(VP10_COMMON *cm, MACROBLOCKD *xd,
vpx_reader *r,
PREDICTION_MODE y_mode) {
const PREDICTION_MODE uv_mode = read_intra_mode(r,
@@ -47,7 +47,7 @@ static PREDICTION_MODE read_intra_mode_uv(VP9_COMMON *cm, MACROBLOCKD *xd,
return uv_mode;
}
-static PREDICTION_MODE read_inter_mode(VP9_COMMON *cm, MACROBLOCKD *xd,
+static PREDICTION_MODE read_inter_mode(VP10_COMMON *cm, MACROBLOCKD *xd,
vpx_reader *r, int ctx) {
const int mode = vpx_read_tree(r, vp10_inter_mode_tree,
cm->fc->inter_mode_probs[ctx]);
@@ -62,7 +62,7 @@ static int read_segment_id(vpx_reader *r, const struct segmentation *seg) {
return vpx_read_tree(r, vp10_segment_tree, seg->tree_probs);
}
-static TX_SIZE read_selected_tx_size(VP9_COMMON *cm, MACROBLOCKD *xd,
+static TX_SIZE read_selected_tx_size(VP10_COMMON *cm, MACROBLOCKD *xd,
TX_SIZE max_tx_size, vpx_reader *r) {
FRAME_COUNTS *counts = xd->counts;
const int ctx = get_tx_size_context(xd);
@@ -79,7 +79,7 @@ static TX_SIZE read_selected_tx_size(VP9_COMMON *cm, MACROBLOCKD *xd,
return (TX_SIZE)tx_size;
}
-static TX_SIZE read_tx_size(VP9_COMMON *cm, MACROBLOCKD *xd,
+static TX_SIZE read_tx_size(VP10_COMMON *cm, MACROBLOCKD *xd,
int allow_select, vpx_reader *r) {
TX_MODE tx_mode = cm->tx_mode;
BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type;
@@ -90,7 +90,7 @@ static TX_SIZE read_tx_size(VP9_COMMON *cm, MACROBLOCKD *xd,
return MIN(max_tx_size, tx_mode_to_biggest_tx_size[tx_mode]);
}
-static int dec_get_segment_id(const VP9_COMMON *cm, const uint8_t *segment_ids,
+static int dec_get_segment_id(const VP10_COMMON *cm, const uint8_t *segment_ids,
int mi_offset, int x_mis, int y_mis) {
int x, y, segment_id = INT_MAX;
@@ -103,7 +103,7 @@ static int dec_get_segment_id(const VP9_COMMON *cm, const uint8_t *segment_ids,
return segment_id;
}
-static void set_segment_id(VP9_COMMON *cm, int mi_offset,
+static void set_segment_id(VP10_COMMON *cm, int mi_offset,
int x_mis, int y_mis, int segment_id) {
int x, y;
@@ -114,7 +114,7 @@ static void set_segment_id(VP9_COMMON *cm, int mi_offset,
cm->current_frame_seg_map[mi_offset + y * cm->mi_cols + x] = segment_id;
}
-static void copy_segment_id(const VP9_COMMON *cm,
+static void copy_segment_id(const VP10_COMMON *cm,
const uint8_t *last_segment_ids,
uint8_t *current_segment_ids,
int mi_offset, int x_mis, int y_mis) {
@@ -126,7 +126,7 @@ static void copy_segment_id(const VP9_COMMON *cm,
last_segment_ids[mi_offset + y * cm->mi_cols + x] : 0;
}
-static int read_intra_segment_id(VP9_COMMON *const cm, int mi_offset,
+static int read_intra_segment_id(VP10_COMMON *const cm, int mi_offset,
int x_mis, int y_mis,
vpx_reader *r) {
struct segmentation *const seg = &cm->seg;
@@ -146,7 +146,7 @@ static int read_intra_segment_id(VP9_COMMON *const cm, int mi_offset,
return segment_id;
}
-static int read_inter_segment_id(VP9_COMMON *const cm, MACROBLOCKD *const xd,
+static int read_inter_segment_id(VP10_COMMON *const cm, MACROBLOCKD *const xd,
int mi_row, int mi_col, vpx_reader *r) {
struct segmentation *const seg = &cm->seg;
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
@@ -184,7 +184,7 @@ static int read_inter_segment_id(VP9_COMMON *const cm, MACROBLOCKD *const xd,
return segment_id;
}
-static int read_skip(VP9_COMMON *cm, const MACROBLOCKD *xd,
+static int read_skip(VP10_COMMON *cm, const MACROBLOCKD *xd,
int segment_id, vpx_reader *r) {
if (segfeature_active(&cm->seg, segment_id, SEG_LVL_SKIP)) {
return 1;
@@ -198,7 +198,7 @@ static int read_skip(VP9_COMMON *cm, const MACROBLOCKD *xd,
}
}
-static void read_intra_frame_mode_info(VP9_COMMON *const cm,
+static void read_intra_frame_mode_info(VP10_COMMON *const cm,
MACROBLOCKD *const xd,
int mi_row, int mi_col, vpx_reader *r) {
MODE_INFO *const mi = xd->mi[0];
@@ -302,7 +302,7 @@ static INLINE void read_mv(vpx_reader *r, MV *mv, const MV *ref,
mv->col = ref->col + diff.col;
}
-static REFERENCE_MODE read_block_reference_mode(VP9_COMMON *cm,
+static REFERENCE_MODE read_block_reference_mode(VP10_COMMON *cm,
const MACROBLOCKD *xd,
vpx_reader *r) {
if (cm->reference_mode == REFERENCE_MODE_SELECT) {
@@ -319,7 +319,7 @@ static REFERENCE_MODE read_block_reference_mode(VP9_COMMON *cm,
}
// Read the referncence frame
-static void read_ref_frames(VP9_COMMON *const cm, MACROBLOCKD *const xd,
+static void read_ref_frames(VP10_COMMON *const cm, MACROBLOCKD *const xd,
vpx_reader *r,
int segment_id, MV_REFERENCE_FRAME ref_frame[2]) {
FRAME_CONTEXT *const fc = cm->fc;
@@ -364,7 +364,7 @@ static void read_ref_frames(VP9_COMMON *const cm, MACROBLOCKD *const xd,
static INLINE INTERP_FILTER read_switchable_interp_filter(
- VP9_COMMON *const cm, MACROBLOCKD *const xd,
+ VP10_COMMON *const cm, MACROBLOCKD *const xd,
vpx_reader *r) {
const int ctx = vp10_get_pred_context_switchable_interp(xd);
const INTERP_FILTER type =
@@ -376,7 +376,7 @@ static INLINE INTERP_FILTER read_switchable_interp_filter(
return type;
}
-static void read_intra_block_mode_info(VP9_COMMON *const cm,
+static void read_intra_block_mode_info(VP10_COMMON *const cm,
MACROBLOCKD *const xd, MODE_INFO *mi,
vpx_reader *r) {
MB_MODE_INFO *const mbmi = &mi->mbmi;
@@ -416,7 +416,7 @@ static INLINE int is_mv_valid(const MV *mv) {
mv->col > MV_LOW && mv->col < MV_UPP;
}
-static INLINE int assign_mv(VP9_COMMON *cm, MACROBLOCKD *xd,
+static INLINE int assign_mv(VP10_COMMON *cm, MACROBLOCKD *xd,
PREDICTION_MODE mode,
int_mv mv[2], int_mv ref_mv[2],
int_mv nearest_mv[2], int_mv near_mv[2],
@@ -460,7 +460,7 @@ static INLINE int assign_mv(VP9_COMMON *cm, MACROBLOCKD *xd,
return ret;
}
-static int read_is_inter_block(VP9_COMMON *const cm, MACROBLOCKD *const xd,
+static int read_is_inter_block(VP10_COMMON *const cm, MACROBLOCKD *const xd,
int segment_id, vpx_reader *r) {
if (segfeature_active(&cm->seg, segment_id, SEG_LVL_REF_FRAME)) {
return get_segdata(&cm->seg, segment_id, SEG_LVL_REF_FRAME) != INTRA_FRAME;
@@ -484,7 +484,7 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi,
MACROBLOCKD *const xd,
MODE_INFO *const mi,
int mi_row, int mi_col, vpx_reader *r) {
- VP9_COMMON *const cm = &pbi->common;
+ VP10_COMMON *const cm = &pbi->common;
MB_MODE_INFO *const mbmi = &mi->mbmi;
const BLOCK_SIZE bsize = mbmi->sb_type;
const int allow_hp = cm->allow_high_precision_mv;
@@ -586,7 +586,7 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi,
static void read_inter_frame_mode_info(VP9Decoder *const pbi,
MACROBLOCKD *const xd,
int mi_row, int mi_col, vpx_reader *r) {
- VP9_COMMON *const cm = &pbi->common;
+ VP10_COMMON *const cm = &pbi->common;
MODE_INFO *const mi = xd->mi[0];
MB_MODE_INFO *const mbmi = &mi->mbmi;
int inter_block;
@@ -607,7 +607,7 @@ static void read_inter_frame_mode_info(VP9Decoder *const pbi,
void vp10_read_mode_info(VP9Decoder *const pbi, MACROBLOCKD *xd,
int mi_row, int mi_col, vpx_reader *r,
int x_mis, int y_mis) {
- VP9_COMMON *const cm = &pbi->common;
+ VP10_COMMON *const cm = &pbi->common;
MODE_INFO *const mi = xd->mi[0];
MV_REF* frame_mvs = cm->cur_frame->mvs + mi_row * cm->mi_cols + mi_col;
int w, h;
diff --git a/vp10/decoder/decoder.c b/vp10/decoder/decoder.c
index 2bbc22e3a..e68874c2e 100644
--- a/vp10/decoder/decoder.c
+++ b/vp10/decoder/decoder.c
@@ -48,14 +48,14 @@ static void initialize_dec(void) {
}
}
-static void vp10_dec_setup_mi(VP9_COMMON *cm) {
+static void vp10_dec_setup_mi(VP10_COMMON *cm) {
cm->mi = cm->mip + cm->mi_stride + 1;
cm->mi_grid_visible = cm->mi_grid_base + cm->mi_stride + 1;
memset(cm->mi_grid_base, 0,
cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mi_grid_base));
}
-static int vp10_dec_alloc_mi(VP9_COMMON *cm, int mi_size) {
+static int vp10_dec_alloc_mi(VP10_COMMON *cm, int mi_size) {
cm->mip = vpx_calloc(mi_size, sizeof(*cm->mip));
if (!cm->mip)
return 1;
@@ -66,7 +66,7 @@ static int vp10_dec_alloc_mi(VP9_COMMON *cm, int mi_size) {
return 0;
}
-static void vp10_dec_free_mi(VP9_COMMON *cm) {
+static void vp10_dec_free_mi(VP10_COMMON *cm) {
vpx_free(cm->mip);
cm->mip = NULL;
vpx_free(cm->mi_grid_base);
@@ -75,7 +75,7 @@ static void vp10_dec_free_mi(VP9_COMMON *cm) {
VP9Decoder *vp10_decoder_create(BufferPool *const pool) {
VP9Decoder *volatile const pbi = vpx_memalign(32, sizeof(*pbi));
- VP9_COMMON *volatile const cm = pbi ? &pbi->common : NULL;
+ VP10_COMMON *volatile const cm = pbi ? &pbi->common : NULL;
if (!cm)
return NULL;
@@ -153,7 +153,7 @@ static int equal_dimensions(const YV12_BUFFER_CONFIG *a,
vpx_codec_err_t vp10_copy_reference_dec(VP9Decoder *pbi,
VP9_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd) {
- VP9_COMMON *cm = &pbi->common;
+ VP10_COMMON *cm = &pbi->common;
/* TODO(jkoleszar): The decoder doesn't have any real knowledge of what the
* encoder is using the frame buffers for. This is just a stub to keep the
@@ -181,7 +181,7 @@ vpx_codec_err_t vp10_copy_reference_dec(VP9Decoder *pbi,
}
-vpx_codec_err_t vp10_set_reference_dec(VP9_COMMON *cm,
+vpx_codec_err_t vp10_set_reference_dec(VP10_COMMON *cm,
VP9_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd) {
RefBuffer *ref_buf = NULL;
@@ -230,7 +230,7 @@ vpx_codec_err_t vp10_set_reference_dec(VP9_COMMON *cm,
/* If any buffer updating is signaled it should be done here. */
static void swap_frame_buffers(VP9Decoder *pbi) {
int ref_index = 0, mask;
- VP9_COMMON *const cm = &pbi->common;
+ VP10_COMMON *const cm = &pbi->common;
BufferPool *const pool = cm->buffer_pool;
RefCntBuffer *const frame_bufs = cm->buffer_pool->frame_bufs;
@@ -271,7 +271,7 @@ static void swap_frame_buffers(VP9Decoder *pbi) {
int vp10_receive_compressed_data(VP9Decoder *pbi,
size_t size, const uint8_t **psource) {
- VP9_COMMON *volatile const cm = &pbi->common;
+ VP10_COMMON *volatile const cm = &pbi->common;
BufferPool *volatile const pool = cm->buffer_pool;
RefCntBuffer *volatile const frame_bufs = cm->buffer_pool->frame_bufs;
const uint8_t *source = *psource;
@@ -412,7 +412,7 @@ int vp10_receive_compressed_data(VP9Decoder *pbi,
int vp10_get_raw_frame(VP9Decoder *pbi, YV12_BUFFER_CONFIG *sd,
vp10_ppflags_t *flags) {
- VP9_COMMON *const cm = &pbi->common;
+ VP10_COMMON *const cm = &pbi->common;
int ret = -1;
#if !CONFIG_VP9_POSTPROC
(void)*flags;
diff --git a/vp10/decoder/decoder.h b/vp10/decoder/decoder.h
index 308821b38..1ff0c19a1 100644
--- a/vp10/decoder/decoder.h
+++ b/vp10/decoder/decoder.h
@@ -29,7 +29,7 @@ extern "C" {
// TODO(hkuang): combine this with TileWorkerData.
typedef struct TileData {
- VP9_COMMON *cm;
+ VP10_COMMON *cm;
vpx_reader bit_reader;
DECLARE_ALIGNED(16, MACROBLOCKD, xd);
/* dqcoeff are shared by all the planes. So planes must be decoded serially */
@@ -49,7 +49,7 @@ typedef struct TileWorkerData {
typedef struct VP9Decoder {
DECLARE_ALIGNED(16, MACROBLOCKD, mb);
- DECLARE_ALIGNED(16, VP9_COMMON, common);
+ DECLARE_ALIGNED(16, VP10_COMMON, common);
int ready_for_new_data;
@@ -92,7 +92,7 @@ vpx_codec_err_t vp10_copy_reference_dec(struct VP9Decoder *pbi,
VP9_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd);
-vpx_codec_err_t vp10_set_reference_dec(VP9_COMMON *cm,
+vpx_codec_err_t vp10_set_reference_dec(VP10_COMMON *cm,
VP9_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd);
diff --git a/vp10/decoder/dthread.c b/vp10/decoder/dthread.c
index 391613a3d..efea52685 100644
--- a/vp10/decoder/dthread.c
+++ b/vp10/decoder/dthread.c
@@ -139,8 +139,8 @@ void vp10_frameworker_copy_context(VPxWorker *const dst_worker,
#if CONFIG_MULTITHREAD
FrameWorkerData *const src_worker_data = (FrameWorkerData *)src_worker->data1;
FrameWorkerData *const dst_worker_data = (FrameWorkerData *)dst_worker->data1;
- VP9_COMMON *const src_cm = &src_worker_data->pbi->common;
- VP9_COMMON *const dst_cm = &dst_worker_data->pbi->common;
+ VP10_COMMON *const src_cm = &src_worker_data->pbi->common;
+ VP10_COMMON *const dst_cm = &dst_worker_data->pbi->common;
int i;
// Wait until source frame's context is ready.
diff --git a/vp10/encoder/aq_complexity.c b/vp10/encoder/aq_complexity.c
index 3887616fd..624aae4e5 100644
--- a/vp10/encoder/aq_complexity.c
+++ b/vp10/encoder/aq_complexity.c
@@ -44,7 +44,7 @@ static int get_aq_c_strength(int q_index, vpx_bit_depth_t bit_depth) {
}
void vp10_setup_in_frame_q_adj(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
struct segmentation *const seg = &cm->seg;
// Make SURE use of floating point in this function is safe.
@@ -112,7 +112,7 @@ void vp10_setup_in_frame_q_adj(VP9_COMP *cpi) {
// bits for the block vs a target average and its spatial complexity.
void vp10_caq_select_segment(VP9_COMP *cpi, MACROBLOCK *mb, BLOCK_SIZE bs,
int mi_row, int mi_col, int projected_rate) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const int mi_offset = mi_row * cm->mi_cols + mi_col;
const int bw = num_8x8_blocks_wide_lookup[BLOCK_64X64];
diff --git a/vp10/encoder/aq_cyclicrefresh.c b/vp10/encoder/aq_cyclicrefresh.c
index b0a989459..8a1a52681 100644
--- a/vp10/encoder/aq_cyclicrefresh.c
+++ b/vp10/encoder/aq_cyclicrefresh.c
@@ -85,7 +85,7 @@ void vp10_cyclic_refresh_free(CYCLIC_REFRESH *cr) {
}
// Check if we should turn off cyclic refresh based on bitrate condition.
-static int apply_cyclic_refresh_bitrate(const VP9_COMMON *cm,
+static int apply_cyclic_refresh_bitrate(const VP10_COMMON *cm,
const RATE_CONTROL *rc) {
// Turn off cyclic refresh if bits available per frame is not sufficiently
// larger than bit cost of segmentation. Segment map bit cost should scale
@@ -155,7 +155,7 @@ static int compute_deltaq(const VP9_COMP *cpi, int q, double rate_factor) {
// (called from rc_update_rate_correction_factors()).
int vp10_cyclic_refresh_estimate_bits_at_q(const VP9_COMP *cpi,
double correction_factor) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
int estimated_bits;
int mbs = cm->MBs;
@@ -186,7 +186,7 @@ int vp10_cyclic_refresh_estimate_bits_at_q(const VP9_COMP *cpi,
// to 1/CR_SEGMENT_ID_BOOST1 (refresh) for each superblock, prior to encoding.
int vp10_cyclic_refresh_rc_bits_per_mb(const VP9_COMP *cpi, int i,
double correction_factor) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
int bits_per_mb;
int num8x8bl = cm->MBs << 2;
@@ -216,7 +216,7 @@ void vp10_cyclic_refresh_update_segment(VP9_COMP *const cpi,
int64_t rate,
int64_t dist,
int skip) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
const int bw = num_8x8_blocks_wide_lookup[bsize];
const int bh = num_8x8_blocks_high_lookup[bsize];
@@ -274,7 +274,7 @@ void vp10_cyclic_refresh_update_segment(VP9_COMP *const cpi,
// Update the actual number of blocks that were applied the segment delta q.
void vp10_cyclic_refresh_postencode(VP9_COMP *const cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
unsigned char *const seg_map = cpi->segmentation_map;
int mi_row, mi_col;
@@ -309,7 +309,7 @@ void vp10_cyclic_refresh_set_golden_update(VP9_COMP *const cpi) {
// golden reference is to be updated check if we should NOT update the golden
// ref.
void vp10_cyclic_refresh_check_golden_update(VP9_COMP *const cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
int mi_row, mi_col;
double fraction_low = 0.0;
@@ -381,7 +381,7 @@ void vp10_cyclic_refresh_check_golden_update(VP9_COMP *const cpi) {
// Blocks labeled as BOOST1 may later get set to BOOST2 (during the
// encoding of the superblock).
static void cyclic_refresh_update_map(VP9_COMP *const cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
unsigned char *const seg_map = cpi->segmentation_map;
int i, block_count, bl_index, sb_rows, sb_cols, sbs_in_frame;
@@ -451,7 +451,7 @@ static void cyclic_refresh_update_map(VP9_COMP *const cpi) {
// Set cyclic refresh parameters.
void vp10_cyclic_refresh_update_parameters(VP9_COMP *const cpi) {
const RATE_CONTROL *const rc = &cpi->rc;
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
cr->percent_refresh = 10;
cr->max_qdelta_perc = 50;
@@ -476,7 +476,7 @@ void vp10_cyclic_refresh_update_parameters(VP9_COMP *const cpi) {
// Setup cyclic background refresh: set delta q and segmentation map.
void vp10_cyclic_refresh_setup(VP9_COMP *const cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const RATE_CONTROL *const rc = &cpi->rc;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
struct segmentation *const seg = &cm->seg;
@@ -560,7 +560,7 @@ int vp10_cyclic_refresh_get_rdmult(const CYCLIC_REFRESH *cr) {
}
void vp10_cyclic_refresh_reset_resize(VP9_COMP *const cpi) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
memset(cr->map, 0, cm->mi_rows * cm->mi_cols);
cr->sb_index = 0;
diff --git a/vp10/encoder/aq_variance.c b/vp10/encoder/aq_variance.c
index 239afbbb8..6e5b42707 100644
--- a/vp10/encoder/aq_variance.c
+++ b/vp10/encoder/aq_variance.c
@@ -43,7 +43,7 @@ unsigned int vp10_vaq_segment_id(int energy) {
}
void vp10_vaq_frame_setup(VP9_COMP *cpi) {
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
struct segmentation *seg = &cm->seg;
int i;
diff --git a/vp10/encoder/bitstream.c b/vp10/encoder/bitstream.c
index 63779f4ec..51ae05c44 100644
--- a/vp10/encoder/bitstream.c
+++ b/vp10/encoder/bitstream.c
@@ -76,7 +76,7 @@ static void prob_diff_update(const vpx_tree_index *tree,
vp10_cond_prob_diff_update(w, &probs[i], branch_ct[i]);
}
-static void write_selected_tx_size(const VP9_COMMON *cm,
+static void write_selected_tx_size(const VP10_COMMON *cm,
const MACROBLOCKD *xd, vpx_writer *w) {
TX_SIZE tx_size = xd->mi[0]->mbmi.tx_size;
BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type;
@@ -91,7 +91,7 @@ static void write_selected_tx_size(const VP9_COMMON *cm,
}
}
-static int write_skip(const VP9_COMMON *cm, const MACROBLOCKD *xd,
+static int write_skip(const VP10_COMMON *cm, const MACROBLOCKD *xd,
int segment_id, const MODE_INFO *mi, vpx_writer *w) {
if (segfeature_active(&cm->seg, segment_id, SEG_LVL_SKIP)) {
return 1;
@@ -102,7 +102,7 @@ static int write_skip(const VP9_COMMON *cm, const MACROBLOCKD *xd,
}
}
-static void update_skip_probs(VP9_COMMON *cm, vpx_writer *w,
+static void update_skip_probs(VP10_COMMON *cm, vpx_writer *w,
FRAME_COUNTS *counts) {
int k;
@@ -110,7 +110,7 @@ static void update_skip_probs(VP9_COMMON *cm, vpx_writer *w,
vp10_cond_prob_diff_update(w, &cm->fc->skip_probs[k], counts->skip[k]);
}
-static void update_switchable_interp_probs(VP9_COMMON *cm, vpx_writer *w,
+static void update_switchable_interp_probs(VP10_COMMON *cm, vpx_writer *w,
FRAME_COUNTS *counts) {
int j;
for (j = 0; j < SWITCHABLE_FILTER_CONTEXTS; ++j)
@@ -199,7 +199,7 @@ static void write_segment_id(vpx_writer *w, const struct segmentation *seg,
}
// This function encodes the reference frame
-static void write_ref_frames(const VP9_COMMON *cm, const MACROBLOCKD *xd,
+static void write_ref_frames(const VP10_COMMON *cm, const MACROBLOCKD *xd,
vpx_writer *w) {
const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
const int is_compound = has_second_ref(mbmi);
@@ -236,7 +236,7 @@ static void write_ref_frames(const VP9_COMMON *cm, const MACROBLOCKD *xd,
static void pack_inter_mode_mvs(VP9_COMP *cpi, const MODE_INFO *mi,
vpx_writer *w) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const nmv_context *nmvc = &cm->fc->nmvc;
const MACROBLOCK *const x = &cpi->td.mb;
const MACROBLOCKD *const xd = &x->e_mbd;
@@ -338,7 +338,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, const MODE_INFO *mi,
}
}
-static void write_mb_modes_kf(const VP9_COMMON *cm, const MACROBLOCKD *xd,
+static void write_mb_modes_kf(const VP10_COMMON *cm, const MACROBLOCKD *xd,
MODE_INFO **mi_8x8, vpx_writer *w) {
const struct segmentation *const seg = &cm->seg;
const MODE_INFO *const mi = mi_8x8[0];
@@ -378,7 +378,7 @@ static void write_modes_b(VP9_COMP *cpi, const TileInfo *const tile,
vpx_writer *w, TOKENEXTRA **tok,
const TOKENEXTRA *const tok_end,
int mi_row, int mi_col) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
MODE_INFO *m;
@@ -402,7 +402,7 @@ static void write_modes_b(VP9_COMP *cpi, const TileInfo *const tile,
pack_mb_tokens(w, tok, tok_end, cm->bit_depth);
}
-static void write_partition(const VP9_COMMON *const cm,
+static void write_partition(const VP10_COMMON *const cm,
const MACROBLOCKD *const xd,
int hbs, int mi_row, int mi_col,
PARTITION_TYPE p, BLOCK_SIZE bsize, vpx_writer *w) {
@@ -428,7 +428,7 @@ static void write_modes_sb(VP9_COMP *cpi,
const TileInfo *const tile, vpx_writer *w,
TOKENEXTRA **tok, const TOKENEXTRA *const tok_end,
int mi_row, int mi_col, BLOCK_SIZE bsize) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
const int bsl = b_width_log2_lookup[bsize];
@@ -485,7 +485,7 @@ static void write_modes_sb(VP9_COMP *cpi,
static void write_modes(VP9_COMP *cpi,
const TileInfo *const tile, vpx_writer *w,
TOKENEXTRA **tok, const TOKENEXTRA *const tok_end) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
int mi_row, mi_col;
@@ -742,7 +742,7 @@ static void write_delta_q(struct vpx_write_bit_buffer *wb, int delta_q) {
}
}
-static void encode_quantization(const VP9_COMMON *const cm,
+static void encode_quantization(const VP10_COMMON *const cm,
struct vpx_write_bit_buffer *wb) {
vpx_wb_write_literal(wb, cm->base_qindex, QINDEX_BITS);
write_delta_q(wb, cm->y_dc_delta_q);
@@ -750,7 +750,7 @@ static void encode_quantization(const VP9_COMMON *const cm,
write_delta_q(wb, cm->uv_ac_delta_q);
}
-static void encode_segmentation(VP9_COMMON *cm, MACROBLOCKD *xd,
+static void encode_segmentation(VP10_COMMON *cm, MACROBLOCKD *xd,
struct vpx_write_bit_buffer *wb) {
int i, j;
@@ -812,7 +812,7 @@ static void encode_segmentation(VP9_COMMON *cm, MACROBLOCKD *xd,
}
}
-static void encode_txfm_probs(VP9_COMMON *cm, vpx_writer *w,
+static void encode_txfm_probs(VP10_COMMON *cm, vpx_writer *w,
FRAME_COUNTS *counts) {
// Mode
vpx_write_literal(w, MIN(cm->tx_mode, ALLOW_32X32), 2);
@@ -858,7 +858,7 @@ static void write_interp_filter(INTERP_FILTER filter,
vpx_wb_write_literal(wb, filter_to_literal[filter], 2);
}
-static void fix_interp_filter(VP9_COMMON *cm, FRAME_COUNTS *counts) {
+static void fix_interp_filter(VP10_COMMON *cm, FRAME_COUNTS *counts) {
if (cm->interp_filter == SWITCHABLE) {
// Check to see if only one of the filters is actually used
int count[SWITCHABLE_FILTERS];
@@ -881,7 +881,7 @@ static void fix_interp_filter(VP9_COMMON *cm, FRAME_COUNTS *counts) {
}
}
-static void write_tile_info(const VP9_COMMON *const cm,
+static void write_tile_info(const VP10_COMMON *const cm,
struct vpx_write_bit_buffer *wb) {
int min_log2_tile_cols, max_log2_tile_cols, ones;
vp10_get_tile_n_bits(cm->mi_cols, &min_log2_tile_cols, &max_log2_tile_cols);
@@ -927,7 +927,7 @@ static int get_refresh_mask(VP9_COMP *cpi) {
}
static size_t encode_tiles(VP9_COMP *cpi, uint8_t *data_ptr) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
vpx_writer residual_bc;
int tile_row, tile_col;
TOKENEXTRA *tok_end;
@@ -968,7 +968,7 @@ static size_t encode_tiles(VP9_COMP *cpi, uint8_t *data_ptr) {
return total_size;
}
-static void write_display_size(const VP9_COMMON *cm,
+static void write_display_size(const VP10_COMMON *cm,
struct vpx_write_bit_buffer *wb) {
const int scaling_active = cm->width != cm->display_width ||
cm->height != cm->display_height;
@@ -979,7 +979,7 @@ static void write_display_size(const VP9_COMMON *cm,
}
}
-static void write_frame_size(const VP9_COMMON *cm,
+static void write_frame_size(const VP10_COMMON *cm,
struct vpx_write_bit_buffer *wb) {
vpx_wb_write_literal(wb, cm->width - 1, 16);
vpx_wb_write_literal(wb, cm->height - 1, 16);
@@ -989,7 +989,7 @@ static void write_frame_size(const VP9_COMMON *cm,
static void write_frame_size_with_refs(VP9_COMP *cpi,
struct vpx_write_bit_buffer *wb) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
int found = 0;
MV_REFERENCE_FRAME ref_frame;
@@ -1052,7 +1052,7 @@ static void write_profile(BITSTREAM_PROFILE profile,
}
static void write_bitdepth_colorspace_sampling(
- VP9_COMMON *const cm, struct vpx_write_bit_buffer *wb) {
+ VP10_COMMON *const cm, struct vpx_write_bit_buffer *wb) {
if (cm->profile >= PROFILE_2) {
assert(cm->bit_depth > VPX_BITS_8);
vpx_wb_write_bit(wb, cm->bit_depth == VPX_BITS_10 ? 0 : 1);
@@ -1076,7 +1076,7 @@ static void write_bitdepth_colorspace_sampling(
static void write_uncompressed_header(VP9_COMP *cpi,
struct vpx_write_bit_buffer *wb) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
vpx_wb_write_literal(wb, VP9_FRAME_MARKER, 2);
@@ -1151,7 +1151,7 @@ static void write_uncompressed_header(VP9_COMP *cpi,
}
static size_t write_compressed_header(VP9_COMP *cpi, uint8_t *data) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
FRAME_CONTEXT *const fc = cm->fc;
FRAME_COUNTS *counts = cpi->td.counts;
diff --git a/vp10/encoder/context_tree.c b/vp10/encoder/context_tree.c
index 11a7bb3ac..d210e3610 100644
--- a/vp10/encoder/context_tree.c
+++ b/vp10/encoder/context_tree.c
@@ -18,7 +18,7 @@ static const BLOCK_SIZE square[] = {
BLOCK_64X64,
};
-static void alloc_mode_context(VP9_COMMON *cm, int num_4x4_blk,
+static void alloc_mode_context(VP10_COMMON *cm, int num_4x4_blk,
PICK_MODE_CONTEXT *ctx) {
const int num_blk = (num_4x4_blk < 4 ? 4 : num_4x4_blk);
const int num_pix = num_blk << 4;
@@ -63,7 +63,7 @@ static void free_mode_context(PICK_MODE_CONTEXT *ctx) {
}
}
-static void alloc_tree_contexts(VP9_COMMON *cm, PC_TREE *tree,
+static void alloc_tree_contexts(VP10_COMMON *cm, PC_TREE *tree,
int num_4x4_blk) {
alloc_mode_context(cm, num_4x4_blk, &tree->none);
alloc_mode_context(cm, num_4x4_blk/2, &tree->horizontal[0]);
@@ -90,7 +90,7 @@ static void free_tree_contexts(PC_TREE *tree) {
// partition level. There are contexts for none, horizontal, vertical, and
// split. Along with a block_size value and a selected block_size which
// represents the state of our search.
-void vp10_setup_pc_tree(VP9_COMMON *cm, ThreadData *td) {
+void vp10_setup_pc_tree(VP10_COMMON *cm, ThreadData *td) {
int i, j;
const int leaf_nodes = 64;
const int tree_nodes = 64 + 16 + 4 + 1;
diff --git a/vp10/encoder/encodeframe.c b/vp10/encoder/encodeframe.c
index 262bd34a8..f1bd6749a 100644
--- a/vp10/encoder/encodeframe.c
+++ b/vp10/encoder/encodeframe.c
@@ -169,7 +169,7 @@ static BLOCK_SIZE get_rd_var_based_fixed_partition(VP9_COMP *cpi, MACROBLOCK *x,
// Lighter version of set_offsets that only sets the mode info
// pointers.
-static INLINE void set_mode_info_offsets(VP9_COMMON *const cm,
+static INLINE void set_mode_info_offsets(VP10_COMMON *const cm,
MACROBLOCK *const x,
MACROBLOCKD *const xd,
int mi_row,
@@ -183,7 +183,7 @@ static INLINE void set_mode_info_offsets(VP9_COMMON *const cm,
static void set_offsets(VP9_COMP *cpi, const TileInfo *const tile,
MACROBLOCK *const x, int mi_row, int mi_col,
BLOCK_SIZE bsize) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *mbmi;
const int mi_width = num_8x8_blocks_wide_lookup[bsize];
@@ -237,7 +237,7 @@ static void set_offsets(VP9_COMP *cpi, const TileInfo *const tile,
xd->tile = *tile;
}
-static void duplicate_mode_info_in_sb(VP9_COMMON *cm, MACROBLOCKD *xd,
+static void duplicate_mode_info_in_sb(VP10_COMMON *cm, MACROBLOCKD *xd,
int mi_row, int mi_col,
BLOCK_SIZE bsize) {
const int block_width = num_8x8_blocks_wide_lookup[bsize];
@@ -396,7 +396,7 @@ static int set_vt_partitioning(VP9_COMP *cpi,
int64_t threshold,
BLOCK_SIZE bsize_min,
int force_split) {
- VP9_COMMON * const cm = &cpi->common;
+ VP10_COMMON * const cm = &cpi->common;
variance_node vt;
const int block_width = num_8x8_blocks_wide_lookup[bsize];
const int block_height = num_8x8_blocks_high_lookup[bsize];
@@ -477,7 +477,7 @@ static int set_vt_partitioning(VP9_COMP *cpi,
// 3 - vbp_threshold_8x8. vbp_threshold_8x8 (to split to 4x4 partition) is
// currently only used on key frame.
static void set_vbp_thresholds(VP9_COMP *cpi, int64_t thresholds[], int q) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const int is_key_frame = (cm->frame_type == KEY_FRAME);
const int threshold_multiplier = is_key_frame ? 20 : 1;
const int64_t threshold_base = (int64_t)(threshold_multiplier *
@@ -503,7 +503,7 @@ static void set_vbp_thresholds(VP9_COMP *cpi, int64_t thresholds[], int q) {
}
void vp10_set_variance_partition_thresholds(VP9_COMP *cpi, int q) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
SPEED_FEATURES *const sf = &cpi->sf;
const int is_key_frame = (cm->frame_type == KEY_FRAME);
if (sf->partition_search_type != VAR_BASED_PARTITION &&
@@ -653,7 +653,7 @@ static int choose_partitioning(VP9_COMP *cpi,
const TileInfo *const tile,
MACROBLOCK *x,
int mi_row, int mi_col) {
- VP9_COMMON * const cm = &cpi->common;
+ VP10_COMMON * const cm = &cpi->common;
MACROBLOCKD *xd = &x->e_mbd;
int i, j, k, m;
v64x64 vt;
@@ -966,7 +966,7 @@ static void update_state(VP9_COMP *cpi, ThreadData *td,
int mi_row, int mi_col, BLOCK_SIZE bsize,
int output_enabled) {
int i, x_idx, y;
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
RD_COUNTS *const rdc = &td->rd_counts;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -1150,7 +1150,7 @@ static int set_segment_rdmult(VP9_COMP *const cpi,
MACROBLOCK *const x,
int8_t segment_id) {
int segment_qindex;
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
vp10_init_plane_quantizers(cpi, x);
vpx_clear_system_state();
segment_qindex = vp10_get_qindex(&cm->seg, segment_id,
@@ -1164,7 +1164,7 @@ static void rd_pick_sb_modes(VP9_COMP *cpi,
int mi_row, int mi_col, RD_COST *rd_cost,
BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx,
int64_t best_rd) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
TileInfo *const tile_info = &tile_data->tile_info;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *mbmi;
@@ -1276,7 +1276,7 @@ static void rd_pick_sb_modes(VP9_COMP *cpi,
ctx->dist = rd_cost->dist;
}
-static void update_stats(VP9_COMMON *cm, ThreadData *td) {
+static void update_stats(VP10_COMMON *cm, ThreadData *td) {
const MACROBLOCK *x = &td->mb;
const MACROBLOCKD *const xd = &x->e_mbd;
const MODE_INFO *const mi = xd->mi[0];
@@ -1419,7 +1419,7 @@ static void encode_sb(VP9_COMP *cpi, ThreadData *td,
TOKENEXTRA **tp, int mi_row, int mi_col,
int output_enabled, BLOCK_SIZE bsize,
PC_TREE *pc_tree) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -1532,7 +1532,7 @@ static void set_partial_b64x64_partition(MODE_INFO *mi, int mis,
static void set_fixed_partitioning(VP9_COMP *cpi, const TileInfo *const tile,
MODE_INFO **mi_8x8, int mi_row, int mi_col,
BLOCK_SIZE bsize) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const int mis = cm->mi_stride;
const int row8x8_remaining = tile->mi_row_end - mi_row;
const int col8x8_remaining = tile->mi_col_end - mi_col;
@@ -1579,7 +1579,7 @@ static void set_source_var_based_partition(VP9_COMP *cpi,
MACROBLOCK *const x,
MODE_INFO **mi_8x8,
int mi_row, int mi_col) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const int mis = cm->mi_stride;
const int row8x8_remaining = tile->mi_row_end - mi_row;
const int col8x8_remaining = tile->mi_col_end - mi_col;
@@ -1663,7 +1663,7 @@ static void set_source_var_based_partition(VP9_COMP *cpi,
static void update_state_rt(VP9_COMP *cpi, ThreadData *td,
PICK_MODE_CONTEXT *ctx,
int mi_row, int mi_col, int bsize) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
MODE_INFO *const mi = xd->mi[0];
@@ -1756,7 +1756,7 @@ static void encode_sb_rt(VP9_COMP *cpi, ThreadData *td,
TOKENEXTRA **tp, int mi_row, int mi_col,
int output_enabled, BLOCK_SIZE bsize,
PC_TREE *pc_tree) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -1831,7 +1831,7 @@ static void rd_use_partition(VP9_COMP *cpi,
BLOCK_SIZE bsize,
int *rate, int64_t *dist,
int do_recon, PC_TREE *pc_tree) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
TileInfo *const tile_info = &tile_data->tile_info;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -2155,7 +2155,7 @@ static void rd_auto_partition_range(VP9_COMP *cpi, const TileInfo *const tile,
int mi_row, int mi_col,
BLOCK_SIZE *min_block_size,
BLOCK_SIZE *max_block_size) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MODE_INFO **mi = xd->mi;
const int left_in_image = xd->left_available && mi[-1];
const int above_in_image = xd->up_available && mi[-xd->mi_stride];
@@ -2227,7 +2227,7 @@ static void rd_auto_partition_range(VP9_COMP *cpi, const TileInfo *const tile,
}
// TODO(jingning) refactor functions setting partition search range
-static void set_partition_range(VP9_COMMON *cm, MACROBLOCKD *xd,
+static void set_partition_range(VP10_COMMON *cm, MACROBLOCKD *xd,
int mi_row, int mi_col, BLOCK_SIZE bsize,
BLOCK_SIZE *min_bs, BLOCK_SIZE *max_bs) {
int mi_width = num_8x8_blocks_wide_lookup[bsize];
@@ -2341,7 +2341,7 @@ static void rd_pick_partition(VP9_COMP *cpi, ThreadData *td,
TOKENEXTRA **tp, int mi_row, int mi_col,
BLOCK_SIZE bsize, RD_COST *rd_cost,
int64_t best_rd, PC_TREE *pc_tree) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
TileInfo *const tile_info = &tile_data->tile_info;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -2754,7 +2754,7 @@ static void encode_rd_sb_row(VP9_COMP *cpi,
TileDataEnc *tile_data,
int mi_row,
TOKENEXTRA **tp) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
TileInfo *const tile_info = &tile_data->tile_info;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -2836,7 +2836,7 @@ static void encode_rd_sb_row(VP9_COMP *cpi,
static void init_encode_frame_mb_context(VP9_COMP *cpi) {
MACROBLOCK *const x = &cpi->td.mb;
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
const int aligned_mi_cols = mi_cols_aligned_to_sb(cm->mi_cols);
@@ -2865,7 +2865,7 @@ static int check_dual_ref_flags(VP9_COMP *cpi) {
}
}
-static void reset_skip_tx_size(VP9_COMMON *cm, TX_SIZE max_tx_size) {
+static void reset_skip_tx_size(VP10_COMMON *cm, TX_SIZE max_tx_size) {
int mi_row, mi_col;
const int mis = cm->mi_stride;
MODE_INFO **mi_ptr = cm->mi_grid_visible;
@@ -2917,7 +2917,7 @@ static void nonrd_pick_sb_modes(VP9_COMP *cpi,
TileDataEnc *tile_data, MACROBLOCK *const x,
int mi_row, int mi_col, RD_COST *rd_cost,
BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
TileInfo *const tile_info = &tile_data->tile_info;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *mbmi;
@@ -2949,7 +2949,7 @@ static void nonrd_pick_sb_modes(VP9_COMP *cpi,
ctx->dist = rd_cost->dist;
}
-static void fill_mode_info_sb(VP9_COMMON *cm, MACROBLOCK *x,
+static void fill_mode_info_sb(VP10_COMMON *cm, MACROBLOCK *x,
int mi_row, int mi_col,
BLOCK_SIZE bsize,
PC_TREE *pc_tree) {
@@ -3033,7 +3033,7 @@ static void nonrd_pick_partition(VP9_COMP *cpi, ThreadData *td,
int do_recon, int64_t best_rd,
PC_TREE *pc_tree) {
const SPEED_FEATURES *const sf = &cpi->sf;
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
TileInfo *const tile_info = &tile_data->tile_info;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -3288,7 +3288,7 @@ static void nonrd_select_partition(VP9_COMP *cpi,
int mi_row, int mi_col,
BLOCK_SIZE bsize, int output_enabled,
RD_COST *rd_cost, PC_TREE *pc_tree) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
TileInfo *const tile_info = &tile_data->tile_info;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -3427,7 +3427,7 @@ static void nonrd_use_partition(VP9_COMP *cpi,
int mi_row, int mi_col,
BLOCK_SIZE bsize, int output_enabled,
RD_COST *dummy_cost, PC_TREE *pc_tree) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
TileInfo *tile_info = &tile_data->tile_info;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -3541,7 +3541,7 @@ static void encode_nonrd_sb_row(VP9_COMP *cpi,
int mi_row,
TOKENEXTRA **tp) {
SPEED_FEATURES *const sf = &cpi->sf;
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
TileInfo *const tile_info = &tile_data->tile_info;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -3637,7 +3637,7 @@ static void encode_nonrd_sb_row(VP9_COMP *cpi,
static int set_var_thresh_from_histogram(VP9_COMP *cpi) {
const SPEED_FEATURES *const sf = &cpi->sf;
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const uint8_t *src = cpi->Source->y_buffer;
const uint8_t *last_src = cpi->Last_Source->y_buffer;
@@ -3720,7 +3720,7 @@ static int set_var_thresh_from_histogram(VP9_COMP *cpi) {
}
static void source_var_based_partition_search_method(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
SPEED_FEATURES *const sf = &cpi->sf;
if (cm->frame_type == KEY_FRAME) {
@@ -3747,7 +3747,7 @@ static void source_var_based_partition_search_method(VP9_COMP *cpi) {
}
}
-static int get_skip_encode_frame(const VP9_COMMON *cm, ThreadData *const td) {
+static int get_skip_encode_frame(const VP10_COMMON *cm, ThreadData *const td) {
unsigned int intra_count = 0, inter_count = 0;
int j;
@@ -3762,7 +3762,7 @@ static int get_skip_encode_frame(const VP9_COMMON *cm, ThreadData *const td) {
}
void vp10_init_tile_data(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const int tile_cols = 1 << cm->log2_tile_cols;
const int tile_rows = 1 << cm->log2_tile_rows;
int tile_col, tile_row;
@@ -3805,7 +3805,7 @@ void vp10_init_tile_data(VP9_COMP *cpi) {
void vp10_encode_tile(VP9_COMP *cpi, ThreadData *td,
int tile_row, int tile_col) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const int tile_cols = 1 << cm->log2_tile_cols;
TileDataEnc *this_tile =
&cpi->tile_data[tile_row * tile_cols + tile_col];
@@ -3827,7 +3827,7 @@ void vp10_encode_tile(VP9_COMP *cpi, ThreadData *td,
}
static void encode_tiles(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const int tile_cols = 1 << cm->log2_tile_cols;
const int tile_rows = 1 << cm->log2_tile_rows;
int tile_col, tile_row;
@@ -3841,7 +3841,7 @@ static void encode_tiles(VP9_COMP *cpi) {
#if CONFIG_FP_MB_STATS
static int input_fpmb_stats(FIRSTPASS_MB_STATS *firstpass_mb_stats,
- VP9_COMMON *cm, uint8_t **this_frame_mb_stats) {
+ VP10_COMMON *cm, uint8_t **this_frame_mb_stats) {
uint8_t *mb_stats_in = firstpass_mb_stats->mb_stats_start +
cm->current_video_frame * cm->MBs * sizeof(uint8_t);
@@ -3858,7 +3858,7 @@ static void encode_frame_internal(VP9_COMP *cpi) {
SPEED_FEATURES *const sf = &cpi->sf;
ThreadData *const td = &cpi->td;
MACROBLOCK *const x = &td->mb;
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
RD_COUNTS *const rdc = &cpi->td.rd_counts;
@@ -3980,7 +3980,7 @@ static INTERP_FILTER get_interp_filter(
}
void vp10_encode_frame(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
// In the longer term the encoder should be generalized to match the
// decoder such that we allow compound where one of the 3 buffers has a
@@ -4126,7 +4126,7 @@ static void encode_superblock(VP9_COMP *cpi, ThreadData *td,
TOKENEXTRA **t, int output_enabled,
int mi_row, int mi_col, BLOCK_SIZE bsize,
PICK_MODE_CONTEXT *ctx) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
MODE_INFO **mi_8x8 = xd->mi;
diff --git a/vp10/encoder/encodemv.c b/vp10/encoder/encodemv.c
index fca883caf..bfdb6649e 100644
--- a/vp10/encoder/encodemv.c
+++ b/vp10/encoder/encodemv.c
@@ -160,7 +160,7 @@ static void write_mv_update(const vpx_tree_index *tree,
update_mv(w, branch_ct[i], &probs[i], MV_UPDATE_PROB);
}
-void vp10_write_nmv_probs(VP9_COMMON *cm, int usehp, vpx_writer *w,
+void vp10_write_nmv_probs(VP10_COMMON *cm, int usehp, vpx_writer *w,
nmv_context_counts *const counts) {
int i, j;
nmv_context *const mvc = &cm->fc->nmvc;
diff --git a/vp10/encoder/encodemv.h b/vp10/encoder/encodemv.h
index de148ea05..6e1dd3c76 100644
--- a/vp10/encoder/encodemv.h
+++ b/vp10/encoder/encodemv.h
@@ -20,7 +20,7 @@ extern "C" {
void vp10_entropy_mv_init(void);
-void vp10_write_nmv_probs(VP9_COMMON *cm, int usehp, vpx_writer *w,
+void vp10_write_nmv_probs(VP10_COMMON *cm, int usehp, vpx_writer *w,
nmv_context_counts *const counts);
void vp10_encode_mv(VP9_COMP *cpi, vpx_writer* w, const MV* mv, const MV* ref,
diff --git a/vp10/encoder/encoder.c b/vp10/encoder/encoder.c
index 1eab6a3cb..547bffcda 100644
--- a/vp10/encoder/encoder.c
+++ b/vp10/encoder/encoder.c
@@ -229,7 +229,7 @@ void vp10_set_high_precision_mv(VP9_COMP *cpi, int allow_high_precision_mv) {
}
static void setup_frame(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
// Set up entropy context depending on frame type. The decoder mandates
// the use of the default context, index 0, for keyframes and inter
// frames where the error_resilient_mode or intra_only flag is set. For
@@ -253,7 +253,7 @@ static void setup_frame(VP9_COMP *cpi) {
}
}
-static void vp10_enc_setup_mi(VP9_COMMON *cm) {
+static void vp10_enc_setup_mi(VP10_COMMON *cm) {
int i;
cm->mi = cm->mip + cm->mi_stride + 1;
memset(cm->mip, 0, cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mip));
@@ -271,7 +271,7 @@ static void vp10_enc_setup_mi(VP9_COMMON *cm) {
cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mi_grid_base));
}
-static int vp10_enc_alloc_mi(VP9_COMMON *cm, int mi_size) {
+static int vp10_enc_alloc_mi(VP10_COMMON *cm, int mi_size) {
cm->mip = vpx_calloc(mi_size, sizeof(*cm->mip));
if (!cm->mip)
return 1;
@@ -290,7 +290,7 @@ static int vp10_enc_alloc_mi(VP9_COMMON *cm, int mi_size) {
return 0;
}
-static void vp10_enc_free_mi(VP9_COMMON *cm) {
+static void vp10_enc_free_mi(VP10_COMMON *cm) {
vpx_free(cm->mip);
cm->mip = NULL;
vpx_free(cm->prev_mip);
@@ -301,7 +301,7 @@ static void vp10_enc_free_mi(VP9_COMMON *cm) {
cm->prev_mi_grid_base = NULL;
}
-static void vp10_swap_mi_and_prev_mi(VP9_COMMON *cm) {
+static void vp10_swap_mi_and_prev_mi(VP10_COMMON *cm) {
// Current mip will be the prev_mip for the next frame.
MODE_INFO **temp_base = cm->prev_mi_grid_base;
MODE_INFO *temp = cm->prev_mip;
@@ -335,7 +335,7 @@ void vp10_initialize_enc(void) {
}
static void dealloc_compressor_data(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
int i;
vpx_free(cpi->mbmi_ext_base);
@@ -417,7 +417,7 @@ static void dealloc_compressor_data(VP9_COMP *cpi) {
static void save_coding_context(VP9_COMP *cpi) {
CODING_CONTEXT *const cc = &cpi->coding_context;
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
// Stores a snapshot of key state variables which can subsequently be
// restored with a call to vp10_restore_coding_context. These functions are
@@ -447,7 +447,7 @@ static void save_coding_context(VP9_COMP *cpi) {
static void restore_coding_context(VP9_COMP *cpi) {
CODING_CONTEXT *const cc = &cpi->coding_context;
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
// Restore key state variables to the snapshot state stored in the
// previous call to vp10_save_coding_context.
@@ -473,7 +473,7 @@ static void restore_coding_context(VP9_COMP *cpi) {
}
static void configure_static_seg_features(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const RATE_CONTROL *const rc = &cpi->rc;
struct segmentation *const seg = &cm->seg;
@@ -597,7 +597,7 @@ static void configure_static_seg_features(VP9_COMP *cpi) {
}
static void update_reference_segmentation_map(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MODE_INFO **mi_8x8_ptr = cm->mi_grid_visible;
uint8_t *cache_ptr = cm->last_frame_seg_map;
int row, col;
@@ -613,7 +613,7 @@ static void update_reference_segmentation_map(VP9_COMP *cpi) {
}
static void alloc_raw_frame_buffers(VP9_COMP *cpi) {
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
const VP9EncoderConfig *oxcf = &cpi->oxcf;
if (!cpi->lookahead)
@@ -641,7 +641,7 @@ static void alloc_raw_frame_buffers(VP9_COMP *cpi) {
}
static void alloc_util_frame_buffers(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
if (vp9_realloc_frame_buffer(&cpi->last_frame_uf,
cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
@@ -678,7 +678,7 @@ static void alloc_util_frame_buffers(VP9_COMP *cpi) {
static int alloc_context_buffers_ext(VP9_COMP *cpi) {
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
int mi_size = cm->mi_cols * cm->mi_rows;
cpi->mbmi_ext_base = vpx_calloc(mi_size, sizeof(*cpi->mbmi_ext_base));
@@ -689,7 +689,7 @@ static int alloc_context_buffers_ext(VP9_COMP *cpi) {
}
void vp10_alloc_compressor_data(VP9_COMP *cpi) {
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
vp10_alloc_context_buffers(cm, cm->width, cm->height);
@@ -712,7 +712,7 @@ void vp10_new_framerate(VP9_COMP *cpi, double framerate) {
}
static void set_tile_limits(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
int min_log2_tile_cols, max_log2_tile_cols;
vp10_get_tile_n_bits(cm->mi_cols, &min_log2_tile_cols, &max_log2_tile_cols);
@@ -730,7 +730,7 @@ static void set_tile_limits(VP9_COMP *cpi) {
}
static void update_frame_size(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
vp10_set_mb_mi(cm, cm->width, cm->height);
@@ -763,7 +763,7 @@ static void init_buffer_indices(VP9_COMP *cpi) {
}
static void init_config(struct VP9_COMP *cpi, VP9EncoderConfig *oxcf) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
cpi->oxcf = *oxcf;
cpi->framerate = oxcf->init_framerate;
@@ -1018,7 +1018,7 @@ MAKE_BFP_SAD8_WRAPPER(vpx_highbd_sad4x4x8)
MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad4x4x4d)
static void highbd_set_var_fns(VP9_COMP *const cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
if (cm->use_highbitdepth) {
switch (cm->bit_depth) {
case VPX_BITS_8:
@@ -1426,7 +1426,7 @@ static void highbd_set_var_fns(VP9_COMP *const cpi) {
#endif // CONFIG_VP9_HIGHBITDEPTH
static void realloc_segmentation_maps(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
// Create the encoder segmentation map and set all entries to 0
vpx_free(cpi->segmentation_map);
@@ -1452,7 +1452,7 @@ static void realloc_segmentation_maps(VP9_COMP *cpi) {
}
void vp10_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
if (cm->profile != oxcf->profile)
@@ -1594,7 +1594,7 @@ VP9_COMP *vp10_create_compressor(VP9EncoderConfig *oxcf,
BufferPool *const pool) {
unsigned int i;
VP9_COMP *volatile const cpi = vpx_memalign(32, sizeof(VP9_COMP));
- VP9_COMMON *volatile const cm = cpi != NULL ? &cpi->common : NULL;
+ VP10_COMMON *volatile const cm = cpi != NULL ? &cpi->common : NULL;
if (!cm)
return NULL;
@@ -1918,7 +1918,7 @@ VP9_COMP *vp10_create_compressor(VP9EncoderConfig *oxcf,
snprintf((H) + strlen(H), sizeof(H) - strlen(H), (T), (V))
void vp10_remove_compressor(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
unsigned int i;
int t;
@@ -2450,7 +2450,7 @@ void vp10_write_yuv_frame_420(YV12_BUFFER_CONFIG *s, FILE *f) {
#endif
#ifdef OUTPUT_YUV_REC
-void vp10_write_yuv_rec_frame(VP9_COMMON *cm) {
+void vp10_write_yuv_rec_frame(VP10_COMMON *cm) {
YV12_BUFFER_CONFIG *s = cm->frame_to_show;
uint8_t *src = s->y_buffer;
int h = cm->height;
@@ -2660,7 +2660,7 @@ static int recode_loop_test(VP9_COMP *cpi,
}
void vp10_update_reference_frames(VP9_COMP *cpi) {
- VP9_COMMON * const cm = &cpi->common;
+ VP10_COMMON * const cm = &cpi->common;
BufferPool *const pool = cm->buffer_pool;
// At this point the new frame has been encoded.
@@ -2741,7 +2741,7 @@ void vp10_update_reference_frames(VP9_COMP *cpi) {
#endif
}
-static void loopfilter_frame(VP9_COMP *cpi, VP9_COMMON *cm) {
+static void loopfilter_frame(VP9_COMP *cpi, VP10_COMMON *cm) {
MACROBLOCKD *xd = &cpi->td.mb.e_mbd;
struct loopfilter *lf = &cm->lf;
if (xd->lossless) {
@@ -2772,7 +2772,7 @@ static void loopfilter_frame(VP9_COMP *cpi, VP9_COMMON *cm) {
vp9_extend_frame_inner_borders(cm->frame_to_show);
}
-static INLINE void alloc_frame_mvs(const VP9_COMMON *cm,
+static INLINE void alloc_frame_mvs(const VP10_COMMON *cm,
int buffer_idx) {
RefCntBuffer *const new_fb_ptr = &cm->buffer_pool->frame_bufs[buffer_idx];
if (new_fb_ptr->mvs == NULL ||
@@ -2788,7 +2788,7 @@ static INLINE void alloc_frame_mvs(const VP9_COMMON *cm,
}
void vp10_scale_references(VP9_COMP *cpi) {
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
MV_REFERENCE_FRAME ref_frame;
const VP9_REFFRAME ref_mask[3] = {VP9_LAST_FLAG, VP9_GOLD_FLAG, VP9_ALT_FLAG};
@@ -2870,7 +2870,7 @@ void vp10_scale_references(VP9_COMP *cpi) {
}
static void release_scaled_references(VP9_COMP *cpi) {
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
int i;
if (cpi->oxcf.pass == 0 && !cpi->use_svc) {
// Only release scaled references under certain conditions:
@@ -2929,7 +2929,7 @@ static void full_to_model_counts(vp10_coeff_count_model *model_count,
#if 0 && CONFIG_INTERNAL_STATS
static void output_frame_level_debug_stats(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
FILE *const f = fopen("tmp.stt", cm->current_video_frame ? "a" : "w");
int64_t recon_err;
@@ -2997,7 +2997,7 @@ static void output_frame_level_debug_stats(VP9_COMP *cpi) {
#endif
static void set_mv_search_params(VP9_COMP *cpi) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const unsigned int max_mv_def = MIN(cm->width, cm->height);
// Default based on max resolution.
@@ -3030,7 +3030,7 @@ static void set_size_independent_vars(VP9_COMP *cpi) {
static void set_size_dependent_vars(VP9_COMP *cpi, int *q,
int *bottom_index, int *top_index) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const VP9EncoderConfig *const oxcf = &cpi->oxcf;
// Setup variables that depend on the dimensions of the frame.
@@ -3088,7 +3088,7 @@ static void init_motion_estimation(VP9_COMP *cpi) {
static void set_frame_size(VP9_COMP *cpi) {
int ref_frame;
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
VP9EncoderConfig *const oxcf = &cpi->oxcf;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
@@ -3182,7 +3182,7 @@ static void set_frame_size(VP9_COMP *cpi) {
}
static void encode_without_recode_loop(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
int q = 0, bottom_index = 0, top_index = 0; // Dummy variables.
vpx_clear_system_state();
@@ -3255,7 +3255,7 @@ static void encode_without_recode_loop(VP9_COMP *cpi) {
static void encode_with_recode_loop(VP9_COMP *cpi,
size_t *size,
uint8_t *dest) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
int bottom_index, top_index;
int loop_count = 0;
@@ -3555,7 +3555,7 @@ static void set_ext_overrides(VP9_COMP *cpi) {
}
}
-YV12_BUFFER_CONFIG *vp10_scale_if_required_fast(VP9_COMMON *cm,
+YV12_BUFFER_CONFIG *vp10_scale_if_required_fast(VP10_COMMON *cm,
YV12_BUFFER_CONFIG *unscaled,
YV12_BUFFER_CONFIG *scaled) {
if (cm->mi_cols * MI_SIZE != unscaled->y_width ||
@@ -3570,7 +3570,7 @@ YV12_BUFFER_CONFIG *vp10_scale_if_required_fast(VP9_COMMON *cm,
}
}
-YV12_BUFFER_CONFIG *vp10_scale_if_required(VP9_COMMON *cm,
+YV12_BUFFER_CONFIG *vp10_scale_if_required(VP10_COMMON *cm,
YV12_BUFFER_CONFIG *unscaled,
YV12_BUFFER_CONFIG *scaled) {
if (cm->mi_cols * MI_SIZE != unscaled->y_width ||
@@ -3587,7 +3587,7 @@ YV12_BUFFER_CONFIG *vp10_scale_if_required(VP9_COMMON *cm,
}
static void set_arf_sign_bias(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
int arf_sign_bias;
if ((cpi->oxcf.pass == 2) && cpi->multi_arf_allowed) {
@@ -3632,7 +3632,7 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
size_t *size,
uint8_t *dest,
unsigned int *frame_flags) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const VP9EncoderConfig *const oxcf = &cpi->oxcf;
struct segmentation *const seg = &cm->seg;
TX_SIZE t;
@@ -3890,7 +3890,7 @@ static void Pass2Encode(VP9_COMP *cpi, size_t *size,
vp10_twopass_postencode_update(cpi);
}
-static void init_ref_frame_bufs(VP9_COMMON *cm) {
+static void init_ref_frame_bufs(VP10_COMMON *cm) {
int i;
BufferPool *const pool = cm->buffer_pool;
cm->new_fb_idx = INVALID_IDX;
@@ -3905,7 +3905,7 @@ static void check_initial_width(VP9_COMP *cpi,
int use_highbitdepth,
#endif
int subsampling_x, int subsampling_y) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
if (!cpi->initial_width ||
#if CONFIG_VP9_HIGHBITDEPTH
@@ -3933,7 +3933,7 @@ static void check_initial_width(VP9_COMP *cpi,
#if CONFIG_VP9_TEMPORAL_DENOISING
static void setup_denoiser_buffer(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
if (cpi->oxcf.noise_sensitivity > 0 &&
!cpi->denoiser.frame_buffer_initialized) {
vp10_denoiser_alloc(&(cpi->denoiser), cm->width, cm->height,
@@ -3949,7 +3949,7 @@ static void setup_denoiser_buffer(VP9_COMP *cpi) {
int vp10_receive_raw_frame(VP9_COMP *cpi, unsigned int frame_flags,
YV12_BUFFER_CONFIG *sd, int64_t time_stamp,
int64_t end_time) {
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
struct vpx_usec_timer timer;
int res = 0;
const int subsampling_x = sd->subsampling_x;
@@ -3993,7 +3993,7 @@ int vp10_receive_raw_frame(VP9_COMP *cpi, unsigned int frame_flags,
static int frame_is_reference(const VP9_COMP *cpi) {
- const VP9_COMMON *cm = &cpi->common;
+ const VP10_COMMON *cm = &cpi->common;
return cm->frame_type == KEY_FRAME ||
cpi->refresh_last_frame ||
@@ -4104,7 +4104,7 @@ int vp10_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
size_t *size, uint8_t *dest,
int64_t *time_stamp, int64_t *time_end, int flush) {
const VP9EncoderConfig *const oxcf = &cpi->oxcf;
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
BufferPool *const pool = cm->buffer_pool;
RATE_CONTROL *const rc = &cpi->rc;
struct vpx_usec_timer cmptimer;
@@ -4553,7 +4553,7 @@ int vp10_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
int vp10_get_preview_raw_frame(VP9_COMP *cpi, YV12_BUFFER_CONFIG *dest,
vp10_ppflags_t *flags) {
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
#if !CONFIG_VP9_POSTPROC
(void)flags;
#endif
@@ -4583,7 +4583,7 @@ int vp10_get_preview_raw_frame(VP9_COMP *cpi, YV12_BUFFER_CONFIG *dest,
int vp10_set_internal_size(VP9_COMP *cpi,
VPX_SCALING horiz_mode, VPX_SCALING vert_mode) {
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
int hr = 0, hs = 0, vr = 0, vs = 0;
if (horiz_mode > ONETWO || vert_mode > ONETWO)
@@ -4605,7 +4605,7 @@ int vp10_set_internal_size(VP9_COMP *cpi,
int vp10_set_size_literal(VP9_COMP *cpi, unsigned int width,
unsigned int height) {
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
#if CONFIG_VP9_HIGHBITDEPTH
check_initial_width(cpi, cm->use_highbitdepth, 1, 1);
#else
diff --git a/vp10/encoder/encoder.h b/vp10/encoder/encoder.h
index c8449c1ab..be98ed657 100644
--- a/vp10/encoder/encoder.h
+++ b/vp10/encoder/encoder.h
@@ -295,7 +295,7 @@ typedef struct VP9_COMP {
MB_MODE_INFO_EXT *mbmi_ext_base;
DECLARE_ALIGNED(16, int16_t, y_dequant[QINDEX_RANGE][8]);
DECLARE_ALIGNED(16, int16_t, uv_dequant[QINDEX_RANGE][8]);
- VP9_COMMON common;
+ VP10_COMMON common;
VP9EncoderConfig oxcf;
struct lookahead_ctx *lookahead;
struct lookahead_entry *alt_ref_source;
@@ -569,14 +569,14 @@ static INLINE int get_ref_frame_map_idx(const VP9_COMP *cpi,
static INLINE int get_ref_frame_buf_idx(const VP9_COMP *const cpi,
int ref_frame) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const int map_idx = get_ref_frame_map_idx(cpi, ref_frame);
return (map_idx != INVALID_IDX) ? cm->ref_frame_map[map_idx] : INVALID_IDX;
}
static INLINE YV12_BUFFER_CONFIG *get_ref_frame_buffer(
VP9_COMP *cpi, MV_REFERENCE_FRAME ref_frame) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const int buf_idx = get_ref_frame_buf_idx(cpi, ref_frame);
return
buf_idx != INVALID_IDX ? &cm->buffer_pool->frame_bufs[buf_idx].buf : NULL;
@@ -614,11 +614,11 @@ void vp10_update_reference_frames(VP9_COMP *cpi);
void vp10_set_high_precision_mv(VP9_COMP *cpi, int allow_high_precision_mv);
-YV12_BUFFER_CONFIG *vp10_scale_if_required_fast(VP9_COMMON *cm,
+YV12_BUFFER_CONFIG *vp10_scale_if_required_fast(VP10_COMMON *cm,
YV12_BUFFER_CONFIG *unscaled,
YV12_BUFFER_CONFIG *scaled);
-YV12_BUFFER_CONFIG *vp10_scale_if_required(VP9_COMMON *cm,
+YV12_BUFFER_CONFIG *vp10_scale_if_required(VP10_COMMON *cm,
YV12_BUFFER_CONFIG *unscaled,
YV12_BUFFER_CONFIG *scaled);
@@ -639,7 +639,7 @@ static INLINE int is_altref_enabled(const VP9_COMP *const cpi) {
cpi->oxcf.ss_enable_auto_arf[cpi->svc.spatial_layer_id]));
}
-static INLINE void set_ref_ptrs(VP9_COMMON *cm, MACROBLOCKD *xd,
+static INLINE void set_ref_ptrs(VP10_COMMON *cm, MACROBLOCKD *xd,
MV_REFERENCE_FRAME ref0,
MV_REFERENCE_FRAME ref1) {
xd->block_refs[0] = &cm->frame_refs[ref0 >= LAST_FRAME ? ref0 - LAST_FRAME
diff --git a/vp10/encoder/ethread.c b/vp10/encoder/ethread.c
index 322bd5ac1..ba56d18e5 100644
--- a/vp10/encoder/ethread.c
+++ b/vp10/encoder/ethread.c
@@ -33,7 +33,7 @@ static void accumulate_rd_opt(ThreadData *td, ThreadData *td_t) {
static int enc_worker_hook(EncWorkerData *const thread_data, void *unused) {
VP9_COMP *const cpi = thread_data->cpi;
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const int tile_cols = 1 << cm->log2_tile_cols;
const int tile_rows = 1 << cm->log2_tile_rows;
int t;
@@ -64,7 +64,7 @@ static int get_max_tile_cols(VP9_COMP *cpi) {
}
void vp10_encode_tiles_mt(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const int tile_cols = 1 << cm->log2_tile_cols;
const VPxWorkerInterface *const winterface = vpx_get_worker_interface();
const int num_workers = MIN(cpi->oxcf.max_threads, tile_cols);
diff --git a/vp10/encoder/firstpass.c b/vp10/encoder/firstpass.c
index 20333766a..149ee0ad3 100644
--- a/vp10/encoder/firstpass.c
+++ b/vp10/encoder/firstpass.c
@@ -143,7 +143,7 @@ static void output_stats(FIRSTPASS_STATS *stats,
}
#if CONFIG_FP_MB_STATS
-static void output_fpmb_stats(uint8_t *this_frame_mb_stats, VP9_COMMON *cm,
+static void output_fpmb_stats(uint8_t *this_frame_mb_stats, VP10_COMMON *cm,
struct vpx_codec_pkt_list *pktlist) {
struct vpx_codec_cx_pkt pkt;
pkt.kind = VPX_CODEC_FPMB_STATS_PKT;
@@ -454,7 +454,7 @@ static void first_pass_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
}
}
-static BLOCK_SIZE get_bsize(const VP9_COMMON *cm, int mb_row, int mb_col) {
+static BLOCK_SIZE get_bsize(const VP10_COMMON *cm, int mb_row, int mb_col) {
if (2 * mb_col + 1 < cm->mi_cols) {
return 2 * mb_row + 1 < cm->mi_rows ? BLOCK_16X16
: BLOCK_16X8;
@@ -478,7 +478,7 @@ static int find_fp_qindex(vpx_bit_depth_t bit_depth) {
}
static void set_first_pass_params(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
if (!cpi->refresh_alt_ref_frame &&
(cm->current_video_frame == 0 ||
(cpi->frame_flags & FRAMEFLAGS_KEY))) {
@@ -495,7 +495,7 @@ static void set_first_pass_params(VP9_COMP *cpi) {
void vp10_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
int mb_row, mb_col;
MACROBLOCK *const x = &cpi->td.mb;
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
TileInfo tile;
struct macroblock_plane *const p = x->plane;
@@ -1239,7 +1239,7 @@ static void setup_rf_level_maxq(VP9_COMP *cpi) {
}
void vp10_init_subsampling(VP9_COMP *cpi) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
const int w = cm->width;
const int h = cm->height;
@@ -1842,7 +1842,7 @@ static void allocate_gf_group_bits(VP9_COMP *cpi, int64_t gf_group_bits,
// Analyse and define a gf/arf group.
static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
VP9EncoderConfig *const oxcf = &cpi->oxcf;
TWO_PASS *const twopass = &cpi->twopass;
@@ -2578,7 +2578,7 @@ static int is_skippable_frame(const VP9_COMP *cpi) {
}
void vp10_rc_get_second_pass_params(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
TWO_PASS *const twopass = &cpi->twopass;
GF_GROUP *const gf_group = &twopass->gf_group;
diff --git a/vp10/encoder/mbgraph.c b/vp10/encoder/mbgraph.c
index a9d33be00..8fa70aea8 100644
--- a/vp10/encoder/mbgraph.c
+++ b/vp10/encoder/mbgraph.c
@@ -180,7 +180,7 @@ static void update_mbgraph_mb_stats
MACROBLOCK *const x = &cpi->td.mb;
MACROBLOCKD *const xd = &x->e_mbd;
int intra_error;
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
// FIXME in practice we're completely ignoring chroma here
x->plane[0].src.buf = buf->y_buffer + mb_y_offset;
@@ -234,7 +234,7 @@ static void update_mbgraph_frame_stats(VP9_COMP *cpi,
YV12_BUFFER_CONFIG *alt_ref) {
MACROBLOCK *const x = &cpi->td.mb;
MACROBLOCKD *const xd = &x->e_mbd;
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
int mb_col, mb_row, offset = 0;
int mb_y_offset = 0, arf_y_offset = 0, gld_y_offset = 0;
@@ -297,7 +297,7 @@ static void update_mbgraph_frame_stats(VP9_COMP *cpi,
// void separate_arf_mbs_byzz
static void separate_arf_mbs(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
int mb_col, mb_row, offset, i;
int mi_row, mi_col;
int ncnt[4] = { 0 };
@@ -375,7 +375,7 @@ static void separate_arf_mbs(VP9_COMP *cpi) {
}
void vp10_update_mbgraph_stats(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
int i, n_frames = vp10_lookahead_depth(cpi->lookahead);
YV12_BUFFER_CONFIG *golden_ref = get_ref_frame_buffer(cpi, GOLDEN_FRAME);
diff --git a/vp10/encoder/picklpf.c b/vp10/encoder/picklpf.c
index f5139b01f..7fe324848 100644
--- a/vp10/encoder/picklpf.c
+++ b/vp10/encoder/picklpf.c
@@ -37,7 +37,7 @@ static int get_max_filter_level(const VP9_COMP *cpi) {
static int64_t try_filter_frame(const YV12_BUFFER_CONFIG *sd,
VP9_COMP *const cpi,
int filt_level, int partial_frame) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
int64_t filt_err;
if (cpi->num_workers > 1)
@@ -66,7 +66,7 @@ static int64_t try_filter_frame(const YV12_BUFFER_CONFIG *sd,
static int search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
int partial_frame) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const struct loopfilter *const lf = &cm->lf;
const int min_filter_level = 0;
const int max_filter_level = get_max_filter_level(cpi);
@@ -148,7 +148,7 @@ static int search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
void vp10_pick_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
LPF_PICK_METHOD method) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
struct loopfilter *const lf = &cm->lf;
lf->sharpness_level = cm->frame_type == KEY_FRAME ? 0
diff --git a/vp10/encoder/pickmode.c b/vp10/encoder/pickmode.c
index 61dc9364b..5c0d6af2c 100644
--- a/vp10/encoder/pickmode.c
+++ b/vp10/encoder/pickmode.c
@@ -39,7 +39,7 @@ typedef struct {
int in_use;
} PRED_BUFFER;
-static int mv_refs_rt(const VP9_COMMON *cm, const MACROBLOCK *x,
+static int mv_refs_rt(const VP10_COMMON *cm, const MACROBLOCK *x,
const MACROBLOCKD *xd,
const TileInfo *const tile,
MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
@@ -1016,7 +1016,7 @@ void vp10_pick_intra_mode(VP9_COMP *cpi, MACROBLOCK *x, RD_COST *rd_cost,
*rd_cost = best_rdc;
}
-static void init_ref_frame_cost(VP9_COMMON *const cm,
+static void init_ref_frame_cost(VP10_COMMON *const cm,
MACROBLOCKD *const xd,
int ref_frame_cost[MAX_REF_FRAMES]) {
vpx_prob intra_inter_p = vp10_get_intra_inter_prob(cm, xd);
@@ -1057,7 +1057,7 @@ void vp10_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
TileDataEnc *tile_data,
int mi_row, int mi_col, RD_COST *rd_cost,
BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
SPEED_FEATURES *const sf = &cpi->sf;
TileInfo *const tile_info = &tile_data->tile_info;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -1624,7 +1624,7 @@ void vp10_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
void vp10_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
int mi_row, int mi_col, RD_COST *rd_cost,
BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
SPEED_FEATURES *const sf = &cpi->sf;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
diff --git a/vp10/encoder/quantize.c b/vp10/encoder/quantize.c
index 4c99e537a..a17fec825 100644
--- a/vp10/encoder/quantize.c
+++ b/vp10/encoder/quantize.c
@@ -249,7 +249,7 @@ static int get_qzbin_factor(int q, vpx_bit_depth_t bit_depth) {
}
void vp10_init_quantizer(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
QUANTS *const quants = &cpi->quants;
int i, q, quant;
@@ -305,7 +305,7 @@ void vp10_init_quantizer(VP9_COMP *cpi) {
}
void vp10_init_plane_quantizers(VP9_COMP *cpi, MACROBLOCK *x) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
QUANTS *const quants = &cpi->quants;
const int segment_id = xd->mi[0]->mbmi.segment_id;
@@ -352,7 +352,7 @@ void vp10_frame_init_quantizer(VP9_COMP *cpi) {
vp10_init_plane_quantizers(cpi, &cpi->td.mb);
}
-void vp10_set_quantizer(VP9_COMMON *cm, int q) {
+void vp10_set_quantizer(VP10_COMMON *cm, int q) {
// quantizer has to be reinitialized with vp10_init_quantizer() if any
// delta_q changes.
cm->base_qindex = q;
diff --git a/vp10/encoder/ratectrl.c b/vp10/encoder/ratectrl.c
index b3364bfd9..37a7574d0 100644
--- a/vp10/encoder/ratectrl.c
+++ b/vp10/encoder/ratectrl.c
@@ -257,7 +257,7 @@ static void update_layer_buffer_level(SVC *svc, int encoded_frame_size) {
// Update the buffer level: leaky bucket model.
static void update_buffer_level(VP9_COMP *cpi, int encoded_frame_size) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
// Non-viewable frames are a special case and are treated as pure overhead.
@@ -443,7 +443,7 @@ static void set_rate_correction_factor(VP9_COMP *cpi, double factor) {
}
void vp10_rc_update_rate_correction_factors(VP9_COMP *cpi) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
int correction_factor = 100;
double rate_correction_factor = get_rate_correction_factor(cpi);
double adjustment_limit;
@@ -515,7 +515,7 @@ void vp10_rc_update_rate_correction_factors(VP9_COMP *cpi) {
int vp10_rc_regulate_q(const VP9_COMP *cpi, int target_bits_per_frame,
int active_best_quality, int active_worst_quality) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
int q = active_worst_quality;
int last_error = INT_MAX;
int i, target_bits_per_mb, bits_per_mb_at_this_q;
@@ -627,7 +627,7 @@ static int calc_active_worst_quality_one_pass_cbr(const VP9_COMP *cpi) {
// If buffer is below the optimal level, let the active_worst_quality go from
// ambient Q (at buffer = optimal level) to worst_quality level
// (at buffer = critical level).
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const RATE_CONTROL *rc = &cpi->rc;
// Buffer level below which we push active_worst to worst_quality.
int64_t critical_level = rc->optimal_buffer_level >> 3;
@@ -680,7 +680,7 @@ static int calc_active_worst_quality_one_pass_cbr(const VP9_COMP *cpi) {
static int rc_pick_q_and_bounds_one_pass_cbr(const VP9_COMP *cpi,
int *bottom_index,
int *top_index) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const RATE_CONTROL *const rc = &cpi->rc;
int active_best_quality;
int active_worst_quality = calc_active_worst_quality_one_pass_cbr(cpi);
@@ -812,7 +812,7 @@ static int get_active_cq_level(const RATE_CONTROL *rc,
static int rc_pick_q_and_bounds_one_pass_vbr(const VP9_COMP *cpi,
int *bottom_index,
int *top_index) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const RATE_CONTROL *const rc = &cpi->rc;
const VP9EncoderConfig *const oxcf = &cpi->oxcf;
const int cq_level = get_active_cq_level(rc, oxcf);
@@ -970,7 +970,7 @@ int vp10_frame_type_qdelta(const VP9_COMP *cpi, int rf_level, int q) {
};
static const FRAME_TYPE frame_type[RATE_FACTOR_LEVELS] =
{INTER_FRAME, INTER_FRAME, INTER_FRAME, INTER_FRAME, KEY_FRAME};
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
int qdelta = vp10_compute_qdelta_by_rate(&cpi->rc, frame_type[rf_level],
q, rate_factor_deltas[rf_level],
cm->bit_depth);
@@ -981,7 +981,7 @@ int vp10_frame_type_qdelta(const VP9_COMP *cpi, int rf_level, int q) {
static int rc_pick_q_and_bounds_two_pass(const VP9_COMP *cpi,
int *bottom_index,
int *top_index) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const RATE_CONTROL *const rc = &cpi->rc;
const VP9EncoderConfig *const oxcf = &cpi->oxcf;
const GF_GROUP *gf_group = &cpi->twopass.gf_group;
@@ -1210,7 +1210,7 @@ void vp10_rc_compute_frame_size_bounds(const VP9_COMP *cpi,
}
void vp10_rc_set_frame_target(VP9_COMP *cpi, int target) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
rc->this_frame_target = target;
@@ -1266,7 +1266,7 @@ static void update_golden_frame_stats(VP9_COMP *cpi) {
}
void vp10_rc_postencode_update(VP9_COMP *cpi, uint64_t bytes_used) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const VP9EncoderConfig *const oxcf = &cpi->oxcf;
RATE_CONTROL *const rc = &cpi->rc;
const int qindex = cm->base_qindex;
@@ -1399,7 +1399,7 @@ static int calc_iframe_target_size_one_pass_vbr(const VP9_COMP *const cpi) {
}
void vp10_rc_get_one_pass_vbr_params(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
int target;
// TODO(yaowu): replace the "auto_key && 0" below with proper decision logic.
@@ -1529,7 +1529,7 @@ static void reset_temporal_layer_to_zero(VP9_COMP *cpi) {
}
void vp10_rc_get_svc_params(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
int target = rc->avg_frame_bandwidth;
const int layer = LAYER_IDS_TO_IDX(cpi->svc.spatial_layer_id,
@@ -1591,7 +1591,7 @@ void vp10_rc_get_svc_params(VP9_COMP *cpi) {
}
void vp10_rc_get_one_pass_cbr_params(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
int target;
// TODO(yaowu): replace the "auto_key && 0" below with proper decision logic.
@@ -1716,7 +1716,7 @@ void vp10_rc_set_gf_interval_range(const VP9_COMP *const cpi,
}
void vp10_rc_update_framerate(VP9_COMP *cpi) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const VP9EncoderConfig *const oxcf = &cpi->oxcf;
RATE_CONTROL *const rc = &cpi->rc;
int vbr_max_bits;
@@ -1799,7 +1799,7 @@ void vp10_set_target_rate(VP9_COMP *cpi) {
// Check if we should resize, based on average QP from past x frames.
// Only allow for resize at most one scale down for now, scaling factor is 2.
int vp10_resize_one_pass_cbr(VP9_COMP *cpi) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
int resize_now = 0;
cpi->resize_scale_num = 1;
diff --git a/vp10/encoder/rd.c b/vp10/encoder/rd.c
index 157c70661..eb8be1614 100644
--- a/vp10/encoder/rd.c
+++ b/vp10/encoder/rd.c
@@ -230,7 +230,7 @@ void vp10_initialize_me_consts(VP9_COMP *cpi, MACROBLOCK *x, int qindex) {
#endif // CONFIG_VP9_HIGHBITDEPTH
}
-static void set_block_thresholds(const VP9_COMMON *cm, RD_OPT *rd) {
+static void set_block_thresholds(const VP10_COMMON *cm, RD_OPT *rd) {
int i, bsize, segment_id;
for (segment_id = 0; segment_id < MAX_SEGMENTS; ++segment_id) {
@@ -263,7 +263,7 @@ static void set_block_thresholds(const VP9_COMMON *cm, RD_OPT *rd) {
}
void vp10_initialize_rd_consts(VP9_COMP *cpi) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = &cpi->td.mb;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
RD_OPT *const rd = &cpi->rd;
@@ -543,7 +543,7 @@ int16_t* vp10_raster_block_offset_int16(BLOCK_SIZE plane_bsize,
YV12_BUFFER_CONFIG *vp10_get_scaled_ref_frame(const VP9_COMP *cpi,
int ref_frame) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const int scaled_idx = cpi->scaled_ref_idx[ref_frame - 1];
const int ref_idx = get_ref_frame_buf_idx(cpi, ref_frame);
return
diff --git a/vp10/encoder/rdopt.c b/vp10/encoder/rdopt.c
index a0de4556a..eca3e04b8 100644
--- a/vp10/encoder/rdopt.c
+++ b/vp10/encoder/rdopt.c
@@ -592,7 +592,7 @@ static void choose_largest_tx_size(VP9_COMP *cpi, MACROBLOCK *x,
int64_t ref_best_rd,
BLOCK_SIZE bs) {
const TX_SIZE max_tx_size = max_txsize_lookup[bs];
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const TX_SIZE largest_tx_size = tx_mode_to_biggest_tx_size[cm->tx_mode];
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
@@ -612,7 +612,7 @@ static void choose_tx_size_from_rd(VP9_COMP *cpi, MACROBLOCK *x,
int64_t ref_best_rd,
BLOCK_SIZE bs) {
const TX_SIZE max_tx_size = max_txsize_lookup[bs];
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
vpx_prob skip_prob = vp10_get_skip_prob(cm, xd);
@@ -1182,7 +1182,7 @@ static int64_t rd_sbuv_dcpred(const VP9_COMP *cpi, MACROBLOCK *x,
int *rate, int *rate_tokenonly,
int64_t *distortion, int *skippable,
BLOCK_SIZE bsize) {
- const VP9_COMMON *cm = &cpi->common;
+ const VP10_COMMON *cm = &cpi->common;
int64_t unused;
x->e_mbd.mi[0]->mbmi.uv_mode = DC_PRED;
@@ -1500,7 +1500,7 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
int mi_row, int mi_col,
int_mv single_newmv[MAX_REF_FRAMES],
int *rate_mv) {
- const VP9_COMMON *const cm = &cpi->common;
+ const VP10_COMMON *const cm = &cpi->common;
const int pw = 4 * num_4x4_blocks_wide_lookup[bsize];
const int ph = 4 * num_4x4_blocks_high_lookup[bsize];
MACROBLOCKD *xd = &x->e_mbd;
@@ -1698,7 +1698,7 @@ static int64_t rd_pick_best_sub8x8_mode(VP9_COMP *cpi, MACROBLOCK *x,
int k, br = 0, idx, idy;
int64_t bd = 0, block_sse = 0;
PREDICTION_MODE this_mode;
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
struct macroblock_plane *const p = &x->plane[0];
struct macroblockd_plane *const pd = &xd->plane[0];
const int label_count = 4;
@@ -2061,7 +2061,7 @@ static int64_t rd_pick_best_sub8x8_mode(VP9_COMP *cpi, MACROBLOCK *x,
return bsi->segment_rd;
}
-static void estimate_ref_frame_costs(const VP9_COMMON *cm,
+static void estimate_ref_frame_costs(const VP10_COMMON *cm,
const MACROBLOCKD *xd,
int segment_id,
unsigned int *ref_costs_single,
@@ -2151,7 +2151,7 @@ static void setup_buffer_inter(VP9_COMP *cpi, MACROBLOCK *x,
int_mv frame_nearest_mv[MAX_REF_FRAMES],
int_mv frame_near_mv[MAX_REF_FRAMES],
struct buf_2d yv12_mb[4][MAX_MB_PLANE]) {
- const VP9_COMMON *cm = &cpi->common;
+ const VP10_COMMON *cm = &cpi->common;
const YV12_BUFFER_CONFIG *yv12 = get_ref_frame_buffer(cpi, ref_frame);
MACROBLOCKD *const xd = &x->e_mbd;
MODE_INFO *const mi = xd->mi[0];
@@ -2187,7 +2187,7 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
int mi_row, int mi_col,
int_mv *tmp_mv, int *rate_mv) {
MACROBLOCKD *xd = &x->e_mbd;
- const VP9_COMMON *cm = &cpi->common;
+ const VP10_COMMON *cm = &cpi->common;
MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
struct buf_2d backup_yv12[MAX_MB_PLANE] = {{0, 0}};
int bestsme = INT_MAX;
@@ -2357,7 +2357,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
const int64_t ref_best_rd,
int64_t *mask_filter,
int64_t filter_cache[]) {
- VP9_COMMON *cm = &cpi->common;
+ VP10_COMMON *cm = &cpi->common;
MACROBLOCKD *xd = &x->e_mbd;
MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
MB_MODE_INFO_EXT *const mbmi_ext = x->mbmi_ext;
@@ -2723,7 +2723,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
void vp10_rd_pick_intra_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
RD_COST *rd_cost, BLOCK_SIZE bsize,
PICK_MODE_CONTEXT *ctx, int64_t best_rd) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
struct macroblockd_plane *const pd = xd->plane;
int rate_y = 0, rate_uv = 0, rate_y_tokenonly = 0, rate_uv_tokenonly = 0;
@@ -2909,7 +2909,7 @@ void vp10_rd_pick_inter_mode_sb(VP9_COMP *cpi,
RD_COST *rd_cost, BLOCK_SIZE bsize,
PICK_MODE_CONTEXT *ctx,
int64_t best_rd_so_far) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
TileInfo *const tile_info = &tile_data->tile_info;
RD_OPT *const rd_opt = &cpi->rd;
SPEED_FEATURES *const sf = &cpi->sf;
@@ -3589,7 +3589,7 @@ void vp10_rd_pick_inter_mode_sb_seg_skip(VP9_COMP *cpi,
BLOCK_SIZE bsize,
PICK_MODE_CONTEXT *ctx,
int64_t best_rd_so_far) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
unsigned char segment_id = mbmi->segment_id;
@@ -3690,7 +3690,7 @@ void vp10_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
BLOCK_SIZE bsize,
PICK_MODE_CONTEXT *ctx,
int64_t best_rd_so_far) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
RD_OPT *const rd_opt = &cpi->rd;
SPEED_FEATURES *const sf = &cpi->sf;
MACROBLOCKD *const xd = &x->e_mbd;
diff --git a/vp10/encoder/segmentation.c b/vp10/encoder/segmentation.c
index 86a970288..e5d827bab 100644
--- a/vp10/encoder/segmentation.c
+++ b/vp10/encoder/segmentation.c
@@ -106,7 +106,7 @@ static int cost_segmap(int *segcounts, vpx_prob *probs) {
return cost;
}
-static void count_segs(const VP9_COMMON *cm, MACROBLOCKD *xd,
+static void count_segs(const VP10_COMMON *cm, MACROBLOCKD *xd,
const TileInfo *tile, MODE_INFO **mi,
int *no_pred_segcounts,
int (*temporal_predictor_count)[2],
@@ -145,7 +145,7 @@ static void count_segs(const VP9_COMMON *cm, MACROBLOCKD *xd,
}
}
-static void count_segs_sb(const VP9_COMMON *cm, MACROBLOCKD *xd,
+static void count_segs_sb(const VP10_COMMON *cm, MACROBLOCKD *xd,
const TileInfo *tile, MODE_INFO **mi,
int *no_pred_segcounts,
int (*temporal_predictor_count)[2],
@@ -195,7 +195,7 @@ static void count_segs_sb(const VP9_COMMON *cm, MACROBLOCKD *xd,
}
}
-void vp10_choose_segmap_coding_method(VP9_COMMON *cm, MACROBLOCKD *xd) {
+void vp10_choose_segmap_coding_method(VP10_COMMON *cm, MACROBLOCKD *xd) {
struct segmentation *seg = &cm->seg;
int no_pred_cost;
diff --git a/vp10/encoder/segmentation.h b/vp10/encoder/segmentation.h
index d30373d3f..91a9937f5 100644
--- a/vp10/encoder/segmentation.h
+++ b/vp10/encoder/segmentation.h
@@ -42,7 +42,7 @@ void vp10_clear_segdata(struct segmentation *seg,
void vp10_set_segment_data(struct segmentation *seg, signed char *feature_data,
unsigned char abs_delta);
-void vp10_choose_segmap_coding_method(VP9_COMMON *cm, MACROBLOCKD *xd);
+void vp10_choose_segmap_coding_method(VP10_COMMON *cm, MACROBLOCKD *xd);
void vp10_reset_segment_features(struct segmentation *seg);
diff --git a/vp10/encoder/skin_detection.c b/vp10/encoder/skin_detection.c
index e37ea260c..dbb8b3485 100644
--- a/vp10/encoder/skin_detection.c
+++ b/vp10/encoder/skin_detection.c
@@ -52,7 +52,7 @@ int vp10_skin_pixel(const uint8_t y, const uint8_t cb, const uint8_t cr) {
// For viewing skin map on input source.
void vp10_compute_skin_map(VP9_COMP *const cpi, FILE *yuv_skinmap_file) {
int i, j, mi_row, mi_col;
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
uint8_t *y;
const uint8_t *src_y = cpi->Source->y_buffer;
const uint8_t *src_u = cpi->Source->u_buffer;
diff --git a/vp10/encoder/speed_features.c b/vp10/encoder/speed_features.c
index b428e31dc..b3ae6871e 100644
--- a/vp10/encoder/speed_features.c
+++ b/vp10/encoder/speed_features.c
@@ -27,7 +27,7 @@ static int frame_is_boosted(const VP9_COMP *cpi) {
// partly on the screen area that over which they propogate. Propogation is
// limited by transform block size but the screen area take up by a given block
// size will be larger for a small image format stretched to full screen.
-static BLOCK_SIZE set_partition_min_limit(VP9_COMMON *const cm) {
+static BLOCK_SIZE set_partition_min_limit(VP10_COMMON *const cm) {
unsigned int screen_area = (cm->width * cm->height);
// Select block size based on image format size.
@@ -46,7 +46,7 @@ static BLOCK_SIZE set_partition_min_limit(VP9_COMMON *const cm) {
static void set_good_speed_feature_framesize_dependent(VP9_COMP *cpi,
SPEED_FEATURES *sf,
int speed) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
if (speed >= 1) {
if (MIN(cm->width, cm->height) >= 720) {
@@ -108,7 +108,7 @@ static void set_good_speed_feature_framesize_dependent(VP9_COMP *cpi,
}
}
-static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm,
+static void set_good_speed_feature(VP9_COMP *cpi, VP10_COMMON *cm,
SPEED_FEATURES *sf, int speed) {
const int boosted = frame_is_boosted(cpi);
@@ -212,7 +212,7 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm,
static void set_rt_speed_feature_framesize_dependent(VP9_COMP *cpi,
SPEED_FEATURES *sf, int speed) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
if (speed >= 1) {
if (MIN(cm->width, cm->height) >= 720) {
@@ -248,7 +248,7 @@ static void set_rt_speed_feature_framesize_dependent(VP9_COMP *cpi,
static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf,
int speed, vp9e_tune_content content) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
const int is_keyframe = cm->frame_type == KEY_FRAME;
const int frames_since_key = is_keyframe ? 0 : cpi->rc.frames_since_key;
sf->static_segmentation = 0;
@@ -433,7 +433,7 @@ void vp10_set_speed_features_framesize_dependent(VP9_COMP *cpi) {
void vp10_set_speed_features_framesize_independent(VP9_COMP *cpi) {
SPEED_FEATURES *const sf = &cpi->sf;
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = &cpi->td.mb;
const VP9EncoderConfig *const oxcf = &cpi->oxcf;
int i;
diff --git a/vp10/encoder/temporal_filter.c b/vp10/encoder/temporal_filter.c
index 5b7792cc7..0a9330979 100644
--- a/vp10/encoder/temporal_filter.c
+++ b/vp10/encoder/temporal_filter.c
@@ -652,7 +652,7 @@ static void adjust_arnr_filter(VP9_COMP *cpi,
}
void vp10_temporal_filter(VP9_COMP *cpi, int distance) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
int frame;
diff --git a/vp10/encoder/tokenize.c b/vp10/encoder/tokenize.c
index 2df9c46a3..1e868b54c 100644
--- a/vp10/encoder/tokenize.c
+++ b/vp10/encoder/tokenize.c
@@ -612,7 +612,7 @@ int vp10_has_high_freq_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
void vp10_tokenize_sb(VP9_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
int dry_run, BLOCK_SIZE bsize) {
- VP9_COMMON *const cm = &cpi->common;
+ VP10_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
diff --git a/vp10/vp10_dx_iface.c b/vp10/vp10_dx_iface.c
index 9be2bf705..233d1a273 100644
--- a/vp10/vp10_dx_iface.c
+++ b/vp10/vp10_dx_iface.c
@@ -281,7 +281,7 @@ static void init_buffer_callbacks(vpx_codec_alg_priv_t *ctx) {
for (i = 0; i < ctx->num_frame_workers; ++i) {
VPxWorker *const worker = &ctx->frame_workers[i];
FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1;
- VP9_COMMON *const cm = &frame_worker_data->pbi->common;
+ VP10_COMMON *const cm = &frame_worker_data->pbi->common;
BufferPool *const pool = cm->buffer_pool;
cm->new_fb_idx = INVALID_IDX;
@@ -567,7 +567,7 @@ static void wait_worker_and_cache_frame(vpx_codec_alg_priv_t *ctx) {
check_resync(ctx, frame_worker_data->pbi);
if (vp10_get_raw_frame(frame_worker_data->pbi, &sd, &flags) == 0) {
- VP9_COMMON *const cm = &frame_worker_data->pbi->common;
+ VP10_COMMON *const cm = &frame_worker_data->pbi->common;
RefCntBuffer *const frame_bufs = cm->buffer_pool->frame_bufs;
ctx->frame_cache[ctx->frame_cache_write].fb_idx = cm->new_fb_idx;
yuvconfig2image(&ctx->frame_cache[ctx->frame_cache_write].img, &sd,
@@ -764,7 +764,7 @@ static vpx_image_t *decoder_get_frame(vpx_codec_alg_priv_t *ctx,
check_resync(ctx, frame_worker_data->pbi);
}
if (vp10_get_raw_frame(frame_worker_data->pbi, &sd, &flags) == 0) {
- VP9_COMMON *const cm = &frame_worker_data->pbi->common;
+ VP10_COMMON *const cm = &frame_worker_data->pbi->common;
RefCntBuffer *const frame_bufs = cm->buffer_pool->frame_bufs;
release_last_output_frame(ctx);
ctx->last_show_frame = frame_worker_data->pbi->common.new_fb_idx;
@@ -965,7 +965,7 @@ static vpx_codec_err_t ctrl_get_frame_size(vpx_codec_alg_priv_t *ctx,
VPxWorker *const worker = ctx->frame_workers;
FrameWorkerData *const frame_worker_data =
(FrameWorkerData *)worker->data1;
- const VP9_COMMON *const cm = &frame_worker_data->pbi->common;
+ const VP10_COMMON *const cm = &frame_worker_data->pbi->common;
frame_size[0] = cm->width;
frame_size[1] = cm->height;
return VPX_CODEC_OK;
@@ -992,7 +992,7 @@ static vpx_codec_err_t ctrl_get_display_size(vpx_codec_alg_priv_t *ctx,
VPxWorker *const worker = ctx->frame_workers;
FrameWorkerData *const frame_worker_data =
(FrameWorkerData *)worker->data1;
- const VP9_COMMON *const cm = &frame_worker_data->pbi->common;
+ const VP10_COMMON *const cm = &frame_worker_data->pbi->common;
display_size[0] = cm->display_width;
display_size[1] = cm->display_height;
return VPX_CODEC_OK;
@@ -1013,7 +1013,7 @@ static vpx_codec_err_t ctrl_get_bit_depth(vpx_codec_alg_priv_t *ctx,
if (worker) {
FrameWorkerData *const frame_worker_data =
(FrameWorkerData *)worker->data1;
- const VP9_COMMON *const cm = &frame_worker_data->pbi->common;
+ const VP10_COMMON *const cm = &frame_worker_data->pbi->common;
*bit_depth = cm->bit_depth;
return VPX_CODEC_OK;
} else {