Commit 26a9afc3 authored by Yaowu Xu's avatar Yaowu Xu

VP9_COMP -> VP10_COMP

Change-Id: I83b5c69621f9f28b742e5b13517d4e5b99c6cd26
parent fc7cbd1f
......@@ -43,7 +43,7 @@ static int get_aq_c_strength(int q_index, vpx_bit_depth_t bit_depth) {
return (base_quant > 10) + (base_quant > 25);
}
void vp10_setup_in_frame_q_adj(VP9_COMP *cpi) {
void vp10_setup_in_frame_q_adj(VP10_COMP *cpi) {
VP10_COMMON *const cm = &cpi->common;
struct segmentation *const seg = &cm->seg;
......@@ -110,7 +110,7 @@ void vp10_setup_in_frame_q_adj(VP9_COMP *cpi) {
// Select a segment for the current block.
// The choice of segment for a block depends on the ratio of the projected
// 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,
void vp10_caq_select_segment(VP10_COMP *cpi, MACROBLOCK *mb, BLOCK_SIZE bs,
int mi_row, int mi_col, int projected_rate) {
VP10_COMMON *const cm = &cpi->common;
......
......@@ -18,17 +18,17 @@ extern "C" {
#include "vp10/common/enums.h"
struct VP9_COMP;
struct VP10_COMP;
struct macroblock;
// Select a segment for the current Block.
void vp10_caq_select_segment(struct VP9_COMP *cpi, struct macroblock *,
void vp10_caq_select_segment(struct VP10_COMP *cpi, struct macroblock *,
BLOCK_SIZE bs,
int mi_row, int mi_col, int projected_rate);
// This function sets up a set of segments with delta Q values around
// the baseline frame quantizer.
void vp10_setup_in_frame_q_adj(struct VP9_COMP *cpi);
void vp10_setup_in_frame_q_adj(struct VP10_COMP *cpi);
#ifdef __cplusplus
} // extern "C"
......
......@@ -137,7 +137,7 @@ static int candidate_refresh_aq(const CYCLIC_REFRESH *cr,
}
// Compute delta-q for the segment.
static int compute_deltaq(const VP9_COMP *cpi, int q, double rate_factor) {
static int compute_deltaq(const VP10_COMP *cpi, int q, double rate_factor) {
const CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
const RATE_CONTROL *const rc = &cpi->rc;
int deltaq = vp10_compute_qdelta_by_rate(rc, cpi->common.frame_type,
......@@ -153,7 +153,7 @@ static int compute_deltaq(const VP9_COMP *cpi, int q, double rate_factor) {
// from non-base segment. For now ignore effect of multiple segments
// (with different delta-q). Note this function is called in the postencode
// (called from rc_update_rate_correction_factors()).
int vp10_cyclic_refresh_estimate_bits_at_q(const VP9_COMP *cpi,
int vp10_cyclic_refresh_estimate_bits_at_q(const VP10_COMP *cpi,
double correction_factor) {
const VP10_COMMON *const cm = &cpi->common;
const CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
......@@ -184,7 +184,7 @@ int vp10_cyclic_refresh_estimate_bits_at_q(const VP9_COMP *cpi,
// rc_regulate_q() to set the base qp index.
// Note: the segment map is set to either 0/CR_SEGMENT_ID_BASE (no refresh) or
// 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,
int vp10_cyclic_refresh_rc_bits_per_mb(const VP10_COMP *cpi, int i,
double correction_factor) {
const VP10_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
......@@ -209,7 +209,7 @@ int vp10_cyclic_refresh_rc_bits_per_mb(const VP9_COMP *cpi, int i,
// Prior to coding a given prediction block, of size bsize at (mi_row, mi_col),
// check if we should reset the segment_id, and update the cyclic_refresh map
// and segmentation map.
void vp10_cyclic_refresh_update_segment(VP9_COMP *const cpi,
void vp10_cyclic_refresh_update_segment(VP10_COMP *const cpi,
MB_MODE_INFO *const mbmi,
int mi_row, int mi_col,
BLOCK_SIZE bsize,
......@@ -273,7 +273,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) {
void vp10_cyclic_refresh_postencode(VP10_COMP *const cpi) {
VP10_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
unsigned char *const seg_map = cpi->segmentation_map;
......@@ -292,7 +292,7 @@ void vp10_cyclic_refresh_postencode(VP9_COMP *const cpi) {
}
// Set golden frame update interval, for non-svc 1 pass CBR mode.
void vp10_cyclic_refresh_set_golden_update(VP9_COMP *const cpi) {
void vp10_cyclic_refresh_set_golden_update(VP10_COMP *const cpi) {
RATE_CONTROL *const rc = &cpi->rc;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
// Set minimum gf_interval for GF update to a multiple (== 2) of refresh
......@@ -308,7 +308,7 @@ void vp10_cyclic_refresh_set_golden_update(VP9_COMP *const cpi) {
// background has high motion, refresh the golden frame. Otherwise, if the
// 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) {
void vp10_cyclic_refresh_check_golden_update(VP10_COMP *const cpi) {
VP10_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
int mi_row, mi_col;
......@@ -380,7 +380,7 @@ void vp10_cyclic_refresh_check_golden_update(VP9_COMP *const cpi) {
// 1/CR_SEGMENT_ID_BOOST1 (refresh) for each superblock.
// 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) {
static void cyclic_refresh_update_map(VP10_COMP *const cpi) {
VP10_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
unsigned char *const seg_map = cpi->segmentation_map;
......@@ -449,7 +449,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) {
void vp10_cyclic_refresh_update_parameters(VP10_COMP *const cpi) {
const RATE_CONTROL *const rc = &cpi->rc;
const VP10_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
......@@ -475,7 +475,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) {
void vp10_cyclic_refresh_setup(VP10_COMP *const cpi) {
VP10_COMMON *const cm = &cpi->common;
const RATE_CONTROL *const rc = &cpi->rc;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
......@@ -559,7 +559,7 @@ int vp10_cyclic_refresh_get_rdmult(const CYCLIC_REFRESH *cr) {
return cr->rdmult;
}
void vp10_cyclic_refresh_reset_resize(VP9_COMP *const cpi) {
void vp10_cyclic_refresh_reset_resize(VP10_COMP *const cpi) {
const VP10_COMMON *const cm = &cpi->common;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
memset(cr->map, 0, cm->mi_rows * cm->mi_cols);
......
......@@ -27,7 +27,7 @@ extern "C" {
// Maximum rate target ratio for setting segment delta-qp.
#define CR_MAX_RATE_TARGET_RATIO 4.0
struct VP9_COMP;
struct VP10_COMP;
struct CYCLIC_REFRESH;
typedef struct CYCLIC_REFRESH CYCLIC_REFRESH;
......@@ -38,44 +38,44 @@ void vp10_cyclic_refresh_free(CYCLIC_REFRESH *cr);
// Estimate the bits, incorporating the delta-q from segment 1, after encoding
// the frame.
int vp10_cyclic_refresh_estimate_bits_at_q(const struct VP9_COMP *cpi,
int vp10_cyclic_refresh_estimate_bits_at_q(const struct VP10_COMP *cpi,
double correction_factor);
// Estimate the bits per mb, for a given q = i and a corresponding delta-q
// (for segment 1), prior to encoding the frame.
int vp10_cyclic_refresh_rc_bits_per_mb(const struct VP9_COMP *cpi, int i,
int vp10_cyclic_refresh_rc_bits_per_mb(const struct VP10_COMP *cpi, int i,
double correction_factor);
// Prior to coding a given prediction block, of size bsize at (mi_row, mi_col),
// check if we should reset the segment_id, and update the cyclic_refresh map
// and segmentation map.
void vp10_cyclic_refresh_update_segment(struct VP9_COMP *const cpi,
void vp10_cyclic_refresh_update_segment(struct VP10_COMP *const cpi,
MB_MODE_INFO *const mbmi,
int mi_row, int mi_col, BLOCK_SIZE bsize,
int64_t rate, int64_t dist, int skip);
// Update the segmentation map, and related quantities: cyclic refresh map,
// refresh sb_index, and target number of blocks to be refreshed.
void vp10_cyclic_refresh_update__map(struct VP9_COMP *const cpi);
void vp10_cyclic_refresh_update__map(struct VP10_COMP *const cpi);
// Update the actual number of blocks that were applied the segment delta q.
void vp10_cyclic_refresh_postencode(struct VP9_COMP *const cpi);
void vp10_cyclic_refresh_postencode(struct VP10_COMP *const cpi);
// Set golden frame update interval, for non-svc 1 pass CBR mode.
void vp10_cyclic_refresh_set_golden_update(struct VP9_COMP *const cpi);
void vp10_cyclic_refresh_set_golden_update(struct VP10_COMP *const cpi);
// Check if we should not update golden reference, based on past refresh stats.
void vp10_cyclic_refresh_check_golden_update(struct VP9_COMP *const cpi);
void vp10_cyclic_refresh_check_golden_update(struct VP10_COMP *const cpi);
// Set/update global/frame level refresh parameters.
void vp10_cyclic_refresh_update_parameters(struct VP9_COMP *const cpi);
void vp10_cyclic_refresh_update_parameters(struct VP10_COMP *const cpi);
// Setup cyclic background refresh: set delta q and segmentation map.
void vp10_cyclic_refresh_setup(struct VP9_COMP *const cpi);
void vp10_cyclic_refresh_setup(struct VP10_COMP *const cpi);
int vp10_cyclic_refresh_get_rdmult(const CYCLIC_REFRESH *cr);
void vp10_cyclic_refresh_reset_resize(struct VP9_COMP *const cpi);
void vp10_cyclic_refresh_reset_resize(struct VP10_COMP *const cpi);
static INLINE int cyclic_refresh_segment_id_boosted(int segment_id) {
return segment_id == CR_SEGMENT_ID_BOOST1 ||
......
......@@ -42,7 +42,7 @@ unsigned int vp10_vaq_segment_id(int energy) {
return SEGMENT_ID(energy);
}
void vp10_vaq_frame_setup(VP9_COMP *cpi) {
void vp10_vaq_frame_setup(VP10_COMP *cpi) {
VP10_COMMON *cm = &cpi->common;
struct segmentation *seg = &cm->seg;
int i;
......@@ -137,7 +137,7 @@ static void aq_highbd_8_variance(const uint8_t *a8, int a_stride,
}
#endif // CONFIG_VP9_HIGHBITDEPTH
static unsigned int block_variance(VP9_COMP *cpi, MACROBLOCK *x,
static unsigned int block_variance(VP10_COMP *cpi, MACROBLOCK *x,
BLOCK_SIZE bs) {
MACROBLOCKD *xd = &x->e_mbd;
unsigned int var, sse;
......@@ -188,14 +188,14 @@ static unsigned int block_variance(VP9_COMP *cpi, MACROBLOCK *x,
}
}
double vp10_log_block_var(VP9_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs) {
double vp10_log_block_var(VP10_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs) {
unsigned int var = block_variance(cpi, x, bs);
vpx_clear_system_state();
return log(var + 1.0);
}
#define DEFAULT_E_MIDPOINT 10.0
int vp10_block_energy(VP9_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs) {
int vp10_block_energy(VP10_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs) {
double energy;
double energy_midpoint;
vpx_clear_system_state();
......
......@@ -19,10 +19,10 @@ extern "C" {
#endif
unsigned int vp10_vaq_segment_id(int energy);
void vp10_vaq_frame_setup(VP9_COMP *cpi);
void vp10_vaq_frame_setup(VP10_COMP *cpi);
int vp10_block_energy(VP9_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs);
double vp10_log_block_var(VP9_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs);
int vp10_block_energy(VP10_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs);
double vp10_log_block_var(VP10_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs);
#ifdef __cplusplus
} // extern "C"
......
......@@ -234,7 +234,7 @@ static void write_ref_frames(const VP10_COMMON *cm, const MACROBLOCKD *xd,
}
}
static void pack_inter_mode_mvs(VP9_COMP *cpi, const MODE_INFO *mi,
static void pack_inter_mode_mvs(VP10_COMP *cpi, const MODE_INFO *mi,
vpx_writer *w) {
VP10_COMMON *const cm = &cpi->common;
const nmv_context *nmvc = &cm->fc->nmvc;
......@@ -374,7 +374,7 @@ static void write_mb_modes_kf(const VP10_COMMON *cm, const MACROBLOCKD *xd,
write_intra_mode(w, mbmi->uv_mode, vp10_kf_uv_mode_prob[mbmi->mode]);
}
static void write_modes_b(VP9_COMP *cpi, const TileInfo *const tile,
static void write_modes_b(VP10_COMP *cpi, const TileInfo *const tile,
vpx_writer *w, TOKENEXTRA **tok,
const TOKENEXTRA *const tok_end,
int mi_row, int mi_col) {
......@@ -424,7 +424,7 @@ static void write_partition(const VP10_COMMON *const cm,
}
}
static void write_modes_sb(VP9_COMP *cpi,
static void write_modes_sb(VP10_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) {
......@@ -482,7 +482,7 @@ static void write_modes_sb(VP9_COMP *cpi,
update_partition_context(xd, mi_row, mi_col, subsize, bsize);
}
static void write_modes(VP9_COMP *cpi,
static void write_modes(VP10_COMP *cpi,
const TileInfo *const tile, vpx_writer *w,
TOKENEXTRA **tok, const TOKENEXTRA *const tok_end) {
const VP10_COMMON *const cm = &cpi->common;
......@@ -501,7 +501,7 @@ static void write_modes(VP9_COMP *cpi,
}
}
static void build_tree_distribution(VP9_COMP *cpi, TX_SIZE tx_size,
static void build_tree_distribution(VP10_COMP *cpi, TX_SIZE tx_size,
vp10_coeff_stats *coef_branch_ct,
vp10_coeff_probs_model *coef_probs) {
vp10_coeff_count *coef_counts = cpi->td.rd_counts.coef_counts[tx_size];
......@@ -528,7 +528,7 @@ static void build_tree_distribution(VP9_COMP *cpi, TX_SIZE tx_size,
}
}
static void update_coef_probs_common(vpx_writer* const bc, VP9_COMP *cpi,
static void update_coef_probs_common(vpx_writer* const bc, VP10_COMP *cpi,
TX_SIZE tx_size,
vp10_coeff_stats *frame_branch_ct,
vp10_coeff_probs_model *new_coef_probs) {
......@@ -673,7 +673,7 @@ static void update_coef_probs_common(vpx_writer* const bc, VP9_COMP *cpi,
}
}
static void update_coef_probs(VP9_COMP *cpi, vpx_writer* w) {
static void update_coef_probs(VP10_COMP *cpi, vpx_writer* w) {
const TX_MODE tx_mode = cpi->common.tx_mode;
const TX_SIZE max_tx_size = tx_mode_to_biggest_tx_size[tx_mode];
TX_SIZE tx_size;
......@@ -900,7 +900,7 @@ static void write_tile_info(const VP10_COMMON *const cm,
vpx_wb_write_bit(wb, cm->log2_tile_rows != 1);
}
static int get_refresh_mask(VP9_COMP *cpi) {
static int get_refresh_mask(VP10_COMP *cpi) {
if (vp10_preserve_existing_gf(cpi)) {
// We have decided to preserve the previously existing golden frame as our
// new ARF frame. However, in the short term we leave it in the GF slot and,
......@@ -926,7 +926,7 @@ static int get_refresh_mask(VP9_COMP *cpi) {
}
}
static size_t encode_tiles(VP9_COMP *cpi, uint8_t *data_ptr) {
static size_t encode_tiles(VP10_COMP *cpi, uint8_t *data_ptr) {
VP10_COMMON *const cm = &cpi->common;
vpx_writer residual_bc;
int tile_row, tile_col;
......@@ -987,7 +987,7 @@ static void write_frame_size(const VP10_COMMON *cm,
write_display_size(cm, wb);
}
static void write_frame_size_with_refs(VP9_COMP *cpi,
static void write_frame_size_with_refs(VP10_COMP *cpi,
struct vpx_write_bit_buffer *wb) {
VP10_COMMON *const cm = &cpi->common;
int found = 0;
......@@ -1074,7 +1074,7 @@ static void write_bitdepth_colorspace_sampling(
}
}
static void write_uncompressed_header(VP9_COMP *cpi,
static void write_uncompressed_header(VP10_COMP *cpi,
struct vpx_write_bit_buffer *wb) {
VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
......@@ -1150,7 +1150,7 @@ static void write_uncompressed_header(VP9_COMP *cpi,
write_tile_info(cm, wb);
}
static size_t write_compressed_header(VP9_COMP *cpi, uint8_t *data) {
static size_t write_compressed_header(VP10_COMP *cpi, uint8_t *data) {
VP10_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
FRAME_CONTEXT *const fc = cm->fc;
......@@ -1227,7 +1227,7 @@ static size_t write_compressed_header(VP9_COMP *cpi, uint8_t *data) {
return header_bc.pos;
}
void vp10_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, size_t *size) {
void vp10_pack_bitstream(VP10_COMP *cpi, uint8_t *dest, size_t *size) {
uint8_t *data = dest;
size_t first_part_size, uncompressed_hdr_size;
struct vpx_write_bit_buffer wb = {data, 0};
......
......@@ -18,9 +18,9 @@ extern "C" {
#include "vp10/encoder/encoder.h"
void vp10_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, size_t *size);
void vp10_pack_bitstream(VP10_COMP *cpi, uint8_t *dest, size_t *size);
static INLINE int vp10_preserve_existing_gf(VP9_COMP *cpi) {
static INLINE int vp10_preserve_existing_gf(VP10_COMP *cpi) {
return !cpi->multi_arf_allowed && cpi->refresh_golden_frame &&
cpi->rc.is_src_frame_alt_ref &&
(!cpi->use_svc || // Add spatial svc base layer case here
......
......@@ -14,7 +14,7 @@
#include "vp10/common/blockd.h"
#include "vp10/encoder/block.h"
struct VP9_COMP;
struct VP10_COMP;
struct VP9Common;
struct ThreadData;
......
This diff is collapsed.
......@@ -20,7 +20,7 @@ extern "C" {
struct macroblock;
struct yv12_buffer_config;
struct VP9_COMP;
struct VP10_COMP;
struct ThreadData;
// Constants used in SOURCE_VAR_BASED_PARTITION
......@@ -34,13 +34,13 @@ void vp10_setup_src_planes(struct macroblock *x,
const struct yv12_buffer_config *src,
int mi_row, int mi_col);
void vp10_encode_frame(struct VP9_COMP *cpi);
void vp10_encode_frame(struct VP10_COMP *cpi);
void vp10_init_tile_data(struct VP9_COMP *cpi);
void vp10_encode_tile(struct VP9_COMP *cpi, struct ThreadData *td,
void vp10_init_tile_data(struct VP10_COMP *cpi);
void vp10_encode_tile(struct VP10_COMP *cpi, struct ThreadData *td,
int tile_row, int tile_col);
void vp10_set_variance_partition_thresholds(struct VP9_COMP *cpi, int q);
void vp10_set_variance_partition_thresholds(struct VP10_COMP *cpi, int q);
#ifdef __cplusplus
} // extern "C"
......
......@@ -198,7 +198,7 @@ void vp10_write_nmv_probs(VP10_COMMON *cm, int usehp, vpx_writer *w,
}
}
void vp10_encode_mv(VP9_COMP* cpi, vpx_writer* w,
void vp10_encode_mv(VP10_COMP* cpi, vpx_writer* w,
const MV* mv, const MV* ref,
const nmv_context* mvctx, int usehp) {
const MV diff = {mv->row - ref->row,
......
......@@ -23,7 +23,7 @@ void vp10_entropy_mv_init(void);
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,
void vp10_encode_mv(VP10_COMP *cpi, vpx_writer* w, const MV* mv, const MV* ref,
const nmv_context* mvctx, int usehp);
void vp10_build_nmv_cost_table(int *mvjoint, int *mvcost[2],
......
This diff is collapsed.
......@@ -289,7 +289,7 @@ typedef struct IMAGE_STAT {
double worst;
} ImageStat;
typedef struct VP9_COMP {
typedef struct VP10_COMP {
QUANTS quants;
ThreadData td;
MB_MODE_INFO_EXT *mbmi_ext_base;
......@@ -501,62 +501,62 @@ typedef struct VP9_COMP {
VPxWorker *workers;
struct EncWorkerData *tile_thr_data;
VP9LfSync lf_row_sync;
} VP9_COMP;
} VP10_COMP;
void vp10_initialize_enc(void);
struct VP9_COMP *vp10_create_compressor(VP9EncoderConfig *oxcf,
struct VP10_COMP *vp10_create_compressor(VP9EncoderConfig *oxcf,
BufferPool *const pool);
void vp10_remove_compressor(VP9_COMP *cpi);
void vp10_remove_compressor(VP10_COMP *cpi);
void vp10_change_config(VP9_COMP *cpi, const VP9EncoderConfig *oxcf);
void vp10_change_config(VP10_COMP *cpi, const VP9EncoderConfig *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 vp10_receive_raw_frame(VP9_COMP *cpi, unsigned int frame_flags,
int vp10_receive_raw_frame(VP10_COMP *cpi, unsigned int frame_flags,
YV12_BUFFER_CONFIG *sd, int64_t time_stamp,
int64_t end_time_stamp);
int vp10_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
int vp10_get_compressed_data(VP10_COMP *cpi, unsigned int *frame_flags,
size_t *size, uint8_t *dest,
int64_t *time_stamp, int64_t *time_end, int flush);
int vp10_get_preview_raw_frame(VP9_COMP *cpi, YV12_BUFFER_CONFIG *dest,
int vp10_get_preview_raw_frame(VP10_COMP *cpi, YV12_BUFFER_CONFIG *dest,
vp10_ppflags_t *flags);
int vp10_use_as_reference(VP9_COMP *cpi, int ref_frame_flags);
int vp10_use_as_reference(VP10_COMP *cpi, int ref_frame_flags);
void vp10_update_reference(VP9_COMP *cpi, int ref_frame_flags);
void vp10_update_reference(VP10_COMP *cpi, int ref_frame_flags);
int vp10_copy_reference_enc(VP9_COMP *cpi, VP9_REFFRAME ref_frame_flag,
int vp10_copy_reference_enc(VP10_COMP *cpi, VP9_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd);
int vp10_set_reference_enc(VP9_COMP *cpi, VP9_REFFRAME ref_frame_flag,
int vp10_set_reference_enc(VP10_COMP *cpi, VP9_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd);
int vp10_update_entropy(VP9_COMP *cpi, int update);
int vp10_update_entropy(VP10_COMP *cpi, int update);
int vp10_set_active_map(VP9_COMP *cpi, unsigned char *map, int rows, int cols);
int vp10_set_active_map(VP10_COMP *cpi, unsigned char *map, int rows, int cols);
int vp10_get_active_map(VP9_COMP *cpi, unsigned char *map, int rows, int cols);
int vp10_get_active_map(VP10_COMP *cpi, unsigned char *map, int rows, int cols);
int vp10_set_internal_size(VP9_COMP *cpi,
int vp10_set_internal_size(VP10_COMP *cpi,
VPX_SCALING horiz_mode, VPX_SCALING vert_mode);
int vp10_set_size_literal(VP9_COMP *cpi, unsigned int width,
int vp10_set_size_literal(VP10_COMP *cpi, unsigned int width,
unsigned int height);
void vp10_set_svc(VP9_COMP *cpi, int use_svc);
void vp10_set_svc(VP10_COMP *cpi, int use_svc);
int vp10_get_quantizer(struct VP9_COMP *cpi);
int vp10_get_quantizer(struct VP10_COMP *cpi);
static INLINE int frame_is_kf_gf_arf(const VP9_COMP *cpi) {
static INLINE int frame_is_kf_gf_arf(const VP10_COMP *cpi) {
return frame_is_intra_only(&cpi->common) ||
cpi->refresh_alt_ref_frame ||
(cpi->refresh_golden_frame && !cpi->rc.is_src_frame_alt_ref);
}
static INLINE int get_ref_frame_map_idx(const VP9_COMP *cpi,
static INLINE int get_ref_frame_map_idx(const VP10_COMP *cpi,
MV_REFERENCE_FRAME ref_frame) {
if (ref_frame == LAST_FRAME) {
return cpi->lst_fb_idx;
......@@ -567,7 +567,7 @@ 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,
static INLINE int get_ref_frame_buf_idx(const VP10_COMP *const cpi,
int ref_frame) {
const VP10_COMMON *const cm = &cpi->common;
const int map_idx = get_ref_frame_map_idx(cpi, ref_frame);
......@@ -575,7 +575,7 @@ static INLINE int get_ref_frame_buf_idx(const VP9_COMP *const cpi,
}
static INLINE YV12_BUFFER_CONFIG *get_ref_frame_buffer(
VP9_COMP *cpi, MV_REFERENCE_FRAME ref_frame) {
VP10_COMP *cpi, MV_REFERENCE_FRAME ref_frame) {
VP10_COMMON *const cm = &cpi->common;
const int buf_idx = get_ref_frame_buf_idx(cpi, ref_frame);
return
......@@ -606,13 +606,13 @@ int64_t vp10_highbd_get_y_sse(const YV12_BUFFER_CONFIG *a,
const YV12_BUFFER_CONFIG *b);
#endif // CONFIG_VP9_HIGHBITDEPTH
void vp10_alloc_compressor_data(VP9_COMP *cpi);
void vp10_alloc_compressor_data(VP10_COMP *cpi);
void vp10_scale_references(VP9_COMP *cpi);
void vp10_scale_references(VP10_COMP *cpi);
void vp10_update_reference_frames(VP9_COMP *cpi);
void vp10_update_reference_frames(VP10_COMP *cpi);
void vp10_set_high_precision_mv(VP9_COMP *cpi, int allow_high_precision_mv);
void vp10_set_high_precision_mv(VP10_COMP *cpi, int allow_high_precision_mv);
YV12_BUFFER_CONFIG *vp10_scale_if_required_fast(VP10_COMMON *cm,
YV12_BUFFER_CONFIG *unscaled,
......@@ -622,17 +622,17 @@ YV12_BUFFER_CONFIG *vp10_scale_if_required(VP10_COMMON *cm,
YV12_BUFFER_CONFIG *unscaled,
YV12_BUFFER_CONFIG *scaled);
void vp10_apply_encoding_flags(VP9_COMP *cpi, vpx_enc_frame_flags_t flags);
void vp10_apply_encoding_flags(VP10_COMP *cpi, vpx_enc_frame_flags_t flags);
static INLINE int is_two_pass_svc(const struct VP9_COMP *const cpi) {
static INLINE int is_two_pass_svc(const struct VP10_COMP *const cpi) {
return cpi->use_svc && cpi->oxcf.pass != 0;
}
static INLINE int is_one_pass_cbr_svc(const struct VP9_COMP *const cpi) {
static INLINE int is_one_pass_cbr_svc(const struct VP10_COMP *const cpi) {
return (cpi->use_svc && cpi->oxcf.pass == 0);
}
static INLINE int is_altref_enabled(const VP9_COMP *const cpi) {
static INLINE int is_altref_enabled(const VP10_COMP *const cpi) {
return cpi->oxcf.mode != REALTIME && cpi->oxcf.lag_in_frames > 0 &&
(cpi->oxcf.enable_auto_arf &&
(!is_two_pass_svc(cpi) ||
......@@ -652,11 +652,11 @@ static INLINE int get_chessboard_index(const int frame_index) {
return frame_index & 0x1;
}
static INLINE int *cond_cost_list(const struct VP9_COMP *cpi, int *cost_list) {
static INLINE int *cond_cost_list(const struct VP10_COMP *cpi, int *cost_list) {
return cpi->sf.mv.subpel_search_method != SUBPEL_TREE ? cost_list : NULL;
}
void vp10_new_framerate(VP9_COMP *cpi, double framerate);
void vp10_new_framerate(VP10_COMP *cpi, double framerate);
#define LAYER_IDS_TO_IDX(sl, tl, num_tl) ((sl) * (num_tl) + (tl))
......
......@@ -32,7 +32,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;
VP10_COMP *const cpi = thread_data->cpi;
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;
......@@ -51,7 +51,7 @@ static int enc_worker_hook(EncWorkerData *const thread_data, void *unused) {
return 0;
}
static int get_max_tile_cols(VP9_COMP *cpi) {
static int get_max_tile_cols(VP10_COMP *cpi) {
const int aligned_width = ALIGN_POWER_OF_TWO(cpi->oxcf.width, MI_SIZE_LOG2);
int mi_cols = aligned_width >> MI_SIZE_LOG2;
int min_log2_tile_cols, max_log2_tile_cols;
......@@ -63,7 +63,7 @@ static int get_max_tile_cols(VP9_COMP *cpi) {
return (1 << log2_tile_cols);
}
void vp10_encode_tiles_mt(VP9_COMP *cpi) {
void vp10_encode_tiles_mt(VP10_COMP *cpi) {
VP10_COMMON *const cm = &cpi->common;
const int tile_cols = 1 << cm->log2_tile_cols;
const VPxWorkerInterface *const winterface = vpx_get_worker_interface();
......
......@@ -11,15 +11,15 @@
#ifndef VP10_ENCODER_ETHREAD_H_
#define VP10_ENCODER_ETHREAD_H_
struct VP9_COMP;
struct VP10_COMP;
struct ThreadData;
typedef struct EncWorkerData {
struct VP9_COMP *cpi;
struct VP10_COMP *cpi;
struct ThreadData *td;
int start;
} EncWorkerData;
void vp10_encode_tiles_mt(struct VP9_COMP *cpi);
void vp10_encode_tiles_mt(struct VP10_COMP *cpi);
#endif // VP10_ENCODER_ETHREAD_H_
This diff is collapsed.
......@@ -139,23 +139,24 @@ typedef struct {
GF_GROUP gf_group;
} TWO_PASS;
struct VP9_COMP;
struct VP10_COMP;
void vp10_init_first_pass(struct VP9_COMP *cpi);
void vp10_rc_get_first_pass_params(struct VP9_COMP *cpi);
void vp10_first_pass(struct VP9_COMP *cpi, const struct lookahead_entry *source);
void vp10_end_first_pass(struct VP9_COMP *cpi);
void vp10_init_first_pass(struct VP10_COMP *cpi);
void vp10_rc_get_first_pass_params(struct VP10_COMP *cpi);
void vp10_first_pass(struct VP10_COMP *cpi,
const struct lookahead_entry *source);
void vp10_end_first_pass(struct VP10_COMP *cpi);
void vp10_init_second_pass(struct VP9_COMP *cpi);
void vp10_rc_get_second_pass_params(struct VP9_COMP *cpi);
void vp10_twopass_postencode_update(struct VP9_COMP *cpi);
void vp10_init_second_pass(struct VP10_COMP *cpi);
void vp10_rc_get_second_pass_params(struct VP10_COMP *cpi);
void vp10_twopass_postencode_update(struct VP10_COMP *cpi);
// Post encode update of the rate control parameters for 2-pass
void vp10_twopass_postencode_update(struct VP9_COMP *cpi);
void vp10_twopass_postencode_update(struct VP10_COMP *cpi);
void vp10_init_subsampling(struct VP9_COMP *cpi);
void vp10_init_subsampling(struct VP10_COMP *cpi);
void vp10_calculate_coded_size(struct VP9_COMP *cpi,
void vp10_calculate_coded_size(struct VP10_COMP *cpi,
int *scaled_frame_width,
int *scaled_frame_height);
......
......@@ -22,7 +22,7 @@
#include "vp10/common/reconintra.h"
static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
static unsigned int do_16x16_motion_iteration(VP10_COMP *cpi,
const MV *ref_mv,
MV *dst_mv,
int mb_row,
......@@ -81,7 +81,7 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
xd->plane[0].dst.buf, xd->plane[0].dst.stride);
}
static int do_16x16_motion_search(VP9_COMP *cpi, const MV *ref_mv,
static int do_16x16_motion_search(VP10_COMP *cpi, const MV *ref_mv,
int_mv *dst_mv, int mb_row, int mb_col) {
MACROBLOCK *const x = &cpi->td.mb;
MACROBLOCKD *const xd = &x->e_mbd;
......@@ -119,7 +119,7 @@ static int do_16x16_motion_search(VP9_COMP *cpi, const MV *ref_mv,
return err;
}
static int do_16x16_zerozero_search(VP9_COMP *cpi, int_mv *dst_mv) {
static int do_16x16_zerozero_search(VP10_COMP *cpi, int_mv *dst_mv) {
MACROBLOCK *const x = &cpi->td.mb;
MACROBLOCKD *const xd = &x->e_mbd;