Commit ecfbd36d authored by Antti Hallapuro's avatar Antti Hallapuro
Browse files

Check subpicture specific decoded picture hashes in decoder

parent e81efd6f
......@@ -767,6 +767,27 @@ 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);
if (!hash && pcSlice->getSPS()->getNumSubPics() > 1)
{
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