Merge "Change the control function of VP9 denoiser."
This commit is contained in:
commit
282fac96ca
@ -586,7 +586,7 @@ int main(int argc, char **argv) {
|
||||
vpx_codec_control(&codec, VP8E_SET_CPUUSED, speed);
|
||||
vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
|
||||
vpx_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0);
|
||||
vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, 0);
|
||||
vpx_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, 0);
|
||||
if (vpx_codec_control(&codec, VP9E_SET_SVC, 1)) {
|
||||
die_codec(&codec, "Failed to set SVC");
|
||||
}
|
||||
|
@ -555,7 +555,7 @@ static vpx_codec_err_t ctrl_set_enable_auto_alt_ref(vpx_codec_alg_priv_t *ctx,
|
||||
static vpx_codec_err_t ctrl_set_noise_sensitivity(vpx_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct vp9_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.noise_sensitivity = CAST(VP8E_SET_NOISE_SENSITIVITY, args);
|
||||
extra_cfg.noise_sensitivity = CAST(VP9E_SET_NOISE_SENSITIVITY, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
@ -1240,7 +1240,6 @@ static vpx_codec_ctrl_fn_map_t encoder_ctrl_maps[] = {
|
||||
{VP8E_SET_ACTIVEMAP, ctrl_set_active_map},
|
||||
{VP8E_SET_SCALEMODE, ctrl_set_scale_mode},
|
||||
{VP8E_SET_CPUUSED, ctrl_set_cpuused},
|
||||
{VP8E_SET_NOISE_SENSITIVITY, ctrl_set_noise_sensitivity},
|
||||
{VP8E_SET_ENABLEAUTOALTREF, ctrl_set_enable_auto_alt_ref},
|
||||
{VP8E_SET_SHARPNESS, ctrl_set_sharpness},
|
||||
{VP8E_SET_STATIC_THRESHOLD, ctrl_set_static_thresh},
|
||||
@ -1260,6 +1259,7 @@ static vpx_codec_ctrl_fn_map_t encoder_ctrl_maps[] = {
|
||||
{VP9E_SET_SVC_PARAMETERS, ctrl_set_svc_parameters},
|
||||
{VP9E_SET_SVC_LAYER_ID, ctrl_set_svc_layer_id},
|
||||
{VP9E_SET_TUNE_CONTENT, ctrl_set_tune_content},
|
||||
{VP9E_SET_NOISE_SENSITIVITY, ctrl_set_noise_sensitivity},
|
||||
|
||||
// Getters
|
||||
{VP8E_GET_LAST_QUANTIZER, ctrl_get_quantizer},
|
||||
|
14
vpx/vp8cx.h
14
vpx/vp8cx.h
@ -148,7 +148,12 @@ enum vp8e_enc_control_id {
|
||||
*/
|
||||
VP8E_SET_CPUUSED = 13,
|
||||
VP8E_SET_ENABLEAUTOALTREF, /**< control function to enable vp8 to automatic set and use altref frame */
|
||||
VP8E_SET_NOISE_SENSITIVITY, /**< control function to set noise sensitivity */
|
||||
/*!\brief control function to set noise sensitivity
|
||||
*
|
||||
* 0: off, 1: OnYOnly, 2: OnYUV,
|
||||
* 3: OnYUVAggressive, 4: Adaptive
|
||||
*/
|
||||
VP8E_SET_NOISE_SENSITIVITY,
|
||||
VP8E_SET_SHARPNESS, /**< control function to set sharpness */
|
||||
VP8E_SET_STATIC_THRESHOLD, /**< control function to set the threshold for macroblocks treated static */
|
||||
VP8E_SET_TOKEN_PARTITIONS, /**< control function to set the number of token partitions */
|
||||
@ -197,6 +202,11 @@ enum vp8e_enc_control_id {
|
||||
VP9E_SET_FRAME_PARALLEL_DECODING,
|
||||
VP9E_SET_AQ_MODE,
|
||||
VP9E_SET_FRAME_PERIODIC_BOOST,
|
||||
/*!\brief control function to set noise sensitivity
|
||||
*
|
||||
* 0: off, 1: OnYOnly
|
||||
*/
|
||||
VP9E_SET_NOISE_SENSITIVITY,
|
||||
|
||||
VP9E_SET_SVC,
|
||||
VP9E_SET_SVC_PARAMETERS,
|
||||
@ -376,6 +386,8 @@ VPX_CTRL_USE_TYPE(VP9E_SET_AQ_MODE, unsigned int)
|
||||
|
||||
VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PERIODIC_BOOST, unsigned int)
|
||||
|
||||
VPX_CTRL_USE_TYPE(VP9E_SET_NOISE_SENSITIVITY, unsigned int)
|
||||
|
||||
VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* vp9e_tune_content */
|
||||
/*! @} - end defgroup vp8_encoder */
|
||||
#ifdef __cplusplus
|
||||
|
10
vpxenc.c
10
vpxenc.c
@ -415,10 +415,11 @@ static const arg_def_t tune_content = ARG_DEF_ENUM(
|
||||
NULL, "tune-content", 1, "Tune content type", tune_content_enum);
|
||||
|
||||
static const arg_def_t *vp9_args[] = {
|
||||
&cpu_used, &auto_altref, &noise_sens, &sharpness, &static_thresh,
|
||||
&cpu_used, &auto_altref, &sharpness, &static_thresh,
|
||||
&tile_cols, &tile_rows, &arnr_maxframes, &arnr_strength, &arnr_type,
|
||||
&tune_ssim, &cq_level, &max_intra_rate_pct, &lossless,
|
||||
&frame_parallel_decoding, &aq_mode, &frame_periodic_boost, &tune_content,
|
||||
&frame_parallel_decoding, &aq_mode, &frame_periodic_boost,
|
||||
&noise_sens, &tune_content,
|
||||
#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
|
||||
&bitdeptharg, &inbitdeptharg,
|
||||
#endif
|
||||
@ -426,12 +427,13 @@ static const arg_def_t *vp9_args[] = {
|
||||
};
|
||||
static const int vp9_arg_ctrl_map[] = {
|
||||
VP8E_SET_CPUUSED, VP8E_SET_ENABLEAUTOALTREF,
|
||||
VP8E_SET_NOISE_SENSITIVITY, VP8E_SET_SHARPNESS, VP8E_SET_STATIC_THRESHOLD,
|
||||
VP8E_SET_SHARPNESS, VP8E_SET_STATIC_THRESHOLD,
|
||||
VP9E_SET_TILE_COLUMNS, VP9E_SET_TILE_ROWS,
|
||||
VP8E_SET_ARNR_MAXFRAMES, VP8E_SET_ARNR_STRENGTH, VP8E_SET_ARNR_TYPE,
|
||||
VP8E_SET_TUNING, VP8E_SET_CQ_LEVEL, VP8E_SET_MAX_INTRA_BITRATE_PCT,
|
||||
VP9E_SET_LOSSLESS, VP9E_SET_FRAME_PARALLEL_DECODING, VP9E_SET_AQ_MODE,
|
||||
VP9E_SET_FRAME_PERIODIC_BOOST, VP9E_SET_TUNE_CONTENT,
|
||||
VP9E_SET_FRAME_PERIODIC_BOOST, VP9E_SET_NOISE_SENSITIVITY,
|
||||
VP9E_SET_TUNE_CONTENT,
|
||||
0
|
||||
};
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user