[x265] [PATCH] Support high payload size

Pradeep Ramachandran pradeep at multicorewareinc.com
Fri May 26 12:46:58 CEST 2017


On Thu, May 25, 2017 at 6:47 PM, <bhavna at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Bhavna Hariharan <bhavna at multicorewareinc.com>
> # Date 1495523574 -19800
> #      Tue May 23 12:42:54 2017 +0530
> # Node ID 38e7a4373f26b463e13107ff24dc92440a5fc119
> # Parent  355cf3582263acc9bbcb8faa24f1dfa009f41de3
> Support high payload size
>

Pushed to default.


>
> diff -r 355cf3582263 -r 38e7a4373f26 source/dynamicHDR10/
> metadataFromJson.cpp
> --- a/source/dynamicHDR10/metadataFromJson.cpp  Mon May 22 12:05:24 2017
> +0530
> +++ b/source/dynamicHDR10/metadataFromJson.cpp  Tue May 23 12:42:54 2017
> +0530
> @@ -168,7 +168,7 @@
>      {
>          int payloadBytes = 1;
>
> -        for(;payload > 0xFF; payload -= 0xFF, ++payloadBytes);
> +        for(;payload >= 0xFF; payload -= 0xFF, ++payloadBytes);
>
>          if(payloadBytes > 1)
>          {
> diff -r 355cf3582263 -r 38e7a4373f26 source/encoder/encoder.cpp
> --- a/source/encoder/encoder.cpp        Mon May 22 12:05:24 2017 +0530
> +++ b/source/encoder/encoder.cpp        Tue May 23 12:42:54 2017 +0530
> @@ -607,8 +607,13 @@
>              uint8_t *cim = NULL;
>              if (m_hdr10plus_api->hdr10plus_json_to_frame_cim(m_param->toneMapFile,
> pic_in->poc, cim))
>              {
> -                toneMap.payload = (uint8_t*)x265_malloc(sizeof(uint8_t)
> * cim[0]);
> -                toneMap.payloadSize = cim[0];
> +                int32_t i = 0;
> +                toneMap.payloadSize = 0;
> +                while (cim[i] == 0xFF)
> +                    toneMap.payloadSize += cim[i++] + 1;
> +                toneMap.payloadSize += cim[i] + 1;
> +
> +                toneMap.payload = (uint8_t*)x265_malloc(sizeof(uint8_t)
> * toneMap.payloadSize);
>                  toneMap.payloadType = USER_DATA_REGISTERED_ITU_T_T35;
>                  memcpy(toneMap.payload, cim, toneMap.payloadSize);
>              }
> diff -r 355cf3582263 -r 38e7a4373f26 source/encoder/sei.h
> --- a/source/encoder/sei.h      Mon May 22 12:05:24 2017 +0530
> +++ b/source/encoder/sei.h      Tue May 23 12:42:54 2017 +0530
> @@ -289,12 +289,10 @@
>          while (cim[i] == 0xFF)
>          {
>              i++;
> -            payloadSize += cim[i];
>              WRITE_CODE(0xFF, 8, "payload_size");
>          }
> -        WRITE_CODE(payloadSize, 8, "payload_size");
> +        WRITE_CODE(cim[i], 8, "payload_size");
>          i++;
> -        payloadSize += i;
>          for (; i < payloadSize; ++i)
>              WRITE_CODE(cim[i], 8, "creative_intent_metadata");
>      }
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20170526/f09d1bba/attachment.html>


More information about the x265-devel mailing list