diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 673eb6141870c9a23a9c6c20e0d4f4105059ae4d..7f40bc0665b59f4b7a77c9263995244be772ddad 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -3451,6 +3451,11 @@ bool EncAppCfg::xCheckParameter() xConfirmPara(m_useColorTrans && (m_log2MaxTbSize == 6), "Log2MaxTbSize must be less than 6 when ACT is enabled, otherwise ACT needs to be disabled"); +#if JVET_R0097_MAX_TRSIZE_CONDITIONALY_SIGNALING + xConfirmPara(m_uiCTUSize <= 32 && (m_log2MaxTbSize == 6), "Log2MaxTbSize must be less than 6 when CTU size is 32"); +#endif + + #undef xConfirmPara return check_failed; } diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 23b29455535515e3cf29c0aea7beb866e8a160d7..c79a36ed7c99b0113d52765581041f4522e06acf 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -51,6 +51,8 @@ #include <cassert> //########### place macros to be removed in next cycle below this line ############### +#define JVET_R0097_MAX_TRSIZE_CONDITIONALY_SIGNALING 1 // JVET-R0097: Aspect 1, If the luma CTB size is not larger than 32, sps_max_luma_transform_size_64_flag is not signalled and inferred to be 0 + #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 R0324_PH_SYNTAX_CONDITION_MODIFY 1 // JVET-R0324 add conditions on PH syntax to conder whether current pic is bi-predictive picture diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 8d9788e8f701da33d1e070b094eb18d586ddc246..626a5500063fd62bc3c6a48ae5cf571b6b976687 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -1694,8 +1694,17 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) pcSPS->setMaxBTSize(maxBTSize[1], maxBTSize[0], maxBTSize[2]); pcSPS->setMaxTTSize(maxTTSize[1], maxTTSize[0], maxTTSize[2]); - - READ_FLAG( uiCode, "sps_max_luma_transform_size_64_flag"); pcSPS->setLog2MaxTbSize( (uiCode ? 1 : 0) + 5 ); +#if JVET_R0097_MAX_TRSIZE_CONDITIONALY_SIGNALING + if (pcSPS->getCTUSize() > 32) { +#endif + READ_FLAG(uiCode, "sps_max_luma_transform_size_64_flag"); pcSPS->setLog2MaxTbSize((uiCode ? 1 : 0) + 5); +#if JVET_R0097_MAX_TRSIZE_CONDITIONALY_SIGNALING + } + else + { + pcSPS->setLog2MaxTbSize(5); + } +#endif if (chromaArrayType != CHROMA_400) { diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 36158eda8b2b710f670442562b8f2875f47962ca..468c2e737ae8f95227d1c7e3dc759bc374460e6e 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -1018,8 +1018,10 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) WRITE_UVLC(floorLog2(pcSPS->getMaxTTSizeIChroma()) - floorLog2(pcSPS->getMinQTSize(I_SLICE, CHANNEL_TYPE_CHROMA)), "sps_log2_diff_max_tt_min_qt_intra_slice_chroma"); } } - - WRITE_FLAG( (pcSPS->getLog2MaxTbSize() - 5) ? 1 : 0, "sps_max_luma_transform_size_64_flag" ); +#if JVET_R0097_MAX_TRSIZE_CONDITIONALY_SIGNALING + if (pcSPS->getCTUSize() > 32) +#endif + WRITE_FLAG( (pcSPS->getLog2MaxTbSize() - 5) ? 1 : 0, "sps_max_luma_transform_size_64_flag" ); if (chromaArrayType != CHROMA_400) {