[x265] [PATCH 1 of 5] Add CLI options for turning on PSNR, SSIM metrics

Aarthi Thirumalai aarthi at multicorewareinc.com
Sat Sep 28 06:52:47 CEST 2013


# HG changeset patch
# User Aarthi Thirumalai
# Date 1380342254 -19800
#      Sat Sep 28 09:54:14 2013 +0530
# Node ID 0fa415d022c56451e6580c5b2bee793498d986c8
# Parent  4014edcf215747ba4ac8147b1168f8edc6f5d64c
Add CLI options for turning on PSNR, SSIM metrics.
By default , PSNR is turned on , SSIM is off.

diff -r 4014edcf2157 -r 0fa415d022c5 source/common/common.cpp
--- a/source/common/common.cpp	Fri Sep 27 02:18:36 2013 -0500
+++ b/source/common/common.cpp	Sat Sep 28 09:54:14 2013 +0530
@@ -178,6 +178,10 @@
     param->rc.qpStep = 4;
     param->rc.rateControlMode = X265_RC_CQP;
     param->rc.qp = 32;
+
+    /* Quality Measurement Metrics */
+    param->bEnablePsnr = 1;
+    param->bEnableSsim = 0;
 }
 
 extern "C"
@@ -428,6 +432,8 @@
     }
     TOOLOPT(param->bEnableWeightedPred, "weightp");
     TOOLOPT(param->bEnableWeightedBiPred, "weightbp");
+    TOOLOPT(param->bEnableSsim, "ssim");
+    TOOLOPT(param->bEnablePsnr, "psnr");
     fprintf(stderr, "\n");
     fflush(stderr);
 }
diff -r 4014edcf2157 -r 0fa415d022c5 source/x265.h
--- a/source/x265.h	Fri Sep 27 02:18:36 2013 -0500
+++ b/source/x265.h	Sat Sep 28 09:54:14 2013 +0530
@@ -266,6 +266,9 @@
     // debugging
     int       decodedPictureHashSEI;           ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message
 
+    //Quality Measurement Metrics
+    int        bEnablePsnr;
+    int        bEnableSsim;
     struct 
     {
         int       bitrate;
diff -r 4014edcf2157 -r 0fa415d022c5 source/x265opts.h
--- a/source/x265opts.h	Fri Sep 27 02:18:36 2013 -0500
+++ b/source/x265opts.h	Sat Sep 28 09:54:14 2013 +0530
@@ -96,3 +96,7 @@
 
 HELP("SEI options:")
 OPT("hash",            param->decodedPictureHashSEI,  required_argument, 0, "Decoded Picture Hash SEI 0: disabled, 1: MD5, 2: CRC, 3: Checksum ")
+
+HELP("Quality Measurement metrices: ")
+OPT("ssim",            param->bEnableSsim,              required_argument, 0, "Log SSIM metric 0:disabled (defaullt), 1: enabled")
+OPT("psnr",            param->bEnablePsnr,              required_argument, 0, "Log PSNR metric 0:disabled, 1: enabled(default)")


More information about the x265-devel mailing list