Skip to content
Snippets Groups Projects
Commit a9f7ece9 authored by Wei Jia's avatar Wei Jia Committed by Karsten Suehring
Browse files

JVET-AE0142 item 3 and item 4: Fix two bugs including an added condition and a...

JVET-AE0142 item 3 and item 4: Fix two bugs including an added condition and a nnpfc_purpose related constraint.
parent f63f499f
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,20 @@ void SEINeuralNetworkPostFiltering::filterPictures(PicList& picList)
|| picType == NAL_UNIT_CODED_SLICE_CRA || picType == NAL_UNIT_CODED_SLICE_GDR)
{
m_clvsNnpfcSEIs = getSeisByType(currCodedPic->SEIs, SEI::PayloadType::NEURAL_NETWORK_POST_FILTER_CHARACTERISTICS);
#if JVET_AE0142_NNPF_CONSTRAINT_BUGFIXES
for (std::list<SEI*>::iterator it = m_clvsNnpfcSEIs.begin(); it != m_clvsNnpfcSEIs.end(); it++)
{
SEINeuralNetworkPostFilterCharacteristics *nnpfcSEI = (SEINeuralNetworkPostFilterCharacteristics*)(*it);
for (std::list<SEI*>::iterator it2 = it; it2 != m_clvsNnpfcSEIs.end(); it2++)
{
SEINeuralNetworkPostFilterCharacteristics *nnpfcSEI2 = (SEINeuralNetworkPostFilterCharacteristics*)(*it2);
CHECK(nnpfcSEI->m_id == nnpfcSEI2->m_id && nnpfcSEI->m_purpose != nnpfcSEI2->m_purpose, "All NNPFC SEI messages with a particular value of nnpfc_id within a CLVS shall have the same value of nnpfc_purpose.");
}
}
#endif
m_isNnpfActiveForCLVS.clear();
}
......@@ -364,7 +378,11 @@ void SEINeuralNetworkPostFiltering::checkInputPics(
{
inputPic[i] = inputPic[i - 1];
inputPresentFlag[i] = false;
#if JVET_AE0142_NNPF_CONSTRAINT_BUGFIXES
CHECK( pictureRateUpsamplingFlag && currNnpfc->m_numberInterpolatedPictures[i - 1] > 0, "It is a requirement of bitstream conformance that when PictureRateUpsamplingFlag is equal to 1, nnpfc_interpolated_pics[i - 1] shall not be greater than 0");
#else
CHECK(currNnpfc->m_numberInterpolatedPictures[i] > 0, "It is a requirement of bitstream conformance that nnpfc_interpolated_pics[i - 1] shall not be greater than 0");
#endif
}
}
}
......
......@@ -67,6 +67,8 @@
#define JVET_AE0141_NNPFC_BUGFIX_COLOURIZATION 1 // JVET-AE0141: Fix a bug in NNPFC SEI message for colourization
#define JVET_AE0142_NNPF_CONSTRAINT_BUGFIXES 1 // JVET_AE0142 item 3 and item 4: Fix two bugs including an added condition and a nnpfc_purpose related constraint.
#define JVET_AE0135_NNPF_PIC_RATE_UPSAMPLING_CONSTRAINT 1 // JVET_AE0135 item2: On NNPF picture rate upsampling constraint
//########### place macros to be be kept below this line ###############
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment