summaryrefslogtreecommitdiff
path: root/vp8/vp8_cx_iface.c
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2010-12-17 09:43:39 -0500
committerJohn Koleszar <jkoleszar@google.com>2010-12-17 10:01:05 -0500
commitb0da9b399d8e9129f47c81366902e66823063878 (patch)
tree11bd71c9ebaf7e4a7ba3e17e2075b09d7edd1970 /vp8/vp8_cx_iface.c
parent64baa8df2e3f5cd8036fac9715d3f7d348620fa6 (diff)
downloadlibvpx-b0da9b399d8e9129f47c81366902e66823063878.tar
libvpx-b0da9b399d8e9129f47c81366902e66823063878.tar.gz
libvpx-b0da9b399d8e9129f47c81366902e66823063878.tar.bz2
libvpx-b0da9b399d8e9129f47c81366902e66823063878.zip
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
Diffstat (limited to 'vp8/vp8_cx_iface.c')
-rw-r--r--vp8/vp8_cx_iface.c5
1 files changed, 5 insertions, 0 deletions
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},
};