diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 420d504bad222c57d640c0eeb148f5738c3a1f60..37ef1186401f5a90aa2a039284049a1e7b25c7c6 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -134,7 +134,6 @@ -#define JVET_Q0267_RESET_CHROMA_QP_OFFSET 1 // JVET-Q0267: Reset chroma QP offsets at the start of each chroma QP offset group #define JVET_Q0293_REMOVAL_PDPC_CHROMA_NX2 1 // JVET-Q0293: Removal of chroma Nx2 blocks in PDPC diff --git a/source/Lib/DecoderLib/CABACReader.cpp b/source/Lib/DecoderLib/CABACReader.cpp index 53dc7745b2a8e9e659246e1638acb08e2e359aff..7cae24655636b75370f3592f269d56660712c6ae 100644 --- a/source/Lib/DecoderLib/CABACReader.cpp +++ b/source/Lib/DecoderLib/CABACReader.cpp @@ -481,9 +481,7 @@ void CABACReader::coding_tree( CodingStructure& cs, Partitioner& partitioner, CU if( cs.slice->getUseChromaQpAdj() && partitioner.currQgChromaEnable() ) { cuCtx.isChromaQpAdjCoded = false; -#if JVET_Q0267_RESET_CHROMA_QP_OFFSET cs.chromaQpAdj = 0; -#endif } // Reset delta QP coding flag and ChromaQPAdjustemt coding flag @@ -497,9 +495,7 @@ void CABACReader::coding_tree( CodingStructure& cs, Partitioner& partitioner, CU if (cs.slice->getUseChromaQpAdj() && pPartitionerChroma->currQgChromaEnable()) { pCuCtxChroma->isChromaQpAdjCoded = false; -#if JVET_Q0267_RESET_CHROMA_QP_OFFSET cs.chromaQpAdj = 0; -#endif } } diff --git a/source/Lib/EncoderLib/EncCu.cpp b/source/Lib/EncoderLib/EncCu.cpp index 3f4df464df3aff7041ecdf3ce0094d96542da894..a2cdd55428001574f38ab7d2a46ae1c8c85bcf56 100644 --- a/source/Lib/EncoderLib/EncCu.cpp +++ b/source/Lib/EncoderLib/EncCu.cpp @@ -691,14 +691,10 @@ void EncCu::xCompressCU( CodingStructure*& tempCS, CodingStructure*& bestCS, Par // TODO M0133 : double check encoder decisions with respect to chroma QG detection and actual encode int lgMinCuSize = sps.getLog2MinCodingBlockSize() + std::max<int>(0, floorLog2(sps.getCTUSize()) - sps.getLog2MinCodingBlockSize() - int(slice.getCuChromaQpOffsetSubdiv() / 2)); -#if JVET_Q0267_RESET_CHROMA_QP_OFFSET if( partitioner.currQgChromaEnable() ) { m_cuChromaQpOffsetIdxPlus1 = ( ( uiLPelX >> lgMinCuSize ) + ( uiTPelY >> lgMinCuSize ) ) % ( pps.getChromaQpOffsetListLen() + 1 ); } -#else - m_cuChromaQpOffsetIdxPlus1 = ( ( uiLPelX >> lgMinCuSize ) + ( uiTPelY >> lgMinCuSize ) ) % ( pps.getChromaQpOffsetListLen() + 1 ); -#endif } if( !m_modeCtrl->anyMode() ) @@ -1862,9 +1858,7 @@ bool EncCu::xCheckRDCostIntra(CodingStructure *&tempCS, CodingStructure *&bestCS xEncodeDontSplit( *tempCS, partitioner ); xCheckDQP( *tempCS, partitioner ); -#if JVET_Q0267_RESET_CHROMA_QP_OFFSET xCheckChromaQPOffset( *tempCS, partitioner ); -#endif // Check if low frequency non-separable transform (LFNST) is too expensive if( lfnstIdx && !cuCtx.lfnstLastScanPos && !cu.ispMode ) @@ -2100,9 +2094,7 @@ void EncCu::xCheckPLT(CodingStructure *&tempCS, CodingStructure *&bestCS, Partit xEncodeDontSplit(*tempCS, partitioner); xCheckDQP(*tempCS, partitioner); -#if JVET_Q0267_RESET_CHROMA_QP_OFFSET xCheckChromaQPOffset( *tempCS, partitioner ); -#endif xCalDebCost(*tempCS, partitioner); tempCS->useDbCost = m_pcEncCfg->getUseEncDbOpt(); @@ -2189,7 +2181,6 @@ void EncCu::xCheckDQP( CodingStructure& cs, Partitioner& partitioner, bool bKeep } } -#if JVET_Q0267_RESET_CHROMA_QP_OFFSET void EncCu::xCheckChromaQPOffset( CodingStructure& cs, Partitioner& partitioner ) { // doesn't apply if CU chroma QP offset is disabled @@ -2244,7 +2235,6 @@ void EncCu::xCheckChromaQPOffset( CodingStructure& cs, Partitioner& partitioner } } -#endif void EncCu::xFillPCMBuffer( CodingUnit &cu ) { const ChromaFormat format = cu.chromaFormat; @@ -3911,9 +3901,7 @@ void EncCu::xCheckRDCostIBCModeMerge2Nx2N(CodingStructure *&tempCS, CodingStruct xCheckDQP(*tempCS, partitioner); } #endif -#if JVET_Q0267_RESET_CHROMA_QP_OFFSET xCheckChromaQPOffset( *tempCS, partitioner ); -#endif DTRACE_MODE_COST(*tempCS, m_pcRdCost->getLambda()); @@ -4005,9 +3993,7 @@ void EncCu::xCheckRDCostIBCMode(CodingStructure *&tempCS, CodingStructure *&best xCheckDQP(*tempCS, partitioner); } #endif -#if JVET_Q0267_RESET_CHROMA_QP_OFFSET xCheckChromaQPOffset( *tempCS, partitioner ); -#endif tempCS->useDbCost = m_pcEncCfg->getUseEncDbOpt(); if ( m_bestModeUpdated ) @@ -4721,9 +4707,7 @@ void EncCu::xEncodeInterResidual( CodingStructure *&tempCS xEncodeDontSplit( *tempCS, partitioner ); xCheckDQP( *tempCS, partitioner ); -#if JVET_Q0267_RESET_CHROMA_QP_OFFSET xCheckChromaQPOffset( *tempCS, partitioner ); -#endif if( NULL != bestHasNonResi && (bestCostInternal > tempCS->cost) ) @@ -4872,9 +4856,7 @@ void EncCu::xEncodeInterResidual( CodingStructure *&tempCS xEncodeDontSplit( *tempCS, partitioner ); xCheckDQP( *tempCS, partitioner ); -#if JVET_Q0267_RESET_CHROMA_QP_OFFSET xCheckChromaQPOffset( *tempCS, partitioner ); -#endif if( NULL != bestHasNonResi && ( bestCostInternal > tempCS->cost ) ) { @@ -5043,9 +5025,7 @@ void EncCu::xReuseCachedResult( CodingStructure *&tempCS, CodingStructure *&best xEncodeDontSplit( *tempCS, partitioner ); xCheckDQP ( *tempCS, partitioner ); -#if JVET_Q0267_RESET_CHROMA_QP_OFFSET xCheckChromaQPOffset( *tempCS, partitioner ); -#endif xCheckBestMode ( tempCS, bestCS, partitioner, cachedMode ); } else diff --git a/source/Lib/EncoderLib/EncCu.h b/source/Lib/EncoderLib/EncCu.h index 91e22c548f69522b0dbbf969aa59974df7ff86d8..c73ba366124ac3733a71c822952cc3d114a971cc 100644 --- a/source/Lib/EncoderLib/EncCu.h +++ b/source/Lib/EncoderLib/EncCu.h @@ -284,9 +284,7 @@ protected: bool xCheckRDCostIntra(CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &pm, const EncTestMode& encTestMode, bool adaptiveColorTrans); void xCheckDQP ( CodingStructure& cs, Partitioner& partitioner, bool bKeepCtx = false); -#if JVET_Q0267_RESET_CHROMA_QP_OFFSET void xCheckChromaQPOffset ( CodingStructure& cs, Partitioner& partitioner); -#endif void xFillPCMBuffer ( CodingUnit &cu); void xCheckRDCostHashInter ( CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &pm, const EncTestMode& encTestMode );