[x265] [PATCH 3 of 5] sei clean up

Mario *LigH* Rohkrämer contact at ligh.de
Thu Apr 20 09:05:06 CEST 2017


h:/MSYS-GCC630/home/Entwicklung/x265/source/encoder/sei.cpp: In member  
function 'void x265::SEI::write(x265::Bitstream&, const x265::SPS&)':
h:/MSYS-GCC630/home/Entwicklung/x265/source/encoder/sei.cpp:51:18:  
warning: declaration of 'type' shadows a previous local [-Wshadow]
          uint32_t type = m_payloadType;
                   ^~~~
h:/MSYS-GCC630/home/Entwicklung/x265/source/encoder/sei.cpp:41:14: note:  
shadowed declaration is here
      uint32_t type = m_payloadType;
               ^~~~

Am 20.04.2017, 07:47 Uhr, schrieb <bhavna at multicorewareinc.com>:

> diff -r e2eb86dce7f4 -r 9c3ae5906579 source/encoder/sei.cpp
> --- a/source/encoder/sei.cpp	Wed Apr 19 16:36:59 2017 -0700
> +++ b/source/encoder/sei.cpp	Tue Mar 28 10:53:31 2017 +0530
> @@ -38,24 +38,38 @@
>   * in bitstream bs */
>  void SEI::write(Bitstream& bs, const SPS& sps)
>  {
> +    uint32_t type = m_payloadType; // <== #1
> +    m_bitIf = &bs;
>      BitCounter count;
> -    m_bitIf = &count;
> +    bool hrdTypes = (m_payloadType == ACTIVE_PARAMETER_SETS ||  
> m_payloadType == PICTURE_TIMING || m_payloadType == BUFFERING_PERIOD);
> +    if (hrdTypes)
> +    {
> +        m_bitIf = &count;
> +        /* virtual writeSEI method, write to bit counter to determine  
> size */
> +        writeSEI(sps);
> +        m_bitIf = &bs;
> +        uint32_t type = m_payloadType; // <== #2
> +        for (; type >= 0xff; type -= 0xff)
> +            WRITE_CODE(0xff, 8, "payload_type");
> +    }



-- 

Fun and success!
Mario *LigH* Rohkrämer
mailto:contact at ligh.de
 


More information about the x265-devel mailing list