changeset 12604:3780f7544794

hdr: Replace --hdr with --hdr10 This patch deprecates the existing option '--hdr' and replaces it with '--hdr10' as the feature signals SEI specific to HDR10. Note: '--hdr' will be removed in the upcoming major release of x265.
author Aruna Matheswaran <aruna@multicorewareinc.com>
date Tue, 07 Jan 2020 15:07:31 +0530
parents fe9d36ccb331
children c5ff72937e9c
files doc/reST/cli.rst source/CMakeLists.txt source/common/param.cpp source/encoder/encoder.cpp source/x265.h source/x265cli.h
diffstat 6 files changed, 24 insertions(+-), 15 deletions(-) [+]
line wrap: on
line diff
--- a/doc/reST/cli.rst	Mon Jan 06 10:44:13 2020 +0530
+++ b/doc/reST/cli.rst	Tue Jan 07 15:07:31 2020 +0530
@@ -2250,9 +2250,9 @@ VUI fields must be manually specified.
     is specified. When enabled, signals max-cll and max-fall as 0 if :option:`max-cll` is unspecified.
     Default enabled.
 
-.. option:: --hdr, --no-hdr
-
-	Force signalling of HDR parameters in SEI packets. Enabled
+.. option:: --hdr10, --no-hdr10
+
+	Force signaling of HDR10 parameters in SEI packets. Enabled
 	automatically when :option:`--master-display` or :option:`--max-cll` is
 	specified. Useful when there is a desire to signal 0 values for max-cll
 	and max-fall. Default disabled.
--- a/source/CMakeLists.txt	Mon Jan 06 10:44:13 2020 +0530
+++ b/source/CMakeLists.txt	Tue Jan 07 15:07:31 2020 +0530
@@ -29,7 +29,7 @@ option(NATIVE_BUILD "Target the build CP
 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 185)
+set(X265_BUILD 186)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
                "${PROJECT_BINARY_DIR}/x265.def")
 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
--- a/source/common/param.cpp	Mon Jan 06 10:44:13 2020 +0530
+++ b/source/common/param.cpp	Tue Jan 07 15:07:31 2020 +0530
@@ -147,7 +147,8 @@ void x265_param_default(x265_param* para
     param->bEnableAccessUnitDelimiters = 0;
     param->bEmitHRDSEI = 0;
     param->bEmitInfoSEI = 1;
-    param->bEmitHDRSEI = 0;
+    param->bEmitHDRSEI = 0; /*Deprecated*/
+    param->bEmitHDR10SEI = 0;
     param->bEmitIDRRecoverySEI = 0;
 
     /* CU definitions */
@@ -1231,7 +1232,8 @@ int x265_param_parse(x265_param* p, cons
                 p->bSsimRd = atobool(value);
             }
         }
-        OPT("hdr") p->bEmitHDRSEI = atobool(value);
+        OPT("hdr") p->bEmitHDR10SEI = atobool(value);  /*DEPRECATED*/
+        OPT("hdr10") p->bEmitHDR10SEI = atobool(value);
         OPT("hdr-opt") p->bHDR10Opt = atobool(value); /*DEPRECATED*/
         OPT("hdr10-opt") p->bHDR10Opt = atobool(value);
         OPT("limit-sao") p->bLimitSAO = atobool(value);
@@ -1753,12 +1755,12 @@ int x265_check_params(x265_param* param)
 #endif
 
     if (param->masteringDisplayColorVolume || param->maxFALL || param->maxCLL)
-        param->bEmitHDRSEI = 1;
+        param->bEmitHDR10SEI = 1;
 
     bool isSingleSEI = (param->bRepeatHeaders
                      || param->bEmitHRDSEI
                      || param->bEmitInfoSEI
-                     || param->bEmitHDRSEI
+                     || param->bEmitHDR10SEI
                      || param->bEmitIDRRecoverySEI
                    || !!param->interlaceMode
                      || param->preferredTransferCharacteristics > 1
@@ -2153,7 +2155,7 @@ char *x265_param2string(x265_param* p, i
     s += sprintf(s, " hist-threshold=%.2f", p->edgeTransitionThreshold);
     BOOL(p->bOptCUDeltaQP, "opt-cu-delta-qp");
     BOOL(p->bAQMotion, "aq-motion");
-    BOOL(p->bEmitHDRSEI, "hdr");
+    BOOL(p->bEmitHDR10SEI, "hdr10");
     BOOL(p->bHDR10Opt, "hdr10-opt");
     BOOL(p->bDhdr10opt, "dhdr10-opt");
     BOOL(p->bEmitIDRRecoverySEI, "idr-recovery-sei");
@@ -2475,7 +2477,7 @@ void x265_copy_params(x265_param* dst, x
     dst->bAQMotion = src->bAQMotion;
     dst->bSsimRd = src->bSsimRd;
     dst->dynamicRd = src->dynamicRd;
-    dst->bEmitHDRSEI = src->bEmitHDRSEI;
+    dst->bEmitHDR10SEI = src->bEmitHDR10SEI;
     dst->bEmitHRDSEI = src->bEmitHRDSEI;
     dst->bHDROpt = src->bHDROpt; /*DEPRECATED*/
     dst->bHDR10Opt = src->bHDR10Opt;
--- a/source/encoder/encoder.cpp	Mon Jan 06 10:44:13 2020 +0530
+++ b/source/encoder/encoder.cpp	Tue Jan 07 15:07:31 2020 +0530
@@ -3121,7 +3121,7 @@ void Encoder::getStreamHeaders(NALList& 
     if (m_param->bSingleSeiNal)
         bs.resetBits();
 
-    if (m_param->bEmitHDRSEI)
+    if (m_param->bEmitHDR10SEI)
     {
         if (m_param->bEmitCLL)
         {
@@ -3378,7 +3378,7 @@ void Encoder::configureDolbyVisionParams
     p->vui.matrixCoeffs = dovi[doviProfile].matrixCoeffs;
 
     if (dovi[doviProfile].doviProfileId == 81)
-        p->bEmitHDRSEI = p->bEmitCLL = 1;
+        p->bEmitHDR10SEI = p->bEmitCLL = 1;
 
     if (dovi[doviProfile].doviProfileId == 50)
         p->crQpOffset = 3;
@@ -4013,7 +4013,7 @@ void Encoder::configure(x265_param *p)
         }
     }
 
-    if (m_param->toneMapFile || p->bHDR10Opt || p->bEmitHDRSEI)
+    if (m_param->toneMapFile || p->bHDR10Opt || p->bEmitHDR10SEI)
     {
         if (!p->bRepeatHeaders)
         {
--- a/source/x265.h	Mon Jan 06 10:44:13 2020 +0530
+++ b/source/x265.h	Tue Jan 07 15:07:31 2020 +0530
@@ -1647,7 +1647,7 @@ typedef struct x265_param
 
     /* Enables the emitting of HDR SEI packets which contains HDR-specific params.
      * Auto-enabled when max-cll, max-fall, or mastering display info is specified.
-     * Default is disabled */
+     * Default is disabled. Now deprecated.*/
     int       bEmitHDRSEI;
 
     /* Enable luma and chroma offsets for HDR/WCG content.
@@ -1862,6 +1862,11 @@ typedef struct x265_param
 
     /* Block-level QP optimization for HDR10 content. Default is disabled.*/
     int       bHDR10Opt;
+
+    /* Enables the emitting of HDR10 SEI packets which contains HDR10-specific params.
+    * Auto-enabled when max-cll, max-fall, or mastering display info is specified.
+    * Default is disabled */
+    int       bEmitHDR10SEI;
 } x265_param;
 
 /* x265_param_alloc:
--- a/source/x265cli.h	Mon Jan 06 10:44:13 2020 +0530
+++ b/source/x265cli.h	Tue Jan 07 15:07:31 2020 +0530
@@ -297,6 +297,8 @@ static const struct option long_options[
     { "no-ssim-rd",           no_argument, NULL, 0 },
     { "hdr",                  no_argument, NULL, 0 },
     { "no-hdr",               no_argument, NULL, 0 },
+    { "hdr10",                no_argument, NULL, 0 },
+    { "no-hdr10",             no_argument, NULL, 0 },
     { "hdr-opt",              no_argument, NULL, 0 },
     { "no-hdr-opt",           no_argument, NULL, 0 },
     { "hdr10-opt",            no_argument, NULL, 0 },
@@ -632,7 +634,7 @@ static void showHelp(x265_param *param)
     H0("                                    format: G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)\n");
     H0("   --max-cll <string>            Specify content light level info SEI as \"cll,fall\" (HDR).\n");
     H0("   --[no-]cll                    Emit content light level info SEI. Default %s\n", OPT(param->bEmitCLL));
-    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("   --[no-]hdr10                  Control dumping of HDR10 SEI packet. If max-cll or master-display has non-zero values, this is enabled. Default %s\n", OPT(param->bEmitHDR10SEI));
     H0("   --[no-]hdr-opt                Add luma and chroma offsets for HDR/WCG content. Default %s. Now deprecated.\n", OPT(param->bHDROpt));
     H0("   --[no-]HDR10-opt              Block-level QP optimization for HDR10 content. Default %s.\n", OPT(param->bHDR10Opt));
     H0("   --min-luma <integer>          Minimum luma plane value of input source picture\n");