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

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
......@@ -13,7 +13,7 @@
#define _ENCODEINTRA_H_
#include "onyx_int.h"
int vp9_encode_intra(VP8_COMP *cpi, MACROBLOCK *x, int use_16x16_pred);
int vp9_encode_intra(VP9_COMP *cpi, MACROBLOCK *x, int use_16x16_pred);
void vp9_encode_intra16x16mby(const VP8_ENCODER_RTCD *, MACROBLOCK *x);
void vp9_encode_intra16x16mbuv(const VP8_ENCODER_RTCD *, MACROBLOCK *x);
void vp9_encode_intra4x4mby(const VP8_ENCODER_RTCD *, MACROBLOCK *mb);
......
......@@ -356,7 +356,7 @@ static void add_nmvcount(nmv_context_counts* const dst,
}
#endif
void vp9_write_nmvprobs(VP8_COMP* const cpi, int usehp, vp8_writer* const bc) {
void vp9_write_nmvprobs(VP9_COMP* const cpi, int usehp, vp8_writer* const bc) {
int i, j;
nmv_context prob;
unsigned int branch_ct_joint[MV_JOINTS - 1][2];
......
......@@ -14,7 +14,7 @@
#include "onyx_int.h"
void vp9_write_nmvprobs(VP8_COMP* const, int usehp, vp8_writer* const);
void vp9_write_nmvprobs(VP9_COMP* const, int usehp, vp8_writer* const);
void vp9_encode_nmv(vp8_writer* const w, const MV* const mv,
const MV* const ref, const nmv_context* const mvctx);
void vp9_encode_nmv_fp(vp8_writer* const w, const MV* const mv,
......
......@@ -43,12 +43,12 @@ extern void vp9_build_block_offsets(MACROBLOCK *x);
extern void vp9_setup_block_ptrs(MACROBLOCK *x);
extern void vp9_frame_init_quantizer(VP8_COMP *cpi);
extern void vp9_frame_init_quantizer(VP9_COMP *cpi);
extern void vp9_set_mbmode_and_mvs(MACROBLOCK *x, MB_PREDICTION_MODE mb,
int_mv *mv);
extern void vp9_alloc_compressor_data(VP8_COMP *cpi);
extern void vp9_alloc_compressor_data(VP9_COMP *cpi);
#define IIFACTOR 12.5
#define IIKFACTOR1 12.5
......@@ -65,7 +65,7 @@ extern void vp9_alloc_compressor_data(VP8_COMP *cpi);
#define POW1 (double)cpi->oxcf.two_pass_vbrbias/100.0
#define POW2 (double)cpi->oxcf.two_pass_vbrbias/100.0
static void find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame);
static void find_next_key_frame(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame);
static int select_cq_level(int qindex) {
int ret_val = QINDEX_RANGE - 1;
......@@ -85,11 +85,11 @@ static int select_cq_level(int qindex) {
// Resets the first pass file to the given position using a relative seek from the current position
static void reset_fpf_position(VP8_COMP *cpi, FIRSTPASS_STATS *Position) {
static void reset_fpf_position(VP9_COMP *cpi, FIRSTPASS_STATS *Position) {
cpi->twopass.stats_in = Position;
}
static int lookup_next_frame_stats(VP8_COMP *cpi, FIRSTPASS_STATS *next_frame) {
static int lookup_next_frame_stats(VP9_COMP *cpi, FIRSTPASS_STATS *next_frame) {
if (cpi->twopass.stats_in >= cpi->twopass.stats_in_end)
return EOF;
......@@ -98,7 +98,7 @@ static int lookup_next_frame_stats(VP8_COMP *cpi, FIRSTPASS_STATS *next_frame) {
}
// Read frame stats at an offset from the current position
static int read_frame_stats(VP8_COMP *cpi,
static int read_frame_stats(VP9_COMP *cpi,
FIRSTPASS_STATS *frame_stats,
int offset) {
FIRSTPASS_STATS *fps_ptr = cpi->twopass.stats_in;
......@@ -116,7 +116,7 @@ static int read_frame_stats(VP8_COMP *cpi,
return 1;
}
static int input_stats(VP8_COMP *cpi, FIRSTPASS_STATS *fps) {
static int input_stats(VP9_COMP *cpi, FIRSTPASS_STATS *fps) {
if (cpi->twopass.stats_in >= cpi->twopass.stats_in_end)
return EOF;
......@@ -126,7 +126,7 @@ static int input_stats(VP8_COMP *cpi, FIRSTPASS_STATS *fps) {
return 1;
}
static void output_stats(const VP8_COMP *cpi,
static void output_stats(const VP9_COMP *cpi,
struct vpx_codec_pkt_list *pktlist,
FIRSTPASS_STATS *stats) {
struct vpx_codec_cx_pkt pkt;
......@@ -258,7 +258,7 @@ static void avg_stats(FIRSTPASS_STATS *section) {
}
// Calculate a modified Error used in distributing bits between easier and harder frames
static double calculate_modified_err(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) {
static double calculate_modified_err(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
double av_err = (cpi->twopass.total_stats->ssim_weighted_pred_err /
cpi->twopass.total_stats->count);
double this_err = this_frame->ssim_weighted_pred_err;
......@@ -332,7 +332,7 @@ static double simple_weight(YV12_BUFFER_CONFIG *source) {
// This function returns the current per frame maximum bitrate target
static int frame_max_bits(VP8_COMP *cpi) {
static int frame_max_bits(VP9_COMP *cpi) {
// Max allocation for a single frame based on the max section guidelines passed in and how many bits are left
int max_bits;
......@@ -346,15 +346,15 @@ static int frame_max_bits(VP8_COMP *cpi) {
return max_bits;
}
void vp9_init_first_pass(VP8_COMP *cpi) {
void vp9_init_first_pass(VP9_COMP *cpi) {
zero_stats(cpi->twopass.total_stats);
}
void vp9_end_first_pass(VP8_COMP *cpi) {
void vp9_end_first_pass(VP9_COMP *cpi) {
output_stats(cpi, cpi->output_pkt_list, cpi->twopass.total_stats);
}
static void zz_motion_search(VP8_COMP *cpi, MACROBLOCK *x, YV12_BUFFER_CONFIG *recon_buffer, int *best_motion_err, int recon_yoffset) {
static void zz_motion_search(VP9_COMP *cpi, MACROBLOCK *x, YV12_BUFFER_CONFIG *recon_buffer, int *best_motion_err, int recon_yoffset) {
MACROBLOCKD *const xd = &x->e_mbd;
BLOCK *b = &x->block[0];
BLOCKD *d = &x->e_mbd.block[0];
......@@ -373,7 +373,7 @@ static void zz_motion_search(VP8_COMP *cpi, MACROBLOCK *x, YV12_BUFFER_CONFIG *r
(unsigned int *)(best_motion_err));
}
static void first_pass_motion_search(VP8_COMP *cpi, MACROBLOCK *x,
static void first_pass_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
int_mv *ref_mv, MV *best_mv,
YV12_BUFFER_CONFIG *recon_buffer,
int *best_motion_err, int recon_yoffset) {
......@@ -440,10 +440,10 @@ static void first_pass_motion_search(VP8_COMP *cpi, MACROBLOCK *x,
}
}
void vp9_first_pass(VP8_COMP *cpi) {
void vp9_first_pass(VP9_COMP *cpi) {
int mb_row, mb_col;
MACROBLOCK *const x = &cpi->mb;
VP8_COMMON *const cm = &cpi->common;
VP9_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
int recon_yoffset, recon_uvoffset;
......@@ -807,7 +807,7 @@ static double bitcost(double prob) {
return -(log(prob) / log(2.0));
}
static long long estimate_modemvcost(VP8_COMP *cpi,
static long long estimate_modemvcost(VP9_COMP *cpi,
FIRSTPASS_STATS *fpstats) {
int mv_cost;
int mode_cost;
......@@ -871,7 +871,7 @@ static double calc_correction_factor(double err_per_mb,
// PGW TODO..
// This code removes direct dependency on QIndex to determin the range
// (now uses the actual quantizer) but has not been tuned.
static void adjust_maxq_qrange(VP8_COMP *cpi) {
static void adjust_maxq_qrange(VP9_COMP *cpi) {
int i;
double q;
......@@ -894,7 +894,7 @@ static void adjust_maxq_qrange(VP8_COMP *cpi) {
}
}
static int estimate_max_q(VP8_COMP *cpi,
static int estimate_max_q(VP9_COMP *cpi,
FIRSTPASS_STATS *fpstats,
int section_target_bandwitdh,
int overhead_bits) {
......@@ -1020,7 +1020,7 @@ static int estimate_max_q(VP8_COMP *cpi,
// For cq mode estimate a cq level that matches the observed
// complexity and data rate.
static int estimate_cq(VP8_COMP *cpi,
static int estimate_cq(VP9_COMP *cpi,
FIRSTPASS_STATS *fpstats,
int section_target_bandwitdh,
int overhead_bits) {
......@@ -1116,9 +1116,9 @@ static int estimate_cq(VP8_COMP *cpi,
}
extern void vp9_new_frame_rate(VP8_COMP *cpi, double framerate);
extern void vp9_new_frame_rate(VP9_COMP *cpi, double framerate);
void vp9_init_second_pass(VP8_COMP *cpi) {
void vp9_init_second_pass(VP9_COMP *cpi) {
FIRSTPASS_STATS this_frame;
FIRSTPASS_STATS *start_pos;
......@@ -1200,12 +1200,12 @@ void vp9_init_second_pass(VP8_COMP *cpi) {
}
}
void vp9_end_second_pass(VP8_COMP *cpi) {
void vp9_end_second_pass(VP9_COMP *cpi) {
}
// This function gives and estimate of how badly we believe
// the prediction quality is decaying from frame to frame.
static double get_prediction_decay_rate(VP8_COMP *cpi,
static double get_prediction_decay_rate(VP9_COMP *cpi,
FIRSTPASS_STATS *next_frame) {
double prediction_decay_rate;
double second_ref_decay;
......@@ -1236,7 +1236,7 @@ static double get_prediction_decay_rate(VP8_COMP *cpi,
// by a static section. For example in slide shows where there is a fade
// between slides. This is to help with more optimal kf and gf positioning.
static int detect_transition_to_still(
VP8_COMP *cpi,
VP9_COMP *cpi,
int frame_interval,
int still_interval,
double loop_decay_rate,
......@@ -1279,7 +1279,7 @@ static int detect_transition_to_still(
// This function detects a flash through the high relative pcnt_second_ref
// score in the frame following a flash frame. The offset passed in should
// reflect this
static BOOL detect_flash(VP8_COMP *cpi, int offset) {
static BOOL detect_flash(VP9_COMP *cpi, int offset) {
FIRSTPASS_STATS next_frame;
BOOL flash_detected = FALSE;
......@@ -1303,7 +1303,7 @@ static BOOL detect_flash(VP8_COMP *cpi, int offset) {
// Update the motion related elements to the GF arf boost calculation
static void accumulate_frame_motion_stats(
VP8_COMP *cpi,
VP9_COMP *cpi,
FIRSTPASS_STATS *this_frame,
double *this_frame_mv_in_out,
double *mv_in_out_accumulator,
......@@ -1347,7 +1347,7 @@ static void accumulate_frame_motion_stats(
// Calculate a baseline boost number for the current frame.
static double calc_frame_boost(
VP8_COMP *cpi,
VP9_COMP *cpi,
FIRSTPASS_STATS *this_frame,
double this_frame_mv_in_out) {
double frame_boost;
......@@ -1378,7 +1378,7 @@ static double calc_frame_boost(
}
static int calc_arf_boost(
VP8_COMP *cpi,
VP9_COMP *cpi,
int offset,
int f_frames,
int b_frames,
......@@ -1471,7 +1471,7 @@ static int calc_arf_boost(
return arf_boost;
}
static void configure_arnr_filter(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) {
static void configure_arnr_filter(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
int half_gf_int;
int frames_after_arf;
int frames_bwd = cpi->oxcf.arnr_max_frames - 1;
......@@ -1523,7 +1523,7 @@ static void configure_arnr_filter(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) {
}
// Analyse and define a gf/arf group .
static void define_gf_group(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) {
static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
FIRSTPASS_STATS next_frame;
FIRSTPASS_STATS *start_pos;
int i;
......@@ -1879,7 +1879,7 @@ static void define_gf_group(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) {
}
// Allocate bits to a normal frame that is neither a gf an arf or a key frame.
static void assign_std_frame_bits(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) {
static void assign_std_frame_bits(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
int target_frame_size; // gf_group_error_left
double modified_err;
......@@ -1952,7 +1952,7 @@ static int adjust_active_maxq(int old_maxqi, int new_maxqi) {
return ret_val;
}
void vp9_second_pass(VP8_COMP *cpi) {
void vp9_second_pass(VP9_COMP *cpi) {
int tmp_q;
int frames_left = (int)(cpi->twopass.total_stats->count - cpi->common.current_video_frame);
......@@ -2107,7 +2107,7 @@ void vp9_second_pass(VP8_COMP *cpi) {
}
static BOOL test_candidate_kf(VP8_COMP *cpi, FIRSTPASS_STATS *last_frame, FIRSTPASS_STATS *this_frame, FIRSTPASS_STATS *next_frame) {
static BOOL test_candidate_kf(VP9_COMP *cpi, FIRSTPASS_STATS *last_frame, FIRSTPASS_STATS *this_frame, FIRSTPASS_STATS *next_frame) {
BOOL is_viable_kf = FALSE;
// Does the frame satisfy the primary criteria of a key frame
......@@ -2190,7 +2190,7 @@ static BOOL test_candidate_kf(VP8_COMP *cpi, FIRSTPASS_STATS *last_frame, FIRST
return is_viable_kf;
}
static void find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) {
static void find_next_key_frame(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
int i, j;
FIRSTPASS_STATS last_frame;
FIRSTPASS_STATS first_frame;
......
......@@ -12,13 +12,13 @@
#if !defined __INC_FIRSTPASS_H
#define __INC_FIRSTPASS_H
extern void vp9_init_first_pass(VP8_COMP *cpi);
extern void vp9_first_pass(VP8_COMP *cpi);
extern void vp9_end_first_pass(VP8_COMP *cpi);
extern void vp9_init_first_pass(VP9_COMP *cpi);
extern void vp9_first_pass(VP9_COMP *cpi);
extern void vp9_end_first_pass(VP9_COMP *cpi);
extern void vp9_init_second_pass(VP8_COMP *cpi);
extern void vp9_second_pass(VP8_COMP *cpi);
extern void vp9_end_second_pass(VP8_COMP *cpi);
extern void vp9_init_second_pass(VP9_COMP *cpi);
extern void vp9_second_pass(VP9_COMP *cpi);
extern void vp9_end_second_pass(VP9_COMP *cpi);
extern size_t vp8_firstpass_stats_sz(unsigned int mb_count);
#endif
......@@ -14,8 +14,8 @@
#include "vp8/encoder/onyx_int.h"
void vp9_arch_x86_encoder_init(VP8_COMP *cpi);
void vp8_arch_arm_encoder_init(VP8_COMP *cpi);
void vp9_arch_x86_encoder_init(VP9_COMP *cpi);
void vp8_arch_arm_encoder_init(VP9_COMP *cpi);
void (*vp9_yv12_copy_partial_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc,
YV12_BUFFER_CONFIG *dst_ybc,
......@@ -24,7 +24,7 @@ extern void vp9_yv12_copy_partial_frame(YV12_BUFFER_CONFIG *src_ybc,
YV12_BUFFER_CONFIG *dst_ybc,
int fraction);
void vp9_cmachine_specific_config(VP8_COMP *cpi) {
void vp9_cmachine_specific_config(VP9_COMP *cpi) {
#if CONFIG_RUNTIME_CPU_DETECT
cpi->rtcd.common = &cpi->common.rtcd;
......
......@@ -20,7 +20,7 @@
static unsigned int do_16x16_motion_iteration
(
VP8_COMP *cpi,
VP9_COMP *cpi,
int_mv *ref_mv,
int_mv *dst_mv
) {
......@@ -97,7 +97,7 @@ static unsigned int do_16x16_motion_iteration
static int do_16x16_motion_search
(
VP8_COMP *cpi,
VP9_COMP *cpi,
int_mv *ref_mv,
int_mv *dst_mv,
YV12_BUFFER_CONFIG *buf,
......@@ -158,7 +158,7 @@ static int do_16x16_motion_search
static int do_16x16_zerozero_search
(
VP8_COMP *cpi,
VP9_COMP *cpi,
int_mv *dst_mv,
YV12_BUFFER_CONFIG *buf,
int buf_mb_y_offset,
......@@ -197,7 +197,7 @@ static int do_16x16_zerozero_search
}
static int find_best_16x16_intra
(
VP8_COMP *cpi,
VP9_COMP *cpi,
YV12_BUFFER_CONFIG *buf,
int mb_y_offset,
MB_PREDICTION_MODE *pbest_mode
......@@ -231,7 +231,7 @@ static int find_best_16x16_intra
static void update_mbgraph_mb_stats
(
VP8_COMP *cpi,
VP9_COMP *cpi,
MBGRAPH_MB_STATS *stats,
YV12_BUFFER_CONFIG *buf,
int mb_y_offset,
......@@ -289,14 +289,14 @@ static void update_mbgraph_mb_stats
static void update_mbgraph_frame_stats
(
VP8_COMP *cpi,
VP9_COMP *cpi,
MBGRAPH_FRAME_STATS *stats,
YV12_BUFFER_CONFIG *buf,
YV12_BUFFER_CONFIG *golden_ref,
YV12_BUFFER_CONFIG *alt_ref
) {
MACROBLOCK *const x = &cpi->mb;
VP8_COMMON *const cm = &cpi->common;
VP9_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
int mb_col, mb_row, offset = 0;
int mb_y_offset = 0, arf_y_offset = 0, gld_y_offset = 0;
......@@ -358,8 +358,8 @@ static void update_mbgraph_frame_stats
}
// void separate_arf_mbs_byzz
static void separate_arf_mbs(VP8_COMP *cpi) {
VP8_COMMON *const cm = &cpi->common;
static void separate_arf_mbs(VP9_COMP *cpi) {
VP9_COMMON *const cm = &cpi->common;
int mb_col, mb_row, offset, i;
int ncnt[4];
int n_frames = cpi->mbgraph_n_frames;
......@@ -428,10 +428,10 @@ static void separate_arf_mbs(VP8_COMP *cpi) {
cpi->static_mb_pct = 0;
cpi->seg0_cnt = ncnt[0];
vp9_enable_segmentation((VP8_PTR) cpi);
vp9_enable_segmentation((VP9_PTR) cpi);
} else {
cpi->static_mb_pct = 0;
vp9_disable_segmentation((VP8_PTR) cpi);
vp9_disable_segmentation((VP9_PTR) cpi);
}
// Free localy allocated storage
......@@ -440,9 +440,9 @@ static void separate_arf_mbs(VP8_COMP *cpi) {
void vp9_update_mbgraph_stats
(
VP8_COMP *cpi
VP9_COMP *cpi
) {
VP8_COMMON *const cm = &cpi->common;
VP9_COMMON *const cm = &cpi->common;
int i, n_frames = vp9_lookahead_depth(cpi->lookahead);
YV12_BUFFER_CONFIG *golden_ref = &cm->yv12_fb[cm->gld_fb_idx];
......
......@@ -11,6 +11,6 @@
#ifndef __INC_MBGRAPH_H__
#define __INC_MBGRAPH_H__ 1
extern void vp9_update_mbgraph_stats(VP8_COMP *cpi);
extern void vp9_update_mbgraph_stats(VP9_COMP *cpi);
#endif /* __INC_MBGRAPH_H__ */
......@@ -1512,7 +1512,7 @@ int vp9_diamond_search_sadx4(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
/* do_refine: If last step (1-away) of n-step search doesn't pick the center
point as the best match, we will do a final 1-away diamond
refining search */
int vp9_full_pixel_diamond(VP8_COMP *cpi, MACROBLOCK *x, BLOCK *b,
int vp9_full_pixel_diamond(VP9_COMP *cpi, MACROBLOCK *x, BLOCK *b,
BLOCKD *d, int_mv *mvp_full, int step_param,
int sadpb, int further_steps,
int do_refine, vp8_variance_fn_ptr_t *fn_ptr,
......
......@@ -38,8 +38,8 @@ extern int vp9_mv_bit_cost(int_mv *mv, int_mv *ref, DEC_MVCOSTS,
extern void vp9_init_dsmotion_compensation(MACROBLOCK *x, int stride);
extern void vp9_init3smotion_compensation(MACROBLOCK *x, int stride);
// Runs sequence of diamond searches in smaller steps for RD
struct VP8_COMP;
int vp9_full_pixel_diamond(struct VP8_COMP *cpi, MACROBLOCK *x, BLOCK *b,
struct VP9_COMP;
int vp9_full_pixel_diamond(struct VP9_COMP *cpi, MACROBLOCK *x, BLOCK *b,
BLOCKD *d, int_mv *mvp_full, int step_param,
int sadpb, int further_steps, int do_refine,
vp8_variance_fn_ptr_t *fn_ptr,
......
......@@ -15,8 +15,8 @@
#include "vp8/common/entropymode.h"
void vp9_init_mode_costs(VP8_COMP *c) {
VP8_COMMON *x = &c->common;
void vp9_init_mode_costs(VP9_COMP *c) {
VP9_COMMON *x = &c->common;
const vp8_tree_p T = vp9_bmode_tree;
int i, j;
......
......@@ -12,6 +12,6 @@
#ifndef __INC_MODECOSTS_H
#define __INC_MODECOSTS_H
void vp9_init_mode_costs(VP8_COMP *x);
void vp9_init_mode_costs(VP9_COMP *x);
#endif
This diff is collapsed.
......@@ -348,7 +348,7 @@ typedef struct {
typedef struct VP8_ENCODER_RTCD {
VP8_COMMON_RTCD *common;
VP9_COMMON_RTCD *common;
vp8_search_rtcd_vtable_t search;
vp8_temporal_rtcd_vtable_t temporal;
} VP8_ENCODER_RTCD;
......@@ -364,7 +364,7 @@ enum BlockSize {
BLOCK_MAX_SB_SEGMENTS,
};
typedef struct VP8_COMP {
typedef struct VP9_COMP {
DECLARE_ALIGNED(16, short, Y1quant[QINDEX_RANGE][16]);
DECLARE_ALIGNED(16, unsigned char, Y1quant_shift[QINDEX_RANGE][16]);
......@@ -400,7 +400,7 @@ typedef struct VP8_COMP {
DECLARE_ALIGNED(16, short, zrun_zbin_boost_uv_16x16[QINDEX_RANGE][256]);
MACROBLOCK mb;
VP8_COMMON common;
VP9_COMMON common;
VP8_CONFIG oxcf;
struct lookahead_ctx *lookahead;
......@@ -755,19 +755,19 @@ typedef struct VP8_COMP {
unsigned int best_ref_index_counts[MAX_REF_FRAMES][MAX_MV_REFS];
#endif
} VP8_COMP;
} VP9_COMP;
void vp9_encode_frame(VP8_COMP *cpi);
void vp9_encode_frame(VP9_COMP *cpi);
void vp9_pack_bitstream(VP8_COMP *cpi, unsigned char *dest,
void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
unsigned long *size);
void vp9_activity_masking(VP8_COMP *cpi, MACROBLOCK *x);
void vp9_activity_masking(VP9_COMP *cpi, MACROBLOCK *x);
void vp9_tokenize_mb(VP8_COMP *, MACROBLOCKD *, TOKENEXTRA **, int dry_run);
void vp9_stuff_mb(VP8_COMP *cpi, MACROBLOCKD *xd, TOKENEXTRA **t, int dry_run);
void vp9_tokenize_mb(VP9_COMP *, MACROBLOCKD *, TOKENEXTRA **, int dry_run);
void vp9_stuff_mb(VP9_COMP *cpi, MACROBLOCKD *xd, TOKENEXTRA **t, int dry_run);
void vp9_set_speed_features(VP8_COMP *cpi);
void vp9_set_speed_features(VP9_COMP *cpi);
#if CONFIG_DEBUG
#define CHECK_MEM_ERROR(lval,expr) do {\
......
......@@ -102,7 +102,7 @@ static int vp8_calc_partial_ssl_err(YV12_BUFFER_CONFIG *source,
}
// Enforce a minimum filter level based upon baseline Q
static int get_min_filter_level(VP8_COMP *cpi, int base_qindex) {
static int get_min_filter_level(VP9_COMP *cpi, int base_qindex) {
int min_filter_level;
/*int q = (int) vp9_convert_qindex_to_q(base_qindex);
......@@ -124,7 +124,7 @@ static int get_min_filter_level(VP8_COMP *cpi, int base_qindex) {
}
// Enforce a maximum filter level based upon baseline Q
static int get_max_filter_level(VP8_COMP *cpi, int base_qindex) {
static int get_max_filter_level(VP9_COMP *cpi, int base_qindex) {
// PGW August 2006: Highest filter values almost always a bad idea
// jbb chg: 20100118 - not so any more with this overquant stuff allow high values
......@@ -138,8 +138,8 @@ static int get_max_filter_level(VP8_COMP *cpi, int base_qindex) {
return max_filter_level;
}
void vp9_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi) {
VP8_COMMON *cm = &cpi->common;
void vp9_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi) {
VP9_COMMON *cm = &cpi->common;
int best_err = 0;
int filt_err = 0;
......@@ -245,11 +245,11 @@ void vp9_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi) {
}
// Stub function for now Alt LF not used
void vp9_set_alt_lf_level(VP8_COMP *cpi, int filt_val) {
void vp9_set_alt_lf_level(VP9_COMP *cpi, int filt_val) {
}
void vp9_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi) {
VP8_COMMON *cm = &cpi->common;
void vp9_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi) {
VP9_COMMON *cm = &cpi->common;
int best_err = 0;
int filt_err = 0;
......
......@@ -367,7 +367,7 @@ static void invert_quant(short *quant,
*shift = l;
}
void vp9_init_quantizer(VP8_COMP *cpi) {
void vp9_init_quantizer(VP9_COMP *cpi) {
int i;
int quant_val;
int Q;
......@@ -531,7 +531,7 @@ void vp9_init_quantizer(VP8_COMP *cpi) {
}
}
void vp9_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x) {
void vp9_mb_init_quantizer(VP9_COMP *cpi, MACROBLOCK *x) {
int i;
int QIndex;
MACROBLOCKD *xd = &x->e_mbd;
......@@ -655,7 +655,7 @@ void vp9_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x) {
x->e_mbd.q_index = QIndex;
}
void vp9_update_zbin_extra(VP8_COMP *cpi, MACROBLOCK *x) {
void vp9_update_zbin_extra(VP9_COMP *cpi, MACROBLOCK *x) {
int i;
int QIndex = x->e_mbd.q_index;
int zbin_extra;
......@@ -688,7 +688,7 @@ void vp9_update_zbin_extra(VP8_COMP *cpi, MACROBLOCK *x) {
x->block[24].zbin_extra = (short)zbin_extra;
}
void vp9_frame_init_quantizer(VP8_COMP *cpi) {