diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 6cf70309f5b880f3a3df5553e00699f0c2767016..9bfe0eca61e6d0801547c28f0f1f42dceff7eb81 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -258,9 +258,7 @@ void EncApp::xInitLibCfg() #if JVET_L0100_MULTI_HYPOTHESIS_INTRA m_cEncLib.setUseMHIntra ( m_MHIntra ); #endif -#if JVET_L0124_L0208_TRIANGLE m_cEncLib.setUseTriangle ( m_Triangle ); -#endif #if JVET_L0293_CPR m_cEncLib.setCPRMode ( m_CPRMode ); diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index a03c19c01961e1d38ec24b78d6483b048f9d768f..9a48eb93dc1080442174496fe6d42d2b0ab8d478 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -859,9 +859,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) #if JVET_L0100_MULTI_HYPOTHESIS_INTRA ("MHIntra", m_MHIntra, false, "Enable MHIntra mode") #endif -#if JVET_L0124_L0208_TRIANGLE ("Triangle", m_Triangle, false, "Enable triangular shape motion vector prediction (0:off, 1:on)") -#endif #if JVET_L0293_CPR ( "CPR", m_CPRMode, 0u, "CPRMode (0x1:enabled, 0x0:disabled) [default: disabled]") @@ -1950,9 +1948,7 @@ bool EncAppCfg::xCheckParameter() xConfirmPara( m_GBi, "GBi is only allowed with NEXT profile" ); xConfirmPara( m_GBiFast, "GBiFast is only allowed with NEXT profile" ); #endif -#if JVET_L0124_L0208_TRIANGLE xConfirmPara( m_Triangle, "Triangle is only allowed with NEXT profile" ); -#endif // ADD_NEW_TOOL : (parameter check) add a check for next tools here } else @@ -3151,9 +3147,7 @@ void EncAppCfg::xPrintParameter() #if JVET_L0100_MULTI_HYPOTHESIS_INTRA msg(VERBOSE, "MHIntra:%d ", m_MHIntra); #endif -#if JVET_L0124_L0208_TRIANGLE msg( VERBOSE, "Triangle:%d ", m_Triangle ); -#endif } #if JVET_L0293_CPR msg(VERBOSE, "CPR:%d ", m_CPRMode); diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 9dc9cd54266d1a482404cbdb04445f5d9b0ea39e..5b60b44be54dc2c6c2a97faec157800d6ddc661f 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -239,9 +239,7 @@ protected: #if JVET_L0100_MULTI_HYPOTHESIS_INTRA bool m_MHIntra; #endif -#if JVET_L0124_L0208_TRIANGLE bool m_Triangle; -#endif #if JVET_L0293_CPR diff --git a/source/Lib/CommonLib/CodingStatistics.h b/source/Lib/CommonLib/CodingStatistics.h index c9bf3b3559d0756fcdd258397cc06c823b63d398..ea7a717e3aa7fd6845c39eeca6966e95d80ef27d 100644 --- a/source/Lib/CommonLib/CodingStatistics.h +++ b/source/Lib/CommonLib/CodingStatistics.h @@ -106,10 +106,8 @@ enum CodingStatisticsType #if JVET_L0100_MULTI_HYPOTHESIS_INTRA STATS__CABAC_BITS__MH_INTRA_FLAG, #endif -#if JVET_L0124_L0208_TRIANGLE STATS__CABAC_BITS__TRIANGLE_FLAG, STATS__CABAC_BITS__TRIANGLE_INDEX, -#endif #if JVET_L0283_MULTI_REF_LINE STATS__CABAC_BITS__MULTI_REF_LINE, #endif @@ -193,10 +191,8 @@ static inline const char* getName(CodingStatisticsType name) #if JVET_L0100_MULTI_HYPOTHESIS_INTRA "CABAC_BITS__MH_INTRA_FLAG", #endif -#if JVET_L0124_L0208_TRIANGLE "CABAC_BITS__TRIANGLE_FLAG", "CABAC_BITS__TRIANGLE_INDEX", -#endif #if JVET_L0283_MULTI_REF_LINE "CABAC_BITS__MULTI_REF_LINE", #endif diff --git a/source/Lib/CommonLib/CommonDef.h b/source/Lib/CommonLib/CommonDef.h index 07004135a64c2f60584963d33c5fcc53f5521431..b8e0ed48b86dbfc8fd0161f2bb23ae9d470d8a8a 100644 --- a/source/Lib/CommonLib/CommonDef.h +++ b/source/Lib/CommonLib/CommonDef.h @@ -420,13 +420,11 @@ static const int NTAPS_BILINEAR = 2; ///< Numb #if JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK static const int ATMVP_SUB_BLOCK_SIZE = 3; ///< sub-block size for ATMVP #endif -#if JVET_L0124_L0208_TRIANGLE static const int TRIANGLE_MAX_NUM_UNI_CANDS = 5; static const int TRIANGLE_MAX_NUM_CANDS_MEM = 7; static const int TRIANGLE_MAX_NUM_CANDS = 40; static const int TRIANGLE_MAX_NUM_SATD_CANDS = 3; static const int TRIANGLE_MIN_SIZE = 8 * 8; -#endif #if JVET_L0293_CPR static const int CPR_MAX_CAND_SIZE = 16; // max block size for cpr search diff --git a/source/Lib/CommonLib/ContextModelling.cpp b/source/Lib/CommonLib/ContextModelling.cpp index bbfac11a65808d1c2c7782669c51452443387a1a..57c630de1e9ad325837c00918eb14a6d0b679392 100644 --- a/source/Lib/CommonLib/ContextModelling.cpp +++ b/source/Lib/CommonLib/ContextModelling.cpp @@ -330,7 +330,6 @@ unsigned DeriveCtx::CtxBTsplit(const CodingStructure& cs, Partitioner& partition return ctx; } -#if JVET_L0124_L0208_TRIANGLE unsigned DeriveCtx::CtxTriangleFlag( const CodingUnit& cu ) { const CodingStructure *cs = cu.cs; @@ -344,7 +343,6 @@ unsigned DeriveCtx::CtxTriangleFlag( const CodingUnit& cu ) return ctxId; } -#endif void MergeCtx::setMergeInfo( PredictionUnit& pu, int candIdx ) diff --git a/source/Lib/CommonLib/ContextModelling.h b/source/Lib/CommonLib/ContextModelling.h index 6af2eb86443c7eb8f8871ebcd39f4b119f248b20..faec087ffe975d826004246a448cd4c5af0a6a15 100644 --- a/source/Lib/CommonLib/ContextModelling.h +++ b/source/Lib/CommonLib/ContextModelling.h @@ -349,9 +349,7 @@ unsigned CtxInterDir ( const PredictionUnit& pu ); unsigned CtxSkipFlag ( const CodingUnit& cu ); unsigned CtxIMVFlag ( const CodingUnit& cu ); unsigned CtxAffineFlag( const CodingUnit& cu ); -#if JVET_L0124_L0208_TRIANGLE unsigned CtxTriangleFlag( const CodingUnit& cu ); -#endif } #endif // __CONTEXTMODELLING__ diff --git a/source/Lib/CommonLib/Contexts.cpp b/source/Lib/CommonLib/Contexts.cpp index 89bc1fb749ce7768ed86d92b42a11e4c66aa468b..a525ff330f65715733d8aa23f7814a9bee57afa6 100644 --- a/source/Lib/CommonLib/Contexts.cpp +++ b/source/Lib/CommonLib/Contexts.cpp @@ -1138,7 +1138,6 @@ const CtxSet ContextSetCfg::MHIntraPredMode = ContextSetCfg::addCtxSet }); #endif -#if JVET_L0124_L0208_TRIANGLE const CtxSet ContextSetCfg::TriangleFlag = ContextSetCfg::addCtxSet ({ #if TRAINED_CABAC_INIT_TABLES @@ -1164,7 +1163,6 @@ const CtxSet ContextSetCfg::TriangleIdx = ContextSetCfg::addCtxSet { CNU, }, #endif }); -#endif const unsigned ContextSetCfg::NumberOfContexts = (unsigned)ContextSetCfg::sm_InitTables[0].size(); diff --git a/source/Lib/CommonLib/Contexts.h b/source/Lib/CommonLib/Contexts.h index 522bf65184bac528f532095216c38c96cd8d888c..3864052b30cb8f07c3f7255df8be32a312296369 100644 --- a/source/Lib/CommonLib/Contexts.h +++ b/source/Lib/CommonLib/Contexts.h @@ -210,10 +210,8 @@ public: static const CtxSet MHIntraFlag; static const CtxSet MHIntraPredMode; #endif -#if JVET_L0124_L0208_TRIANGLE static const CtxSet TriangleFlag; static const CtxSet TriangleIdx; -#endif static const unsigned NumberOfContexts; // combined sets for less complex copying diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp index dc6fad99a9c5b4a2d3fe08fca7d3efad88b7e308..b0335576ec3fa0b9b8f5965d079a2848cb9aab38 100644 --- a/source/Lib/CommonLib/InterPrediction.cpp +++ b/source/Lib/CommonLib/InterPrediction.cpp @@ -120,9 +120,7 @@ void InterPrediction::destroy() } } -#if JVET_L0124_L0208_TRIANGLE m_triangleBuf.destroy(); -#endif #if JVET_L0265_AFF_MINIMUM4X4 if (m_storedMv != nullptr) @@ -180,9 +178,7 @@ void InterPrediction::init( RdCost* pcRdCost, ChromaFormat chromaFormatIDC ) } } -#if JVET_L0124_L0208_TRIANGLE m_triangleBuf.create(UnitArea(chromaFormatIDC, Area(0, 0, MAX_CU_SIZE, MAX_CU_SIZE))); -#endif m_iRefListIdx = -1; @@ -574,7 +570,6 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred) } else { -#if JVET_L0124_L0208_TRIANGLE xPredInterUni( pu, eRefPicList, pcMbBuf, pu.cu->triangle #if JVET_L0256_BIO , bioApplied @@ -583,16 +578,6 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred) , true, true #endif ); -#else - xPredInterUni ( pu, eRefPicList, pcMbBuf, false -#if JVET_L0256_BIO - , bioApplied -#endif -#if JVET_L0293_CPR - , true, true -#endif - ); -#endif } } } @@ -1349,24 +1334,20 @@ void InterPrediction::xWeightedAverage( const PredictionUnit& pu, const CPelUnit } else if( iRefIdx0 >= 0 && iRefIdx1 < 0 ) { -#if JVET_L0124_L0208_TRIANGLE if( pu.cu->triangle ) { pcYuvDst.copyFrom( pcYuvSrc0 ); } else -#endif pcYuvDst.copyClip( pcYuvSrc0, clpRngs ); } else if( iRefIdx0 < 0 && iRefIdx1 >= 0 ) { -#if JVET_L0124_L0208_TRIANGLE if( pu.cu->triangle ) { pcYuvDst.copyFrom( pcYuvSrc1 ); } else -#endif pcYuvDst.copyClip( pcYuvSrc1, clpRngs ); } } @@ -1508,7 +1489,6 @@ int InterPrediction::rightShiftMSB(int numer, int denom) } #endif -#if JVET_L0124_L0208_TRIANGLE void InterPrediction::motionCompensation4Triangle( CodingUnit &cu, MergeCtx &triangleMrgCtx, const bool splitDir, const uint8_t candIdx0, const uint8_t candIdx1 ) { for( auto &pu : CU::traversePUs( cu ) ) @@ -1618,7 +1598,6 @@ void InterPrediction::xWeightedTriangleBlk( const PredictionUnit &pu, const uint weightedEndPos += weightedPosoffset; } } -#endif #if JVET_J0090_MEMORY_BANDWITH_MEASURE void InterPrediction::cacheAssign( CacheModel *cache ) diff --git a/source/Lib/CommonLib/InterPrediction.h b/source/Lib/CommonLib/InterPrediction.h index e56f3d05b746aa9afc4a591b00a694862bf1f3bb..d739043376b0a2c8e8130fcb1485ff714d50e17e 100644 --- a/source/Lib/CommonLib/InterPrediction.h +++ b/source/Lib/CommonLib/InterPrediction.h @@ -91,9 +91,7 @@ protected: RdCost* m_pcRdCost; int m_iRefListIdx; -#if JVET_L0124_L0208_TRIANGLE PelStorage m_triangleBuf; -#endif #if JVET_L0265_AFF_MINIMUM4X4 Mv* m_storedMv; #endif @@ -140,9 +138,7 @@ protected: #endif void xPredAffineBlk( const ComponentID& compID, const PredictionUnit& pu, const Picture* refPic, const Mv* _mv, PelUnitBuf& dstPic, const bool& bi, const ClpRng& clpRng ); -#if JVET_L0124_L0208_TRIANGLE void xWeightedTriangleBlk ( const PredictionUnit &pu, const uint32_t width, const uint32_t height, const ComponentID compIdx, const bool splitDir, const bool weights, PelUnitBuf& predDst, PelUnitBuf& predSrc0, PelUnitBuf& predSrc1 ); -#endif static bool xCheckIdenticalMotion( const PredictionUnit& pu ); @@ -180,10 +176,8 @@ public: #endif ); -#if JVET_L0124_L0208_TRIANGLE void motionCompensation4Triangle( CodingUnit &cu, MergeCtx &triangleMrgCtx, const bool splitDir, const uint8_t candIdx0, const uint8_t candIdx1 ); void weightedTriangleBlk ( PredictionUnit &pu, bool weights, const bool splitDir, int32_t channel, PelUnitBuf& predDst, PelUnitBuf& predSrc0, PelUnitBuf& predSrc1 ); -#endif #if JVET_J0090_MEMORY_BANDWITH_MEASURE void cacheAssign( CacheModel *cache ); diff --git a/source/Lib/CommonLib/Rom.cpp b/source/Lib/CommonLib/Rom.cpp index 93ee217434705b1e344d639b5ad550948c62a53c..140e497f8451ea01f0f450e75e22d54741db99db 100644 --- a/source/Lib/CommonLib/Rom.cpp +++ b/source/Lib/CommonLib/Rom.cpp @@ -529,7 +529,6 @@ void initROM() } } -#if JVET_L0124_L0208_TRIANGLE for( int idxH = MAX_CU_DEPTH - MIN_CU_LOG2; idxH >= 0; --idxH ) { for( int idxW = MAX_CU_DEPTH - MIN_CU_LOG2; idxW >= 0; --idxW ) @@ -551,7 +550,6 @@ void initROM() } } } -#endif } void destroyROM() @@ -883,7 +881,6 @@ const uint8_t g_NonMPM[257] = { 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8 }; -#if JVET_L0124_L0208_TRIANGLE const Pel g_trianglePelWeightedLuma[TRIANGLE_DIR_NUM][2][7] = { { // TRIANGLE_DIR_135 @@ -943,5 +940,4 @@ const uint8_t g_triangleIdxBins[TRIANGLE_MAX_NUM_CANDS] = 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 }; -#endif //! \} diff --git a/source/Lib/CommonLib/Rom.h b/source/Lib/CommonLib/Rom.h index 13792f923e4c657132ac54735616ca44f3f0aa92..65a132ce5245296889ab2e721c7b4fb67ce18498 100644 --- a/source/Lib/CommonLib/Rom.h +++ b/source/Lib/CommonLib/Rom.h @@ -257,7 +257,6 @@ constexpr uint8_t g_tbMax[257] = { 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, //! \} -#if JVET_L0124_L0208_TRIANGLE extern const Pel g_trianglePelWeightedLuma[TRIANGLE_DIR_NUM][2][7]; extern const Pel g_trianglePelWeightedChroma[2][TRIANGLE_DIR_NUM][2][7]; extern const uint8_t g_triangleWeightLengthLuma[2]; @@ -265,7 +264,6 @@ extern const uint8_t g_triangleWeightLengthChroma[2][2]; extern uint8_t g_triangleMvStorage[TRIANGLE_DIR_NUM][MAX_CU_DEPTH - MIN_CU_LOG2 + 1][MAX_CU_DEPTH - MIN_CU_LOG2 + 1][MAX_CU_SIZE >> MIN_CU_LOG2][MAX_CU_SIZE >> MIN_CU_LOG2]; extern const uint8_t g_triangleCombination[TRIANGLE_MAX_NUM_CANDS][3]; extern const uint8_t g_triangleIdxBins[TRIANGLE_MAX_NUM_CANDS]; -#endif #endif //__TCOMROM__ diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index c9181079ebbf15e983a0d776bb41ddb3642e68a9..3ac23db597bdd70a20cf725f2606fa9f0b813792 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -1687,9 +1687,7 @@ void Slice::updateMotionLUTs(LutMotionCand* lutMC, CodingUnit & cu) { PredictionUnit *selectedPU = cu.firstPU; if (cu.affine) { return; } -#if JVET_L0124_L0208_TRIANGLE if (cu.triangle) { return; } -#endif MotionInfo newMi = selectedPU->getMotionInfo(); addMotionInfoToLUTs(lutMC, newMi); @@ -1792,9 +1790,7 @@ SPSNext::SPSNext( SPS& sps ) #if JVET_L0100_MULTI_HYPOTHESIS_INTRA , m_MHIntra ( false ) #endif -#if JVET_L0124_L0208_TRIANGLE , m_Triangle ( false ) -#endif #if ENABLE_WPP_PARALLELISM , m_NextDQP ( false ) #endif diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 0e8dab53e684acfa09da1fb06f4d885223e7b85b..8603a543cc11441a822893d70e2ce33ebf6be501 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -819,9 +819,7 @@ private: #if JVET_L0100_MULTI_HYPOTHESIS_INTRA bool m_MHIntra; #endif -#if JVET_L0124_L0208_TRIANGLE bool m_Triangle; -#endif #if ENABLE_WPP_PARALLELISM bool m_NextDQP; #endif @@ -978,10 +976,8 @@ public: void setUseMHIntra ( bool b ) { m_MHIntra = b; } bool getUseMHIntra () const { return m_MHIntra; } #endif -#if JVET_L0124_L0208_TRIANGLE void setUseTriangle ( bool b ) { m_Triangle = b; } bool getUseTriangle () const { return m_Triangle; } -#endif #if JVET_L0293_CPR void setCPRMode (unsigned CPRMode) { m_CPRMode = CPRMode; } unsigned getCPRMode () const { return m_CPRMode; } diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 01c8f247a7ca290c2bc2c12905fb93af659442de..82d3281aa75dce5ca5121c4802ef8aaf56795f9f 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -53,7 +53,6 @@ #define TRAINED_CABAC_INIT_TABLES 1 // Trained values for VTM3 -#define JVET_L0124_L0208_TRIANGLE 1 // triangular shape prediction unit #define JVET_L0059_MTS_SIMP 1 // Simpification on MTS signaling #define JVET_L0100_MULTI_HYPOTHESIS_INTRA 1 // Combine intra mode with an extra merge indexed prediction @@ -942,14 +941,12 @@ enum MergeType NUM_MRG_TYPE // 5 }; -#if JVET_L0124_L0208_TRIANGLE enum TriangleSplit { TRIANGLE_DIR_135 = 0, TRIANGLE_DIR_45, TRIANGLE_DIR_NUM }; -#endif ////////////////////////////////////////////////////////////////////////// // Encoder modes to try out diff --git a/source/Lib/CommonLib/Unit.cpp b/source/Lib/CommonLib/Unit.cpp index 77cffb67ea35d88717a0705bca6543fe9d5a2a86..93585d3c84912a728a0981ec4d1260bc6ac5658d 100644 --- a/source/Lib/CommonLib/Unit.cpp +++ b/source/Lib/CommonLib/Unit.cpp @@ -257,9 +257,7 @@ CodingUnit& CodingUnit::operator=( const CodingUnit& other ) #endif affine = other.affine; affineType = other.affineType; -#if JVET_L0124_L0208_TRIANGLE triangle = other.triangle; -#endif transQuantBypass = other.transQuantBypass; ipcm = other.ipcm; qp = other.qp; @@ -296,9 +294,7 @@ void CodingUnit::initData() #endif affine = false; affineType = 0; -#if JVET_L0124_L0208_TRIANGLE triangle = false; -#endif transQuantBypass = false; ipcm = false; qp = 0; diff --git a/source/Lib/CommonLib/Unit.h b/source/Lib/CommonLib/Unit.h index 3142b13b03cf8eceee7fd525306387bd504c2aef..b086824dc7e27d50fe56edfa076ae1e4c0a686b3 100644 --- a/source/Lib/CommonLib/Unit.h +++ b/source/Lib/CommonLib/Unit.h @@ -299,9 +299,7 @@ struct CodingUnit : public UnitArea #endif bool affine; int affineType; -#if JVET_L0124_L0208_TRIANGLE bool triangle; -#endif bool transQuantBypass; bool ipcm; uint8_t imv; diff --git a/source/Lib/CommonLib/UnitTools.cpp b/source/Lib/CommonLib/UnitTools.cpp index a4a04f326ac9bde1da97ac0a7b0fe24f6fe3aa79..0b7822cf81163db76b2e23b8d7b4018936362303 100644 --- a/source/Lib/CommonLib/UnitTools.cpp +++ b/source/Lib/CommonLib/UnitTools.cpp @@ -4460,7 +4460,6 @@ void PU::restrictBiPredMergeCands( const PredictionUnit &pu, MergeCtx& mergeCtx } } -#if JVET_L0124_L0208_TRIANGLE void PU::getTriangleMergeCandidates( const PredictionUnit &pu, MergeCtx& triangleMrgCtx ) { const CodingStructure &cs = *pu.cs; @@ -4971,7 +4970,6 @@ int32_t PU::mappingRefPic( const PredictionUnit &pu, int32_t refPicPoc, bool tar } return -1; } -#endif void CU::resetMVDandMV2Int( CodingUnit& cu, InterPrediction *interPred ) { diff --git a/source/Lib/CommonLib/UnitTools.h b/source/Lib/CommonLib/UnitTools.h index 5d2c20535b1d9314dc5205539ab64dc8a10466d3..d69595d3d7be05c62d0778b603b85126ff362a01 100644 --- a/source/Lib/CommonLib/UnitTools.h +++ b/source/Lib/CommonLib/UnitTools.h @@ -183,13 +183,11 @@ namespace PU int getMHIntraMPMs (const PredictionUnit &pu, unsigned *mpm, const ChannelType &channelType = CHANNEL_TYPE_LUMA, const bool isChromaMDMS = false, const unsigned startIdx = 0); int getNarrowShape (const int width, const int height); #endif -#if JVET_L0124_L0208_TRIANGLE void getTriangleMergeCandidates (const PredictionUnit &pu, MergeCtx &triangleMrgCtx); bool isUniqueTriangleCandidates (const PredictionUnit &pu, MergeCtx &triangleMrgCtx); bool getTriangleWeights (const PredictionUnit &pu, MergeCtx &triangleMrgCtx, const uint8_t candIdx0, const uint8_t candIdx1); void spanTriangleMotionInfo ( PredictionUnit &pu, MergeCtx &triangleMrgCtx, const uint8_t mergeIdx, const bool splitDir, const uint8_t candIdx0, const uint8_t candIdx1); int32_t mappingRefPic (const PredictionUnit &pu, int32_t refPicPoc, bool targetRefPicList); -#endif #if JVET_L0293_CPR void getCprMVPsEncOnly(PredictionUnit &pu, Mv* MvPred, int& nbPred); bool getDerivedBV(PredictionUnit &pu, const Mv& currentMv, Mv& derivedMv); diff --git a/source/Lib/CommonLib/dtrace_blockstatistics.cpp b/source/Lib/CommonLib/dtrace_blockstatistics.cpp index 0bd330edb6d65397e493811b413c54bb1f87254a..9f8f70d259275819b45e08095e6189bb3ed5c979 100644 --- a/source/Lib/CommonLib/dtrace_blockstatistics.cpp +++ b/source/Lib/CommonLib/dtrace_blockstatistics.cpp @@ -271,7 +271,6 @@ void CDTrace::dtrace_polygon_vector(int k, int poc, const std::vector dtrace(k, "BlockStat: POC %d @[%s] %s={%4d,%4d}\n", poc, polygonDescription.c_str(), stat_type.c_str(), val_x, val_y); } -#if JVET_L0124_L0208_TRIANGLE void retrieveTriangularMvInfo(const PredictionUnit& pu, MotionInfo& mi0, MotionInfo& mi1) { int triangleDir = g_triangleCombination[pu.mergeIdx][0]; @@ -359,7 +358,6 @@ void retrieveTrianglePolygon(const PredictionUnit& pu, std::vector& tr CHECK(triangleDir != TRIANGLE_DIR_45 && triangleDir != TRIANGLE_DIR_135, "Unknown triangle type"); } } -#endif void writeBlockStatisticsHeader(const SPS *sps) { @@ -497,9 +495,7 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea) DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::Luma_IntraMode), pu.intraDir[COMPONENT_Y]); } #endif -#if JVET_L0124_L0208_TRIANGLE DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::TriangleFlag), pu.cu->triangle); -#endif } DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::AffineFlag), pu.cu->affine); DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::AffineType), pu.cu->affineType); @@ -515,11 +511,7 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea) DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::MVPIdxL1), pu.mvpIdx[REF_PIC_LIST_1]); DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::RefIdxL1), pu.refIdx[REF_PIC_LIST_1]); } -#if JVET_L0124_L0208_TRIANGLE if (!pu.cu->affine && !pu.cu->triangle) -#else - if (!pu.cu->affine) -#endif { if (pu.interDir != 2 /* PRED_L1 */) { @@ -544,7 +536,6 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea) DTRACE_BLOCK_VECTOR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::MVL1), mv.hor, mv.ver); } } -#if JVET_L0124_L0208_TRIANGLE else if (pu.cu->triangle) { MotionInfo mi[2]; @@ -566,7 +557,6 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea) } } } -#endif else { if (pu.interDir != 2 /* PRED_L1 */) @@ -904,13 +894,11 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea) } } #endif -#if JVET_L0124_L0208_TRIANGLE if (cu.cs->slice->getSPS()->getSpsNext().getUseTriangle() && cu.cs->slice->isInterB() && cu.lwidth() * cu.lheight() >= TRIANGLE_MIN_SIZE && !cu.affine) { DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_CODED, cu, GetBlockStatisticName(BlockStatistic::TriangleFlag), cu.triangle); } -#endif } else { @@ -943,11 +931,7 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea) DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_CODED, pu, GetBlockStatisticName(BlockStatistic::MVPIdxL1), pu.mvpIdx[REF_PIC_LIST_1]); DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_CODED, pu, GetBlockStatisticName(BlockStatistic::RefIdxL1), pu.refIdx[REF_PIC_LIST_1]); } -#if JVET_L0124_L0208_TRIANGLE if (!pu.cu->affine && !pu.cu->triangle) -#else - if (!pu.cu->affine) -#endif { if (pu.interDir != 2 /* PRED_L1 */) { @@ -972,7 +956,6 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea) DTRACE_BLOCK_VECTOR(g_trace_ctx, D_BLOCK_STATISTICS_CODED, pu, GetBlockStatisticName(BlockStatistic::MVL1), mv.hor, mv.ver); } } -#if JVET_L0124_L0208_TRIANGLE else if (pu.cu->triangle) { MotionInfo mi[2]; @@ -994,7 +977,6 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea) } } } -#endif else { if (pu.interDir != 2 /* PRED_L1 */) diff --git a/source/Lib/CommonLib/dtrace_blockstatistics.h b/source/Lib/CommonLib/dtrace_blockstatistics.h index ffdae8b68115d7c2a59e12e353905de197ec6ad8..93130b05ee86d3540ee2a4ab2cb48864cfb6e506 100644 --- a/source/Lib/CommonLib/dtrace_blockstatistics.h +++ b/source/Lib/CommonLib/dtrace_blockstatistics.h @@ -109,12 +109,10 @@ enum class BlockStatistic { #if JVET_L0100_MULTI_HYPOTHESIS_INTRA MHIntraFlag, #endif -#if JVET_L0124_L0208_TRIANGLE TriangleFlag, TrianglePartitioning, TriangleMVL0, //<< currently only uni-prediction enabled TriangleMVL1, //<< currently only uni-prediction enabled -#endif #if JVET_L0646_GBI GBIIndex, #endif @@ -205,12 +203,10 @@ static const std::map{"MHIntraFlag", BlockStatisticType::Flag, ""}}, #endif -#if JVET_L0124_L0208_TRIANGLE { BlockStatistic::TriangleFlag, std::tuple{"TriangleFlag", BlockStatisticType::Flag, ""}}, { BlockStatistic::TrianglePartitioning, std::tuple{"TrianglePartitioning", BlockStatisticType::Line, ""}}, { BlockStatistic::TriangleMVL0, std::tuple{"TriangleMVL0", BlockStatisticType::VectorPolygon, "Scale: 4"}}, { BlockStatistic::TriangleMVL1, std::tuple{"TriangleMVL1", BlockStatisticType::VectorPolygon, "Scale: 4"}}, -#endif #if JVET_L0646_GBI { BlockStatistic::GBIIndex, std::tuple{"GBIIndex", BlockStatisticType::Integer, "[0, 4]"}}, #endif diff --git a/source/Lib/DecoderLib/CABACReader.cpp b/source/Lib/DecoderLib/CABACReader.cpp index c1cf2e8166c496f42cb2051a5ebc4a8d94026beb..90351638778a6971077b6e9fc1b139a702c1993e 100644 --- a/source/Lib/DecoderLib/CABACReader.cpp +++ b/source/Lib/DecoderLib/CABACReader.cpp @@ -1270,9 +1270,7 @@ void CABACReader::prediction_unit( PredictionUnit& pu, MergeCtx& mrgCtx ) pu.intraDir[1] = DM_CHROMA_IDX; } #endif -#if JVET_L0124_L0208_TRIANGLE triangle_mode( *pu.cu ); -#endif #if JVET_L0054_MMVD if (pu.mmvdMergeFlag) { @@ -1513,7 +1511,6 @@ void CABACReader::merge_idx( PredictionUnit& pu ) int numCandminus1 = int( pu.cs->slice->getMaxNumMergeCand() ) - 1; pu.mergeIdx = 0; -#if JVET_L0124_L0208_TRIANGLE if( pu.cu->triangle ) { RExt__DECODER_DEBUG_BIT_STATISTICS_CREATE_SET( STATS__CABAC_BITS__TRIANGLE_INDEX ); @@ -1529,7 +1526,6 @@ void CABACReader::merge_idx( PredictionUnit& pu ) DTRACE( g_trace_ctx, D_SYNTAX, "merge_idx() triangle_idx=%d\n", pu.mergeIdx ); return; } -#endif if( numCandminus1 > 0 ) { @@ -1850,7 +1846,6 @@ void CABACReader::MHIntra_luma_pred_modes(CodingUnit &cu) } #endif -#if JVET_L0124_L0208_TRIANGLE void CABACReader::triangle_mode( CodingUnit& cu ) { RExt__DECODER_DEBUG_BIT_STATISTICS_CREATE_SET( STATS__CABAC_BITS__TRIANGLE_FLAG ); @@ -1866,7 +1861,6 @@ void CABACReader::triangle_mode( CodingUnit& cu ) DTRACE( g_trace_ctx, D_SYNTAX, "triangle_mode() triangle_mode=%d pos=(%d,%d) size: %dx%d\n", cu.triangle, cu.Y().x, cu.Y().y, cu.lumaSize().width, cu.lumaSize().height ); } -#endif //================================================================================ // clause 7.3.8.7 diff --git a/source/Lib/DecoderLib/CABACReader.h b/source/Lib/DecoderLib/CABACReader.h index b15ee113fcbf1e62045f4ad9f81edbfb94679bef..0d8d86643da91346347d5cba99306a18950f8bfe 100644 --- a/source/Lib/DecoderLib/CABACReader.h +++ b/source/Lib/DecoderLib/CABACReader.h @@ -118,9 +118,7 @@ public: void MHIntra_flag ( PredictionUnit& pu ); void MHIntra_luma_pred_modes ( CodingUnit& cu ); #endif -#if JVET_L0124_L0208_TRIANGLE void triangle_mode ( CodingUnit& cu ); -#endif // pcm samples (clause 7.3.8.7) void pcm_samples ( TransformUnit& tu ); diff --git a/source/Lib/DecoderLib/DecCu.cpp b/source/Lib/DecoderLib/DecCu.cpp index 1f411d4e7a42c8f6f2c735f2631731681142e688..310535805c7af7d6fb40acbd00bf553d259c7b83 100644 --- a/source/Lib/DecoderLib/DecCu.cpp +++ b/source/Lib/DecoderLib/DecCu.cpp @@ -334,7 +334,6 @@ void DecCu::xFillPCMBuffer(CodingUnit &cu) void DecCu::xReconInter(CodingUnit &cu) { -#if JVET_L0124_L0208_TRIANGLE if( cu.triangle ) { const uint8_t mergeIdx = cu.firstPU->mergeIdx; @@ -346,7 +345,6 @@ void DecCu::xReconInter(CodingUnit &cu) } else { -#endif #if JVET_L0100_MULTI_HYPOTHESIS_INTRA m_pcIntraPred->geneIntrainterPred(cu); #endif @@ -357,9 +355,7 @@ void DecCu::xReconInter(CodingUnit &cu) CHECK(cu.cpr && cu.firstPU->mhIntraFlag, "CPR and MHIntra cannot be used together"); #endif CHECK(cu.cpr && cu.affine, "CPR and Affine cannot be used together"); -#if JVET_L0124_L0208_TRIANGLE CHECK(cu.cpr && cu.triangle, "CPR and triangle cannot be used together"); -#endif #if JVET_L0054_MMVD CHECK(cu.cpr && cu.firstPU->mmvdMergeFlag, "CPR and MMVD cannot be used together"); #endif @@ -376,9 +372,7 @@ void DecCu::xReconInter(CodingUnit &cu) #else m_pcInterPred->motionCompensation( cu ); #endif -#if JVET_L0124_L0208_TRIANGLE } -#endif #if JVET_L0266_HMVP #if JVET_L0293_CPR if (cu.Y().valid()) @@ -522,14 +516,12 @@ void DecCu::xDeriveCUMV( CodingUnit &cu ) { #endif { -#if JVET_L0124_L0208_TRIANGLE if( pu.cu->triangle ) { PU::getTriangleMergeCandidates( pu, m_triangleMrgCtx ); } else { -#endif if( pu.cu->affine ) { #if JVET_L0632_AFFINE_MERGE @@ -616,9 +608,7 @@ void DecCu::xDeriveCUMV( CodingUnit &cu ) PU::spanMotionInfo( pu, mrgCtx ); } -#if JVET_L0124_L0208_TRIANGLE } -#endif } #if JVET_L0054_MMVD } diff --git a/source/Lib/DecoderLib/DecCu.h b/source/Lib/DecoderLib/DecCu.h index 3a9f46d909e2ff7c9a1ba27dcecba802977a71f9..77ea580aa89b321af77a648fd40af68ee1afce96 100644 --- a/source/Lib/DecoderLib/DecCu.h +++ b/source/Lib/DecoderLib/DecCu.h @@ -93,9 +93,7 @@ private: MotionInfo m_SubPuMiBuf[(MAX_CU_SIZE * MAX_CU_SIZE) >> (MIN_CU_LOG2 << 1)]; -#if JVET_L0124_L0208_TRIANGLE MergeCtx m_triangleMrgCtx; -#endif }; //! \} diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 487ddcebfb48f04d2b113f9a60ee452e2d5f5865..fa15d7b99a73183c467cd252c4c37b78f3d65b1d 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -817,9 +817,7 @@ void HLSyntaxReader::parseSPSNext( SPSNext& spsNext, const bool usePCM ) #if JVET_L0100_MULTI_HYPOTHESIS_INTRA READ_FLAG( symbol, "mhintra_flag" ); spsNext.setUseMHIntra ( symbol != 0 ); #endif -#if JVET_L0124_L0208_TRIANGLE READ_FLAG( symbol, "triangle_flag" ); spsNext.setUseTriangle ( symbol != 0 ); -#endif #if ENABLE_WPP_PARALLELISM READ_FLAG( symbol, "next_dqp_enabled_flag" ); spsNext.setUseNextDQP ( symbol != 0 ); #else diff --git a/source/Lib/EncoderLib/CABACWriter.cpp b/source/Lib/EncoderLib/CABACWriter.cpp index e8731833d6b3b70a428552164d83f23a53839ce1..3c0ad655b1faaf1e80a481c8f50ba4dfd61a1540 100644 --- a/source/Lib/EncoderLib/CABACWriter.cpp +++ b/source/Lib/EncoderLib/CABACWriter.cpp @@ -1286,9 +1286,7 @@ void CABACWriter::prediction_unit( const PredictionUnit& pu ) MHIntra_luma_pred_modes( *pu.cu ); } #endif -#if JVET_L0124_L0208_TRIANGLE triangle_mode( *pu.cu ); -#endif #if JVET_L0054_MMVD if (pu.mmvdMergeFlag) { @@ -1514,7 +1512,6 @@ void CABACWriter::merge_idx( const PredictionUnit& pu ) else { #endif -#if JVET_L0124_L0208_TRIANGLE if( pu.cu->triangle ) { if( pu.mergeIdx < 2 ) @@ -1531,7 +1528,6 @@ void CABACWriter::merge_idx( const PredictionUnit& pu ) DTRACE( g_trace_ctx, D_SYNTAX, "merge_idx() triangle_idx=%d\n", pu.mergeIdx ); return; } -#endif int numCandminus1 = int( pu.cs->slice->getMaxNumMergeCand() ) - 1; if( numCandminus1 > 0 ) { @@ -1798,7 +1794,6 @@ void CABACWriter::MHIntra_luma_pred_modes(const CodingUnit& cu) } #endif -#if JVET_L0124_L0208_TRIANGLE void CABACWriter::triangle_mode( const CodingUnit& cu ) { if( !cu.cs->slice->getSPS()->getSpsNext().getUseTriangle() || !cu.cs->slice->isInterB() || cu.lwidth() * cu.lheight() < TRIANGLE_MIN_SIZE || cu.affine ) @@ -1812,7 +1807,6 @@ void CABACWriter::triangle_mode( const CodingUnit& cu ) DTRACE( g_trace_ctx, D_SYNTAX, "triangle_mode() triangle_mode=%d pos=(%d,%d) size: %dx%d\n", cu.triangle, cu.Y().x, cu.Y().y, cu.lumaSize().width, cu.lumaSize().height ); } -#endif //================================================================================ // clause 7.3.8.7 diff --git a/source/Lib/EncoderLib/CABACWriter.h b/source/Lib/EncoderLib/CABACWriter.h index b9fddb21d63e5ec0785b9c86261814653c7f512b..c48aba6e550ac0e11d54d62bb3e279bbefd49373 100644 --- a/source/Lib/EncoderLib/CABACWriter.h +++ b/source/Lib/EncoderLib/CABACWriter.h @@ -134,9 +134,7 @@ public: void MHIntra_flag ( const PredictionUnit& pu ); void MHIntra_luma_pred_modes ( const CodingUnit& cu ); #endif -#if JVET_L0124_L0208_TRIANGLE void triangle_mode ( const CodingUnit& cu ); -#endif // pcm samples (clause 7.3.8.7) void pcm_samples ( const TransformUnit& tu ); diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 89a9ee01d1aadce23a657fcd27cfcfb75be15f86..7578f670ff542ed27d4134e66769632a1c920434 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -241,9 +241,7 @@ protected: #if JVET_L0100_MULTI_HYPOTHESIS_INTRA bool m_MHIntra; #endif -#if JVET_L0124_L0208_TRIANGLE bool m_Triangle; -#endif #if JVET_L0293_CPR unsigned m_CPRMode; @@ -761,10 +759,8 @@ public: void setUseMHIntra ( bool b ) { m_MHIntra = b; } bool getUseMHIntra () const { return m_MHIntra; } #endif -#if JVET_L0124_L0208_TRIANGLE void setUseTriangle ( bool b ) { m_Triangle = b; } bool getUseTriangle () const { return m_Triangle; } -#endif #if JVET_L0293_CPR diff --git a/source/Lib/EncoderLib/EncCu.cpp b/source/Lib/EncoderLib/EncCu.cpp index 237cf46ec96070c6757b1d2b416f8b2890398b48..b207528f132d2be45b8f880e86b0fac8571bd6de 100644 --- a/source/Lib/EncoderLib/EncCu.cpp +++ b/source/Lib/EncoderLib/EncCu.cpp @@ -161,12 +161,10 @@ void EncCu::create( EncCfg* encCfg ) m_acRealMergeBuffer[ui].create(chromaFormat, Area(0, 0, uiMaxWidth, uiMaxHeight)); } #endif -#if JVET_L0124_L0208_TRIANGLE for( unsigned ui = 0; ui < TRIANGLE_MAX_NUM_CANDS; ui++ ) { m_acTriangleWeightedBuffer[ui].create( chromaFormat, Area( 0, 0, uiMaxWidth, uiMaxHeight ) ); } -#endif m_CtxBuffer.resize( maxDepth ); m_CurrCtx = 0; @@ -264,12 +262,10 @@ void EncCu::destroy() m_acRealMergeBuffer[ui].destroy(); } #endif -#if JVET_L0124_L0208_TRIANGLE for( unsigned ui = 0; ui < TRIANGLE_MAX_NUM_CANDS; ui++ ) { m_acTriangleWeightedBuffer[ui].destroy(); } -#endif } @@ -766,12 +762,10 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par cu->mmvdSkip = cu->skip == false ? false : cu->mmvdSkip; #endif } -#if JVET_L0124_L0208_TRIANGLE else if( currTestMode.type == ETM_MERGE_TRIANGLE ) { xCheckRDCostMergeTriangle2Nx2N( tempCS, bestCS, partitioner, currTestMode ); } -#endif else if( currTestMode.type == ETM_INTRA ) { xCheckRDCostIntra( tempCS, bestCS, partitioner, currTestMode ); @@ -1707,9 +1701,7 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *& mergeCtx.subPuMvpMiBuf = MotionBuf( m_SubPuMiBuf, bufSize ); } -#if JVET_L0124_L0208_TRIANGLE setMergeBestSATDCost( MAX_DOUBLE ); -#endif { // first get merge candidates @@ -1875,9 +1867,7 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *& #if JVET_L0054_MMVD cu.mmvdSkip = false; #endif -#if JVET_L0124_L0208_TRIANGLE cu.triangle = false; -#endif //cu.affine cu.predMode = MODE_INTER; //cu.LICFlag @@ -2218,9 +2208,7 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *& } } -#if JVET_L0124_L0208_TRIANGLE setMergeBestSATDCost( candCostList[0] ); -#endif #if JVET_L0100_MULTI_HYPOTHESIS_INTRA if (isIntrainterEnabled) @@ -2331,9 +2319,7 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *& #if JVET_L0054_MMVD cu.mmvdSkip = false; #endif -#if JVET_L0124_L0208_TRIANGLE cu.triangle = false; -#endif //cu.affine cu.predMode = MODE_INTER; //cu.LICFlag @@ -2495,7 +2481,6 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *& } } -#if JVET_L0124_L0208_TRIANGLE void EncCu::xCheckRDCostMergeTriangle2Nx2N( CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &partitioner, const EncTestMode& encTestMode ) { const Slice &slice = *tempCS->slice; @@ -2742,7 +2727,6 @@ void EncCu::xCheckRDCostMergeTriangle2Nx2N( CodingStructure *&tempCS, CodingStru } } } -#endif void EncCu::xCheckRDCostAffineMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &partitioner, const EncTestMode& encTestMode ) { @@ -3153,9 +3137,7 @@ void EncCu::xCheckRDCostCPRModeMerge2Nx2N(CodingStructure *&tempCS, CodingStruct cu.mmvdSkip = false; pu.mmvdMergeFlag = false; #endif -#if JVET_L0124_L0208_TRIANGLE cu.triangle = false; -#endif PU::getInterMergeCandidates(pu, mergeCtx #if JVET_L0054_MMVD , 0 @@ -3199,9 +3181,7 @@ void EncCu::xCheckRDCostCPRModeMerge2Nx2N(CodingStructure *&tempCS, CodingStruct #if JVET_L0054_MMVD cu.mmvdSkip = false; #endif -#if JVET_L0124_L0208_TRIANGLE cu.triangle = false; -#endif DistParam distParam; const bool bUseHadamard = !encTestMode.lossless; PredictionUnit &pu = tempCS->addPU(cu, partitioner.chType); //tempCS->addPU(cu); @@ -3349,9 +3329,7 @@ void EncCu::xCheckRDCostCPRModeMerge2Nx2N(CodingStructure *&tempCS, CodingStruct cu.mmvdSkip = false; pu.mmvdMergeFlag = false; #endif -#if JVET_L0124_L0208_TRIANGLE cu.triangle = false; -#endif mergeCtx.setMergeInfo(pu, mergeCand); PU::spanMotionInfo(pu, mergeCtx); diff --git a/source/Lib/EncoderLib/EncCu.h b/source/Lib/EncoderLib/EncCu.h index 62d8bb549c135c359e9c98af4033a68e843e8181..20b43c5d27c1153c18b1bd7a9fca9a4b8e8b54e9 100644 --- a/source/Lib/EncoderLib/EncCu.h +++ b/source/Lib/EncoderLib/EncCu.h @@ -126,10 +126,8 @@ private: #else PelStorage m_acMergeBuffer[MRG_MAX_NUM_CANDS]; #endif -#if JVET_L0124_L0208_TRIANGLE PelStorage m_acTriangleWeightedBuffer[TRIANGLE_MAX_NUM_CANDS]; // to store weighted prediction pixles double m_mergeBestSATDCost; -#endif MotionInfo m_SubPuMiBuf [( MAX_CU_SIZE * MAX_CU_SIZE ) >> ( MIN_CU_LOG2 << 1 )]; unsigned int m_subMergeBlkSize[10]; unsigned int m_subMergeBlkNum[10]; @@ -191,10 +189,8 @@ public: bool getClearSubMergeStatic() { return m_clearSubMergeStatic; } #endif -#if JVET_L0124_L0208_TRIANGLE void setMergeBestSATDCost(double cost) { m_mergeBestSATDCost = cost; } double getMergeBestSATDCost() { return m_mergeBestSATDCost; } -#endif ~EncCu(); @@ -240,9 +236,7 @@ protected: void xCheckRDCostMerge2Nx2N ( CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &pm, const EncTestMode& encTestMode ); -#if JVET_L0124_L0208_TRIANGLE void xCheckRDCostMergeTriangle2Nx2N( CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &pm, const EncTestMode& encTestMode ); -#endif void xEncodeInterResidual ( CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &partitioner, const EncTestMode& encTestMode, int residualPass = 0 , CodingStructure* imvCS = NULL diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 8fb0b94273be27f1fc645123d45fc6b830b1f37f..3a47717fdbca4abb1da1e340a3d2227fca2e903c 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -902,9 +902,7 @@ void EncLib::xInitSPS(SPS &sps) #if JVET_L0100_MULTI_HYPOTHESIS_INTRA sps.getSpsNext().setUseMHIntra ( m_MHIntra ); #endif -#if JVET_L0124_L0208_TRIANGLE sps.getSpsNext().setUseTriangle ( m_Triangle ); -#endif #if JVET_L0293_CPR sps.getSpsNext().setCPRMode ( m_CPRMode ); diff --git a/source/Lib/EncoderLib/EncModeCtrl.cpp b/source/Lib/EncoderLib/EncModeCtrl.cpp index 576905c58fa3a16fd6ababc6fbe0aad940533e78..84b29a76f0bbed62f31d37fb53fc81ddd567a2b3 100644 --- a/source/Lib/EncoderLib/EncModeCtrl.cpp +++ b/source/Lib/EncoderLib/EncModeCtrl.cpp @@ -1140,12 +1140,10 @@ void EncModeCtrlMTnoRQT::initCULevel( Partitioner &partitioner, const CodingStru // add inter modes if( m_pcEncCfg->getUseEarlySkipDetection() ) { -#if JVET_L0124_L0208_TRIANGLE if( cs.sps->getSpsNext().getUseTriangle() && cs.slice->isInterB() ) { m_ComprCUCtxList.back().testModes.push_back( { ETM_MERGE_TRIANGLE, ETO_STANDARD, qp, lossless } ); } -#endif m_ComprCUCtxList.back().testModes.push_back( { ETM_MERGE_SKIP, ETO_STANDARD, qp, lossless } ); #if JVET_L0369_SUBBLOCK_MERGE if ( cs.sps->getSpsNext().getUseAffine() || cs.sps->getSpsNext().getUseSubPuMvp() ) @@ -1160,12 +1158,10 @@ void EncModeCtrlMTnoRQT::initCULevel( Partitioner &partitioner, const CodingStru else { m_ComprCUCtxList.back().testModes.push_back( { ETM_INTER_ME, ETO_STANDARD, qp, lossless } ); -#if JVET_L0124_L0208_TRIANGLE if( cs.sps->getSpsNext().getUseTriangle() && cs.slice->isInterB() ) { m_ComprCUCtxList.back().testModes.push_back( { ETM_MERGE_TRIANGLE, ETO_STANDARD, qp, lossless } ); } -#endif m_ComprCUCtxList.back().testModes.push_back( { ETM_MERGE_SKIP, ETO_STANDARD, qp, lossless } ); #if JVET_L0369_SUBBLOCK_MERGE if ( cs.sps->getSpsNext().getUseAffine() || cs.sps->getSpsNext().getUseSubPuMvp() ) @@ -1399,12 +1395,10 @@ bool EncModeCtrlMTnoRQT::tryMode( const EncTestMode& encTestmode, const CodingSt { return false; } -#if JVET_L0124_L0208_TRIANGLE if( encTestmode.type == ETM_MERGE_TRIANGLE && ( partitioner.currArea().lumaSize().area() < TRIANGLE_MIN_SIZE || relatedCU.isIntra ) ) { return false; } -#endif return true; } else if( isModeSplit( encTestmode ) ) diff --git a/source/Lib/EncoderLib/EncModeCtrl.h b/source/Lib/EncoderLib/EncModeCtrl.h index 7583f070a462105789db8167919fc7165c385735..24f0ecf5d36450e0f007b61fa53993f29a29b43f 100644 --- a/source/Lib/EncoderLib/EncModeCtrl.h +++ b/source/Lib/EncoderLib/EncModeCtrl.h @@ -57,9 +57,7 @@ enum EncTestModeType ETM_MERGE_SKIP, ETM_INTER_ME, ETM_AFFINE, -#if JVET_L0124_L0208_TRIANGLE ETM_MERGE_TRIANGLE, -#endif ETM_INTRA, ETM_IPCM, ETM_SPLIT_QT, @@ -140,9 +138,7 @@ inline bool isModeInter( const EncTestMode& encTestmode ) // perhaps remove return ( encTestmode.type == ETM_INTER_ME || encTestmode.type == ETM_MERGE_SKIP || encTestmode.type == ETM_AFFINE -#if JVET_L0124_L0208_TRIANGLE || encTestmode.type == ETM_MERGE_TRIANGLE -#endif ); } diff --git a/source/Lib/EncoderLib/InterSearch.cpp b/source/Lib/EncoderLib/InterSearch.cpp index 7d79e797b8ebd07fcfcb7c5de8197d992ce86a66..e30a324b6c76789093d4b17e2e356970f9133a78 100644 --- a/source/Lib/EncoderLib/InterSearch.cpp +++ b/source/Lib/EncoderLib/InterSearch.cpp @@ -5378,9 +5378,7 @@ void InterSearch::encodeResAndCalcRdInterCU(CodingStructure &cs, Partitioner &pa #else m_CABACEstimator->affine_flag( cu ); #endif -#if JVET_L0124_L0208_TRIANGLE m_CABACEstimator->triangle_mode ( cu ); -#endif #if JVET_L0054_MMVD if (cu.mmvdSkip) { @@ -5575,9 +5573,7 @@ uint64_t InterSearch::xGetSymbolFracBitsInter(CodingStructure &cs, Partitioner & #else m_CABACEstimator->affine_flag ( cu ); #endif -#if JVET_L0124_L0208_TRIANGLE m_CABACEstimator->triangle_mode ( cu ); -#endif #if JVET_L0054_MMVD if (cu.mmvdSkip) { diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index f3313a45ed841c0b006fb912388cee85ccb9b547..19a17c847bb7d5a57c6e34a93c015b4a7d385c92 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -558,9 +558,7 @@ void HLSWriter::codeSPSNext( const SPSNext& spsNext, const bool usePCM ) #if JVET_L0100_MULTI_HYPOTHESIS_INTRA WRITE_FLAG( spsNext.getUseMHIntra() ? 1 : 0, "mhintra_flag" ); #endif -#if JVET_L0124_L0208_TRIANGLE WRITE_FLAG( spsNext.getUseTriangle() ? 1: 0, "triangle_flag" ); -#endif #if ENABLE_WPP_PARALLELISM WRITE_FLAG( spsNext.getUseNextDQP(), "next_dqp_enabled_flag" ); #else