From d4c47240901cf3f18ae3d1080ecb52b7048d8b25 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Fri, 29 Jul 2016 10:14:19 -0700 Subject: [PATCH] Cherry pick renaming changes from AOMedia branch Manually cherry-picked the following changes: 8c8d16de vp9 -> vpx in names 75b57d39 VP9_ -> VPX_ in function names 761a7088 VP9_INTERP_EXTEND -> VPX_INTERP_EXTEND 4273a52c VP9->VPX in border pixel macros 03568c31 VP9_FRAME_MARKER -> VPX_FRAME_MARKER 2334f51d VP9->VPX in fdct function names Change-Id: Icc18dbf4b416dd0fa21033b3e19ab8a47c893508 --- vp10/common/common.h | 2 +- vp10/common/mips/msa/idct8x8_msa.c | 8 +-- vp10/common/postproc.c | 4 +- vp10/common/reconinter.h | 4 +- vp10/common/restoration.c | 2 +- vp10/common/vp10_rtcd_defs.pl | 8 +-- vp10/decoder/decodeframe.c | 14 ++-- vp10/encoder/bitstream.c | 2 +- vp10/encoder/encodeframe.c | 16 ++--- vp10/encoder/encoder.c | 22 +++---- vp10/encoder/encoder.h | 2 +- vp10/encoder/firstpass.c | 2 +- vp10/encoder/lookahead.c | 4 +- vp10/encoder/mbgraph.c | 2 +- vp10/encoder/mcomp.c | 88 ++++++++++++------------- vp10/encoder/mcomp.h | 30 ++++----- vp10/encoder/mips/msa/fdct4x4_msa.c | 8 +-- vp10/encoder/mips/msa/fdct8x8_msa.c | 16 ++--- vp10/encoder/mips/msa/fdct_msa.h | 4 +- vp10/encoder/rdopt.c | 6 +- vp10/encoder/skin_detection.c | 2 +- vp10/encoder/temporal_filter.c | 18 ++--- vp10/vp10_dx_iface.c | 2 +- vp10/vp10_iface_common.h | 2 +- vpx_dsp/mips/fwd_txfm_msa.c | 4 +- vpx_dsp/mips/fwd_txfm_msa.h | 2 +- vpx_dsp/mips/inv_txfm_msa.h | 2 +- vpx_dsp/variance.h | 4 +- vpx_scale/generic/yv12extend.c | 4 +- vpx_scale/mips/dspr2/yv12extend_dspr2.c | 4 +- vpx_scale/yv12config.h | 10 +-- 31 files changed, 149 insertions(+), 149 deletions(-) diff --git a/vp10/common/common.h b/vp10/common/common.h index ea5d1d677..88f0d59ca 100644 --- a/vp10/common/common.h +++ b/vp10/common/common.h @@ -67,7 +67,7 @@ static INLINE int get_unsigned_bits(unsigned int num_values) { #define VP10_SYNC_CODE_1 0x83 #define VP10_SYNC_CODE_2 0x43 -#define VP9_FRAME_MARKER 0x2 +#define VPX_FRAME_MARKER 0x2 #ifdef __cplusplus } // extern "C" diff --git a/vp10/common/mips/msa/idct8x8_msa.c b/vp10/common/mips/msa/idct8x8_msa.c index 726af4e9e..0ab1da59c 100644 --- a/vp10/common/mips/msa/idct8x8_msa.c +++ b/vp10/common/mips/msa/idct8x8_msa.c @@ -41,12 +41,12 @@ void vp10_iht8x8_64_add_msa(const int16_t *input, uint8_t *dst, /* ADST in vertical */ TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); - VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); break; case DCT_ADST: /* ADST in horizontal */ - VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); /* DCT in vertical */ TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, @@ -56,12 +56,12 @@ void vp10_iht8x8_64_add_msa(const int16_t *input, uint8_t *dst, break; case ADST_ADST: /* ADST in horizontal */ - VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); /* ADST in vertical */ TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); - VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); break; default: diff --git a/vp10/common/postproc.c b/vp10/common/postproc.c index e8a9f8131..0b742bd5e 100644 --- a/vp10/common/postproc.c +++ b/vp10/common/postproc.c @@ -640,7 +640,7 @@ int vp10_post_proc_frame(struct VP10Common *cm, #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif // CONFIG_VP9_HIGHBITDEPTH - VP9_ENC_BORDER_IN_PIXELS, + VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment) < 0) { vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate MFQE framebuffer"); @@ -658,7 +658,7 @@ int vp10_post_proc_frame(struct VP10Common *cm, #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif - VP9_DEC_BORDER_IN_PIXELS, cm->byte_alignment, + VPX_DEC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL) < 0) vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate post-processing buffer"); diff --git a/vp10/common/reconinter.h b/vp10/common/reconinter.h index cc808e75c..9131c1ec8 100644 --- a/vp10/common/reconinter.h +++ b/vp10/common/reconinter.h @@ -318,9 +318,9 @@ static INLINE MV clamp_mv_to_umv_border_sb(const MACROBLOCKD *xd, // If the MV points so far into the UMV border that no visible pixels // are used for reconstruction, the subpel part of the MV can be // discarded and the MV limited to 16 pixels with equivalent results. - const int spel_left = (VP9_INTERP_EXTEND + bw) << SUBPEL_BITS; + const int spel_left = (VPX_INTERP_EXTEND + bw) << SUBPEL_BITS; const int spel_right = spel_left - SUBPEL_SHIFTS; - const int spel_top = (VP9_INTERP_EXTEND + bh) << SUBPEL_BITS; + const int spel_top = (VPX_INTERP_EXTEND + bh) << SUBPEL_BITS; const int spel_bottom = spel_top - SUBPEL_SHIFTS; MV clamped_mv = { src_mv->row * (1 << (1 - ss_y)), diff --git a/vp10/common/restoration.c b/vp10/common/restoration.c index 71abd7c73..c7dba0ae1 100644 --- a/vp10/common/restoration.c +++ b/vp10/common/restoration.c @@ -406,7 +406,7 @@ void vp10_loop_restoration_rows(YV12_BUFFER_CONFIG *frame, #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif - VP9_DEC_BORDER_IN_PIXELS, cm->byte_alignment, + VPX_DEC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL) < 0) vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate tmp restoration buffer"); diff --git a/vp10/common/vp10_rtcd_defs.pl b/vp10/common/vp10_rtcd_defs.pl index a1496e0f3..29dfa2abe 100644 --- a/vp10/common/vp10_rtcd_defs.pl +++ b/vp10/common/vp10_rtcd_defs.pl @@ -15,7 +15,7 @@ struct macroblockd; /* Encoder forward decls */ struct macroblock; -struct vp10_variance_vtable; +struct vpx_variance_vtable; struct search_site_config; struct mv; union int_mv; @@ -697,15 +697,15 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") { # # Motion search # -add_proto qw/int vp10_full_search_sad/, "const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp10_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv"; +add_proto qw/int vp10_full_search_sad/, "const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vpx_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv"; specialize qw/vp10_full_search_sad sse3 sse4_1/; $vp10_full_search_sad_sse3=vp10_full_search_sadx3; $vp10_full_search_sad_sse4_1=vp10_full_search_sadx8; -add_proto qw/int vp10_diamond_search_sad/, "struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp10_variance_vtable *fn_ptr, const struct mv *center_mv"; +add_proto qw/int vp10_diamond_search_sad/, "struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vpx_variance_vtable *fn_ptr, const struct mv *center_mv"; specialize qw/vp10_diamond_search_sad/; -add_proto qw/int vp10_full_range_search/, "const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp10_variance_vtable *fn_ptr, const struct mv *center_mv"; +add_proto qw/int vp10_full_range_search/, "const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vpx_variance_vtable *fn_ptr, const struct mv *center_mv"; specialize qw/vp10_full_range_search/; add_proto qw/void vp10_temporal_filter_apply/, "uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count"; diff --git a/vp10/decoder/decodeframe.c b/vp10/decoder/decodeframe.c index 049d50d9d..3a51a48ce 100644 --- a/vp10/decoder/decodeframe.c +++ b/vp10/decoder/decodeframe.c @@ -43,7 +43,7 @@ #include "vp10/decoder/decoder.h" #include "vp10/decoder/dsubexp.h" -#define MAX_VP9_HEADER_SIZE 80 +#define MAX_VPX_HEADER_SIZE 80 static int is_compound_reference_allowed(const VP10_COMMON *cm) { int i; @@ -2214,7 +2214,7 @@ static void setup_frame_size(VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) { #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif - VP9_DEC_BORDER_IN_PIXELS, + VPX_DEC_BORDER_IN_PIXELS, cm->byte_alignment, &pool->frame_bufs[cm->new_fb_idx].raw_frame_buffer, pool->get_fb_cb, pool->cb_priv)) { @@ -2301,7 +2301,7 @@ static void setup_frame_size_with_refs(VP10_COMMON *cm, #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif - VP9_DEC_BORDER_IN_PIXELS, + VPX_DEC_BORDER_IN_PIXELS, cm->byte_alignment, &pool->frame_bufs[cm->new_fb_idx].raw_frame_buffer, pool->get_fb_cb, pool->cb_priv)) { @@ -3144,7 +3144,7 @@ static size_t read_uncompressed_header(VP10Decoder *pbi, cm->is_reference_frame = 1; #endif // CONFIG_EXT_REFS - if (vpx_rb_read_literal(rb, 2) != VP9_FRAME_MARKER) + if (vpx_rb_read_literal(rb, 2) != VPX_FRAME_MARKER) vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, "Invalid frame marker"); @@ -3727,12 +3727,12 @@ static struct vpx_read_bit_buffer *init_read_bit_buffer( struct vpx_read_bit_buffer *rb, const uint8_t *data, const uint8_t *data_end, - uint8_t clear_data[MAX_VP9_HEADER_SIZE]) { + uint8_t clear_data[MAX_VPX_HEADER_SIZE]) { rb->bit_offset = 0; rb->error_handler = error_handler; rb->error_handler_data = &pbi->common; if (pbi->decrypt_cb) { - const int n = (int)VPXMIN(MAX_VP9_HEADER_SIZE, data_end - data); + const int n = (int)VPXMIN(MAX_VPX_HEADER_SIZE, data_end - data); pbi->decrypt_cb(pbi->decrypt_state, data, clear_data, n); rb->bit_buffer = clear_data; rb->bit_buffer_end = clear_data + n; @@ -3772,7 +3772,7 @@ void vp10_decode_frame(VP10Decoder *pbi, MACROBLOCKD *const xd = &pbi->mb; struct vpx_read_bit_buffer rb; int context_updated = 0; - uint8_t clear_data[MAX_VP9_HEADER_SIZE]; + uint8_t clear_data[MAX_VPX_HEADER_SIZE]; const size_t first_partition_size = read_uncompressed_header(pbi, init_read_bit_buffer(pbi, &rb, data, data_end, clear_data)); YV12_BUFFER_CONFIG *const new_fb = get_frame_new_buffer(cm); diff --git a/vp10/encoder/bitstream.c b/vp10/encoder/bitstream.c index 6b2f8177d..558bafb51 100644 --- a/vp10/encoder/bitstream.c +++ b/vp10/encoder/bitstream.c @@ -3045,7 +3045,7 @@ static void write_uncompressed_header(VP10_COMP *cpi, VP10_COMMON *const cm = &cpi->common; MACROBLOCKD *const xd = &cpi->td.mb.e_mbd; - vpx_wb_write_literal(wb, VP9_FRAME_MARKER, 2); + vpx_wb_write_literal(wb, VPX_FRAME_MARKER, 2); write_profile(cm->profile, wb); diff --git a/vp10/encoder/encodeframe.c b/vp10/encoder/encodeframe.c index 6bebfe637..ed7e14982 100644 --- a/vp10/encoder/encodeframe.c +++ b/vp10/encoder/encodeframe.c @@ -292,10 +292,10 @@ static void set_offsets_without_segment_id(VP10_COMP *cpi, // Set up limit values for MV components. // Mv beyond the range do not produce new/different prediction block. - x->mv_row_min = -(((mi_row + mi_height) * MI_SIZE) + VP9_INTERP_EXTEND); - x->mv_col_min = -(((mi_col + mi_width) * MI_SIZE) + VP9_INTERP_EXTEND); - x->mv_row_max = (cm->mi_rows - mi_row) * MI_SIZE + VP9_INTERP_EXTEND; - x->mv_col_max = (cm->mi_cols - mi_col) * MI_SIZE + VP9_INTERP_EXTEND; + x->mv_row_min = -(((mi_row + mi_height) * MI_SIZE) + VPX_INTERP_EXTEND); + x->mv_col_min = -(((mi_col + mi_width) * MI_SIZE) + VPX_INTERP_EXTEND); + x->mv_row_max = (cm->mi_rows - mi_row) * MI_SIZE + VPX_INTERP_EXTEND; + x->mv_col_max = (cm->mi_cols - mi_col) * MI_SIZE + VPX_INTERP_EXTEND; // Set up distance of MB to edge of frame in 1/8th pel units. assert(!(mi_col & (mi_width - 1)) && !(mi_row & (mi_height - 1))); @@ -381,10 +381,10 @@ static void set_offsets_extend(VP10_COMP *cpi, ThreadData *td, // Set up limit values for MV components. // Mv beyond the range do not produce new/different prediction block. - x->mv_row_min = -(((mi_row_pred + mi_height) * MI_SIZE) + VP9_INTERP_EXTEND); - x->mv_col_min = -(((mi_col_pred + mi_width) * MI_SIZE) + VP9_INTERP_EXTEND); - x->mv_row_max = (cm->mi_rows - mi_row_pred) * MI_SIZE + VP9_INTERP_EXTEND; - x->mv_col_max = (cm->mi_cols - mi_col_pred) * MI_SIZE + VP9_INTERP_EXTEND; + x->mv_row_min = -(((mi_row_pred + mi_height) * MI_SIZE) + VPX_INTERP_EXTEND); + x->mv_col_min = -(((mi_col_pred + mi_width) * MI_SIZE) + VPX_INTERP_EXTEND); + x->mv_row_max = (cm->mi_rows - mi_row_pred) * MI_SIZE + VPX_INTERP_EXTEND; + x->mv_col_max = (cm->mi_cols - mi_col_pred) * MI_SIZE + VPX_INTERP_EXTEND; // Set up distance of MB to edge of frame in 1/8th pel units. assert(!(mi_col_pred & (mi_width - 1)) && !(mi_row_pred & (mi_height - 1))); diff --git a/vp10/encoder/encoder.c b/vp10/encoder/encoder.c index 76ddea2de..a56c3e327 100644 --- a/vp10/encoder/encoder.c +++ b/vp10/encoder/encoder.c @@ -742,7 +742,7 @@ static void alloc_raw_frame_buffers(VP10_COMP *cpi) { #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif - VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment, + VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL)) vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate altref buffer"); @@ -756,7 +756,7 @@ static void alloc_util_frame_buffers(VP10_COMP *cpi) { #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif - VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment, + VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL)) vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate last frame buffer"); @@ -768,7 +768,7 @@ static void alloc_util_frame_buffers(VP10_COMP *cpi) { #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif - VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment, + VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL)) vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate last frame deblocked buffer"); @@ -780,7 +780,7 @@ static void alloc_util_frame_buffers(VP10_COMP *cpi) { #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif - VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment, + VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL)) vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate scaled source buffer"); @@ -791,7 +791,7 @@ static void alloc_util_frame_buffers(VP10_COMP *cpi) { #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif - VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment, + VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL)) vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate scaled last source buffer"); @@ -3348,7 +3348,7 @@ static INLINE int upsample_ref_frame(VP10_COMP *cpi, #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif - (VP9_ENC_BORDER_IN_PIXELS << 3), + (VPX_ENC_BORDER_IN_PIXELS << 3), cm->byte_alignment, NULL, NULL, NULL)) vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, @@ -3790,7 +3790,7 @@ void vp10_scale_references(VP10_COMP *cpi) { if (vpx_realloc_frame_buffer(&new_fb_ptr->buf, cm->width, cm->height, cm->subsampling_x, cm->subsampling_y, cm->use_highbitdepth, - VP9_ENC_BORDER_IN_PIXELS, + VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL)) vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate frame buffer"); @@ -3816,7 +3816,7 @@ void vp10_scale_references(VP10_COMP *cpi) { new_fb_ptr->buf.y_crop_height != cm->height) { if (vpx_realloc_frame_buffer(&new_fb_ptr->buf, cm->width, cm->height, cm->subsampling_x, cm->subsampling_y, - VP9_ENC_BORDER_IN_PIXELS, + VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL)) vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate frame buffer"); @@ -3839,7 +3839,7 @@ void vp10_scale_references(VP10_COMP *cpi) { #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif - (VP9_ENC_BORDER_IN_PIXELS << 3), + (VPX_ENC_BORDER_IN_PIXELS << 3), cm->byte_alignment, NULL, NULL, NULL)) vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, @@ -4147,7 +4147,7 @@ static void set_frame_size(VP10_COMP *cpi) { #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif - VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment, + VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL)) vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate frame buffer"); @@ -5204,7 +5204,7 @@ static void setup_denoiser_buffer(VP10_COMP *cpi) { #if CONFIG_VP9_HIGHBITDEPTH cm->use_highbitdepth, #endif - VP9_ENC_BORDER_IN_PIXELS)) + VPX_ENC_BORDER_IN_PIXELS)) vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate denoiser"); } diff --git a/vp10/encoder/encoder.h b/vp10/encoder/encoder.h index e1a155e76..be1941370 100644 --- a/vp10/encoder/encoder.h +++ b/vp10/encoder/encoder.h @@ -464,7 +464,7 @@ typedef struct VP10_COMP { fractional_mv_step_fp *find_fractional_mv_step; vp10_full_search_fn_t full_search_sad; // It is currently unused. vp10_diamond_search_fn_t diamond_search_sad; - vp10_variance_fn_ptr_t fn_ptr[BLOCK_SIZES]; + vpx_variance_fn_ptr_t fn_ptr[BLOCK_SIZES]; uint64_t time_receive_data; uint64_t time_compress_data; uint64_t time_pick_lpf; diff --git a/vp10/encoder/firstpass.c b/vp10/encoder/firstpass.c index 6bb716554..d9bc96e7b 100644 --- a/vp10/encoder/firstpass.c +++ b/vp10/encoder/firstpass.c @@ -393,7 +393,7 @@ static void first_pass_motion_search(VP10_COMP *cpi, MACROBLOCK *x, MV ref_mv_full = {ref_mv->row >> 3, ref_mv->col >> 3}; int num00, tmp_err, n; const BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type; - vp10_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[bsize]; + vpx_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[bsize]; const int new_mv_mode_penalty = NEW_MV_MODE_PENALTY; int step_param = 3; diff --git a/vp10/encoder/lookahead.c b/vp10/encoder/lookahead.c index 9e8f536e3..c2db3f0fa 100644 --- a/vp10/encoder/lookahead.c +++ b/vp10/encoder/lookahead.c @@ -77,7 +77,7 @@ struct lookahead_ctx *vp10_lookahead_init(unsigned int width, #if CONFIG_VP9_HIGHBITDEPTH use_highbitdepth, #endif - VP9_ENC_BORDER_IN_PIXELS, + VPX_ENC_BORDER_IN_PIXELS, legacy_byte_alignment)) goto bail; } @@ -177,7 +177,7 @@ int vp10_lookahead_push(struct lookahead_ctx *ctx, YV12_BUFFER_CONFIG *src, #if CONFIG_VP9_HIGHBITDEPTH use_highbitdepth, #endif - VP9_ENC_BORDER_IN_PIXELS, + VPX_ENC_BORDER_IN_PIXELS, 0)) return 1; vpx_free_frame_buffer(&buf->img); diff --git a/vp10/encoder/mbgraph.c b/vp10/encoder/mbgraph.c index 46cff80f5..dd794e46d 100644 --- a/vp10/encoder/mbgraph.c +++ b/vp10/encoder/mbgraph.c @@ -30,7 +30,7 @@ static unsigned int do_16x16_motion_iteration(VP10_COMP *cpi, MACROBLOCK *const x = &cpi->td.mb; MACROBLOCKD *const xd = &x->e_mbd; const MV_SPEED_FEATURES *const mv_sf = &cpi->sf.mv; - const vp10_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[BLOCK_16X16]; + const vpx_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[BLOCK_16X16]; const int tmp_col_min = x->mv_col_min; const int tmp_col_max = x->mv_col_max; diff --git a/vp10/encoder/mcomp.c b/vp10/encoder/mcomp.c index 517283a48..cc2ba4750 100644 --- a/vp10/encoder/mcomp.c +++ b/vp10/encoder/mcomp.c @@ -340,7 +340,7 @@ static unsigned int setup_center_error(const MACROBLOCKD *xd, const MV *bestmv, const MV *ref_mv, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, const uint8_t *const src, const int src_stride, const uint8_t *const y, @@ -416,7 +416,7 @@ int vp10_find_best_sub_pixel_tree_pruned_evenmore( const MV *ref_mv, int allow_hp, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *cost_list, @@ -496,7 +496,7 @@ int vp10_find_best_sub_pixel_tree_pruned_more(MACROBLOCK *x, const MV *ref_mv, int allow_hp, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *cost_list, @@ -573,7 +573,7 @@ int vp10_find_best_sub_pixel_tree_pruned(MACROBLOCK *x, const MV *ref_mv, int allow_hp, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *cost_list, @@ -674,7 +674,7 @@ static const MV search_step_table[12] = { }; static int upsampled_pref_error(const MACROBLOCKD *xd, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, const uint8_t *const src, const int src_stride, const uint8_t *const y, int y_stride, const uint8_t *second_pred, @@ -712,7 +712,7 @@ return besterr; static unsigned int upsampled_setup_center_error( const MACROBLOCKD *xd, const MV *bestmv, const MV *ref_mv, - int error_per_bit, const vp10_variance_fn_ptr_t *vfp, + int error_per_bit, const vpx_variance_fn_ptr_t *vfp, const uint8_t *const src, const int src_stride, const uint8_t *const y, int y_stride, const uint8_t *second_pred, int w, int h, int offset, int *mvjcost, int *mvcost[2], @@ -729,7 +729,7 @@ int vp10_find_best_sub_pixel_tree(MACROBLOCK *x, const MV *ref_mv, int allow_hp, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *cost_list, @@ -936,7 +936,7 @@ static INLINE int is_mv_in(const MACROBLOCK *x, const MV *mv) { static INLINE void calc_int_cost_list(const MACROBLOCK *x, const MV *const ref_mv, int sadpb, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *best_mv, int *cost_list) { static const MV neighbors[4] = {{0, -1}, {1, 0}, {0, 1}, {-1, 0}}; @@ -986,7 +986,7 @@ static INLINE void calc_int_cost_list(const MACROBLOCK *x, static INLINE void calc_int_sad_list(const MACROBLOCK *x, const MV *const ref_mv, int sadpb, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *best_mv, int *cost_list, const int use_mvcost, const int bestsad) { @@ -1045,7 +1045,7 @@ static int pattern_search(MACROBLOCK *x, int sad_per_bit, int do_init_search, int *cost_list, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv, const int num_candidates[MAX_PATTERN_SCALES], @@ -1302,7 +1302,7 @@ static int pattern_search(MACROBLOCK *x, int vp10_get_mvpred_var(const MACROBLOCK *x, const MV *best_mv, const MV *center_mv, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int use_mvcost) { const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const what = &x->plane[0].src; @@ -1319,7 +1319,7 @@ int vp10_get_mvpred_var(const MACROBLOCK *x, int vp10_get_mvpred_av_var(const MACROBLOCK *x, const MV *best_mv, const MV *center_mv, const uint8_t *second_pred, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int use_mvcost) { const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const what = &x->plane[0].src; @@ -1339,7 +1339,7 @@ int vp10_hex_search(MACROBLOCK *x, int sad_per_bit, int do_init_search, int *cost_list, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv) { // First scale has 8-closest points, the rest have 6 points in hex shape @@ -1373,7 +1373,7 @@ static int bigdia_search(MACROBLOCK *x, int sad_per_bit, int do_init_search, int *cost_list, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv) { // First scale has 4-closest points, the rest have 8 points in diamond @@ -1413,7 +1413,7 @@ static int square_search(MACROBLOCK *x, int sad_per_bit, int do_init_search, int *cost_list, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv) { // All scales have 8 closest points in square shape @@ -1453,7 +1453,7 @@ static int fast_hex_search(MACROBLOCK *x, int sad_per_bit, int do_init_search, // must be zero for fast_hex int *cost_list, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv) { return vp10_hex_search( @@ -1467,7 +1467,7 @@ static int fast_dia_search(MACROBLOCK *x, int sad_per_bit, int do_init_search, int *cost_list, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv) { return bigdia_search( @@ -1482,7 +1482,7 @@ static int fast_dia_search(MACROBLOCK *x, static int exhuastive_mesh_search(MACROBLOCK *x, MV *ref_mv, MV *best_mv, int range, int step, int sad_per_bit, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv) { const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const what = &x->plane[0].src; @@ -1571,7 +1571,7 @@ int vp10_diamond_search_sad_c(MACROBLOCK *x, const search_site_config *cfg, MV *ref_mv, MV *best_mv, int search_param, int sad_per_bit, int *num00, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv) { int i, j, step; @@ -1926,7 +1926,7 @@ static int full_pixel_diamond(VP10_COMP *cpi, MACROBLOCK *x, MV *mvp_full, int step_param, int sadpb, int further_steps, int do_refine, int *cost_list, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *ref_mv) { MV temp_mv; int thissme, n, num00 = 0; @@ -1994,7 +1994,7 @@ static int full_pixel_diamond(VP10_COMP *cpi, MACROBLOCK *x, static int full_pixel_exhaustive(VP10_COMP *cpi, MACROBLOCK *x, const MV *centre_mv_full, int sadpb, int *cost_list, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *ref_mv, MV *dst_mv) { const SPEED_FEATURES *const sf = &cpi->sf; MV temp_mv = {centre_mv_full->row, centre_mv_full->col}; @@ -2053,7 +2053,7 @@ static int full_pixel_exhaustive(VP10_COMP *cpi, MACROBLOCK *x, int vp10_full_search_sad_c(const MACROBLOCK *x, const MV *ref_mv, int sad_per_bit, int distance, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv, MV *best_mv) { int r, c; const MACROBLOCKD *const xd = &x->e_mbd; @@ -2086,7 +2086,7 @@ int vp10_full_search_sad_c(const MACROBLOCK *x, const MV *ref_mv, int vp10_full_search_sadx3(const MACROBLOCK *x, const MV *ref_mv, int sad_per_bit, int distance, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv, MV *best_mv) { int r; const MACROBLOCKD *const xd = &x->e_mbd; @@ -2151,7 +2151,7 @@ int vp10_full_search_sadx3(const MACROBLOCK *x, const MV *ref_mv, int vp10_full_search_sadx8(const MACROBLOCK *x, const MV *ref_mv, int sad_per_bit, int distance, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv, MV *best_mv) { int r; const MACROBLOCKD *const xd = &x->e_mbd; @@ -2241,7 +2241,7 @@ int vp10_full_search_sadx8(const MACROBLOCK *x, const MV *ref_mv, int vp10_refining_search_sad(MACROBLOCK *x, MV *ref_mv, int error_per_bit, int search_range, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv) { const MACROBLOCKD *const xd = &x->e_mbd; const MV neighbors[4] = {{ -1, 0}, {0, -1}, {0, 1}, {1, 0}}; @@ -2321,7 +2321,7 @@ int vp10_refining_search_sad(MACROBLOCK *x, int vp10_refining_search_8p_c(MACROBLOCK *x, int error_per_bit, int search_range, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv, const uint8_t *second_pred) { const MV neighbors[8] = {{-1, 0}, {0, -1}, {0, 1}, {1, 0}, @@ -2385,7 +2385,7 @@ int vp10_full_pixel_search(VP10_COMP *cpi, MACROBLOCK *x, int var_max, int rd) { const SPEED_FEATURES *const sf = &cpi->sf; const SEARCH_METHODS method = sf->mv.search_method; - vp10_variance_fn_ptr_t *fn_ptr = &cpi->fn_ptr[bsize]; + vpx_variance_fn_ptr_t *fn_ptr = &cpi->fn_ptr[bsize]; int var = 0; if (cost_list) { @@ -2514,7 +2514,7 @@ int vp10_find_best_masked_sub_pixel_tree(const MACROBLOCK *x, MV *bestmv, const MV *ref_mv, int allow_hp, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *mvjcost, int *mvcost[2], @@ -2606,7 +2606,7 @@ static unsigned int setup_masked_center_error(const uint8_t *mask, const MV *bestmv, const MV *ref_mv, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, const uint8_t *const src, const int src_stride, const uint8_t *const y, @@ -2626,7 +2626,7 @@ static unsigned int setup_masked_center_error(const uint8_t *mask, static int upsampled_masked_pref_error(const MACROBLOCKD *xd, const uint8_t *mask, int mask_stride, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, const uint8_t *const src, const int src_stride, const uint8_t *const y, int y_stride, @@ -2659,7 +2659,7 @@ static unsigned int upsampled_setup_masked_center_error( const MACROBLOCKD *xd, const uint8_t *mask, int mask_stride, const MV *bestmv, const MV *ref_mv, - int error_per_bit, const vp10_variance_fn_ptr_t *vfp, + int error_per_bit, const vpx_variance_fn_ptr_t *vfp, const uint8_t *const src, const int src_stride, const uint8_t *const y, int y_stride, int w, int h, int offset, int *mvjcost, int *mvcost[2], @@ -2680,7 +2680,7 @@ int vp10_find_best_masked_sub_pixel_tree_up(VP10_COMP *cpi, MV *bestmv, const MV *ref_mv, int allow_hp, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *mvjcost, int *mvcost[2], @@ -2879,7 +2879,7 @@ int vp10_find_best_masked_sub_pixel_tree_up(VP10_COMP *cpi, static int get_masked_mvpred_var(const MACROBLOCK *x, const uint8_t *mask, int mask_stride, const MV *best_mv, const MV *center_mv, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int use_mvcost, int is_second) { const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const what = &x->plane[0].src; @@ -2898,7 +2898,7 @@ int masked_refining_search_sad(const MACROBLOCK *x, const uint8_t *mask, int mask_stride, MV *ref_mv, int error_per_bit, int search_range, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv, int is_second) { const MV neighbors[4] = {{ -1, 0}, {0, -1}, {0, 1}, {1, 0}}; const MACROBLOCKD *const xd = &x->e_mbd; @@ -2946,7 +2946,7 @@ int masked_diamond_search_sad(const MACROBLOCK *x, MV *ref_mv, MV *best_mv, int search_param, int sad_per_bit, int *num00, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv, int is_second) { const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const what = &x->plane[0].src; @@ -3036,7 +3036,7 @@ int vp10_masked_full_pixel_diamond(const VP10_COMP *cpi, MACROBLOCK *x, const uint8_t *mask, int mask_stride, MV *mvp_full, int step_param, int sadpb, int further_steps, int do_refine, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *ref_mv, MV *dst_mv, int is_second) { MV temp_mv; @@ -3156,7 +3156,7 @@ static unsigned int setup_obmc_center_error(const int32_t *mask, const MV *bestmv, const MV *ref_mv, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, const int32_t *const wsrc, const uint8_t *const y, int y_stride, @@ -3173,7 +3173,7 @@ static unsigned int setup_obmc_center_error(const int32_t *mask, static int upsampled_obmc_pref_error(const MACROBLOCKD *xd, const int32_t *mask, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, const int32_t *const wsrc, const uint8_t *const y, int y_stride, int w, int h, unsigned int *sse) { @@ -3203,7 +3203,7 @@ static unsigned int upsampled_setup_obmc_center_error( const MACROBLOCKD *xd, const int32_t *mask, const MV *bestmv, const MV *ref_mv, - int error_per_bit, const vp10_variance_fn_ptr_t *vfp, + int error_per_bit, const vpx_variance_fn_ptr_t *vfp, const int32_t *const wsrc, const uint8_t *const y, int y_stride, int w, int h, int offset, int *mvjcost, int *mvcost[2], @@ -3222,7 +3222,7 @@ int vp10_find_best_obmc_sub_pixel_tree_up(VP10_COMP *cpi, MACROBLOCK *x, int mi_row, int mi_col, MV *bestmv, const MV *ref_mv, int allow_hp, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *mvjcost, int *mvcost[2], int *distortion, unsigned int *sse1, @@ -3413,7 +3413,7 @@ static int get_obmc_mvpred_var(const MACROBLOCK *x, const int32_t *wsrc, const int32_t *mask, const MV *best_mv, const MV *center_mv, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int use_mvcost, int is_second) { const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const in_what = &xd->plane[0].pre[is_second]; @@ -3431,7 +3431,7 @@ int obmc_refining_search_sad(const MACROBLOCK *x, const int32_t *mask, MV *ref_mv, int error_per_bit, int search_range, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv, int is_second) { const MV neighbors[4] = {{ -1, 0}, {0, -1}, {0, 1}, {1, 0}}; const MACROBLOCKD *const xd = &x->e_mbd; @@ -3477,7 +3477,7 @@ int obmc_diamond_search_sad(const MACROBLOCK *x, MV *ref_mv, MV *best_mv, int search_param, int sad_per_bit, int *num00, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv, int is_second) { const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const in_what = &xd->plane[0].pre[is_second]; @@ -3562,7 +3562,7 @@ int vp10_obmc_full_pixel_diamond(const VP10_COMP *cpi, MACROBLOCK *x, const int32_t *wsrc, const int32_t *mask, MV *mvp_full, int step_param, int sadpb, int further_steps, int do_refine, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *ref_mv, MV *dst_mv, int is_second) { MV temp_mv; diff --git a/vp10/encoder/mcomp.h b/vp10/encoder/mcomp.h index 98e2b189a..c2e906a52 100644 --- a/vp10/encoder/mcomp.h +++ b/vp10/encoder/mcomp.h @@ -29,7 +29,7 @@ extern "C" { #define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS-1)) // Allowed motion vector pixel distance outside image border // for Block_16x16 -#define BORDER_MV_PIXELS_B16 (16 + VP9_INTERP_EXTEND) +#define BORDER_MV_PIXELS_B16 (16 + VPX_INTERP_EXTEND) // motion search site typedef struct search_site { @@ -53,12 +53,12 @@ int vp10_mv_bit_cost(const MV *mv, const MV *ref, // Utility to compute variance + MV rate cost for a given MV int vp10_get_mvpred_var(const MACROBLOCK *x, const MV *best_mv, const MV *center_mv, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int use_mvcost); int vp10_get_mvpred_av_var(const MACROBLOCK *x, const MV *best_mv, const MV *center_mv, const uint8_t *second_pred, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int use_mvcost); struct VP10_COMP; @@ -69,7 +69,7 @@ int vp10_init_search_range(int size); int vp10_refining_search_sad(struct macroblock *x, struct mv *ref_mv, int sad_per_bit, int distance, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const struct mv *center_mv); // Runs sequence of diamond searches in smaller steps for RD. @@ -77,7 +77,7 @@ int vp10_full_pixel_diamond(const struct VP10_COMP *cpi, MACROBLOCK *x, MV *mvp_full, int step_param, int sadpb, int further_steps, int do_refine, int *cost_list, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *ref_mv, MV *dst_mv); // Perform integral projection based motion estimation. @@ -93,7 +93,7 @@ int vp10_hex_search(MACROBLOCK *x, int sad_per_bit, int do_init_search, int *cost_list, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv); @@ -102,7 +102,7 @@ typedef int (fractional_mv_step_fp) ( const MV *ref_mv, int allow_hp, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int forced_stop, // 0 - full, 1 - qtr only, 2 - half only int iters_per_step, int *cost_list, @@ -119,7 +119,7 @@ extern fractional_mv_step_fp vp10_find_best_sub_pixel_tree_pruned_evenmore; typedef int (*vp10_full_search_fn_t)(const MACROBLOCK *x, const MV *ref_mv, int sad_per_bit, int distance, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv, MV *best_mv); typedef int (*vp10_diamond_search_fn_t)(MACROBLOCK *x, @@ -127,13 +127,13 @@ typedef int (*vp10_diamond_search_fn_t)(MACROBLOCK *x, MV *ref_mv, MV *best_mv, int search_param, int sad_per_bit, int *num00, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv); int vp10_refining_search_8p_c(MACROBLOCK *x, int error_per_bit, int search_range, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv, const uint8_t *second_pred); struct VP10_COMP; @@ -150,7 +150,7 @@ int vp10_find_best_masked_sub_pixel_tree(const MACROBLOCK *x, MV *bestmv, const MV *ref_mv, int allow_hp, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *mvjcost, int *mvcost[2], @@ -165,7 +165,7 @@ int vp10_find_best_masked_sub_pixel_tree_up(struct VP10_COMP *cpi, MV *bestmv, const MV *ref_mv, int allow_hp, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *mvjcost, int *mvcost[2], @@ -177,7 +177,7 @@ int vp10_masked_full_pixel_diamond(const struct VP10_COMP *cpi, MACROBLOCK *x, const uint8_t *mask, int mask_stride, MV *mvp_full, int step_param, int sadpb, int further_steps, int do_refine, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *ref_mv, MV *dst_mv, int is_second); #endif // CONFIG_EXT_INTER @@ -188,7 +188,7 @@ int vp10_obmc_full_pixel_diamond(const struct VP10_COMP *cpi, MACROBLOCK *x, const int32_t *mask, MV *mvp_full, int step_param, int sadpb, int further_steps, int do_refine, - const vp10_variance_fn_ptr_t *fn_ptr, + const vpx_variance_fn_ptr_t *fn_ptr, const MV *ref_mv, MV *dst_mv, int is_second); int vp10_find_best_obmc_sub_pixel_tree_up(struct VP10_COMP *cpi, MACROBLOCK *x, @@ -197,7 +197,7 @@ int vp10_find_best_obmc_sub_pixel_tree_up(struct VP10_COMP *cpi, MACROBLOCK *x, int mi_row, int mi_col, MV *bestmv, const MV *ref_mv, int allow_hp, int error_per_bit, - const vp10_variance_fn_ptr_t *vfp, + const vpx_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *mvjcost, int *mvcost[2], int *distortion, unsigned int *sse1, diff --git a/vp10/encoder/mips/msa/fdct4x4_msa.c b/vp10/encoder/mips/msa/fdct4x4_msa.c index 37269f0a4..175403853 100644 --- a/vp10/encoder/mips/msa/fdct4x4_msa.c +++ b/vp10/encoder/mips/msa/fdct4x4_msa.c @@ -72,19 +72,19 @@ void vp10_fht4x4_msa(const int16_t *input, int16_t *output, int32_t stride, VP9_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3); break; case ADST_DCT: - VP9_FADST4(in0, in1, in2, in3, in0, in1, in2, in3); + VPX_FADST4(in0, in1, in2, in3, in0, in1, in2, in3); TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3); VP9_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3); break; case DCT_ADST: VP9_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3); TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3); - VP9_FADST4(in0, in1, in2, in3, in0, in1, in2, in3); + VPX_FADST4(in0, in1, in2, in3, in0, in1, in2, in3); break; case ADST_ADST: - VP9_FADST4(in0, in1, in2, in3, in0, in1, in2, in3); + VPX_FADST4(in0, in1, in2, in3, in0, in1, in2, in3); TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3); - VP9_FADST4(in0, in1, in2, in3, in0, in1, in2, in3); + VPX_FADST4(in0, in1, in2, in3, in0, in1, in2, in3); break; default: assert(0); diff --git a/vp10/encoder/mips/msa/fdct8x8_msa.c b/vp10/encoder/mips/msa/fdct8x8_msa.c index 4283eb946..8e1e111b3 100644 --- a/vp10/encoder/mips/msa/fdct8x8_msa.c +++ b/vp10/encoder/mips/msa/fdct8x8_msa.c @@ -23,35 +23,35 @@ void vp10_fht8x8_msa(const int16_t *input, int16_t *output, int32_t stride, switch (tx_type) { case DCT_DCT: - VP9_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); - VP9_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); break; case ADST_DCT: - VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); - VP9_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); break; case DCT_ADST: - VP9_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); - VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); break; case ADST_ADST: - VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); - VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); break; default: diff --git a/vp10/encoder/mips/msa/fdct_msa.h b/vp10/encoder/mips/msa/fdct_msa.h index d7d40cb72..576728052 100644 --- a/vp10/encoder/mips/msa/fdct_msa.h +++ b/vp10/encoder/mips/msa/fdct_msa.h @@ -15,7 +15,7 @@ #include "vpx_dsp/mips/txfm_macros_msa.h" #include "vpx_ports/mem.h" -#define VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, \ +#define VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, \ out0, out1, out2, out3, out4, out5, out6, out7) { \ v8i16 cnst0_m, cnst1_m, cnst2_m, cnst3_m, cnst4_m; \ v8i16 vec0_m, vec1_m, vec2_m, vec3_m, s0_m, s1_m; \ @@ -81,7 +81,7 @@ out5 = -out5; \ } -#define VP9_FADST4(in0, in1, in2, in3, out0, out1, out2, out3) { \ +#define VPX_FADST4(in0, in1, in2, in3, out0, out1, out2, out3) { \ v4i32 s0_m, s1_m, s2_m, s3_m, constant_m; \ v4i32 in0_r_m, in1_r_m, in2_r_m, in3_r_m; \ \ diff --git a/vp10/encoder/rdopt.c b/vp10/encoder/rdopt.c index d5a793903..a20e9f94b 100644 --- a/vp10/encoder/rdopt.c +++ b/vp10/encoder/rdopt.c @@ -6538,9 +6538,9 @@ static int discount_newmv_test(const VP10_COMP *cpi, (mode_mv[NEARMV][ref_frame].as_int == INVALID_MV))); } -#define LEFT_TOP_MARGIN ((VP9_ENC_BORDER_IN_PIXELS - VP9_INTERP_EXTEND) << 3) -#define RIGHT_BOTTOM_MARGIN ((VP9_ENC_BORDER_IN_PIXELS -\ - VP9_INTERP_EXTEND) << 3) +#define LEFT_TOP_MARGIN ((VPX_ENC_BORDER_IN_PIXELS - VPX_INTERP_EXTEND) << 3) +#define RIGHT_BOTTOM_MARGIN ((VPX_ENC_BORDER_IN_PIXELS -\ + VPX_INTERP_EXTEND) << 3) // TODO(jingning): this mv clamping function should be block size dependent. static INLINE void clamp_mv2(MV *mv, const MACROBLOCKD *xd) { diff --git a/vp10/encoder/skin_detection.c b/vp10/encoder/skin_detection.c index 9aac477a8..1714cd34d 100644 --- a/vp10/encoder/skin_detection.c +++ b/vp10/encoder/skin_detection.c @@ -63,7 +63,7 @@ void vp10_compute_skin_map(VP10_COMP *const cpi, FILE *yuv_skinmap_file) { memset(&skinmap, 0, sizeof(YV12_BUFFER_CONFIG)); if (vpx_alloc_frame_buffer(&skinmap, cm->width, cm->height, cm->subsampling_x, cm->subsampling_y, - VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment)) { + VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment)) { vpx_free_frame_buffer(&skinmap); return; } diff --git a/vp10/encoder/temporal_filter.c b/vp10/encoder/temporal_filter.c index 707de96fa..8217e09de 100644 --- a/vp10/encoder/temporal_filter.c +++ b/vp10/encoder/temporal_filter.c @@ -384,16 +384,16 @@ static void temporal_filter_iterate_c(VP10_COMP *cpi, // L/A/G reference frames that have a border of 32 (VP9ENCBORDERINPIXELS) // A 6/8 tap filter is used for motion search. This requires 2 pixels // before and 3 pixels after. So the largest Y mv on a border would - // then be 16 - VP9_INTERP_EXTEND. The UV blocks are half the size of the + // then be 16 - VPX_INTERP_EXTEND. The UV blocks are half the size of the // Y and therefore only extended by 8. The largest mv that a UV block - // can support is 8 - VP9_INTERP_EXTEND. A UV mv is half of a Y mv. - // (16 - VP9_INTERP_EXTEND) >> 1 which is greater than - // 8 - VP9_INTERP_EXTEND. + // can support is 8 - VPX_INTERP_EXTEND. A UV mv is half of a Y mv. + // (16 - VPX_INTERP_EXTEND) >> 1 which is greater than + // 8 - VPX_INTERP_EXTEND. // To keep the mv in play for both Y and UV planes the max that it - // can be on a border is therefore 16 - (2*VP9_INTERP_EXTEND+1). - cpi->td.mb.mv_row_min = -((mb_row * 16) + (17 - 2 * VP9_INTERP_EXTEND)); + // can be on a border is therefore 16 - (2*VPX_INTERP_EXTEND+1). + cpi->td.mb.mv_row_min = -((mb_row * 16) + (17 - 2 * VPX_INTERP_EXTEND)); cpi->td.mb.mv_row_max = ((mb_rows - 1 - mb_row) * 16) - + (17 - 2 * VP9_INTERP_EXTEND); + + (17 - 2 * VPX_INTERP_EXTEND); for (mb_col = 0; mb_col < mb_cols; mb_col++) { int i, j, k; @@ -402,9 +402,9 @@ static void temporal_filter_iterate_c(VP10_COMP *cpi, memset(accumulator, 0, 16 * 16 * 3 * sizeof(accumulator[0])); memset(count, 0, 16 * 16 * 3 * sizeof(count[0])); - cpi->td.mb.mv_col_min = -((mb_col * 16) + (17 - 2 * VP9_INTERP_EXTEND)); + cpi->td.mb.mv_col_min = -((mb_col * 16) + (17 - 2 * VPX_INTERP_EXTEND)); cpi->td.mb.mv_col_max = ((mb_cols - 1 - mb_col) * 16) - + (17 - 2 * VP9_INTERP_EXTEND); + + (17 - 2 * VPX_INTERP_EXTEND); for (frame = 0; frame < frame_count; frame++) { const int thresh_low = 10000; diff --git a/vp10/vp10_dx_iface.c b/vp10/vp10_dx_iface.c index d5c4c1c86..f416eb978 100644 --- a/vp10/vp10_dx_iface.c +++ b/vp10/vp10_dx_iface.c @@ -203,7 +203,7 @@ static vpx_codec_err_t decoder_peek_si_internal(const uint8_t *data, const int frame_marker = vpx_rb_read_literal(&rb, 2); const BITSTREAM_PROFILE profile = vp10_read_profile(&rb); - if (frame_marker != VP9_FRAME_MARKER) + if (frame_marker != VPX_FRAME_MARKER) return VPX_CODEC_UNSUP_BITSTREAM; if (profile >= MAX_PROFILES) diff --git a/vp10/vp10_iface_common.h b/vp10/vp10_iface_common.h index 8a80bbe9d..73a3edb1d 100644 --- a/vp10/vp10_iface_common.h +++ b/vp10/vp10_iface_common.h @@ -40,7 +40,7 @@ static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12, img->range = yv12->color_range; img->bit_depth = 8; img->w = yv12->y_stride; - img->h = ALIGN_POWER_OF_TWO(yv12->y_height + 2 * VP9_ENC_BORDER_IN_PIXELS, 3); + img->h = ALIGN_POWER_OF_TWO(yv12->y_height + 2 * VPX_ENC_BORDER_IN_PIXELS, 3); img->d_w = yv12->y_crop_width; img->d_h = yv12->y_crop_height; img->r_w = yv12->render_width; diff --git a/vpx_dsp/mips/fwd_txfm_msa.c b/vpx_dsp/mips/fwd_txfm_msa.c index 0dd141f41..164af78f5 100644 --- a/vpx_dsp/mips/fwd_txfm_msa.c +++ b/vpx_dsp/mips/fwd_txfm_msa.c @@ -203,11 +203,11 @@ void vpx_fdct8x8_msa(const int16_t *input, int16_t *output, LD_SH8(input, src_stride, in0, in1, in2, in3, in4, in5, in6, in7); SLLI_4V(in0, in1, in2, in3, 2); SLLI_4V(in4, in5, in6, in7, 2); - VP9_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); - VP9_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, + VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); diff --git a/vpx_dsp/mips/fwd_txfm_msa.h b/vpx_dsp/mips/fwd_txfm_msa.h index d1e160eed..0ee2ac72f 100644 --- a/vpx_dsp/mips/fwd_txfm_msa.h +++ b/vpx_dsp/mips/fwd_txfm_msa.h @@ -67,7 +67,7 @@ in4, in5, in6, in7); \ } -#define VP9_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, \ +#define VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, \ out0, out1, out2, out3, out4, out5, out6, out7) { \ v8i16 s0_m, s1_m, s2_m, s3_m, s4_m, s5_m, s6_m; \ v8i16 s7_m, x0_m, x1_m, x2_m, x3_m; \ diff --git a/vpx_dsp/mips/inv_txfm_msa.h b/vpx_dsp/mips/inv_txfm_msa.h index 1458561a6..db9f6247a 100644 --- a/vpx_dsp/mips/inv_txfm_msa.h +++ b/vpx_dsp/mips/inv_txfm_msa.h @@ -15,7 +15,7 @@ #include "vpx_dsp/mips/txfm_macros_msa.h" #include "vpx_dsp/txfm_common.h" -#define VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, \ +#define VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, \ out0, out1, out2, out3, out4, out5, out6, out7) { \ v8i16 cnst0_m, cnst1_m, cnst2_m, cnst3_m, cnst4_m; \ v8i16 vec0_m, vec1_m, vec2_m, vec3_m, s0_m, s1_m; \ diff --git a/vpx_dsp/variance.h b/vpx_dsp/variance.h index 42d36dce0..837fc3dbc 100644 --- a/vpx_dsp/variance.h +++ b/vpx_dsp/variance.h @@ -101,7 +101,7 @@ typedef unsigned int (*vpx_obmc_subpixvariance_fn_t)(const uint8_t *pred, #endif // CONFIG_VP10 && CONFIG_OBMC #if CONFIG_VP10 -typedef struct vp10_variance_vtable { +typedef struct vpx_variance_vtable { vpx_sad_fn_t sdf; vpx_sad_avg_fn_t sdaf; vpx_variance_fn_t vf; @@ -120,7 +120,7 @@ typedef struct vp10_variance_vtable { vpx_obmc_variance_fn_t ovf; vpx_obmc_subpixvariance_fn_t osvf; #endif // CONFIG_OBMC -} vp10_variance_fn_ptr_t; +} vpx_variance_fn_ptr_t; #endif // CONFIG_VP10 void vpx_highbd_var_filter_block2d_bil_first_pass( diff --git a/vpx_scale/generic/yv12extend.c b/vpx_scale/generic/yv12extend.c index 97361481b..ef670ed9f 100644 --- a/vpx_scale/generic/yv12extend.c +++ b/vpx_scale/generic/yv12extend.c @@ -202,8 +202,8 @@ void vpx_extend_frame_borders_c(YV12_BUFFER_CONFIG *ybf) { } void vpx_extend_frame_inner_borders_c(YV12_BUFFER_CONFIG *ybf) { - const int inner_bw = (ybf->border > VP9INNERBORDERINPIXELS) ? - VP9INNERBORDERINPIXELS : ybf->border; + const int inner_bw = (ybf->border > VPXINNERBORDERINPIXELS) ? + VPXINNERBORDERINPIXELS : ybf->border; extend_frame(ybf, inner_bw); } diff --git a/vpx_scale/mips/dspr2/yv12extend_dspr2.c b/vpx_scale/mips/dspr2/yv12extend_dspr2.c index aab478539..363c7fdf0 100644 --- a/vpx_scale/mips/dspr2/yv12extend_dspr2.c +++ b/vpx_scale/mips/dspr2/yv12extend_dspr2.c @@ -137,8 +137,8 @@ void vpx_extend_frame_borders_dspr2(YV12_BUFFER_CONFIG *ybf) { } void vpx_extend_frame_inner_borders_dspr2(YV12_BUFFER_CONFIG *ybf) { - const int inner_bw = (ybf->border > VP9INNERBORDERINPIXELS) ? - VP9INNERBORDERINPIXELS : ybf->border; + const int inner_bw = (ybf->border > VPXINNERBORDERINPIXELS) ? + VPXINNERBORDERINPIXELS : ybf->border; extend_frame(ybf, inner_bw); } #endif diff --git a/vpx_scale/yv12config.h b/vpx_scale/yv12config.h index 04467d0b2..5b3272fcc 100644 --- a/vpx_scale/yv12config.h +++ b/vpx_scale/yv12config.h @@ -22,13 +22,13 @@ extern "C" { #define VP8BORDERINPIXELS 32 #if CONFIG_EXT_PARTITION -# define VP9INNERBORDERINPIXELS 160 +# define VPXINNERBORDERINPIXELS 160 #else -# define VP9INNERBORDERINPIXELS 96 +# define VPXINNERBORDERINPIXELS 96 #endif // CONFIG_EXT_PARTITION -#define VP9_INTERP_EXTEND 4 -#define VP9_ENC_BORDER_IN_PIXELS 160 -#define VP9_DEC_BORDER_IN_PIXELS 160 +#define VPX_INTERP_EXTEND 4 +#define VPX_ENC_BORDER_IN_PIXELS 160 +#define VPX_DEC_BORDER_IN_PIXELS 160 typedef struct yv12_buffer_config { int y_width; -- 2.40.0