From afb6b4b8520d3a34294acb3c569fa8fc6ef472e5 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Thu, 13 Aug 2015 14:55:28 -0700 Subject: [PATCH] VP9Common -> VP10Common Change-Id: Ifddc68a8ab020f35a266ffc74429363301fe7d9e --- vp10/common/alloccommon.h | 20 ++++++++++---------- vp10/common/entropy.h | 6 +++--- vp10/common/entropymode.h | 6 +++--- vp10/common/entropymv.h | 6 +++--- vp10/common/loopfilter.c | 3 ++- vp10/common/loopfilter.h | 22 +++++++++++----------- vp10/common/mfqe.h | 2 +- vp10/common/onyxc_int.h | 8 ++++---- vp10/common/postproc.c | 2 +- vp10/common/postproc.h | 4 ++-- vp10/common/thread_common.h | 8 ++++---- vp10/common/tile_common.h | 8 ++++---- vp10/decoder/dthread.h | 2 +- vp10/encoder/context_tree.h | 4 ++-- vp10/encoder/quantize.h | 4 ++-- 15 files changed, 53 insertions(+), 52 deletions(-) diff --git a/vp10/common/alloccommon.h b/vp10/common/alloccommon.h index 35a09c177..5cfe6602d 100644 --- a/vp10/common/alloccommon.h +++ b/vp10/common/alloccommon.h @@ -18,24 +18,24 @@ extern "C" { #endif -struct VP9Common; +struct VP10Common; struct BufferPool; -void vp10_remove_common(struct VP9Common *cm); +void vp10_remove_common(struct VP10Common *cm); -int vp10_alloc_context_buffers(struct VP9Common *cm, int width, int height); -void vp10_init_context_buffers(struct VP9Common *cm); -void vp10_free_context_buffers(struct VP9Common *cm); +int vp10_alloc_context_buffers(struct VP10Common *cm, int width, int height); +void vp10_init_context_buffers(struct VP10Common *cm); +void vp10_free_context_buffers(struct VP10Common *cm); void vp10_free_ref_frame_buffers(struct BufferPool *pool); -void vp10_free_postproc_buffers(struct VP9Common *cm); +void vp10_free_postproc_buffers(struct VP10Common *cm); -int vp10_alloc_state_buffers(struct VP9Common *cm, int width, int height); -void vp10_free_state_buffers(struct VP9Common *cm); +int vp10_alloc_state_buffers(struct VP10Common *cm, int width, int height); +void vp10_free_state_buffers(struct VP10Common *cm); -void vp10_set_mb_mi(struct VP9Common *cm, int width, int height); +void vp10_set_mb_mi(struct VP10Common *cm, int width, int height); -void vp10_swap_current_and_last_seg_map(struct VP9Common *cm); +void vp10_swap_current_and_last_seg_map(struct VP10Common *cm); #ifdef __cplusplus } // extern "C" diff --git a/vp10/common/entropy.h b/vp10/common/entropy.h index 7b77855f8..fba7020a5 100644 --- a/vp10/common/entropy.h +++ b/vp10/common/entropy.h @@ -132,9 +132,9 @@ typedef unsigned int vp10_coeff_stats[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS] #define SUBEXP_PARAM 4 /* Subexponential code parameter */ #define MODULUS_PARAM 13 /* Modulus parameter */ -struct VP9Common; -void vp10_default_coef_probs(struct VP9Common *cm); -void vp10_adapt_coef_probs(struct VP9Common *cm); +struct VP10Common; +void vp10_default_coef_probs(struct VP10Common *cm); +void vp10_adapt_coef_probs(struct VP10Common *cm); // This is the index in the scan order beyond which all coefficients for // 8x8 transform and above are in the top band. diff --git a/vp10/common/entropymode.h b/vp10/common/entropymode.h index 5fbf14ea2..a8b749253 100644 --- a/vp10/common/entropymode.h +++ b/vp10/common/entropymode.h @@ -26,7 +26,7 @@ extern "C" { #define INTER_OFFSET(mode) ((mode) - NEARESTMV) -struct VP9Common; +struct VP10Common; struct tx_probs { vpx_prob p32x32[TX_SIZE_CONTEXTS][TX_SIZES - 1]; @@ -89,9 +89,9 @@ extern const vpx_tree_index vp10_partition_tree[TREE_SIZE(PARTITION_TYPES)]; extern const vpx_tree_index vp10_switchable_interp_tree [TREE_SIZE(SWITCHABLE_FILTERS)]; -void vp10_setup_past_independence(struct VP9Common *cm); +void vp10_setup_past_independence(struct VP10Common *cm); -void vp10_adapt_mode_probs(struct VP9Common *cm); +void vp10_adapt_mode_probs(struct VP10Common *cm); void vp10_tx_counts_to_branch_counts_32x32(const unsigned int *tx_count_32x32p, unsigned int (*ct_32x32p)[2]); diff --git a/vp10/common/entropymv.h b/vp10/common/entropymv.h index 4cd27d257..fd9f1c0ce 100644 --- a/vp10/common/entropymv.h +++ b/vp10/common/entropymv.h @@ -22,11 +22,11 @@ extern "C" { #endif -struct VP9Common; +struct VP10Common; -void vp10_init_mv_probs(struct VP9Common *cm); +void vp10_init_mv_probs(struct VP10Common *cm); -void vp10_adapt_mv_probs(struct VP9Common *cm, int usehp); +void vp10_adapt_mv_probs(struct VP10Common *cm, int usehp); int vp10_use_mv_hp(const MV *ref); #define MV_UPDATE_PROB 252 diff --git a/vp10/common/loopfilter.c b/vp10/common/loopfilter.c index 36854819b..c11d46a8a 100644 --- a/vp10/common/loopfilter.c +++ b/vp10/common/loopfilter.c @@ -1599,7 +1599,8 @@ void vp10_loop_filter_frame(YV12_BUFFER_CONFIG *frame, void vp10_loop_filter_data_reset( LFWorkerData *lf_data, YV12_BUFFER_CONFIG *frame_buffer, - struct VP9Common *cm, const struct macroblockd_plane planes[MAX_MB_PLANE]) { + struct VP10Common *cm, + const struct macroblockd_plane planes[MAX_MB_PLANE]) { lf_data->frame_buffer = frame_buffer; lf_data->cm = cm; lf_data->start = 0; diff --git a/vp10/common/loopfilter.h b/vp10/common/loopfilter.h index 8129224d8..cfeb9b836 100644 --- a/vp10/common/loopfilter.h +++ b/vp10/common/loopfilter.h @@ -87,54 +87,54 @@ typedef struct { } LOOP_FILTER_MASK; /* assorted loopfilter functions which get used elsewhere */ -struct VP9Common; +struct VP10Common; struct macroblockd; struct VP9LfSyncData; // This function sets up the bit masks for the entire 64x64 region represented // by mi_row, mi_col. -void vp10_setup_mask(struct VP9Common *const cm, +void vp10_setup_mask(struct VP10Common *const cm, const int mi_row, const int mi_col, MODE_INFO **mi_8x8, const int mode_info_stride, LOOP_FILTER_MASK *lfm); -void vp10_filter_block_plane_ss00(struct VP9Common *const cm, +void vp10_filter_block_plane_ss00(struct VP10Common *const cm, struct macroblockd_plane *const plane, int mi_row, LOOP_FILTER_MASK *lfm); -void vp10_filter_block_plane_ss11(struct VP9Common *const cm, +void vp10_filter_block_plane_ss11(struct VP10Common *const cm, struct macroblockd_plane *const plane, int mi_row, LOOP_FILTER_MASK *lfm); -void vp10_filter_block_plane_non420(struct VP9Common *cm, +void vp10_filter_block_plane_non420(struct VP10Common *cm, struct macroblockd_plane *plane, MODE_INFO **mi_8x8, int mi_row, int mi_col); -void vp10_loop_filter_init(struct VP9Common *cm); +void vp10_loop_filter_init(struct VP10Common *cm); // Update the loop filter for the current frame. // This should be called before vp10_loop_filter_rows(), vp10_loop_filter_frame() // calls this function directly. -void vp10_loop_filter_frame_init(struct VP9Common *cm, int default_filt_lvl); +void vp10_loop_filter_frame_init(struct VP10Common *cm, int default_filt_lvl); void vp10_loop_filter_frame(YV12_BUFFER_CONFIG *frame, - struct VP9Common *cm, + struct VP10Common *cm, struct macroblockd *mbd, int filter_level, int y_only, int partial_frame); // Apply the loop filter to [start, stop) macro block rows in frame_buffer. void vp10_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, - struct VP9Common *cm, + struct VP10Common *cm, struct macroblockd_plane planes[MAX_MB_PLANE], int start, int stop, int y_only); typedef struct LoopFilterWorkerData { YV12_BUFFER_CONFIG *frame_buffer; - struct VP9Common *cm; + struct VP10Common *cm; struct macroblockd_plane planes[MAX_MB_PLANE]; int start; @@ -144,7 +144,7 @@ typedef struct LoopFilterWorkerData { void vp10_loop_filter_data_reset( LFWorkerData *lf_data, YV12_BUFFER_CONFIG *frame_buffer, - struct VP9Common *cm, const struct macroblockd_plane planes[MAX_MB_PLANE]); + struct VP10Common *cm, const struct macroblockd_plane planes[MAX_MB_PLANE]); // Operates on the rows described by 'lf_data'. int vp10_loop_filter_worker(LFWorkerData *const lf_data, void *unused); diff --git a/vp10/common/mfqe.h b/vp10/common/mfqe.h index 8da050b1e..7bedd119f 100644 --- a/vp10/common/mfqe.h +++ b/vp10/common/mfqe.h @@ -22,7 +22,7 @@ extern "C" { // the motion of the blocks and other conditions such as the SAD of // the current block and correlated block, the variance of the block // difference, etc. -void vp10_mfqe(struct VP9Common *cm); +void vp10_mfqe(struct VP10Common *cm); #ifdef __cplusplus } // extern "C" diff --git a/vp10/common/onyxc_int.h b/vp10/common/onyxc_int.h index 2e3016714..83388e680 100644 --- a/vp10/common/onyxc_int.h +++ b/vp10/common/onyxc_int.h @@ -103,7 +103,7 @@ typedef struct BufferPool { InternalFrameBufferList int_frame_buffers; } BufferPool; -typedef struct VP9Common { +typedef struct VP10Common { struct vpx_internal_error_info error; vpx_color_space_t color_space; int width; @@ -195,9 +195,9 @@ typedef struct VP9Common { MODE_INFO *prev_mi; /* 'mi' from last frame (points into prev_mip) */ // Separate mi functions between encoder and decoder. - int (*alloc_mi)(struct VP9Common *cm, int mi_size); - void (*free_mi)(struct VP9Common *cm); - void (*setup_mi)(struct VP9Common *cm); + int (*alloc_mi)(struct VP10Common *cm, int mi_size); + void (*free_mi)(struct VP10Common *cm); + void (*setup_mi)(struct VP10Common *cm); // Grid of pointers to 8x8 MODE_INFO structs. Any 8x8 not in the visible // area will be NULL. diff --git a/vp10/common/postproc.c b/vp10/common/postproc.c index b3bf65e0f..71125061d 100644 --- a/vp10/common/postproc.c +++ b/vp10/common/postproc.c @@ -623,7 +623,7 @@ static void swap_mi_and_prev_mi(VP10_COMMON *cm) { cm->postproc_state.prev_mi = cm->postproc_state.prev_mip + cm->mi_stride + 1; } -int vp10_post_proc_frame(struct VP9Common *cm, +int vp10_post_proc_frame(struct VP10Common *cm, YV12_BUFFER_CONFIG *dest, vp10_ppflags_t *ppflags) { const int q = MIN(105, cm->lf.filter_level * 2); const int flags = ppflags->post_proc_flag; diff --git a/vp10/common/postproc.h b/vp10/common/postproc.h index ddf29fa6c..e2ce0dcc8 100644 --- a/vp10/common/postproc.h +++ b/vp10/common/postproc.h @@ -35,11 +35,11 @@ struct postproc_state { DECLARE_ALIGNED(16, char, bothclamp[16]); }; -struct VP9Common; +struct VP10Common; #define MFQE_PRECISION 4 -int vp10_post_proc_frame(struct VP9Common *cm, +int vp10_post_proc_frame(struct VP10Common *cm, YV12_BUFFER_CONFIG *dest, vp10_ppflags_t *flags); void vp10_denoise(const YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst, int q); diff --git a/vp10/common/thread_common.h b/vp10/common/thread_common.h index fe6b10b02..6388c7a28 100644 --- a/vp10/common/thread_common.h +++ b/vp10/common/thread_common.h @@ -14,7 +14,7 @@ #include "vp10/common/loopfilter.h" #include "vpx_util/vpx_thread.h" -struct VP9Common; +struct VP10Common; struct FRAME_COUNTS; // Loopfilter row synchronization @@ -36,7 +36,7 @@ typedef struct VP9LfSyncData { } VP9LfSync; // Allocate memory for loopfilter row synchronization. -void vp10_loop_filter_alloc(VP9LfSync *lf_sync, struct VP9Common *cm, int rows, +void vp10_loop_filter_alloc(VP9LfSync *lf_sync, struct VP10Common *cm, int rows, int width, int num_workers); // Deallocate loopfilter synchronization related mutex and data. @@ -44,14 +44,14 @@ void vp10_loop_filter_dealloc(VP9LfSync *lf_sync); // Multi-threaded loopfilter that uses the tile threads. void vp10_loop_filter_frame_mt(YV12_BUFFER_CONFIG *frame, - struct VP9Common *cm, + struct VP10Common *cm, struct macroblockd_plane planes[MAX_MB_PLANE], int frame_filter_level, int y_only, int partial_frame, VPxWorker *workers, int num_workers, VP9LfSync *lf_sync); -void vp10_accumulate_frame_counts(struct VP9Common *cm, +void vp10_accumulate_frame_counts(struct VP10Common *cm, struct FRAME_COUNTS *counts, int is_dec); #endif // VP10_COMMON_LOOPFILTER_THREAD_H_ diff --git a/vp10/common/tile_common.h b/vp10/common/tile_common.h index 8256f187d..09cf060d8 100644 --- a/vp10/common/tile_common.h +++ b/vp10/common/tile_common.h @@ -15,7 +15,7 @@ extern "C" { #endif -struct VP9Common; +struct VP10Common; typedef struct TileInfo { int mi_row_start, mi_row_end; @@ -24,11 +24,11 @@ typedef struct TileInfo { // initializes 'tile->mi_(row|col)_(start|end)' for (row, col) based on // 'cm->log2_tile_(rows|cols)' & 'cm->mi_(rows|cols)' -void vp10_tile_init(TileInfo *tile, const struct VP9Common *cm, +void vp10_tile_init(TileInfo *tile, const struct VP10Common *cm, int row, int col); -void vp10_tile_set_row(TileInfo *tile, const struct VP9Common *cm, int row); -void vp10_tile_set_col(TileInfo *tile, const struct VP9Common *cm, int col); +void vp10_tile_set_row(TileInfo *tile, const struct VP10Common *cm, int row); +void vp10_tile_set_col(TileInfo *tile, const struct VP10Common *cm, int col); void vp10_get_tile_n_bits(int mi_cols, int *min_log2_tile_cols, int *max_log2_tile_cols); diff --git a/vp10/decoder/dthread.h b/vp10/decoder/dthread.h index e3c70f93b..7332aada2 100644 --- a/vp10/decoder/dthread.h +++ b/vp10/decoder/dthread.h @@ -15,7 +15,7 @@ #include "vpx_util/vpx_thread.h" #include "vpx/internal/vpx_codec_internal.h" -struct VP9Common; +struct VP10Common; struct VP10Decoder; // WorkerData for the FrameWorker thread. It contains all the information of diff --git a/vp10/encoder/context_tree.h b/vp10/encoder/context_tree.h index 7e88e6323..9310d1fc3 100644 --- a/vp10/encoder/context_tree.h +++ b/vp10/encoder/context_tree.h @@ -15,7 +15,7 @@ #include "vp10/encoder/block.h" struct VP10_COMP; -struct VP9Common; +struct VP10Common; struct ThreadData; // Structure to hold snapshot of coding context during the mode picking process @@ -81,7 +81,7 @@ typedef struct PC_TREE { }; } PC_TREE; -void vp10_setup_pc_tree(struct VP9Common *cm, struct ThreadData *td); +void vp10_setup_pc_tree(struct VP10Common *cm, struct ThreadData *td); void vp10_free_pc_tree(struct ThreadData *td); #endif /* VP10_ENCODER_CONTEXT_TREE_H_ */ diff --git a/vp10/encoder/quantize.h b/vp10/encoder/quantize.h index fb9bd92da..b44088ecc 100644 --- a/vp10/encoder/quantize.h +++ b/vp10/encoder/quantize.h @@ -41,7 +41,7 @@ void vp10_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block, const int16_t *scan, const int16_t *iscan); struct VP10_COMP; -struct VP9Common; +struct VP10Common; void vp10_frame_init_quantizer(struct VP10_COMP *cpi); @@ -49,7 +49,7 @@ void vp10_init_plane_quantizers(struct VP10_COMP *cpi, MACROBLOCK *x); void vp10_init_quantizer(struct VP10_COMP *cpi); -void vp10_set_quantizer(struct VP9Common *cm, int q); +void vp10_set_quantizer(struct VP10Common *cm, int q); int vp10_quantizer_to_qindex(int quantizer); -- 2.40.0