...
 
Commits (8)
......@@ -618,7 +618,7 @@ void Slice::checkCRA(const ReferencePictureList* pRPL0, const ReferencePictureLi
{
int pocBits = getSPS()->getBitsForPOC();
int pocMask = (1 << pocBits) - 1;
int ltrpPoc = m_pRPL1->getRefPicIdentifier(i) & pocMask;
int ltrpPoc = pRPL1->getRefPicIdentifier(i) & pocMask;
if(pRPL1->getDeltaPocMSBPresentFlag(i))
{
ltrpPoc += getPOC() - pRPL1->getDeltaPocMSBCycleLT(i) * (pocMask + 1) - (getPOC() & pocMask);
......@@ -1123,7 +1123,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
// No RASL pictures shall be present in the bitstream that are associated with
// an IDR picture.
if (nalUnitType == NAL_UNIT_CODED_SLICE_RASL)
if (nalUnitType == NAL_UNIT_CODED_SLICE_RASL && !pps.getMixedNaluTypesInPicFlag())
{
CHECK( this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ||
this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL, "Invalid NAL unit type");
......@@ -1132,7 +1132,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
// No RADL pictures shall be present in the bitstream that are associated with
// a BLA picture having nal_unit_type equal to BLA_N_LP or that are associated
// with an IDR picture having nal_unit_type equal to IDR_N_LP.
if (nalUnitType == NAL_UNIT_CODED_SLICE_RADL)
if (nalUnitType == NAL_UNIT_CODED_SLICE_RADL && !pps.getMixedNaluTypesInPicFlag())
{
CHECK (this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_N_LP, "Invalid NAL unit type");
}
......@@ -1155,7 +1155,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
if (pcSlice->getPicHeader()->getPicOutputFlag() == 1 && !this->getPicHeader()->getNoOutputOfPriorPicsFlag() && pcPic->layerId == this->m_nuhLayerId)
{
if (nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP || nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL)
if ((nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP || nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL) && !pps.getMixedNaluTypesInPicFlag())
{
CHECK(pcPic->poc >= this->getPOC(), "Any picture, with nuh_layer_id equal to a particular value layerId, that precedes an IRAP picture with nuh_layer_id "
"equal to layerId in decoding order shall precede the IRAP picture in output order.");
......@@ -1166,7 +1166,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
{
if (nalUnitType == NAL_UNIT_CODED_SLICE_RADL)
{
if (this->getAssociatedIRAPPOC() > pcSlice->getAssociatedIRAPPOC())
if (this->getAssociatedIRAPPOC() > pcSlice->getAssociatedIRAPPOC() && !pps.getMixedNaluTypesInPicFlag())
{
if (this->getAssociatedIRAPPOC() != pcPic->poc)
{
......@@ -1188,7 +1188,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
}
if ((nalUnitType == NAL_UNIT_CODED_SLICE_RASL || nalUnitType == NAL_UNIT_CODED_SLICE_RADL) &&
(pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL && pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL))
(pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL && pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL) && !pps.getMixedNaluTypesInPicFlag())
{
if (pcSlice->getAssociatedIRAPPOC() == this->getAssociatedIRAPPOC() && pcPic->layerId == this->m_nuhLayerId)
{
......@@ -1206,7 +1206,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
}
}
if (nalUnitType == NAL_UNIT_CODED_SLICE_RASL)
if (nalUnitType == NAL_UNIT_CODED_SLICE_RASL && !pps.getMixedNaluTypesInPicFlag())
{
if ((this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_CRA) &&
this->getAssociatedIRAPPOC() == pcSlice->getAssociatedIRAPPOC())
......@@ -1218,7 +1218,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
}
}
if (nalUnitType == NAL_UNIT_CODED_SLICE_RASL)
if (nalUnitType == NAL_UNIT_CODED_SLICE_RASL && !pps.getMixedNaluTypesInPicFlag())
{
if(this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_CRA)
{
......
......@@ -51,6 +51,8 @@
#include <cassert>
//########### place macros to be removed in next cycle below this line ###############
#define JVET_S0076_ASPECT1 1 // JVET-S0076: aspect 1: Move ph_non_ref_pic_flag to earlier position
#define JVET_S0133_PH_SYNTAX_OVERRIDE_ENC_FIX 1 // JVET-S0133: Encoder-only fix on the override of partition constriants in PH
#define JVET_S0179_CONDITIONAL_SIGNAL_GCI 1 // JVET-S0179: Conditional signalling of GCI fields
......@@ -89,6 +91,8 @@
#define JVET_S0186_SPS_CLEANUP 1 // JVET-S0186: Proposal 1, move sps_chroma_format_idc and sps_log2_ctu_size_minus5 to take place sps_reserved_zero_4bits
#define JVET_S0184_VIRTUAL_BOUNDARY_CONSTRAINT 1 // JVET-S0184: Conformance constraints regarding virtual boundary signalling when subpictures are present
//########### place macros to be be kept below this line ###############
#define JVET_S0257_DUMP_360SEI_MESSAGE 1 // Software support of 360 SEI messages
......
......@@ -1851,7 +1851,7 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl
}
else
{
CHECK(nalu.m_nalUnitType != m_pcPic->slices[m_uiSliceSegmentIdx - 1]->getNalUnitType(), "The value of NAL unit type shall be the same for all coded slice NAL units of a picture");
CHECK(nalu.m_nalUnitType != m_pcPic->slices[m_uiSliceSegmentIdx - 1]->getNalUnitType() && !m_pcPic->cs->pps->getMixedNaluTypesInPicFlag(), "If pps_mixed_nalu_types_in_pic_flag is equal to 0, the value of NAL unit type shall be the same for all coded slice NAL units of a picture");
m_apcSlicePilot->copySliceInfo( m_pcPic->slices[m_uiSliceSegmentIdx-1] );
}
......@@ -2570,7 +2570,7 @@ void DecLib::updatePrevGDRInSameLayer()
{
const NalUnitType pictureType = m_pcPic->getPictureType();
if (pictureType == NAL_UNIT_CODED_SLICE_GDR)
if (pictureType == NAL_UNIT_CODED_SLICE_GDR && !m_pcPic->cs->pps->getMixedNaluTypesInPicFlag())
{
m_prevGDRInSameLayerPOC[m_pcPic->layerId] = m_pcPic->getPOC();
}
......@@ -2580,7 +2580,7 @@ void DecLib::updateAssociatedIRAP()
{
const NalUnitType pictureType = m_pcPic->getPictureType();
if (pictureType == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pictureType == NAL_UNIT_CODED_SLICE_IDR_N_LP || pictureType == NAL_UNIT_CODED_SLICE_CRA)
if ((pictureType == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pictureType == NAL_UNIT_CODED_SLICE_IDR_N_LP || pictureType == NAL_UNIT_CODED_SLICE_CRA) && !m_pcPic->cs->pps->getMixedNaluTypesInPicFlag())
{
m_associatedIRAPDecodingOrderNumber[m_pcPic->layerId] = m_pcPic->getDecodingOrderNumber();
m_pocCRA[m_pcPic->layerId] = m_pcPic->getPOC();
......
......@@ -2455,6 +2455,9 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag
#endif
READ_FLAG(uiCode, "gdr_or_irap_pic_flag"); picHeader->setGdrOrIrapPicFlag(uiCode != 0);
#if JVET_S0076_ASPECT1
READ_FLAG(uiCode, "ph_non_ref_pic_flag"); picHeader->setNonReferencePictureFlag(uiCode != 0);
#endif
if (picHeader->getGdrOrIrapPicFlag())
{
READ_FLAG(uiCode, "gdr_pic_flag"); picHeader->setGdrPicFlag(uiCode != 0);
......@@ -2473,7 +2476,9 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag
picHeader->setPicIntraSliceAllowedFlag(true);
}
CHECK(picHeader->getPicInterSliceAllowedFlag() == 0 && picHeader->getPicIntraSliceAllowedFlag() == 0, "Invalid picture without intra or inter slice");
#if !JVET_S0076_ASPECT1
READ_FLAG(uiCode, "non_reference_picture_flag"); picHeader->setNonReferencePictureFlag( uiCode != 0 );
#endif
// parameter sets
READ_UVLC(uiCode, "ph_pic_parameter_set_id");
picHeader->setPPSId(uiCode);
......@@ -2703,7 +2708,9 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag
{
READ_FLAG( uiCode, "ph_virtual_boundaries_present_flag" );
picHeader->setVirtualBoundariesPresentFlag( uiCode != 0 );
#if !JVET_S0184_VIRTUAL_BOUNDARY_CONSTRAINT
CHECK( sps->getSubPicInfoPresentFlag() && picHeader->getVirtualBoundariesPresentFlag(), "When the subpicture info is present, the signalling of the virtual boundary position, if present, shall be in SPS" );
#endif
if( picHeader->getVirtualBoundariesPresentFlag() )
{
READ_CODE( 2, uiCode, "ph_num_ver_virtual_boundaries"); picHeader->setNumVerVirtualBoundaries( uiCode );
......@@ -3393,6 +3400,10 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par
#if !JVET_S0052_RM_SEPARATE_COLOUR_PLANE
CHECK(pcSlice->getPictureHeaderInSliceHeader() && sps->getSeparateColourPlaneFlag() == 1, "when separate_colour_plane_flag is equal to 1, the value of picture_header_in_slice_header_flag shall be equal to 0");
#endif
#if JVET_S0184_VIRTUAL_BOUNDARY_CONSTRAINT
CHECK(sps->getSubPicInfoPresentFlag() == 1 && sps->getVirtualBoundariesEnabledFlag() == 1 && sps->getVirtualBoundariesPresentFlag() == 0,
"when sps_subpic_infp_present_flag is equal to 1 and sps_virtual_boundaries_enabled_flag is equal to 1, sps_virtual_boundaries_present_flag shall be equal 1");
#endif
const ChromaFormat chFmt = sps->getChromaFormatIdc();
const uint32_t numValidComp=getNumberValidComponents(chFmt);
......
......@@ -1520,7 +1520,10 @@ void HLSWriter::codePictureHeader( PicHeader* picHeader, bool writeRbspTrailingB
#endif
CodingStructure& cs = *picHeader->getPic()->cs;
WRITE_FLAG(picHeader->getGdrOrIrapPicFlag(), "gdr_or_irap_pic_flag");
WRITE_FLAG(picHeader->getGdrOrIrapPicFlag(), "gdr_or_irap_pic_flag");
#if JVET_S0076_ASPECT1
WRITE_FLAG(picHeader->getNonReferencePictureFlag(), "ph_non_ref_pic_flag");
#endif
if (picHeader->getGdrOrIrapPicFlag())
{
WRITE_FLAG(picHeader->getGdrPicFlag(), "gdr_pic_flag");
......@@ -1531,7 +1534,9 @@ void HLSWriter::codePictureHeader( PicHeader* picHeader, bool writeRbspTrailingB
{
WRITE_FLAG(picHeader->getPicIntraSliceAllowedFlag(), "ph_intra_slice_allowed_flag");
}
#if !JVET_S0076_ASPECT1
WRITE_FLAG(picHeader->getNonReferencePictureFlag(), "non_reference_picture_flag");
#endif
// parameter sets
WRITE_UVLC(picHeader->getPPSId(), "ph_pic_parameter_set_id");
pps = cs.slice->getPPS();
......