diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index 4f7106533604c416222424814a9f81daded59a7e..d2fb0fa550d858a6e4e7228a90496a46f6425fd9 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -771,6 +771,24 @@ void DecLib::finishPicture(int &poc, PicList *&rpcListPic, MsgLevel msgl, bool a msg( WARNING, "Warning: Got multiple decoded picture hash SEI messages. Using first."); } m_numberOfChecksumErrorsDetected += calcAndPrintHashStatus(((const Picture*) m_pcPic)->getRecoBuf(), hash, pcSlice->getSPS()->getBitDepths(), msgl); + + SEIMessages scalableNestingSeis = getSeisByType(m_pcPic->SEIs, SEI::SCALABLE_NESTING ); + for (auto seiIt : scalableNestingSeis) + { + SEIScalableNesting *nestingSei = dynamic_cast<SEIScalableNesting*>(seiIt); + if (nestingSei->m_snSubpicFlag) + { + uint32_t subpicId = nestingSei->m_snSubpicId.front(); + SEIMessages nestedPictureHashes = getSeisByType(nestingSei->m_nestedSEIs, SEI::DECODED_PICTURE_HASH); + for (auto decPicHash : nestedPictureHashes) + { + const SubPic& subpic = pcSlice->getPPS()->getSubPic(subpicId); + const UnitArea area = UnitArea(pcSlice->getSPS()->getChromaFormatIdc(), Area(subpic.getSubPicLeft(), subpic.getSubPicTop(), subpic.getSubPicWidthInLumaSample(), subpic.getSubPicHeightInLumaSample())); + PelUnitBuf recoBuf = m_pcPic->cs->getRecoBuf(area); + m_numberOfChecksumErrorsDetected += calcAndPrintHashStatus(recoBuf, dynamic_cast<SEIDecodedPictureHash*>(decPicHash), pcSlice->getSPS()->getBitDepths(), msgl); + } + } + } } msg( msgl, "\n");