diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 5df056cdbe8fee8a471ac75a34fbd490de82be9f..fcd9b8e242f52c2903ceac5abda413e09aceaa8f 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -63,6 +63,8 @@ #define JVET_S0052_RM_SEPARATE_COLOUR_PLANE 1 // JVET-S0052: Remove separate colour plane coding from VVC version 1 +#define JVET_S0063_VPS_SIGNALLING 1 // Modifications to VPS signalling - conditionally signal vps_num_ptls_minus1 + #define JVET_S0065_SPS_INFERENCE_RULE 1 // JVET_S0065_PROPOSAL1: Inference rule for sps_virtual_boundaries_present_flag //########### place macros to be be kept below this line ############### diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 133e35b68b3f9f21a331661aa836a0af6c1a83b9..5918c9bcc954574a8051ac9cc6f76baf392c4942 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -2205,10 +2205,20 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) } } } +#if JVET_S0063_VPS_SIGNALLING + READ_CODE(8, uiCode, "vps_num_ptls_minus1"); pcVPS->setNumPtls(uiCode + 1); +#endif } - +#if JVET_S0063_VPS_SIGNALLING + else + { + pcVPS->setNumPtls(1); + } +#endif pcVPS->deriveOutputLayerSets(); +#if !JVET_S0063_VPS_SIGNALLING READ_CODE(8, uiCode, "vps_num_ptls_minus1"); pcVPS->setNumPtls(uiCode + 1); +#endif CHECK( uiCode >= pcVPS->getTotalNumOLSs(),"The value of vps_num_ptls_minus1 shall be less than TotalNumOlss"); std::vector<bool> isPTLReferred( pcVPS->getNumPtls(), false); diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 253545e619e7f800ee230e06bd9d449c591ed653..2d09f4255682781e5a164b2db85a8fd6ce290cc0 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -1383,10 +1383,16 @@ void HLSWriter::codeVPS(const VPS* pcVPS) } } } +#if JVET_S0063_VPS_SIGNALLING + CHECK(pcVPS->getNumPtls() - 1 < pcVPS->getTotalNumOLSs(), "vps_num_ptls_minus1 shall be less than TotalNumOlss"); + WRITE_CODE(pcVPS->getNumPtls() - 1, 8, "vps_num_ptls_minus1"); +#endif } int totalNumOlss = pcVPS->getTotalNumOLSs(); +#if !JVET_S0063_VPS_SIGNALLING WRITE_CODE(pcVPS->getNumPtls() - 1, 8, "vps_num_ptls_minus1"); +#endif for (int i = 0; i < pcVPS->getNumPtls(); i++) { if(i > 0)