Commit c363af84 authored by Frank Bossen's avatar Frank Bossen
Browse files

Merge branch 'subpic_hash_check' into 'master'

Add verification of subpicture based decoded picture hashes

See merge request jvet/VVCSoftware_VTM!2025
parents ff41810e 85f98bb3
......@@ -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");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment