[x265] [PATCH] cli: Accept new color primaries as per revised HEVC spec

Pradeep Ramachandran pradeep at multicorewareinc.com
Fri Aug 18 12:25:38 CEST 2017


# HG changeset patch
# User Pradeep Ramachandran <pradeep at multicorewareinc.com>
# Date 1503051756 -19800
#      Fri Aug 18 15:52:36 2017 +0530
# Node ID 45b04c73eb70266e04b1f7cbb089d0d4f48ebf74
# Parent  fdf39a97ecb8a8f8438c9023c244d9788ffe18f1
cli: Accept new color primaries as per revised HEVC spec

diff -r fdf39a97ecb8 -r 45b04c73eb70 doc/reST/cli.rst
--- a/doc/reST/cli.rst	Tue Aug 08 18:26:35 2017 +0530
+++ b/doc/reST/cli.rst	Fri Aug 18 15:52:36 2017 +0530
@@ -1912,6 +1912,9 @@
 	7. smpte240m
 	8. film
 	9. bt2020
+    10. smpte-st-428
+    11. smpte-rp-431
+    12. smpte-eg-432
 
 .. option:: --transfer <integer|string>
 
@@ -1952,6 +1955,10 @@
 	8. YCgCo
 	9. bt2020nc
 	10. bt2020c
+    11. smpte-st-2085
+    12. chroma-nc
+    13. chroma-c
+    14. ictcp
 
 .. option:: --chromaloc <0..5>
 
diff -r fdf39a97ecb8 -r 45b04c73eb70 source/common/param.cpp
--- a/source/common/param.cpp	Tue Aug 08 18:26:35 2017 +0530
+++ b/source/common/param.cpp	Fri Aug 18 15:52:36 2017 +0530
@@ -1238,10 +1238,10 @@
           "Video Format must be component,"
           " pal, ntsc, secam, mac or undef");
     CHECK(param->vui.colorPrimaries < 0
-          || param->vui.colorPrimaries > 9
+          || param->vui.colorPrimaries > 12
           || param->vui.colorPrimaries == 3,
           "Color Primaries must be undef, bt709, bt470m,"
-          " bt470bg, smpte170m, smpte240m, film or bt2020");
+          " bt470bg, smpte170m, smpte240m, film, bt2020, smpte-st-428, smpte-rp-431 or smpte-eg-432");
     CHECK(param->vui.transferCharacteristics < 0
           || param->vui.transferCharacteristics > 18
           || param->vui.transferCharacteristics == 3,
@@ -1249,10 +1249,10 @@
           " smpte170m, smpte240m, linear, log100, log316, iec61966-2-4, bt1361e,"
           " iec61966-2-1, bt2020-10, bt2020-12, smpte-st-2084, smpte-st-428 or arib-std-b67");
     CHECK(param->vui.matrixCoeffs < 0
-          || param->vui.matrixCoeffs > 10
+          || param->vui.matrixCoeffs > 14
           || param->vui.matrixCoeffs == 3,
           "Matrix Coefficients must be undef, bt709, fcc, bt470bg, smpte170m,"
-          " smpte240m, GBR, YCgCo, bt2020nc or bt2020c");
+          " smpte240m, GBR, YCgCo, bt2020nc, bt2020c, smpte-st-2085, chroma-nc, chroma-c or ictcp");
     CHECK(param->vui.chromaSampleLocTypeTopField < 0
           || param->vui.chromaSampleLocTypeTopField > 5,
           "Chroma Sample Location Type Top Field must be 0-5");
diff -r fdf39a97ecb8 -r 45b04c73eb70 source/x265.h
--- a/source/x265.h	Tue Aug 08 18:26:35 2017 +0530
+++ b/source/x265.h	Fri Aug 18 15:52:36 2017 +0530
@@ -525,12 +525,12 @@
 static const char * const x265_source_csp_names[] = { "i400", "i420", "i422", "i444", "nv12", "nv16", 0 };
 static const char * const x265_video_format_names[] = { "component", "pal", "ntsc", "secam", "mac", "undef", 0 };
 static const char * const x265_fullrange_names[] = { "limited", "full", 0 };
-static const char * const x265_colorprim_names[] = { "", "bt709", "undef", "", "bt470m", "bt470bg", "smpte170m", "smpte240m", "film", "bt2020", 0 };
+static const char * const x265_colorprim_names[] = { "", "bt709", "undef", "", "bt470m", "bt470bg", "smpte170m", "smpte240m", "film", "bt2020", "smpte-st-428", "smpte-rp-431", "smpte-eg-432", 0 };
 static const char * const x265_transfer_names[] = { "", "bt709", "undef", "", "bt470m", "bt470bg", "smpte170m", "smpte240m", "linear", "log100",
                                                     "log316", "iec61966-2-4", "bt1361e", "iec61966-2-1", "bt2020-10", "bt2020-12",
                                                     "smpte-st-2084", "smpte-st-428", "arib-std-b67", 0 };
 static const char * const x265_colmatrix_names[] = { "GBR", "bt709", "undef", "", "fcc", "bt470bg", "smpte170m", "smpte240m",
-                                                     "YCgCo", "bt2020nc", "bt2020c", 0 };
+                                                     "YCgCo", "bt2020nc", "bt2020c", "smpte-st-2085", "chroma-nc", "chroma-c", "ictcp", 0 };
 static const char * const x265_sar_names[] = { "undef", "1:1", "12:11", "10:11", "16:11", "40:33", "24:11", "20:11",
                                                "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 };
diff -r fdf39a97ecb8 -r 45b04c73eb70 source/x265cli.h
--- a/source/x265cli.h	Tue Aug 08 18:26:35 2017 +0530
+++ b/source/x265cli.h	Fri Aug 18 15:52:36 2017 +0530
@@ -506,12 +506,12 @@
     H0("   --videoformat <string>        Specify video format from undef, component, pal, ntsc, secam, mac. Default undef\n");
     H0("   --range <string>              Specify black level and range of luma and chroma signals as full or limited Default limited\n");
     H0("   --colorprim <string>          Specify color primaries from undef, bt709, bt470m, bt470bg, smpte170m,\n");
-    H0("                                 smpte240m, film, bt2020. Default undef\n");
+    H0("                                 smpte240m, film, bt2020, smpte-st-428, smpte-rp-431, smpte-eg-432. Default undef\n");
     H0("   --transfer <string>           Specify transfer characteristics from undef, bt709, bt470m, bt470bg, smpte170m,\n");
     H0("                                 smpte240m, linear, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1,\n");
     H0("                                 bt2020-10, bt2020-12, smpte-st-2084, smpte-st-428, arib-std-b67. Default undef\n");
     H1("   --colormatrix <string>        Specify color matrix setting from undef, bt709, fcc, bt470bg, smpte170m,\n");
-    H1("                                 smpte240m, GBR, YCgCo, bt2020nc, bt2020c. Default undef\n");
+    H1("                                 smpte240m, GBR, YCgCo, bt2020nc, bt2020c, smpte-st-2085, chroma-nc, chroma-c, ictcp. Default undef\n");
     H1("   --chromaloc <integer>         Specify chroma sample location (0 to 5). Default of %d\n", param->vui.chromaSampleLocTypeTopField);
     H0("   --master-display <string>     SMPTE ST 2086 master display color volume info SEI (HDR)\n");
     H0("                                    format: G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)\n");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 6218 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20170818/b055c670/attachment.bin>


More information about the x265-devel mailing list