From b0da9b399d8e9129f47c81366902e66823063878 Mon Sep 17 00:00:00 2001 From: John Koleszar Date: Fri, 17 Dec 2010 09:43:39 -0500 Subject: Add psnr/ssim tuning option Add a new encoder control, VP8E_SET_TUNING, to allow the application to inform the encoder that the material will benefit from certain tuning. Expose this control as the --tune option to vpxenc. The args helper is expanded to support enumerated arguments by name or value. Two tunings are provided by this patch, PSNR (default) and SSIM. Activity masking is made dependent on setting --tune=ssim, as the current implementation hurts speed (10%) and PSNR (2.7% avg, 10% peak) too much for it to be a default yet. Change-Id: I110d969381c4805347ff5a0ffaf1a14ca1965257 --- vp8/vp8_cx_iface.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'vp8/vp8_cx_iface.c') diff --git a/vp8/vp8_cx_iface.c b/vp8/vp8_cx_iface.c index ed830cca0..f95920775 100644 --- a/vp8/vp8_cx_iface.c +++ b/vp8/vp8_cx_iface.c @@ -37,6 +37,7 @@ struct vp8_extracfg unsigned int arnr_max_frames; /* alt_ref Noise Reduction Max Frame Count */ unsigned int arnr_strength; /* alt_ref Noise Reduction Strength */ unsigned int arnr_type; /* alt_ref filter type */ + vp8e_tuning tuning; }; @@ -67,6 +68,7 @@ static const struct extraconfig_map extracfg_map[] = 0, /* arnr_max_frames */ 3, /* arnr_strength */ 3, /* arnr_type*/ + 0, /* tuning*/ } } }; @@ -336,6 +338,7 @@ static vpx_codec_err_t set_vp8e_config(VP8_CONFIG *oxcf, oxcf->arnr_strength = vp8_cfg.arnr_strength; oxcf->arnr_type = vp8_cfg.arnr_type; + oxcf->tuning = vp8_cfg.tuning; /* printf("Current VP8 Settings: \n"); @@ -449,6 +452,7 @@ static vpx_codec_err_t set_param(vpx_codec_alg_priv_t *ctx, MAP(VP8E_SET_ARNR_MAXFRAMES, xcfg.arnr_max_frames); MAP(VP8E_SET_ARNR_STRENGTH , xcfg.arnr_strength); MAP(VP8E_SET_ARNR_TYPE , xcfg.arnr_type); + MAP(VP8E_SET_TUNING, xcfg.tuning); } @@ -1029,6 +1033,7 @@ static vpx_codec_ctrl_fn_map_t vp8e_ctf_maps[] = {VP8E_SET_ARNR_MAXFRAMES, set_param}, {VP8E_SET_ARNR_STRENGTH , set_param}, {VP8E_SET_ARNR_TYPE , set_param}, + {VP8E_SET_TUNING, set_param}, { -1, NULL}, }; -- cgit v1.2.3