Commit 982deebb authored by Ronald S. Bultje's avatar Ronald S. Bultje

Change name of common top-level structures from VP8 to VP9.

This change encompasses VP8_PTR, VP8_COMP, VP8D_COMP, VP8_COMMON,
VP8Decompressor and VP8Common.

Change-Id: I514ef4ad4e682370f36d656af1c09ee20da216ad
parent 43da8f14
......@@ -21,7 +21,7 @@
extern void vp8_init_scan_order_mask();
void vp9_update_mode_info_border(VP8_COMMON *cpi, MODE_INFO *mi_base) {
void vp9_update_mode_info_border(VP9_COMMON *cpi, MODE_INFO *mi_base) {
int stride = cpi->mode_info_stride;
int i;
......@@ -34,7 +34,7 @@ void vp9_update_mode_info_border(VP8_COMMON *cpi, MODE_INFO *mi_base) {
}
}
void vp9_update_mode_info_in_image(VP8_COMMON *cpi, MODE_INFO *mi) {
void vp9_update_mode_info_in_image(VP9_COMMON *cpi, MODE_INFO *mi) {
int i, j;
// For each in image mode_info element set the in image flag to 1
......@@ -48,7 +48,7 @@ void vp9_update_mode_info_in_image(VP8_COMMON *cpi, MODE_INFO *mi) {
}
}
void vp9_de_alloc_frame_buffers(VP8_COMMON *oci) {
void vp9_de_alloc_frame_buffers(VP9_COMMON *oci) {
int i;
for (i = 0; i < NUM_YV12_BUFFERS; i++)
......@@ -67,7 +67,7 @@ void vp9_de_alloc_frame_buffers(VP8_COMMON *oci) {
}
int vp9_alloc_frame_buffers(VP8_COMMON *oci, int width, int height) {
int vp9_alloc_frame_buffers(VP9_COMMON *oci, int width, int height) {
int i;
vp9_de_alloc_frame_buffers(oci);
......@@ -145,7 +145,7 @@ int vp9_alloc_frame_buffers(VP8_COMMON *oci, int width, int height) {
return 0;
}
void vp9_setup_version(VP8_COMMON *cm) {
void vp9_setup_version(VP9_COMMON *cm) {
if (cm->version & 0x4) {
if (!CONFIG_EXPERIMENTAL)
vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
......@@ -183,7 +183,7 @@ void vp9_setup_version(VP8_COMMON *cm) {
// break;
}
}
void vp9_create_common(VP8_COMMON *oci) {
void vp9_create_common(VP9_COMMON *oci) {
vp9_machine_specific_config(oci);
vp9_init_mbmode_probs(oci);
......@@ -209,7 +209,7 @@ void vp9_create_common(VP8_COMMON *oci) {
oci->kf_ymode_probs_update = 0;
}
void vp9_remove_common(VP8_COMMON *oci) {
void vp9_remove_common(VP9_COMMON *oci) {
vp9_de_alloc_frame_buffers(oci);
}
......
......@@ -14,13 +14,13 @@
#include "onyxc_int.h"
void vp9_create_common(VP8_COMMON *oci);
void vp9_remove_common(VP8_COMMON *oci);
void vp9_de_alloc_frame_buffers(VP8_COMMON *oci);
int vp9_alloc_frame_buffers(VP8_COMMON *oci, int width, int height);
void vp9_setup_version(VP8_COMMON *oci);
void vp9_create_common(VP9_COMMON *oci);
void vp9_remove_common(VP9_COMMON *oci);
void vp9_de_alloc_frame_buffers(VP9_COMMON *oci);
int vp9_alloc_frame_buffers(VP9_COMMON *oci, int width, int height);
void vp9_setup_version(VP9_COMMON *oci);
void vp9_update_mode_info_border(VP8_COMMON *cpi, MODE_INFO *mi_base);
void vp9_update_mode_info_in_image(VP8_COMMON *cpi, MODE_INFO *mi);
void vp9_update_mode_info_border(VP9_COMMON *cpi, MODE_INFO *mi_base);
void vp9_update_mode_info_in_image(VP9_COMMON *cpi, MODE_INFO *mi);
#endif
......@@ -19,9 +19,9 @@
#include "vp8/common/idct.h"
#include "vp8/common/onyxc_int.h"
void vp8_arch_arm_common_init(VP8_COMMON *ctx) {
void vp8_arch_arm_common_init(VP9_COMMON *ctx) {
#if CONFIG_RUNTIME_CPU_DETECT
VP8_COMMON_RTCD *rtcd = &ctx->rtcd;
VP9_COMMON_RTCD *rtcd = &ctx->rtcd;
int flags = arm_cpu_caps();
rtcd->flags = flags;
......
......@@ -370,7 +370,7 @@ typedef struct macroblockd {
#endif
#if CONFIG_RUNTIME_CPU_DETECT
struct VP8_COMMON_RTCD *rtcd;
struct VP9_COMMON_RTCD *rtcd;
#endif
int mb_index; // Index of the MB in the SB (0..3)
......
......@@ -202,7 +202,7 @@ vp8_extra_bit_struct vp9_extra_bits[12] = {
#include "default_coef_probs.h"
void vp9_default_coef_probs(VP8_COMMON *pc) {
void vp9_default_coef_probs(VP9_COMMON *pc) {
vpx_memcpy(pc->fc.coef_probs, default_coef_probs,
sizeof(pc->fc.coef_probs));
vpx_memcpy(pc->fc.hybrid_coef_probs, default_hybrid_coef_probs,
......@@ -234,7 +234,7 @@ void vp9_coef_tree_initialize() {
#define COEF_COUNT_SAT_AFTER_KEY 24
#define COEF_MAX_UPDATE_FACTOR_AFTER_KEY 128
void vp9_adapt_coef_probs(VP8_COMMON *cm) {
void vp9_adapt_coef_probs(VP9_COMMON *cm) {
int t, i, j, k, count;
unsigned int branch_ct[ENTROPY_NODES][2];
vp8_prob coef_probs[ENTROPY_NODES];
......
......@@ -100,8 +100,8 @@ extern DECLARE_ALIGNED(16, const int, vp9_coef_bands_16x16[256]);
extern DECLARE_ALIGNED(16, const unsigned char, vp9_prev_token_class[MAX_ENTROPY_TOKENS]);
struct VP8Common;
void vp9_default_coef_probs(struct VP8Common *);
struct VP9Common;
void vp9_default_coef_probs(struct VP9Common *);
extern DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d[16]);
extern DECLARE_ALIGNED(16, const int, vp9_col_scan[16]);
......@@ -112,6 +112,6 @@ extern DECLARE_ALIGNED(64, const int, vp9_default_zig_zag1d_8x8[64]);
void vp9_coef_tree_initialize(void);
extern DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_16x16[256]);
void vp9_adapt_coef_probs(struct VP8Common *);
void vp9_adapt_coef_probs(struct VP9Common *);
#endif
......@@ -260,7 +260,7 @@ struct vp8_token_struct vp9_sub_mv_ref_encoding_array [VP8_SUBMVREFS];
void vp9_init_mbmode_probs(VP8_COMMON *x) {
void vp9_init_mbmode_probs(VP9_COMMON *x) {
unsigned int bct [VP8_YMODES] [2]; /* num Ymodes > num UV modes */
vp9_tree_probs_from_distribution(VP8_YMODES, vp9_ymode_encodings,
......@@ -387,7 +387,7 @@ void vp9_entropy_mode_init() {
vp9_sub_mv_ref_tree, LEFT4X4);
}
void vp9_init_mode_contexts(VP8_COMMON *pc) {
void vp9_init_mode_contexts(VP9_COMMON *pc) {
vpx_memset(pc->fc.mv_ref_ct, 0, sizeof(pc->fc.mv_ref_ct));
vpx_memset(pc->fc.mv_ref_ct_a, 0, sizeof(pc->fc.mv_ref_ct_a));
......@@ -400,7 +400,7 @@ void vp9_init_mode_contexts(VP8_COMMON *pc) {
}
void vp9_accum_mv_refs(VP8_COMMON *pc,
void vp9_accum_mv_refs(VP9_COMMON *pc,
MB_PREDICTION_MODE m,
const int ct[4]) {
int (*mv_ref_ct)[4][2];
......@@ -434,7 +434,7 @@ void vp9_accum_mv_refs(VP8_COMMON *pc,
#define MVREF_COUNT_SAT 20
#define MVREF_MAX_UPDATE_FACTOR 144
void vp9_update_mode_context(VP8_COMMON *pc) {
void vp9_update_mode_context(VP9_COMMON *pc) {
int i, j;
int (*mv_ref_ct)[4][2];
int (*mode_context)[4];
......@@ -467,7 +467,7 @@ void vp9_update_mode_context(VP8_COMMON *pc) {
#ifdef MODE_STATS
#include "vp8/common/modecont.h"
void print_mode_contexts(VP8_COMMON *pc) {
void print_mode_contexts(VP9_COMMON *pc) {
int j, i;
printf("\n====================\n");
for (j = 0; j < 6; j++) {
......@@ -489,7 +489,7 @@ void print_mode_contexts(VP8_COMMON *pc) {
// #define MODE_COUNT_TESTING
#define MODE_COUNT_SAT 20
#define MODE_MAX_UPDATE_FACTOR 144
void vp9_adapt_mode_probs(VP8_COMMON *cm) {
void vp9_adapt_mode_probs(VP9_COMMON *cm) {
int i, t, count, factor;
unsigned int branch_ct[32][2];
vp8_prob ymode_probs[VP8_YMODES - 1];
......
......@@ -63,18 +63,18 @@ extern struct vp8_token_struct vp9_sub_mv_ref_encoding_array [VP8_SUBMVREFS];
void vp9_entropy_mode_init(void);
struct VP8Common;
void vp9_init_mbmode_probs(struct VP8Common *x);
extern void vp9_init_mode_contexts(struct VP8Common *pc);
extern void vp9_update_mode_context(struct VP8Common *pc);;
extern void vp9_accum_mv_refs(struct VP8Common *pc,
struct VP9Common;
void vp9_init_mbmode_probs(struct VP9Common *x);
extern void vp9_init_mode_contexts(struct VP9Common *pc);
extern void vp9_update_mode_context(struct VP9Common *pc);;
extern void vp9_accum_mv_refs(struct VP9Common *pc,
MB_PREDICTION_MODE m,
const int ct[4]);
void vp9_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES - 1]);
void vp9_kf_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES - 1]);
void vp9_adapt_mode_probs(struct VP8Common *);
void vp9_adapt_mode_probs(struct VP9Common *);
#define VP8_SWITCHABLE_FILTERS 2 /* number of switchable filters */
extern const INTERPOLATIONFILTERTYPE vp9_switchable_interp
......
......@@ -308,7 +308,7 @@ void vp9_counts_to_nmv_context(
}
}
void vp9_adapt_nmv_probs(VP8_COMMON *cm, int usehp) {
void vp9_adapt_nmv_probs(VP9_COMMON *cm, int usehp) {
int i, j, k;
nmv_context prob;
unsigned int branch_ct_joint[MV_JOINTS - 1][2];
......@@ -460,6 +460,6 @@ void vp9_entropy_mv_init() {
vp9_tokens_from_tree(vp9_mv_fp_encodings, vp9_mv_fp_tree);
}
void vp9_init_mv_probs(VP8_COMMON *cm) {
void vp9_init_mv_probs(VP9_COMMON *cm) {
vpx_memcpy(&cm->fc.nmvc, &vp9_default_nmv_context, sizeof(nmv_context));
}
......@@ -16,13 +16,13 @@
#include "vpx_config.h"
#include "blockd.h"
struct VP8Common;
struct VP9Common;
void vp9_entropy_mv_init();
void vp9_init_mv_probs(struct VP8Common *cm);
void vp8_adapt_mv_probs(struct VP8Common *cm);
void vp9_init_mv_probs(struct VP9Common *cm);
void vp8_adapt_mv_probs(struct VP9Common *cm);
void vp9_adapt_nmv_probs(struct VP8Common *cm, int usehp);
void vp9_adapt_nmv_probs(struct VP9Common *cm, int usehp);
void vp8_lower_mv_precision(MV *mv);
int vp9_use_nmv_hp(const MV *ref);
......
......@@ -157,7 +157,7 @@ void vp9_find_near_mvs
vp8_clamp_mv2(best_mv, xd);
}
vp8_prob *vp9_mv_ref_probs(VP8_COMMON *pc,
vp8_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
vp8_prob p[VP8_MVREFS - 1], const int near_mv_ref_ct[4]
) {
p[0] = pc->fc.vp8_mode_contexts [near_mv_ref_ct[0]] [0];
......
......@@ -96,7 +96,7 @@ void vp9_find_near_mvs
int *ref_frame_sign_bias
);
vp8_prob *vp9_mv_ref_probs(VP8_COMMON *pc,
vp8_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
vp8_prob p[VP8_MVREFS - 1], const int near_mv_ref_ct[4]
);
......
......@@ -17,12 +17,12 @@
#include "vp8/common/idct.h"
#include "vp8/common/onyxc_int.h"
extern void vp9_arch_x86_common_init(VP8_COMMON *ctx);
extern void vp8_arch_arm_common_init(VP8_COMMON *ctx);
extern void vp9_arch_x86_common_init(VP9_COMMON *ctx);
extern void vp8_arch_arm_common_init(VP9_COMMON *ctx);
void vp9_machine_specific_config(VP8_COMMON *ctx) {
void vp9_machine_specific_config(VP9_COMMON *ctx) {
#if CONFIG_RUNTIME_CPU_DETECT
VP8_COMMON_RTCD *rtcd = &ctx->rtcd;
VP9_COMMON_RTCD *rtcd = &ctx->rtcd;
rtcd->idct.idct1 = vp9_short_idct4x4llm_1_c;
rtcd->idct.idct16 = vp9_short_idct4x4llm_c;
......
......@@ -94,7 +94,7 @@ void merge(item *labels, int u, int v) {
}
void segment_via_mode_info(VP8_COMMON *oci, int how) {
void segment_via_mode_info(VP9_COMMON *oci, int how) {
MODE_INFO *mi = oci->mi;
int i, j;
int mb_index = 0;
......
......@@ -84,7 +84,7 @@ void vp9_loop_filter_update_sharpness(loop_filter_info_n *lfi,
}
}
void vp9_loop_filter_init(VP8_COMMON *cm) {
void vp9_loop_filter_init(VP9_COMMON *cm) {
loop_filter_info_n *lfi = &cm->lf_info;
int i;
......@@ -101,7 +101,7 @@ void vp9_loop_filter_init(VP8_COMMON *cm) {
}
}
void vp9_loop_filter_frame_init(VP8_COMMON *cm,
void vp9_loop_filter_frame_init(VP9_COMMON *cm,
MACROBLOCKD *xd,
int default_filt_lvl) {
int seg, /* segment number */
......@@ -180,7 +180,7 @@ void vp9_loop_filter_frame_init(VP8_COMMON *cm,
void vp9_loop_filter_frame
(
VP8_COMMON *cm,
VP9_COMMON *cm,
MACROBLOCKD *xd
) {
YV12_BUFFER_CONFIG *post = cm->frame_to_show;
......@@ -318,7 +318,7 @@ void vp9_loop_filter_frame
void vp9_loop_filter_frame_yonly
(
VP8_COMMON *cm,
VP9_COMMON *cm,
MACROBLOCKD *xd,
int default_filt_lvl
) {
......@@ -424,7 +424,7 @@ void vp9_loop_filter_frame_yonly
void vp9_loop_filter_partial_frame
(
VP8_COMMON *cm,
VP9_COMMON *cm,
MACROBLOCKD *xd,
int default_filt_lvl
) {
......
......@@ -80,22 +80,22 @@ typedef void loop_filter_uvfunction
);
/* assorted loopfilter functions which get used elsewhere */
struct VP8Common;
struct VP9Common;
struct macroblockd;
void vp9_loop_filter_init(struct VP8Common *cm);
void vp9_loop_filter_init(struct VP9Common *cm);
void vp9_loop_filter_frame_init(struct VP8Common *cm,
void vp9_loop_filter_frame_init(struct VP9Common *cm,
struct macroblockd *mbd,
int default_filt_lvl);
void vp9_loop_filter_frame(struct VP8Common *cm, struct macroblockd *mbd);
void vp9_loop_filter_frame(struct VP9Common *cm, struct macroblockd *mbd);
void vp9_loop_filter_partial_frame(struct VP8Common *cm,
void vp9_loop_filter_partial_frame(struct VP9Common *cm,
struct macroblockd *mbd,
int default_filt_lvl);
void vp9_loop_filter_frame_yonly(struct VP8Common *cm,
void vp9_loop_filter_frame_yonly(struct VP9Common *cm,
struct macroblockd *mbd,
int default_filt_lvl);
......
......@@ -22,7 +22,7 @@ extern "C"
#include "vpx_scale/yv12config.h"
#include "type_aliases.h"
#include "ppflags.h"
typedef int *VP8_PTR;
typedef int *VP9_PTR;
/* Create/destroy static data structures. */
......@@ -174,50 +174,50 @@ extern "C"
void vp9_initialize_enc();
VP8_PTR vp9_create_compressor(VP8_CONFIG *oxcf);
void vp9_remove_compressor(VP8_PTR *comp);
VP9_PTR vp9_create_compressor(VP8_CONFIG *oxcf);
void vp9_remove_compressor(VP9_PTR *comp);
void vp8_init_config(VP8_PTR onyx, VP8_CONFIG *oxcf);
void vp9_change_config(VP8_PTR onyx, VP8_CONFIG *oxcf);
void vp8_init_config(VP9_PTR onyx, VP8_CONFIG *oxcf);
void vp9_change_config(VP9_PTR onyx, VP8_CONFIG *oxcf);
// receive a frames worth of data caller can assume that a copy of this frame is made
// and not just a copy of the pointer..
int vp9_receive_raw_frame(VP8_PTR comp, unsigned int frame_flags,
int vp9_receive_raw_frame(VP9_PTR comp, unsigned int frame_flags,
YV12_BUFFER_CONFIG *sd, int64_t time_stamp,
int64_t end_time_stamp);
int vp9_get_compressed_data(VP8_PTR comp, unsigned int *frame_flags,
int vp9_get_compressed_data(VP9_PTR comp, unsigned int *frame_flags,
unsigned long *size, unsigned char *dest,
int64_t *time_stamp, int64_t *time_end,
int flush);
int vp9_get_preview_raw_frame(VP8_PTR comp, YV12_BUFFER_CONFIG *dest,
int vp9_get_preview_raw_frame(VP9_PTR comp, YV12_BUFFER_CONFIG *dest,
vp8_ppflags_t *flags);
int vp9_use_as_reference(VP8_PTR comp, int ref_frame_flags);
int vp9_use_as_reference(VP9_PTR comp, int ref_frame_flags);
int vp9_update_reference(VP8_PTR comp, int ref_frame_flags);
int vp9_update_reference(VP9_PTR comp, int ref_frame_flags);
int vp9_get_reference_enc(VP8_PTR comp, VP8_REFFRAME ref_frame_flag,
int vp9_get_reference_enc(VP9_PTR comp, VP8_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd);
int vp9_set_reference_enc(VP8_PTR comp, VP8_REFFRAME ref_frame_flag,
int vp9_set_reference_enc(VP9_PTR comp, VP8_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd);
int vp9_update_entropy(VP8_PTR comp, int update);
int vp9_update_entropy(VP9_PTR comp, int update);
int vp9_set_roimap(VP8_PTR comp, unsigned char *map,
int vp9_set_roimap(VP9_PTR comp, unsigned char *map,
unsigned int rows, unsigned int cols,
int delta_q[4], int delta_lf[4],
unsigned int threshold[4]);
int vp9_set_active_map(VP8_PTR comp, unsigned char *map,
int vp9_set_active_map(VP9_PTR comp, unsigned char *map,
unsigned int rows, unsigned int cols);
int vp9_set_internal_size(VP8_PTR comp,
int vp9_set_internal_size(VP9_PTR comp,
VPX_SCALING horiz_mode, VPX_SCALING vert_mode);
int vp9_get_quantizer(VP8_PTR c);
int vp9_get_quantizer(VP9_PTR c);
#ifdef __cplusplus
}
......
......@@ -133,7 +133,7 @@ typedef enum {
NB_TXFM_MODES = 4,
} TXFM_MODE;
typedef struct VP8_COMMON_RTCD {
typedef struct VP9_COMMON_RTCD {
#if CONFIG_RUNTIME_CPU_DETECT
vp8_idct_rtcd_vtable_t idct;
vp8_subpix_rtcd_vtable_t subpix;
......@@ -144,9 +144,9 @@ typedef struct VP8_COMMON_RTCD {
#else
int unused;
#endif
} VP8_COMMON_RTCD;
} VP9_COMMON_RTCD;
typedef struct VP8Common {
typedef struct VP9Common {
struct vpx_internal_error_info error;
DECLARE_ALIGNED(16, short, Y1dequant[QINDEX_RANGE][16]);
......@@ -294,7 +294,7 @@ typedef struct VP8Common {
double framerate;
#if CONFIG_RUNTIME_CPU_DETECT
VP8_COMMON_RTCD rtcd;
VP9_COMMON_RTCD rtcd;
#endif
#if CONFIG_POSTPROC
......@@ -309,6 +309,6 @@ typedef struct VP8Common {
vp8_prob prob_pred_filter_off;
#endif
} VP8_COMMON;
} VP9_COMMON;
#endif
......@@ -626,7 +626,7 @@ static void constrain_line(int x0, int *x1, int y0, int *y1, int width, int heig
#define RTCD_VTABLE(oci) NULL
#endif
int vp9_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t *ppflags) {
int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t *ppflags) {
int q = oci->filter_level * 10 / 6;
int flags = ppflags->post_proc_flag;
int deblock_level = ppflags->deblocking_level;
......
......@@ -108,7 +108,7 @@ struct postproc_state {
};
#include "onyxc_int.h"
#include "ppflags.h"
int vp9_post_proc_frame(struct VP8Common *oci, YV12_BUFFER_CONFIG *dest,
int vp9_post_proc_frame(struct VP9Common *oci, YV12_BUFFER_CONFIG *dest,
vp8_ppflags_t *flags);
......
......@@ -15,7 +15,7 @@
// TBD prediction functions for various bitstream signals
// Returns a context number for the given MB prediction signal
unsigned char vp9_get_pred_context(const VP8_COMMON *const cm,
unsigned char vp9_get_pred_context(const VP9_COMMON *const cm,
const MACROBLOCKD *const xd,
PRED_ID pred_id) {
int pred_context;
......@@ -104,7 +104,7 @@ unsigned char vp9_get_pred_context(const VP8_COMMON *const cm,
// This function returns a context probability for coding a given
// prediction signal
vp8_prob vp9_get_pred_prob(const VP8_COMMON *const cm,
vp8_prob vp9_get_pred_prob(const VP9_COMMON *const cm,
const MACROBLOCKD *const xd,
PRED_ID pred_id) {
vp8_prob pred_probability;
......@@ -144,7 +144,7 @@ vp8_prob vp9_get_pred_prob(const VP8_COMMON *const cm,
// This function returns a context probability ptr for coding a given
// prediction signal
const vp8_prob *vp9_get_pred_probs(const VP8_COMMON *const cm,
const vp8_prob *vp9_get_pred_probs(const VP9_COMMON *const cm,
const MACROBLOCKD *const xd,
PRED_ID pred_id) {
const vp8_prob *pred_probability;
......@@ -280,7 +280,7 @@ void vp9_set_pred_flag(MACROBLOCKD *const xd,
// peredict various bitstream signals.
// Macroblock segment id prediction function
unsigned char vp9_get_pred_mb_segid(const VP8_COMMON *const cm,
unsigned char vp9_get_pred_mb_segid(const VP9_COMMON *const cm,
const MACROBLOCKD *const xd, int MbIndex) {
// Currently the prediction for the macroblock segment ID is
// the value stored for this macroblock in the previous frame.
......@@ -305,7 +305,7 @@ unsigned char vp9_get_pred_mb_segid(const VP8_COMMON *const cm,
#endif
}
MV_REFERENCE_FRAME vp9_get_pred_ref(const VP8_COMMON *const cm,
MV_REFERENCE_FRAME vp9_get_pred_ref(const VP9_COMMON *const cm,
const MACROBLOCKD *const xd) {
MODE_INFO *m = xd->mode_info_context;
......@@ -407,7 +407,7 @@ void vp9_calc_ref_probs(int *count, vp8_prob *probs) {
// Values willbe set to 0 for reference frame options that are not possible
// because wither they were predicted and prediction has failed or because
// they are not allowed for a given segment.
void vp9_compute_mod_refprobs(VP8_COMMON *const cm) {
void vp9_compute_mod_refprobs(VP9_COMMON *const cm) {
int norm_cnt[MAX_REF_FRAMES];
int intra_count;
int inter_count;
......
......@@ -25,15 +25,15 @@ typedef enum {
PRED_SWITCHABLE_INTERP = 4
} PRED_ID;
extern unsigned char vp9_get_pred_context(const VP8_COMMON *const cm,
extern unsigned char vp9_get_pred_context(const VP9_COMMON *const cm,
const MACROBLOCKD *const xd,
PRED_ID pred_id);
extern vp8_prob vp9_get_pred_prob(const VP8_COMMON *const cm,
extern vp8_prob vp9_get_pred_prob(const VP9_COMMON *const cm,
const MACROBLOCKD *const xd,
PRED_ID pred_id);
extern const vp8_prob *vp9_get_pred_probs(const VP8_COMMON *const cm,
extern const vp8_prob *vp9_get_pred_probs(const VP9_COMMON *const cm,
const MACROBLOCKD *const xd,
PRED_ID pred_id);
......@@ -45,12 +45,12 @@ extern void vp9_set_pred_flag(MACROBLOCKD *const xd,
unsigned char pred_flag);
extern unsigned char vp9_get_pred_mb_segid(const VP8_COMMON *const cm,
extern unsigned char vp9_get_pred_mb_segid(const VP9_COMMON *const cm,
const MACROBLOCKD *const xd,
int MbIndex);
extern MV_REFERENCE_FRAME vp9_get_pred_ref(const VP8_COMMON *const cm,
extern MV_REFERENCE_FRAME vp9_get_pred_ref(const VP9_COMMON *const cm,
const MACROBLOCKD *const xd);
extern void vp9_compute_mod_refprobs(VP8_COMMON *const cm);
extern void vp9_compute_mod_refprobs(VP9_COMMON *const cm);
#endif /* __INC_PRED_COMMON_H__ */
......@@ -20,7 +20,7 @@
void vp9_setup_interp_filters(MACROBLOCKD *xd,
INTERPOLATIONFILTERTYPE mcomp_filter_type,
VP8_COMMON *cm) {
VP9_COMMON *cm) {
if (mcomp_filter_type == SIXTAP) {
xd->subpixel_predict = SUBPIX_INVOKE(
&cm->rtcd.subpix, sixtap4x4);
......
......@@ -67,6 +67,6 @@ extern void vp9_build_2nd_inter_predictors4b(MACROBLOCKD *xd,
extern void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd);
extern void vp9_setup_interp_filters(MACROBLOCKD *xd,
INTERPOLATIONFILTERTYPE filter,
VP8_COMMON *cm);
VP9_COMMON *cm);
#endif
......@@ -17,5 +17,5 @@ void vpx_reset_mmx_state(void);
#define vp8_clear_system_state()
#endif
struct VP8Common;
void vp9_machine_specific_config(struct VP8Common *);
struct VP9Common;
void vp9_machine_specific_config(struct VP9Common *);
......@@ -18,9 +18,9 @@
#include "vp8/common/pragmas.h"
#include "vp8/common/onyxc_int.h"
void vp9_arch_x86_common_init(VP8_COMMON *ctx) {
void vp9_arch_x86_common_init(VP9_COMMON *ctx) {
#if CONFIG_RUNTIME_CPU_DETECT
VP8_COMMON_RTCD *rtcd = &ctx->rtcd;
VP9_COMMON_RTCD *rtcd = &ctx->rtcd;
int flags = x86_simd_caps();
/* Note:
......
......@@ -90,12 +90,12 @@ int vp8_read_mv_ref_id(vp8_reader *r,
#endif
extern const int vp9_i8x8_block[4];
static void kfread_modes(VP8D_COMP *pbi,
static void kfread_modes(VP9D_COMP *pbi,
MODE_INFO *m,
int mb_row,
int mb_col,
BOOL_DECODER* const bc) {
VP8_COMMON *const cm = &pbi->common;
VP9_COMMON *const cm = &pbi->common;
const int mis = pbi->common.mode_info_stride;
int map_index = mb_row * pbi->common.mb_cols + mb_col;
MB_PREDICTION_MODE y_mode;
......@@ -353,14 +353,14 @@ static void read_nmvprobs(vp8_reader *bc, nmv_context *mvctx,
}
// Read the referncence frame
static MV_REFERENCE_FRAME read_ref_frame(VP8D_COMP *pbi,
static MV_REFERENCE_FRAME read_ref_frame(VP9D_COMP *pbi,
vp8_reader *const bc,
unsigned char segment_id) {
MV_REFERENCE_FRAME ref_frame;
int seg_ref_active;
int seg_ref_count = 0;
VP8_COMMON *const cm = &pbi->common;
VP9_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
seg_ref_active = vp9_segfeature_active(xd,
......@@ -498,9 +498,9 @@ static const unsigned char mbsplit_fill_offset[4][16] = {
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
};
static void read_switchable_interp_probs(VP8D_COMP* const pbi,
static void read_switchable_interp_probs(VP9D_COMP* const pbi,
BOOL_DECODER* const bc) {
VP8_COMMON *const cm = &pbi->common;
VP9_COMMON *const cm = &pbi->common;
int i, j;
for (j = 0; j <= VP8_SWITCHABLE_FILTERS; ++j) {
for (i = 0; i < VP8_SWITCHABLE_FILTERS - 1; ++i) {
......@@ -511,8 +511,8 @@ static void read_switchable_interp_probs(VP8D_COMP* const pbi,
//cm->fc.switchable_interp_prob[1]);
}
static void mb_mode_mv_init(VP8D_COMP *pbi, vp8_reader *bc) {
VP8_COMMON *const cm = &pbi->common;
static void mb_mode_mv_init(VP9D_COMP *pbi, vp8_reader *bc) {
VP9_COMMON *const cm = &pbi->common;
nmv_context *const nmvc = &pbi->common.fc.nmvc;
MACROBLOCKD *const xd = &pbi->mb;
......@@ -566,10 +566,10 @@ static void mb_mode_mv_init(VP8D_COMP *pbi, vp8_reader *bc) {
// This function either reads the segment id for the current macroblock from
// the bitstream or if the value is temporally predicted asserts the predicted
// value
static void read_mb_segment_id(VP8D_COMP *pbi,
static void read_mb_segment_id(VP9D_COMP *pbi,
int mb_row, int mb_col,
BOOL_DECODER* const bc) {
VP8_COMMON *const cm = &pbi->common;
VP9_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
MODE_INFO *mi = xd->mode_info_context;
MB_MODE_INFO *mbmi = &mi->mbmi;
......@@ -647,11 +647,11 @@ static void read_mb_segment_id(VP8D_COMP *pbi,
}
}
static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
MODE_INFO *prev_mi,