[x265] [PATCH] CLI: Remove redundant cli option 'capture-csp'

gopi.satykrishna at multicorewareinc.com gopi.satykrishna at multicorewareinc.com
Mon Feb 20 13:16:08 CET 2017


# HG changeset patch
# User Gopi Satykrishna Akisetty <gopi.satykrishna at multicorewareinc.com>
# Date 1487591333 -19800
#      Mon Feb 20 17:18:53 2017 +0530
# Node ID 820f4327ddac44decb4328602ca63e84197ab473
# Parent  cfaff341e3501e7456fe73acd0366b92fc3c6903
CLI: Remove redundant cli option 'capture-csp'

diff -r cfaff341e350 -r 820f4327ddac doc/reST/cli.rst
--- a/doc/reST/cli.rst	Thu Feb 16 12:00:44 2017 +0100
+++ b/doc/reST/cli.rst	Mon Feb 20 17:18:53 2017 +0530
@@ -414,15 +414,6 @@
 	4. nv12
 	5. nv16
 
-.. option:: --capture-csp <integer|string>
-
-	Specify color primaries of the Capture device. Default
-	bt2020.
-
-	1. bt709
-	2. p3d65
-	3. bt2020
-
 .. option:: --fps <integer|float|numerator/denominator>
 
 	YUV only: Source frame rate
@@ -1858,8 +1849,7 @@
 .. option:: --hdr-opt, --no-hdr-opt
 
 	Add luma and chroma offsets for HDR/WCG content.
-	Input video should be 10 bit 4:2:0. Also set the appropriate color primaries
-	of the capture device using :option:`--capture-csp` option. Applicable for HDR content.
+	Input video should be 10 bit 4:2:0. Applicable for HDR content.
 	Default disabled. **Experimental Feature**
 
 .. option:: --min-luma <integer>
diff -r cfaff341e350 -r 820f4327ddac source/CMakeLists.txt
--- a/source/CMakeLists.txt	Thu Feb 16 12:00:44 2017 +0100
+++ b/source/CMakeLists.txt	Mon Feb 20 17:18:53 2017 +0530
@@ -29,7 +29,7 @@
 option(STATIC_LINK_CRT "Statically link C runtime for release builds" OFF)
 mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)
 # X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 111)
+set(X265_BUILD 112)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
                "${PROJECT_BINARY_DIR}/x265.def")
 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
diff -r cfaff341e350 -r 820f4327ddac source/common/param.cpp
--- a/source/common/param.cpp	Thu Feb 16 12:00:44 2017 +0100
+++ b/source/common/param.cpp	Mon Feb 20 17:18:53 2017 +0530
@@ -271,7 +271,6 @@
     param->bOptCUDeltaQP        = 0;
     param->bAQMotion = 0;
     param->bHDROpt = 0;
-    param->captureColorPrim = 3;
 
 }
 
@@ -946,10 +945,6 @@
         }
         OPT("hdr") p->bEmitHDRSEI = atobool(value);
         OPT("hdr-opt") p->bHDROpt = atobool(value);
-        OPT("capture-csp")
-        {
-            p->captureColorPrim = parseName(value, x265_capture_colorprim_names, bError);
-        }
         else
             return X265_PARAM_BAD_NAME;
     }
@@ -1288,10 +1283,6 @@
         "qpmin exceeds supported range (0 to 69)");
     CHECK(param->log2MaxPocLsb < 4 || param->log2MaxPocLsb > 16,
         "Supported range for log2MaxPocLsb is 4 to 16");
-    CHECK(param->captureColorPrim < 0
-        || param->captureColorPrim > 3,
-        "Capture Color Primaries must be bt709, p3d65,"
-        " bt2020");
 #if !X86_64
     CHECK(param->searchMethod == X265_SEA && (param->sourceWidth > 840 || param->sourceHeight > 480),
         "SEA motion search does not support resolutions greater than 480p in 32 bit build");
@@ -1660,7 +1651,6 @@
     BOOL(p->bAQMotion, "aq-motion");
     BOOL(p->bEmitHDRSEI, "hdr");
     BOOL(p->bHDROpt, "hdr-opt");
-    s += sprintf(s, " Capture-colorprim=%d", p->captureColorPrim);
 #undef BOOL
     return buf;
 }
diff -r cfaff341e350 -r 820f4327ddac source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Thu Feb 16 12:00:44 2017 +0100
+++ b/source/encoder/encoder.cpp	Mon Feb 20 17:18:53 2017 +0530
@@ -79,8 +79,8 @@
     m_iFrameNum = 0;
     m_iPPSQpMinus26 = 0;
     m_rpsInSpsCount = 0;
-    m_cB = 0.0;
-    m_cR = 0.0;
+    m_cB = 1.0;
+    m_cR = 1.0;
     for (int i = 0; i < X265_MAX_FRAME_THREADS; i++)
         m_frameEncoder[i] = NULL;
 
@@ -2309,24 +2309,6 @@
                                         "                                            Disabling offset tuning for HDR videos\n");
             p->bHDROpt = 0;
         }
-        else
-        {
-            if (p->captureColorPrim == 1)
-            {
-                m_cB = 1.14;
-                m_cR = 1.78;
-            }
-            else if (p->captureColorPrim == 2)
-            {
-                m_cB = 1.04;
-                m_cR = 1.39;
-            }
-            else if (p->captureColorPrim == 3)
-            {
-                m_cB = 1.0;
-                m_cR = 1.0;
-            }
-        }
     }
 }
 
diff -r cfaff341e350 -r 820f4327ddac source/x265.h
--- a/source/x265.h	Thu Feb 16 12:00:44 2017 +0100
+++ b/source/x265.h	Mon Feb 20 17:18:53 2017 +0530
@@ -492,7 +492,6 @@
                                                "32:11", "80:33", "18:11", "15:11", "64:33", "160:99", "4:3", "3:2", "2:1", 0 };
 static const char * const x265_interlace_names[] = { "prog", "tff", "bff", 0 };
 static const char * const x265_analysis_names[] = { "off", "save", "load", 0 };
-static const char * const x265_capture_colorprim_names[] = { "", "bt709", "p3d65", "bt2020", 0 };
 
 /* Zones: override ratecontrol for specific sections of the video.
  * If zones overlap, whichever comes later in the list takes precedence. */
@@ -1381,9 +1380,6 @@
      * Default is disabled */
     int       bEmitHDRSEI;
 
-    /* Color primaries of the capture device */
-    int       captureColorPrim;
-
     /* Enable luma and chroma offsets for HDR/WCG content.
      * Default is disabled */
     int       bHDROpt;
diff -r cfaff341e350 -r 820f4327ddac source/x265cli.h
--- a/source/x265cli.h	Thu Feb 16 12:00:44 2017 +0100
+++ b/source/x265cli.h	Mon Feb 20 17:18:53 2017 +0530
@@ -263,7 +263,6 @@
     { "no-ssim-rd",           no_argument, NULL, 0 },
     { "hdr",                  no_argument, NULL, 0 },
     { "no-hdr",               no_argument, NULL, 0 },
-    { "capture-csp",          required_argument, NULL, 0 },
     { "hdr-opt",              no_argument, NULL, 0 },
     { "no-hdr-opt",           no_argument, NULL, 0 },
     { 0, 0, 0, 0 },
@@ -474,7 +473,6 @@
     H0("                                    format: G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)\n");
     H0("   --max-cll <string>            Emit content light level info SEI as \"cll,fall\" (HDR)\n");
     H0("   --[no-]hdr                    Control dumping of HDR SEI packet. If max-cll or master-display has non-zero values, this is enabled. Default %s\n", OPT(param->bEmitHDRSEI));
-    H0("   --capture-csp <string>        Specify color primaries from bt709, p3d65, bt2020 for the capture device. Default bt709\n");
     H0("   --[no-]hdr-opt                Add luma and chroma offsets for HDR/WCG content. Default %s\n", OPT(param->bHDROpt));
     H0("   --min-luma <integer>          Minimum luma plane value of input source picture\n");
     H0("   --max-luma <integer>          Maximum luma plane value of input source picture\n");


More information about the x265-devel mailing list