[x265] [PATCH] Fix payload size for SEIRecoveryPoint

Ashok Kumar Mishra ashok at multicorewareinc.com
Fri Mar 16 13:05:11 CET 2018


On Fri, Mar 16, 2018 at 4:24 PM, <aarthi at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Aarthi Thirumalai <aarthi at multicorewareinc.com>
> # Date 1521028474 -19800
> #      Wed Mar 14 17:24:34 2018 +0530
> # Node ID 265d516af978a209bd22a6ae43487cecd01c4503
> # Parent  d7c26df32fae052b7e895fee9bda1c22b24cc44b
> Fix payload size for SEIRecoveryPoint
>
> diff -r d7c26df32fae -r 265d516af978 source/encoder/sei.cpp
> --- a/source/encoder/sei.cpp    Tue Mar 13 13:40:13 2018 +0530
> +++ b/source/encoder/sei.cpp    Wed Mar 14 17:24:34 2018 +0530
> @@ -41,8 +41,9 @@
>      uint32_t type = m_payloadType;
>      m_bitIf = &bs;
>      BitCounter count;
> +    uint32_t payloadSize = m_payloadSize;
>      bool hrdTypes = (m_payloadType == ACTIVE_PARAMETER_SETS ||
> m_payloadType == PICTURE_TIMING || m_payloadType == BUFFERING_PERIOD);
>

I think it is not required to check the condition "m_payloadType ==
RECOVERY_POINT" in other places
if you add this in above flag hrdTypes.


> -    if (hrdTypes)
> +    if (hrdTypes || m_payloadType == RECOVERY_POINT)
>      {
>          m_bitIf = &count;
>          /* virtual writeSEI method, write to bit counter to determine
> size */
> @@ -53,10 +54,10 @@
>              WRITE_CODE(0xff, 8, "payload_type");
>      }
>      WRITE_CODE(type, 8, "payload_type");
> -    uint32_t payloadSize;
> -    if (hrdTypes || m_payloadType == USER_DATA_UNREGISTERED ||
> m_payloadType == USER_DATA_REGISTERED_ITU_T_T35)
> +    if (hrdTypes || m_payloadType == USER_DATA_UNREGISTERED ||
> m_payloadType == USER_DATA_REGISTERED_ITU_T_T35 ||
> +        m_payloadType == RECOVERY_POINT)
>      {
> -        if (hrdTypes)
> +        if (hrdTypes || m_payloadType == RECOVERY_POINT)
>          {
>              X265_CHECK(0 == (count.getNumberOfWrittenBits() & 7),
> "payload unaligned\n");
>              payloadSize = count.getNumberOfWrittenBits() >> 3;
> @@ -65,13 +66,10 @@
>              payloadSize = m_payloadSize + 16;
>          else
>              payloadSize = m_payloadSize;
> -
> -        for (; payloadSize >= 0xff; payloadSize -= 0xff)
> -            WRITE_CODE(0xff, 8, "payload_size");
> -        WRITE_CODE(payloadSize, 8, "payload_size");
>      }
> -    else
> -        WRITE_CODE(m_payloadSize, 8, "payload_size");
> +    for (; payloadSize >= 0xff; payloadSize -= 0xff)
> +        WRITE_CODE(0xff, 8, "payload_size");
> +    WRITE_CODE(payloadSize, 8, "payload_size");
>      /* virtual writeSEI method, write to bs */
>      writeSEI(sps);
>  }
>
> _______________________________________________
> 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/20180316/bcfd0e11/attachment.html>


More information about the x265-devel mailing list