multilib.sh enable dynamic HDR10 support

Issue #336 wontfix
Selur created an issue

How to enable dynamic HDR10 support when using multilib.sh ? Could the multilib.sh adjusted to always build with dhdr10 support, or is there a reason for not wanting to add the support?

Cu Selur

Comments (5)

  1. Selur reporter

    Figured it out,..

    diff --git a/build/linux/multilib.sh b/build/linux/multilib.sh
    --- a/build/linux/multilib.sh
    +++ b/build/linux/multilib.sh
    @@ -3,7 +3,7 @@
     mkdir -p 8bit 10bit 12bit
    
     cd 12bit
    -cmake ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
    +cmake ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON -DENABLE_DYNAMIC_HDR10=ON
     make ${MAKEFLAGS}
    
     cd ../10bit
    @@ -13,7 +13,7 @@
     cd ../8bit
     ln -sf ../10bit/libx265.a libx265_main10.a
     ln -sf ../12bit/libx265.a libx265_main12.a
    -cmake ../../../source -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON
    +cmake ../../../source -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON -DENABLE_DYNAMIC_HDR10=ON
     make ${MAKEFLAGS}
    
     # rename the 8bit library, then combine all three into libx265.a
    diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
    --- a/source/CMakeLists.txt
    +++ b/source/CMakeLists.txt
    @@ -187,7 +187,7 @@
     if(GCC)
         add_definitions(-Wall -Wextra -Wshadow)
         add_definitions(-D__STDC_LIMIT_MACROS=1)
    -    add_definitions(-std=gnu++98)
    +    add_definitions(-std=c++11)
         if(ENABLE_PIC)
              add_definitions(-fPIC)
         endif(ENABLE_PIC)
    diff --git a/source/encoder/encoder.h b/source/encoder/encoder.h
    --- a/source/encoder/encoder.h
    +++ b/source/encoder/encoder.h
    @@ -33,7 +33,7 @@
     #include "framedata.h"
    
     #ifdef ENABLE_DYNAMIC_HDR10
    -    #include "dynamicHDR10\hdr10plus.h"
    +    #include "dynamicHDR10/hdr10plus.h"
     #endif
    
     struct x265_encoder {};
    

    Note there's a typo in encoder.h which break compilation on non-windows systems - #include "dynamicHDR10\hdr10plus.h" + #include "dynamicHDR10/hdr10plus.h"

  2. Pradeep Ramachandran Account Deactivated

    We aren't yet enabling HDR10+ support by default in our builds as the HDR10+ parser code uses STLs which are known to cause incompatibilities across different compilers and run-times; this is why we've avoided STLs in the rest of the code. Once the STLs are removed (you're welcome to send a patch for this, btw :)), we will enable HDR10+ support by default.

  3. Georg Pelz

    Adjusting the multilib.sh in the way mentioned above doesn’t work anymore. 😞
    I end up with:

    CMake Warning:
      Manually-specified variables were not used by the project:
    
        ENABLE_DYNAMIC_HDR10
    

    uploaded the whole build output to https://drive.google.com/file/d/14NnFiGpk-dDYljCE4-pgno24wjjjyPYy/view?usp=sharing

    → Any idea what the problem could be?

    Cu Selur

    Ps.: switching to

    gcc version 10.2.0 (Homebrew GCC 10.2.0)
    

    as compiler instead of clang doesn’t help either.

  4. Log in to comment