[x265] [PATCH] added support for Dolby Vision profile 5

Vittorio Giovara vittorio.giovara at gmail.com
Mon Dec 10 16:34:56 CET 2018


On Mon, Dec 10, 2018 at 4:57 AM Aruna Matheswaran <
aruna at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Praveen Tiwari <praveen at multicorewareinc.com>
> # Date 1537854295 -19800
> #      Tue Sep 25 11:14:55 2018 +0530
> # Node ID 89457c901a6c41f390aef970a2936e3a5650b4f1
> # Parent  f74003e88622dafc62f6c3c50720872df4d928bc
> added support for Dolby Vision profile 5
>
> diff -r f74003e88622 -r 89457c901a6c source/common/param.cpp
> --- a/source/common/param.cpp Thu Nov 22 15:02:08 2018 +0530
> +++ b/source/common/param.cpp Tue Sep 25 11:14:55 2018 +0530
> @@ -1407,6 +1416,15 @@
>          "Invalid refine-intra value, refine-intra levels 0 to 3
> supported");
>      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),
> +        "Unsupported Dolby Vision profile, only profile 5 enabled");
> +    if (param->dolbyProfile == 50)
> +    {
> +        CHECK((param->rc.vbvMaxBitrate < 0 && param->rc.vbvBufferSize <
> 0), "Dolby Vision requires VBV settings to enable HRD.\n");
>

I don't know how CHECK() works, but don't you need to check for
`(param->rc.vbvMaxBitrate <=0 || param->rc.vbvBufferSize <= 0)` ?


> +        CHECK((param->sourceWidth > 3840 || param->sourceHeight > 2160),
> "Maximum supported resolution for Dolby Vision profile - 5 is 4k UHD\n");
> +        CHECK((param->internalBitDepth != 10), "Dolby Vision profile - 5
> is Main10 only\n");
> +        CHECK((param->internalCsp != X265_CSP_I420), "Dolby Vision
> profile - 5 requires YCbCr 4:2:0 color space\n");
> +    }
>  #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");
> diff -r f74003e88622 -r 89457c901a6c source/encoder/encoder.cpp
> --- a/source/encoder/encoder.cpp Thu Nov 22 15:02:08 2018 +0530
> +++ b/source/encoder/encoder.cpp Tue Sep 25 11:14:55 2018 +0530
> @@ -3182,7 +3184,22 @@
>          p->chunkStart = p->chunkEnd = 0;
>          x265_log(p, X265_LOG_WARNING, "chunk-end cannot be less than
> chunk-start. Disabling chunking.\n");
>      }
> -
> +    if (p->dolbyProfile)     // Default disabled.
> +    {
> +        if (p->dolbyProfile == 50)
> +        {
> +            p->bEmitHRDSEI = true;
> +            p->vui.bEnableVideoSignalTypePresentFlag = 1;
> +            p->vui.bEnableColorDescriptionPresentFlag = 1;
> +            p->vui.transferCharacteristics = 2;
> +            p->vui.colorPrimaries = 2;
> +            p->vui.matrixCoeffs = 2;
> +            p->vui.bEnableVideoFullRangeFlag = 1;
> +            p->vui.videoFormat = 5;
> +            p->bEnableAccessUnitDelimiters = 1;
> +            p->bAnnexB = 1;
>

This is only setting some defaults to existing paramenters, aren't there
any new SEIs messages that should be added?
-- 
Vittorio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20181210/fd23f44b/attachment.html>


More information about the x265-devel mailing list