Error when starting encode

Issue #539 resolved
Former user created an issue

Hi,

i compiled x265 3.3+... from the master-branch and get these error, if i start to encode.

#!

avs2pipemod[info]: writing 2184 frames of 24000/1001 fps, 720x400,
sar 0:0, YUV-420-planar-8bit progressive video.
y4m  [info]: 720x400 fps 24000/1001 i420p8 unknown frame count
raw  [info]: output file: G:\Movie\x264\test\00009_temp\00009_out.hevc
x265 [info]: HEVC encoder version 3.3+17-gdf2ac512d
x265 [info]: build info [Windows][GCC 10.0.1][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [error]: internalBitDepth must match compiled bit depth
x265 [error]: x265_encoder_open() failed for Enc,
x265 [error]: Failure generating stream headers 0
avs2pipemod[info]: finished, wrote 1 frames [0%].
avs2pipemod[info]: total elapsed time is 0.042 sec.
avs2pipemod[error]: only wrote 1 of 2184 frames.

I compiled same version with VS2019 and get the same error. That happend with all of my multilib builds. Have a look here. I think it is since commit 429d33f

Comments (20)

  1. Patman86

    Now, i’m registered. The mentioned issue above is from me. I compiled x265-3.3+15 from x265_git with GCC and VS2019 and that Versions works. When i would like to compile x265-3.3-16 from x265_git i’ve got an error during compiling. I’ve set checkout at this commit from source. Error log:

    [ 86%] Building CXX object CMakeFiles/cli.dir/abrEncApp.cpp.obj
    D:/repos/x265/source/abrEncApp.cpp: In constructor 'x265::PassEncoder::PassEncoder(uint32_t, x265::CLIOptions, x265::AbrEncoder*)':
    D:/repos/x265/source/abrEncApp.cpp:212:23: error: 'struct x265::CLIOptions' has no member named 'enableScaler'
      212 |         if(!(m_cliopt.enableScaler && m_id))
          |                       ^~~~~~~~~~~~
    D:/repos/x265/source/abrEncApp.cpp: In member function 'int x265::PassEncoder::init(int&)':
    D:/repos/x265/source/abrEncApp.cpp:228:24: error: 'struct x265::CLIOptions' has no member named 'enableScaler'
      228 |         if (!(m_cliopt.enableScaler && m_id))
          |                        ^~~~~~~~~~~~
    D:/repos/x265/source/abrEncApp.cpp: In member function 'void x265::PassEncoder::setReuseLevel()':
    D:/repos/x265/source/abrEncApp.cpp:275:37: error: 'struct x265::CLIOptions' has no member named 'saveLevel'
      275 |         m_isAnalysisSave = m_cliopt.saveLevel ? true : false;
          |                                     ^~~~~~~~~
    D:/repos/x265/source/abrEncApp.cpp:276:37: error: 'struct x265::CLIOptions' has no member named 'loadLevel'
      276 |         m_isAnalysisLoad = m_cliopt.loadLevel ? true : false;
          |                                     ^~~~~~~~~
    D:/repos/x265/source/abrEncApp.cpp:277:52: error: 'struct x265::CLIOptions' has no member named 'loadLevel'
      277 |         m_param->analysisLoadReuseLevel = m_cliopt.loadLevel;
          |                                                    ^~~~~~~~~
    D:/repos/x265/source/abrEncApp.cpp:278:52: error: 'struct x265::CLIOptions' has no member named 'saveLevel'
      278 |         m_param->analysisSaveReuseLevel = m_cliopt.saveLevel;
          |                                                    ^~~~~~~~~
    D:/repos/x265/source/abrEncApp.cpp:285:65: error: 'struct x265::CLIOptions' has no member named 'refId'
      285 |             x265_param *refParam = m_parent->m_passEnc[m_cliopt.refId]->m_param;
          |                                                                 ^~~~~
    D:/repos/x265/source/abrEncApp.cpp: In member function 'void x265::PassEncoder::copyInfo(x265_analysis_data*)':
    D:/repos/x265/source/abrEncApp.cpp:371:35: error: 'struct x265::CLIOptions' has no member named 'numRefs'
      371 |                 write *= m_cliopt.numRefs;
          |                                   ^~~~~~~
    D:/repos/x265/source/abrEncApp.cpp: In member function 'bool x265::PassEncoder::readPicture(x265_picture*)':
    D:/repos/x265/source/abrEncApp.cpp:478:44: error: 'struct x265::CLIOptions' has no member named 'refId'
      478 |                 int analysisQId = m_cliopt.refId;
          |                                            ^~~~~
    D:/repos/x265/source/abrEncApp.cpp:481:90: error: 'struct x265::CLIOptions' has no member named 'numRefs'
      481 |                 int written = analysisWrite * m_parent->m_passEnc[analysisQId]->m_cliopt.numRefs;
          |                                                                                          ^~~~~~~
    D:/repos/x265/source/abrEncApp.cpp:487:90: error: 'struct x265::CLIOptions' has no member named 'numRefs'
      487 |                     written = analysisWrite * m_parent->m_passEnc[analysisQId]->m_cliopt.numRefs;
          |                                                                                          ^~~~~~~
    D:/repos/x265/source/abrEncApp.cpp:501:102: error: 'struct x265::CLIOptions' has no member named 'numRefs'
      501 |                                 written = analysisWrite * m_parent->m_passEnc[analysisQId]->m_cliopt.numRefs;
          |                                                                                                      ^~~~~~~
    D:/repos/x265/source/abrEncApp.cpp:507:138: error: 'struct x265::CLIOptions' has no member named 'numRefs'
      507 |                                 int write = m_parent->m_analysisWrite[analysisQId][i].get() * m_parent->m_passEnc[analysisQId]->m_cliopt.numRefs;
          |                                                                                                                                          ^~~~~~~
    D:/repos/x265/source/abrEncApp.cpp: In member function 'virtual void x265::PassEncoder::threadMain()':
    D:/repos/x265/source/abrEncApp.cpp:764:30: error: 'struct x265::CLIOptions' has no member named 'loadLevel'
      764 |                 if (m_cliopt.loadLevel && picInput)
          |                              ^~~~~~~~~
    D:/repos/x265/source/abrEncApp.cpp:766:58: error: 'struct x265::CLIOptions' has no member named 'refId'
      766 |                     m_parent->m_analysisReadCnt[m_cliopt.refId].incr();
          |                                                          ^~~~~
    D:/repos/x265/source/abrEncApp.cpp:767:55: error: 'struct x265::CLIOptions' has no member named 'refId'
      767 |                     m_parent->m_analysisRead[m_cliopt.refId][m_lastIdx].incr();
          |                                                       ^~~~~
    In file included from D:/repos/x265/source/abrEncApp.h:32,
                     from D:/repos/x265/source/abrEncApp.cpp:25:
    D:/repos/x265/source/x265cli.h: At global scope:
    D:/repos/x265/source/x265cli.h:40:13: warning: 'orgConsoleTitle' defined but not used [-Wunused-variable]
       40 | static char orgConsoleTitle[CONSOLE_TITLE_SIZE] = "";
          |             ^~~~~~~~~~~~~~~
    make[2]: *** [CMakeFiles/cli.dir/build.make:226: CMakeFiles/cli.dir/abrEncApp.cpp.obj] Fehler 1
    make[2]: Verzeichnis /D/repos/x265/build/msys/8bit wird verlassen
    make[1]: *** [CMakeFiles/Makefile2:223: CMakeFiles/cli.dir/all] Fehler 2
    make[1]: Verzeichnis /D/repos/x265/build/msys/8bit wird verlassen
    make: *** [Makefile:147: all] Fehler 2
    

  2. Aruna Matheswaran

    @Patman86 - Could you please checkout to 3.3+17-df2ac512d in x265_git and test? It has the fix for the build errors.

  3. Patman86

    See first post, compiling the x265-3.3+17 works, but the compiled multilib exe can't used, there is an error with the encoder, the headers and the bit depth. I got same result with Msvc, gcc 9.3.0 or gcc 10.0.1.

  4. Aruna Matheswaran

    Do you observe this encode error even with standalone x265 exe? I just tested the multilib builds with standalone x265 application and the integration with FFMpeg. Both work fine for me.

  5. Patman86

    Now I have tested a lot, but it is not possible to create a Multilib x265.exe with all bit depths working. When I build a standalone for 12bit, 10bit and 8bit, each of these exe files works as it should. But when I build a Multilib x265.exe, only the 8-bit depth works correctly. The other two Bitdepht's show me the error in post 1. I think it’s a linking problem or a little bug in abrEncApp.cpp.

  6. Aruna Matheswaran

    I double-checked this on 3.3+18- 8b61ca0ca. Multilib x265.exe works perfectly for all 3 input-depths. Can you share your build steps for us to reproduce the issue? I hope you are using multilib.sh.

  7. Patman86

    This is really strange. I used the multilib.sh file from the msys folder or the customized multilib.bat file from the vc15-x86_64 folder. The adjustments made here are only in relation to Visual Studio 16. The processes for creating the exe file work smoothly. Nor am I the only one who has this problem. Other people in the Doom9 forum also have this problem. I then generated the building process via the CMake GUI and started building, again with the error message of the exe file. Then I built a static version, still the error message. Till version 3.3+15 there are no problems with the exe file. Here are my compiling logs: GCC log and MSVC log

  8. Aruna Matheswaran

    Thanks for the details, @Patman86 . I could reproduce the issue now. My bad! I was testing it with incorrect CLI. I’ll get back here with the fix ASAP.

  9. Aruna Matheswaran

    app: Fix encode errors with multi-lib builds.

    Enables the application to use the correct version of API based on the internal bit-depth specified run-time.

    Fixes issue #539

    → <<cset 6bb2d88029c2>>

  10. Patman86

    The problems have occurred since the addition of the abrEncApp.cpp file and the associated adjustments. Issue #541 targets the same problem. You can get more infos via the link from @Marsia Mariner

  11. Log in to comment