diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index eb68b906c4fc4979f6b5c48d4d95b3a17cc719b8..ff73948c03e771e4a29ff209e27ce1807e356a37 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -98,7 +98,6 @@ -#define JVET_Q0169_SUBPIC_LEN_CONFORM 1 // JVET-Q0169: add bitstream conformance check on subpic length #define JVET_Q0504_PLT_NON444 1 // JVET-Q0504: enable palette mode for non 444 color format diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index cb4965905691aad05235b3679b782643082736f0..7f8f3b8a2bc9547e95b5cbf2d8823bd11bef8975 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -477,9 +477,7 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) READ_UVLC( uiCode, "pps_subpic_id_len_minus1" ); pcPPS->setSubPicIdLen( uiCode + 1 ); CHECK( uiCode > 15, "Invalid pps_subpic_id_len_minus1 signalled"); -#if JVET_Q0169_SUBPIC_LEN_CONFORM CHECK((1 << pcPPS->getSubPicIdLen()) < pcPPS->getNumSubPics(), "pps_subpic_id_len exceeds valid range"); -#endif for( int picIdx = 0; picIdx < pcPPS->getNumSubPics( ); picIdx++ ) { READ_CODE( pcPPS->getSubPicIdLen( ), uiCode, "pps_subpic_id[i]" ); pcPPS->setSubPicId( picIdx, uiCode ); @@ -1623,9 +1621,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) { READ_UVLC( uiCode, "sps_subpic_id_len_minus1" ); pcSPS->setSubPicIdLen( uiCode + 1 ); CHECK( uiCode > 15, "Invalid sps_subpic_id_len_minus1 signalled"); -#if JVET_Q0169_SUBPIC_LEN_CONFORM CHECK((1 << pcSPS->getSubPicIdLen()) < pcSPS->getNumSubPics(), "sps_subpic_id_len exceeds valid range"); -#endif for( int picIdx = 0; picIdx < pcSPS->getNumSubPics( ); picIdx++ ) { READ_CODE( pcSPS->getSubPicIdLen( ), uiCode, "sps_subpic_id[i]" ); pcSPS->setSubPicId( picIdx, uiCode ); @@ -2888,9 +2884,7 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag { READ_UVLC( uiCode, "ph_subpic_id_len_minus1" ); picHeader->setSubPicIdLen( uiCode + 1 ); CHECK( uiCode > 15, "Invalid ph_subpic_id_len_minus1 signalled"); -#if JVET_Q0169_SUBPIC_LEN_CONFORM CHECK((1 << picHeader->getSubPicIdLen()) < sps->getNumSubPics(), "ph_subpic_id_len exceeds valid range"); -#endif for( int picIdx = 0; picIdx < sps->getNumSubPics( ); picIdx++ ) { READ_CODE( picHeader->getSubPicIdLen( ), uiCode, "ph_subpic_id[i]" ); picHeader->setSubPicId( picIdx, uiCode ); diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 37d5aeb0d17d71d41640742d2e531dd721265a51..62997f5591264fde8caef3e681a1182f1538c875 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -298,9 +298,7 @@ void HLSWriter::codePPS( const PPS* pcPPS ) CHECK(pcPPS->getSubPicIdLen() < 1, "PPS: SubPicIdLen cannot be less than 1"); WRITE_UVLC( pcPPS->getSubPicIdLen() - 1, "pps_subpic_id_len_minus1" ); -#if JVET_Q0169_SUBPIC_LEN_CONFORM CHECK((1 << pcPPS->getSubPicIdLen()) < pcPPS->getNumSubPics(), "pps_subpic_id_len exceeds valid range"); -#endif for( int picIdx = 0; picIdx < pcPPS->getNumSubPics( ); picIdx++ ) { WRITE_CODE( pcPPS->getSubPicId(picIdx), pcPPS->getSubPicIdLen( ), "pps_subpic_id[i]" ); @@ -1050,9 +1048,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) if( pcSPS->getSubPicIdSignallingPresentFlag() ) { WRITE_UVLC( pcSPS->getSubPicIdLen( ) - 1, "sps_subpic_id_len_minus1" ); -#if JVET_Q0169_SUBPIC_LEN_CONFORM CHECK((1 << pcSPS->getSubPicIdLen()) < pcSPS->getNumSubPics(), "sps_subpic_id_len exceeds valid range"); -#endif for( int picIdx = 0; picIdx < pcSPS->getNumSubPics( ); picIdx++ ) { WRITE_CODE( pcSPS->getSubPicId(picIdx), pcSPS->getSubPicIdLen( ), "sps_subpic_id[i]" ); @@ -1935,9 +1931,7 @@ void HLSWriter::codePictureHeader( PicHeader* picHeader ) if( picHeader->getSubPicIdSignallingPresentFlag() ) { WRITE_UVLC( picHeader->getSubPicIdLen() - 1, "ph_subpic_id_len_minus1" ); -#if JVET_Q0169_SUBPIC_LEN_CONFORM CHECK((1 << picHeader->getSubPicIdLen()) < sps->getNumSubPics(), "ph_subpic_id_len exceeds valid range"); -#endif for( int picIdx = 0; picIdx < sps->getNumSubPics( ); picIdx++ ) { WRITE_CODE(picHeader->getSubPicId(picIdx), picHeader->getSubPicIdLen( ), "ph_subpic_id[i]" );