Skip to content

Conversation

@frankplow
Copy link

@frankplow frankplow commented May 31, 2023

This PR uses CMake's FetchContent to automatically fetch the latest version of VTM from the official repo rather than redistributing it. This should reduce the workload maintaining this repo. Draft for now as the updates to VTM between 9.3 and 20.0 have broken the library and it currently fails to build.

@frankplow
Copy link
Author

frankplow commented May 31, 2023

Here are the build errors at the moment:

[ 38%] Building CXX object CMakeFiles/vtmdecoder.dir/src/libVTMDecoder.cpp.o
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:201:51: error: no member named 'getNumReorderPics' in 'SPS'; did you mean 'getMaxNumReorderPics'?
      this->numReorderPicsHighestTid = activeSPS->getNumReorderPics( temporalId );
                                                  ^~~~~~~~~~~~~~~~~
                                                  getMaxNumReorderPics
/Users/frank/Downloads/VTM/build/_deps/vtm-src/source/Lib/CommonLib/./SequenceParameterSet.h:718:27: note: 'getMaxNumReorderPics' declared here
  int                     getMaxNumReorderPics(uint32_t tlayer) const            { return m_maxNumReorderPics[tlayer]; }
                          ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:206:53: error: no member named 'getNumReorderPics' in 'VPS'; did you mean 'getMaxNumReorderPics'?
      this->numReorderPicsHighestTid = referredVPS->getNumReorderPics( temporalId );
                                                    ^~~~~~~~~~~~~~~~~
                                                    getMaxNumReorderPics
/Users/frank/Downloads/VTM/build/_deps/vtm-src/source/Lib/CommonLib/./VideoParameterSet.h:213:21: note: 'getMaxNumReorderPics' declared here
  int               getMaxNumReorderPics( int temporalId ) const         { return m_dpbParameters[m_olsDpbParamsIdx[m_targetOlsIdx]].maxNumReorderPics[temporalId]; }
                    ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:284:10: error: use of undeclared identifier 'NAL_UNIT_RESERVED_IRAP_VCL_12'; did you mean 'NAL_UNIT_RESERVED_IRAP_VCL_11'?
    case NAL_UNIT_RESERVED_IRAP_VCL_12:
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         NAL_UNIT_RESERVED_IRAP_VCL_11
/Users/frank/Downloads/VTM/build/_deps/vtm-src/source/Lib/CommonLib/./TypeDef.h:929:3: note: 'NAL_UNIT_RESERVED_IRAP_VCL_11' declared here
  NAL_UNIT_RESERVED_IRAP_VCL_11,
  ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:284:10: error: duplicate case value 'NAL_UNIT_RESERVED_IRAP_VCL_11'
    case NAL_UNIT_RESERVED_IRAP_VCL_12:
         ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:283:10: note: previous case defined here
    case NAL_UNIT_RESERVED_IRAP_VCL_11:
         ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:482:103: error: use of undeclared identifier 'NAL_UNIT_RESERVED_IRAP_VCL_12'; did you mean 'NAL_UNIT_RESERVED_IRAP_VCL_11'?
      if (!bNewPicture && ((nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_TRAIL && nalu.m_nalUnitType <= NAL_UNIT_RESERVED_IRAP_VCL_12)
                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                                      NAL_UNIT_RESERVED_IRAP_VCL_11
/Users/frank/Downloads/VTM/build/_deps/vtm-src/source/Lib/CommonLib/./TypeDef.h:929:3: note: 'NAL_UNIT_RESERVED_IRAP_VCL_11' declared here
  NAL_UNIT_RESERVED_IRAP_VCL_11,
  ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:647:55: error: use of undeclared identifier 'CHROMA_444'
    if (c == LIBVTMDEC_LUMA || pcPic->chromaFormat == CHROMA_444)
                                                      ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:649:32: error: use of undeclared identifier 'CHROMA_422'
    if (pcPic->chromaFormat == CHROMA_422 || pcPic->chromaFormat == CHROMA_420)
                               ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:649:69: error: use of undeclared identifier 'CHROMA_420'
    if (pcPic->chromaFormat == CHROMA_422 || pcPic->chromaFormat == CHROMA_420)
                                                                    ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:662:55: error: use of undeclared identifier 'CHROMA_444'
    if (c == LIBVTMDEC_LUMA || pcPic->chromaFormat == CHROMA_444 || pcPic->chromaFormat == CHROMA_422)
                                                      ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:662:92: error: use of undeclared identifier 'CHROMA_422'
    if (c == LIBVTMDEC_LUMA || pcPic->chromaFormat == CHROMA_444 || pcPic->chromaFormat == CHROMA_422)
                                                                                           ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:664:32: error: use of undeclared identifier 'CHROMA_420'
    if (pcPic->chromaFormat == CHROMA_420)
                               ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:721:32: error: use of undeclared identifier 'CHROMA_400'
    if (pcPic->chromaFormat == CHROMA_400)
                               ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:723:32: error: use of undeclared identifier 'CHROMA_420'
    if (pcPic->chromaFormat == CHROMA_420)
                               ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:725:32: error: use of undeclared identifier 'CHROMA_422'
    if (pcPic->chromaFormat == CHROMA_422)
                               ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:727:32: error: use of undeclared identifier 'CHROMA_444'
    if (pcPic->chromaFormat == CHROMA_444)
                               ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:742:24: error: no member named 'recon' in 'EnumArray<int, ChannelType>'
      return bitDepths.recon[CHANNEL_TYPE_LUMA];
             ~~~~~~~~~ ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:742:30: error: use of undeclared identifier 'CHANNEL_TYPE_LUMA'
      return bitDepths.recon[CHANNEL_TYPE_LUMA];
                             ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:744:24: error: no member named 'recon' in 'EnumArray<int, ChannelType>'
      return bitDepths.recon[CHANNEL_TYPE_CHROMA];
             ~~~~~~~~~ ^
/Users/frank/Downloads/VTM/src/libVTMDecoder.cpp:744:30: error: use of undeclared identifier 'CHANNEL_TYPE_CHROMA'
      return bitDepths.recon[CHANNEL_TYPE_CHROMA];

@frankplow frankplow marked this pull request as ready for review May 31, 2023 14:48
@frankplow
Copy link
Author

6881f5a updates libVTMDecoder to work with the newest VTM, version 20.0, fixing the build errors above. Seems to work as expected for me so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant