[x265] [PATCH] Add Dolby Vision 8.4 Profile Support

Derek Buitenhuis derek.buitenhuis at gmail.com
Tue Sep 28 13:41:53 UTC 2021


Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
---
 doc/reST/cli.rst           | 2 +-
 source/common/param.cpp    | 8 ++++----
 source/encoder/encoder.cpp | 3 ++-
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst
index b24fa72a9..56a94593a 100755
--- a/doc/reST/cli.rst
+++ b/doc/reST/cli.rst
@@ -2567,7 +2567,7 @@ Bitstream options
     The value is specified as a float or as an integer with the profile times 10,
     for example profile 5 is specified as "5" or "5.0" or "50".
     
-    Currently only profile 5, profile 8.1 and profile 8.2 enabled, Default 0 (disabled)
+    Currently only profile 5, profile 8.1, profile 8.2 and profile 8.4  enabled, Default 0 (disabled)
 
 .. option:: --dolby-vision-rpu <filename>
 
diff --git a/source/common/param.cpp b/source/common/param.cpp
index 6751e0aa7..dd9eb83e2 100755
--- a/source/common/param.cpp
+++ b/source/common/param.cpp
@@ -1834,15 +1834,15 @@ int x265_check_params(x265_param* param)
         "Invalid refine-ctu-distortion value, must be either 0 or 1");
     CHECK(param->maxAUSizeFactor < 0.5 || param->maxAUSizeFactor > 1.0,
         "Supported factor for controlling max AU size is from 0.5 to 1");
-    CHECK((param->dolbyProfile != 0) && (param->dolbyProfile != 50) && (param->dolbyProfile != 81) && (param->dolbyProfile != 82),
-        "Unsupported Dolby Vision profile, only profile 5, profile 8.1 and profile 8.2 enabled");
+    CHECK((param->dolbyProfile != 0) && (param->dolbyProfile != 50) && (param->dolbyProfile != 81) && (param->dolbyProfile != 82) && (param->dolbyProfile != 84),
+        "Unsupported Dolby Vision profile, only profile 5, profile 8.1, profile 8.2 and profile 8.4 enabled");
     CHECK(param->dupThreshold < 1 || 99 < param->dupThreshold,
         "Invalid frame-duplication threshold. Value must be between 1 and 99.");
     if (param->dolbyProfile)
     {
         CHECK((param->rc.vbvMaxBitrate <= 0 || param->rc.vbvBufferSize <= 0), "Dolby Vision requires VBV settings to enable HRD.\n");
-        CHECK((param->internalBitDepth != 10), "Dolby Vision profile - 5, profile - 8.1 and profile - 8.2 is Main10 only\n");
-        CHECK((param->internalCsp != X265_CSP_I420), "Dolby Vision profile - 5, profile - 8.1 and profile - 8.2 requires YCbCr 4:2:0 color space\n");
+        CHECK((param->internalBitDepth != 10), "Dolby Vision profile - 5, profile - 8.1, profile - 8.2 and profile - 8.4 are Main10 only\n");
+        CHECK((param->internalCsp != X265_CSP_I420), "Dolby Vision profile - 5, profile - 8.1, profile - 8.2 and profile - 8.4 requires YCbCr 4:2:0 color space\n");
         if (param->dolbyProfile == 81)
             CHECK(!(param->masteringDisplayColorVolume), "Dolby Vision profile - 8.1 requires Mastering display color volume information\n");
     }
diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp
index dee8fd85d..ec95de012 100644
--- a/source/encoder/encoder.cpp
+++ b/source/encoder/encoder.cpp
@@ -72,7 +72,8 @@ DolbyVisionProfileSpec dovi[] =
 {
     { 1, 1, 1, 1, 1, 5, 1,  2, 2, 2, 50 },
     { 1, 1, 1, 1, 1, 5, 0, 16, 9, 9, 81 },
-    { 1, 1, 1, 1, 1, 5, 0,  1, 1, 1, 82 }
+    { 1, 1, 1, 1, 1, 5, 0,  1, 1, 1, 82 },
+    { 1, 1, 1, 1, 1, 5, 0, 18, 9, 9, 84 }
 };
 
 typedef struct
-- 
2.32.0



More information about the x265-devel mailing list