Commit 16c47bda authored by Yaowu Xu's avatar Yaowu Xu

Rename vp8e_tune and vp9_tune_content

to vpx_tune_metric and vpx_tune_content.

Change-Id: I673aea01075b5241b621af779ca8d3e8d2e6c61c
parent b739d3ae
......@@ -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);
......
......@@ -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
......
......@@ -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 {
......
......@@ -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) {
......
......@@ -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)
......
......@@ -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}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment