[x265] [PATCH] cli: add --csv-data as CLI only option to mention the level of csv logging

Divya Manivannan divya at multicorewareinc.com
Thu Jun 11 12:13:30 CEST 2015


# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1433942092 -19800
#      Wed Jun 10 18:44:52 2015 +0530
# Node ID 10102a58efdb70ff5ffc78120a4087b48fd252ee
# Parent  ae4c2828912ce11fbcb9ad3ae0920b18716a697e
cli: add --csv-data as CLI only option to mention the level of csv logging

diff -r ae4c2828912c -r 10102a58efdb doc/reST/cli.rst
--- a/doc/reST/cli.rst	Wed Jun 10 18:39:36 2015 +0530
+++ b/doc/reST/cli.rst	Wed Jun 10 18:44:52 2015 +0530
@@ -82,7 +82,7 @@
 
 	Writes encoding results to a comma separated value log file. Creates
 	the file if it doesnt already exist, else adds one line per run.  if
-	:option:`--log-level` is frame or above, it writes one line per
+	:option:`--csv-data` is greater than 0, it writes one line per
 	frame. Default none
 
 	When frame level logging is enabled, several frame performance
@@ -127,6 +127,16 @@
 	
 	**CLI ONLY**
 
+.. option:: --csv-data <integer>
+       
+        CSV logging level. Default 0
+       
+        0. summary
+        1. frame level logging
+        2. detailed frame level logging
+       
+        **CLI ONLY**
+       
 .. option:: --ssim, --no-ssim
 
 	Calculate and report Structural Similarity values. It is
diff -r ae4c2828912c -r 10102a58efdb source/x265.cpp
--- a/source/x265.cpp	Wed Jun 10 18:39:36 2015 +0530
+++ b/source/x265.cpp	Wed Jun 10 18:44:52 2015 +0530
@@ -90,6 +90,7 @@
     bool bProgress;
     bool bForceY4m;
     bool bDither;
+    int csvData;
     uint32_t seek;              // number of frames to skip from the beginning
     uint32_t framesToBeEncoded; // number of frames to encode
     uint64_t totalbytes;
@@ -117,6 +118,7 @@
         startTime = x265_mdate();
         prevUpdateTime = 0;
         bDither = false;
+        csvData = 0;
     }
 
     void destroy();
@@ -398,6 +400,7 @@
             OPT2("frame-skip", "seek") this->seek = (uint32_t)x265_atoi(optarg, bError);
             OPT("frames") this->framesToBeEncoded = (uint32_t)x265_atoi(optarg, bError);
             OPT("csv") this->csvfn = optarg;
+            OPT("csv-data") this->csvData = x265_atoi(optarg, bError);
             OPT("no-progress") this->bProgress = false;
             OPT("output") outputfn = optarg;
             OPT("input") inputfn = optarg;
diff -r ae4c2828912c -r 10102a58efdb source/x265cli.h
--- a/source/x265cli.h	Wed Jun 10 18:39:36 2015 +0530
+++ b/source/x265cli.h	Wed Jun 10 18:44:52 2015 +0530
@@ -54,6 +54,7 @@
     { "allow-non-conformance",no_argument, NULL, 0 },
     { "no-allow-non-conformance",no_argument, NULL, 0 },
     { "csv",            required_argument, NULL, 0 },
+    { "csv-data",       required_argument, NULL, 0 },
     { "no-cu-stats",          no_argument, NULL, 0 },
     { "cu-stats",             no_argument, NULL, 0 },
     { "y4m",                  no_argument, NULL, 0 },
@@ -246,7 +247,8 @@
     H0("-D/--output-depth 8|10           Output bit depth (also internal bit depth). Default %d\n", param->internalBitDepth);
     H0("   --log-level <string>          Logging level: none error warning info debug full. Default %s\n", X265_NS::logLevelNames[param->logLevel + 1]);
     H0("   --no-progress                 Disable CLI progress reports\n");
-    H1("   --csv <filename>              Comma separated log file, log level >= 3 frame log, else one line per run\n");
+    H0("   --csv <filename>              Comma separated log file, csv-data > 0 frame log, else one line per run\n");
+    H0("   --csv-data                    Level of csv logging: summary FrameLevelData DetailedFrameLevelData\n");
     H0("\nInput Options:\n");
     H0("   --input <filename>            Raw YUV or Y4M input file name. `-` for stdin\n");
     H1("   --y4m                         Force parsing of input stream as YUV4MPEG2 regardless of file extension\n");


More information about the x265-devel mailing list