summaryrefslogtreecommitdiff
path: root/vp8/encoder/ethreading.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/encoder/ethreading.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/encoder/ethreading.c')
-rw-r--r--vp8/encoder/ethreading.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vp8/encoder/ethreading.c b/vp8/encoder/ethreading.c
index 0611d5bf6..2cd24da67 100644
--- a/vp8/encoder/ethreading.c
+++ b/vp8/encoder/ethreading.c
@@ -115,7 +115,8 @@ THREAD_FUNCTION thread_encoding_proc(void *p_data)
x->rddiv = cpi->RDDIV;
x->rdmult = cpi->RDMULT;
- activity_sum += vp8_activity_masking(cpi, x);
+ if(cpi->oxcf.tuning == VP8_TUNE_SSIM)
+ activity_sum += vp8_activity_masking(cpi, x);
// Is segmentation enabled
// MB level adjutment to quantizer