<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 10, 2018 at 4:57 AM Aruna Matheswaran <<a href="mailto:aruna@multicorewareinc.com" target="_blank">aruna@multicorewareinc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div># HG changeset patch</div><div># User Praveen Tiwari <<a href="mailto:praveen@multicorewareinc.com" target="_blank">praveen@multicorewareinc.com</a>></div><div># Date 1537854295 -19800</div><div>#      Tue Sep 25 11:14:55 2018 +0530</div><div># Node ID 89457c901a6c41f390aef970a2936e3a5650b4f1</div><div># Parent  f74003e88622dafc62f6c3c50720872df4d928bc</div><div>added support for Dolby Vision profile 5</div><br><div>diff -r f74003e88622 -r 89457c901a6c source/common/param.cpp</div><div>--- a/source/common/param.cpp<span style="white-space:pre-wrap">        </span>Thu Nov 22 15:02:08 2018 +0530</div><div>+++ b/source/common/param.cpp<span style="white-space:pre-wrap">      </span>Tue Sep 25 11:14:55 2018 +0530</div><div>@@ -1407,6 +1416,15 @@</div><div>         "Invalid refine-intra value, refine-intra levels 0 to 3 supported");</div><div>     CHECK(param->maxAUSizeFactor < 0.5 || param->maxAUSizeFactor > 1.0,</div><div>         "Supported factor for controlling max AU size is from 0.5 to 1");</div><div>+    CHECK((param->dolbyProfile != 0) && (param->dolbyProfile != 50),</div><div>+        "Unsupported Dolby Vision profile, only profile 5 enabled");</div><div>+    if (param->dolbyProfile == 50)</div><div>+    {</div><div>+        CHECK((param->rc.vbvMaxBitrate < 0 && param->rc.vbvBufferSize < 0), "Dolby Vision requires VBV settings to enable HRD.\n");</div></div></div></blockquote><div><br></div><div>I don't know how CHECK() works, but don't you need to check for `(param->rc.vbvMaxBitrate <=0 || param->rc.vbvBufferSize <= 0)` ?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>+        CHECK((param->sourceWidth > 3840 || param->sourceHeight > 2160), "Maximum supported resolution for Dolby Vision profile - 5 is 4k UHD\n");</div><div>+        CHECK((param->internalBitDepth != 10), "Dolby Vision profile - 5 is Main10 only\n");</div><div>+        CHECK((param->internalCsp != X265_CSP_I420), "Dolby Vision profile - 5 requires YCbCr 4:2:0 color space\n");</div><div>+    }</div><div> #if !X86_64</div><div>     CHECK(param->searchMethod == X265_SEA && (param->sourceWidth > 840 || param->sourceHeight > 480),</div><div>         "SEA motion search does not support resolutions greater than 480p in 32 bit build");</div><div>diff -r f74003e88622 -r 89457c901a6c source/encoder/encoder.cpp</div><div>--- a/source/encoder/encoder.cpp<span style="white-space:pre-wrap">  </span>Thu Nov 22 15:02:08 2018 +0530</div><div>+++ b/source/encoder/encoder.cpp<span style="white-space:pre-wrap">   </span>Tue Sep 25 11:14:55 2018 +0530</div><div>@@ -3182,7 +3184,22 @@</div><div>         p->chunkStart = p->chunkEnd = 0;</div><div>         x265_log(p, X265_LOG_WARNING, "chunk-end cannot be less than chunk-start. Disabling chunking.\n");</div><div>     }</div><div>-</div><div>+    if (p->dolbyProfile)     // Default disabled.</div><div>+    {</div><div>+        if (p->dolbyProfile == 50)</div><div>+        {</div><div>+            p->bEmitHRDSEI = true;</div><div>+            p->vui.bEnableVideoSignalTypePresentFlag = 1;</div><div>+            p->vui.bEnableColorDescriptionPresentFlag = 1;</div><div>+            p->vui.transferCharacteristics = 2;</div><div>+            p->vui.colorPrimaries = 2;</div><div>+            p->vui.matrixCoeffs = 2;</div><div>+            p->vui.bEnableVideoFullRangeFlag = 1;</div><div>+            p->vui.videoFormat = 5;</div><div>+            p->bEnableAccessUnitDelimiters = 1;</div><div>+            p->bAnnexB = 1;</div></div></div></blockquote><div><br></div><div>This is only setting some defaults to existing paramenters, aren't there any new SEIs messages that should be added?</div></div>-- <br><div dir="ltr" class="m_1482198807812427344gmail_signature" data-smartmail="gmail_signature">Vittorio</div></div>