From 16c47bda785611672d3b350641d2eb06c3e1a352 Mon Sep 17 00:00:00 2001 From: Yaowu Xu <yaowu@google.com> Date: Mon, 25 Jan 2016 09:55:19 -0800 Subject: [PATCH] Rename vp8e_tune and vp9_tune_content to vpx_tune_metric and vpx_tune_content. Change-Id: I673aea01075b5241b621af779ca8d3e8d2e6c61c --- vp10/encoder/aq_cyclicrefresh.c | 2 +- vp10/encoder/encoder.h | 4 ++-- vp10/encoder/speed_features.c | 4 ++-- vp10/vp10_cx_iface.c | 12 ++++++------ vpx/vp8cx.h | 22 +++++++++++----------- vpxenc.c | 8 ++++---- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/vp10/encoder/aq_cyclicrefresh.c b/vp10/encoder/aq_cyclicrefresh.c index 660670ccea..7a36d6128b 100644 --- a/vp10/encoder/aq_cyclicrefresh.c +++ b/vp10/encoder/aq_cyclicrefresh.c @@ -407,7 +407,7 @@ static void cyclic_refresh_update_map(VP10_COMP *const cpi) { int mi_row = sb_row_index * MI_BLOCK_SIZE; int mi_col = sb_col_index * MI_BLOCK_SIZE; int qindex_thresh = - cpi->oxcf.content == VP9E_CONTENT_SCREEN + cpi->oxcf.content == VPX_CONTENT_SCREEN ? vp10_get_qindex(&cm->seg, CR_SEGMENT_ID_BOOST2, cm->base_qindex) : 0; assert(mi_row >= 0 && mi_row < cm->mi_rows); diff --git a/vp10/encoder/encoder.h b/vp10/encoder/encoder.h index 73b43437d0..87219edabb 100644 --- a/vp10/encoder/encoder.h +++ b/vp10/encoder/encoder.h @@ -219,8 +219,8 @@ typedef struct VP10EncoderConfig { vpx_fixed_buf_t firstpass_mb_stats_in; #endif - vp8e_tuning tuning; - vp9e_tune_content content; + vpx_tune_metric tuning; + vpx_tune_content content; #if CONFIG_VPX_HIGHBITDEPTH int use_highbitdepth; #endif diff --git a/vp10/encoder/speed_features.c b/vp10/encoder/speed_features.c index ce0aebeab0..b82dec0071 100644 --- a/vp10/encoder/speed_features.c +++ b/vp10/encoder/speed_features.c @@ -261,7 +261,7 @@ static void set_rt_speed_feature_framesize_dependent(VP10_COMP *cpi, } static void set_rt_speed_feature(VP10_COMP *cpi, SPEED_FEATURES *sf, - int speed, vp9e_tune_content content) { + int speed, vpx_tune_content content) { VP10_COMMON *const cm = &cpi->common; const int is_keyframe = cm->frame_type == KEY_FRAME; const int frames_since_key = is_keyframe ? 0 : cpi->rc.frames_since_key; @@ -372,7 +372,7 @@ static void set_rt_speed_feature(VP10_COMP *cpi, SPEED_FEATURES *sf, if (!is_keyframe) { int i; - if (content == VP9E_CONTENT_SCREEN) { + if (content == VPX_CONTENT_SCREEN) { for (i = 0; i < BLOCK_SIZES; ++i) sf->intra_y_mode_bsize_mask[i] = INTRA_DC_TM_H_V; } else { diff --git a/vp10/vp10_cx_iface.c b/vp10/vp10_cx_iface.c index aabfe890d4..9e38e23947 100644 --- a/vp10/vp10_cx_iface.c +++ b/vp10/vp10_cx_iface.c @@ -33,7 +33,7 @@ struct vp10_extracfg { unsigned int arnr_strength; unsigned int min_gf_interval; unsigned int max_gf_interval; - vp8e_tuning tuning; + vpx_tune_metric tuning; unsigned int cq_level; // constrained quality level unsigned int rc_max_intra_bitrate_pct; unsigned int rc_max_inter_bitrate_pct; @@ -43,7 +43,7 @@ struct vp10_extracfg { AQ_MODE aq_mode; unsigned int frame_periodic_boost; vpx_bit_depth_t bit_depth; - vp9e_tune_content content; + vpx_tune_content content; vpx_color_space_t color_space; int color_range; int render_width; @@ -62,7 +62,7 @@ static struct vp10_extracfg default_extra_cfg = { 5, // arnr_strength 0, // min_gf_interval; 0 -> default decision 0, // max_gf_interval; 0 -> default decision - VP8_TUNE_PSNR, // tuning + VPX_TUNE_PSNR, // tuning 10, // cq_level 0, // rc_max_intra_bitrate_pct 0, // rc_max_inter_bitrate_pct @@ -72,7 +72,7 @@ static struct vp10_extracfg default_extra_cfg = { NO_AQ, // aq_mode 0, // frame_periodic_delta_q VPX_BITS_8, // Bit depth - VP9E_CONTENT_DEFAULT, // content + VPX_CONTENT_DEFAULT, // content VPX_CS_UNKNOWN, // color space 0, // color range 0, // render width @@ -218,10 +218,10 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx, RANGE_CHECK(cfg, g_bit_depth, VPX_BITS_8, VPX_BITS_12); RANGE_CHECK(cfg, g_input_bit_depth, 8, 12); RANGE_CHECK(extra_cfg, content, - VP9E_CONTENT_DEFAULT, VP9E_CONTENT_INVALID - 1); + VPX_CONTENT_DEFAULT, VPX_CONTENT_INVALID - 1); // TODO(yaowu): remove this when ssim tuning is implemented for vp9 - if (extra_cfg->tuning == VP8_TUNE_SSIM) + if (extra_cfg->tuning == VPX_TUNE_SSIM) ERROR("Option --tune=ssim is not currently supported in VP9."); if (cfg->g_pass == VPX_RC_LAST_PASS) { diff --git a/vpx/vp8cx.h b/vpx/vp8cx.h index 3cbb0ec114..3344307bdf 100644 --- a/vpx/vp8cx.h +++ b/vpx/vp8cx.h @@ -441,8 +441,8 @@ enum vp8e_enc_control_id { /*!\brief Codec control function to set content type. * \note Valid parameter range: - * VP9E_CONTENT_DEFAULT = Regular video content (Default) - * VP9E_CONTENT_SCREEN = Screen capture content + * VPX_CONTENT_DEFAULT = Regular video content (Default) + * VPX_CONTENT_SCREEN = Screen capture content * * Supported in codecs: VP9 */ @@ -635,10 +635,10 @@ typedef enum { /*!brief VP9 encoder content type */ typedef enum { - VP9E_CONTENT_DEFAULT, - VP9E_CONTENT_SCREEN, - VP9E_CONTENT_INVALID -} vp9e_tune_content; + VPX_CONTENT_DEFAULT, + VPX_CONTENT_SCREEN, + VPX_CONTENT_INVALID +} vpx_tune_content; /*!\brief VP8 model tuning parameters * @@ -646,9 +646,9 @@ typedef enum { * */ typedef enum { - VP8_TUNE_PSNR, - VP8_TUNE_SSIM -} vp8e_tuning; + VPX_TUNE_PSNR, + VPX_TUNE_SSIM +} vpx_tune_metric; /*!\brief vp9 svc layer parameters * @@ -724,7 +724,7 @@ VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_STRENGTH, unsigned int) #define VPX_CTRL_VP8E_SET_ARNR_STRENGTH VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_ARNR_TYPE, unsigned int) #define VPX_CTRL_VP8E_SET_ARNR_TYPE -VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, int) /* vp8e_tuning */ +VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, int) /* vpx_tune_metric */ #define VPX_CTRL_VP8E_SET_TUNING VPX_CTRL_USE_TYPE(VP8E_SET_CQ_LEVEL, unsigned int) #define VPX_CTRL_VP8E_SET_CQ_LEVEL @@ -767,7 +767,7 @@ VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PERIODIC_BOOST, unsigned int) VPX_CTRL_USE_TYPE(VP9E_SET_NOISE_SENSITIVITY, unsigned int) #define VPX_CTRL_VP9E_SET_NOISE_SENSITIVITY -VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* vp9e_tune_content */ +VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* vpx_tune_content */ #define VPX_CTRL_VP9E_SET_TUNE_CONTENT VPX_CTRL_USE_TYPE(VP9E_SET_COLOR_SPACE, int) diff --git a/vpxenc.c b/vpxenc.c index 4cce0f389c..f3c8217980 100644 --- a/vpxenc.c +++ b/vpxenc.c @@ -339,8 +339,8 @@ static const arg_def_t arnr_strength = ARG_DEF( static const arg_def_t arnr_type = ARG_DEF( NULL, "arnr-type", 1, "AltRef type"); static const struct arg_enum_list tuning_enum[] = { - {"psnr", VP8_TUNE_PSNR}, - {"ssim", VP8_TUNE_SSIM}, + {"psnr", VPX_TUNE_PSNR}, + {"ssim", VPX_TUNE_SSIM}, {NULL, 0} }; static const arg_def_t tune_ssim = ARG_DEF_ENUM( @@ -412,8 +412,8 @@ static const arg_def_t inbitdeptharg = ARG_DEF( #endif static const struct arg_enum_list tune_content_enum[] = { - {"default", VP9E_CONTENT_DEFAULT}, - {"screen", VP9E_CONTENT_SCREEN}, + {"default", VPX_CONTENT_DEFAULT}, + {"screen", VPX_CONTENT_SCREEN}, {NULL, 0} }; -- GitLab