diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index c79a36ed7c99b0113d52765581041f4522e06acf..b836ae13ac16bbd02e4acdd906b347ce63eeb03a 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -55,6 +55,8 @@ #define JVET_R0483_SH_TSRC_DISABLED_FLAG_CLEANUP 1 // JVET-R0483 Comb 4: R0049 + R0271, only R0049 method 3 aspect (Skip signaling sh_ts_residual_coding_disabled_flag when sps_transform_skip_enabled_flag = 0, also proposed in R0068, R0097, R0142, R0153) as R0271 has its own macro +#define JVET_R0161_CONDITION_SIGNAL_PTL_IDX 1 // JVET_R0161 proposal 2: skip PTL index signaling when number of signaled PTL structure is equal to number of OLSs + #define R0324_PH_SYNTAX_CONDITION_MODIFY 1 // JVET-R0324 add conditions on PH syntax to conder whether current pic is bi-predictive picture #define JVET_R0278_CONSTRAINT 1 // JVET-R0278: ph_inter_slice_allowed_flag constraint diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 626a5500063fd62bc3c6a48ae5cf571b6b976687..095d498d1b319d42778405947602e8193fb516d5 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -2218,11 +2218,21 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) pcVPS->setProfileTierLevel(ptls); for (int i = 0; i < pcVPS->getTotalNumOLSs(); i++) { +#if JVET_R0161_CONDITION_SIGNAL_PTL_IDX + if (pcVPS->getNumPtls() > 1 && pcVPS->getNumPtls() != pcVPS->getTotalNumOLSs()) +#else if(pcVPS->getNumPtls() > 1) +#endif { READ_CODE(8, uiCode, "ols_ptl_idx"); pcVPS->setOlsPtlIdx(i, uiCode); } +#if JVET_R0161_CONDITION_SIGNAL_PTL_IDX + else if (pcVPS->getNumPtls() == pcVPS->getTotalNumOLSs()) + { + pcVPS->setOlsPtlIdx(i, i); + } +#endif else pcVPS->setOlsPtlIdx(i, 0); } diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 468c2e737ae8f95227d1c7e3dc759bc374460e6e..2b8c7ee98633c5be0cff812fda1aa2495603f5a3 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -1400,7 +1400,11 @@ void HLSWriter::codeVPS(const VPS* pcVPS) } for (int i = 0; i < totalNumOlss; i++) { +#if JVET_R0161_CONDITION_SIGNAL_PTL_IDX + if (pcVPS->getNumPtls() > 1 && pcVPS->getNumPtls() != pcVPS->getTotalNumOLSs()) +#else if(pcVPS->getNumPtls() > 1) +#endif WRITE_CODE(pcVPS->getOlsPtlIdx(i), 8, "ols_ptl_idx"); }