diff --git a/source/Lib/CommonLib/Rom.cpp b/source/Lib/CommonLib/Rom.cpp index b69de50e4d8427cc1767dd8d28027949b04cbd86..3a4932f7834ce1782b597edfc1472cf141ad1933 100644 --- a/source/Lib/CommonLib/Rom.cpp +++ b/source/Lib/CommonLib/Rom.cpp @@ -5130,35 +5130,14 @@ void initGeoTemplate() int16_t rho = (g_Dis[distanceX] << (GEO_MAX_CU_LOG2 + 1)) + (g_Dis[distanceY] << (GEO_MAX_CU_LOG2 + 1)); static const int16_t maskOffset = (2 * GEO_MAX_CU_SIZE - GEO_WEIGHT_MASK_SIZE) >> 1; int index = 0; -#if JVET_Z0056_GPM_SPLIT_MODE_REORDERING - for (int y = 0; y < GEO_WEIGHT_MASK_SIZE; y++) - { - int16_t lookUpY = (((y + maskOffset) << 1) + 1) * g_Dis[distanceY]; - for (int x = 0; x < GEO_WEIGHT_MASK_SIZE; x++, index++) - { - int16_t sx_i = ((x + maskOffset) << 1) + 1; - int16_t weightIdx = sx_i * g_Dis[distanceX] + lookUpY - rho; - if (g_bld2Width[bldIdx] > 1) - { - int weightLinearIdx = 8 * g_bld2Width[bldIdx] + weightIdx; - g_globalGeoWeights[bldIdx][g_angle2mask[angleIdx]][index] = Clip3(0, 32, (weightLinearIdx + (g_bld2Width[bldIdx] >> 2)) >> floorLog2(g_bld2Width[bldIdx] >> 1)); - } - else - { - int weightLinearIdx = 8 + weightIdx; - g_globalGeoWeights[bldIdx][g_angle2mask[angleIdx]][index] = Clip3(0, 32, weightLinearIdx << 1); - } - } - } -#else for (int y = 0; y < GEO_WEIGHT_MASK_SIZE; y++) { int16_t lookUpY = (((y + maskOffset) << 1) + 1) * g_Dis[distanceY]; for (int x = 0; x < GEO_WEIGHT_MASK_SIZE; x++, index++) { - int16_t sx_i = ((x + maskOffset) << 1) + 1; - int16_t weightIdx = sx_i * g_Dis[distanceX] + lookUpY - rho; + int16_t sxi = ((x + maskOffset) << 1) + 1; + int16_t weightIdx = sxi * g_Dis[distanceX] + lookUpY - rho; if (g_bld2Width[bldIdx] > 1) { int weightLinearIdx = 8 * g_bld2Width[bldIdx] + weightIdx; @@ -5171,7 +5150,6 @@ void initGeoTemplate() } } } -#endif } } diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 4f88ec4c0d08d4e71cb3c943dc651c9d4443a47b..a3f05c653fb86451d2000626c03aafdfe9f17364 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -68,7 +68,7 @@ // Software optimization #define JVET_X0144_MAX_MTT_DEPTH_TID 1 // JVET-X0144: max MTT hierarchy depth set by temporal ID #if JVET_X0144_MAX_MTT_DEPTH_TID -#define JVET_AA0098_MTT_DEPTH_TID_BY_QP 1 +#define JVET_AA0098_MTT_DEPTH_TID_BY_QP 1 // JVET-AA0098: MTT depth based on QP #endif #define JVET_X0049_BDMVR_SW_OPT 1 // JVET-X0049: software optimization for BDMVR (lossless) #define INTRA_TRANS_ENC_OPT 1 // JVET-Y0141: Software optimization, including TIMD/DIMD/MTS/LFNS encoder fast algorithm, SIMD implementation and CM initial value retraining diff --git a/source/Lib/CommonLib/UnitTools.cpp b/source/Lib/CommonLib/UnitTools.cpp index 6ed86579747527ce407fb68ec8850bb5b68ae64d..642aa2617dd8132cbc9c0ec1b0c36ef3f3780a73 100644 --- a/source/Lib/CommonLib/UnitTools.cpp +++ b/source/Lib/CommonLib/UnitTools.cpp @@ -1553,13 +1553,14 @@ void PU::getCccmRefLineNum(const PredictionUnit& pu, int& th, int& tv) th = area.x < CCCM_WINDOW_SIZE ? area.x : CCCM_WINDOW_SIZE; tv = area.y < CCCM_WINDOW_SIZE ? area.y : CCCM_WINDOW_SIZE; -#if CCCM_REF_LINES_ABOVE_CTU - int ctuHeight = pu.cs->sps->getMaxCUHeight() >> getComponentScaleY(COMPONENT_Cb, pu.chromaFormat); - int borderDist = area.y % ctuHeight; - int tvMax = borderDist + CCCM_REF_LINES_ABOVE_CTU; - - tv = tv > tvMax ? tvMax : tv; -#endif + if( CCCM_REF_LINES_ABOVE_CTU ) + { + int ctuHeight = pu.cs->sps->getMaxCUHeight() >> getComponentScaleY(COMPONENT_Cb, pu.chromaFormat); + int borderDist = area.y % ctuHeight; + int tvMax = borderDist + CCCM_REF_LINES_ABOVE_CTU; + + tv = tv > tvMax ? tvMax : tv; + } } bool PU::cccmSingleModeAvail(const PredictionUnit& pu, int intraMode) diff --git a/source/Lib/DecoderLib/DecCu.cpp b/source/Lib/DecoderLib/DecCu.cpp index 90d12ad9201fc35ed8db0f5f410aeb3dcef01a0b..c12ece7c450269dfa6b4f95323e091b86885f926 100644 --- a/source/Lib/DecoderLib/DecCu.cpp +++ b/source/Lib/DecoderLib/DecCu.cpp @@ -746,8 +746,6 @@ void DecCu::xIntraRecBlk( TransformUnit& tu, const ComponentID compID ) pReco.reconstruct( piPred, piResi, tu.cu->cs->slice->clpRng( compID ) ); #else piPred.reconstruct( piPred, piResi, tu.cu->cs->slice->clpRng( compID ) ); -#endif -#if !KEEP_PRED_AND_RESI_SIGNALS pReco.copyFrom( piPred ); #endif if (slice.getLmcsEnabledFlag() && (m_pcReshape->getCTUFlag() || slice.isIntra()) && compID == COMPONENT_Y)