Commit eb2fbdc5 authored by Frank Bossen's avatar Frank Bossen

Fix 255: remove IntraPrediction::useFilteredIntraRefSamples function

Deprecated function is removed as well as code calling it.
Impact on CTC: 0.00% (AI) and -0.01% (RA)
parent 5900c435
......@@ -1429,49 +1429,6 @@ void IntraPrediction::xFilterReferenceSamples( const Pel* refBufUnfiltered, Pel*
*piDestPtr=*piSrcPtr;
}
bool IntraPrediction::useFilteredIntraRefSamples( const ComponentID &compID, const PredictionUnit &pu, bool modeSpecific, const UnitArea &tuArea )
{
const SPS &sps = *pu.cs->sps;
const ChannelType chType = toChannelType( compID );
// high level conditions
if( sps.getSpsRangeExtension().getIntraSmoothingDisabledFlag() ) { return false; }
#if JVET_N0671_INTRA_TPM_ALIGNWITH420
if( !isLuma( chType ) ) { return false; }
#else
if( !isLuma( chType ) && pu.chromaFormat != CHROMA_444 ) { return false; }
#endif
#if JVET_N0413_RDPCM
if( isLuma( chType ) && pu.cu->bdpcmMode ) { return false; }
#endif
if( pu.cu->ispMode && isLuma(compID) ) { return false; }
#if JVET_N0217_MATRIX_INTRAPRED
if( PU::isMIP( pu, chType ) ) { return false; }
#endif
if( !modeSpecific ) { return true; }
if (pu.multiRefIdx) { return false; }
// pred. mode related conditions
const int dirMode = PU::getFinalIntraMode( pu, chType );
int predMode = getWideAngle(tuArea.blocks[compID].width, tuArea.blocks[compID].height, dirMode);
if (predMode != dirMode ) { return true; }
if (dirMode == DC_IDX) { return false; }
if (dirMode == PLANAR_IDX)
{
return tuArea.blocks[compID].width * tuArea.blocks[compID].height > 32 ? true : false;
}
int diff = std::min<int>( abs( dirMode - HOR_IDX ), abs( dirMode - VER_IDX ) );
int log2Size = ((g_aucLog2[tuArea.blocks[compID].width] + g_aucLog2[tuArea.blocks[compID].height]) >> 1);
CHECK( log2Size >= MAX_INTRA_FILTER_DEPTHS, "Size not supported" );
return (diff > m_aucIntraFilter[chType][log2Size]);
}
bool isAboveLeftAvailable(const CodingUnit &cu, const ChannelType &chType, const Position &posLT)
{
const CodingStructure& cs = *cu.cs;
......
......@@ -171,10 +171,6 @@ public:
void predIntraMip (const ComponentID compId, PelBuf &piPred, const PredictionUnit &pu);
#endif
static bool useFilteredIntraRefSamples( const ComponentID &compID, const PredictionUnit &pu, bool modeSpecific, const UnitArea &tuArea );
#if HM_MDIS_AS_IN_JEM && JVET_N0193_LFNST
static bool getPlanarMDISCondition( const UnitArea &tuArea ) { return abs( PLANAR_IDX - HOR_IDX ) > m_aucIntraFilter[ CHANNEL_TYPE_LUMA ][ ( ( g_aucLog2[ tuArea.Y().width ] + g_aucLog2[ tuArea.Y().height ] ) >> 1 ) ]; }
#endif
static bool useDPCMForFirstPassIntraEstimation(const PredictionUnit &pu, const uint32_t &uiDirMode);
void geneWeightedPred (const ComponentID compId, PelBuf &pred, const PredictionUnit &pu, Pel *srcBuf);
......
......@@ -291,7 +291,6 @@ typedef std::pair<int, int> TrCost;
#endif
#define HM_CODED_CU_INFO 1 // like in JEM, when related CU is skipped, it stays like this even if a non skip mode wins...
#define HM_4TAPIF_AS_IN_JEM 1 // *** - PM: condition not well suited for 4-tap interpolation filters
#define HM_MDIS_AS_IN_JEM 1 // *** - PM: not filtering ref. samples for 64xn case and using Planar MDIS condition at encoder
#define HM_JEM_CLIP_PEL 1 // ***
#define HM_JEM_MERGE_CANDS 0 // ***
......
......@@ -1566,17 +1566,7 @@ void EncCu::xCheckRDCostIntra( CodingStructure *&tempCS, CodingStructure *&bestC
const int nonZeroCoeffThr = CS::isDualITree( *tempCS ) ? ( isLuma( partitioner.chType ) ? LFNST_SIG_NZ_LUMA : LFNST_SIG_NZ_CHROMA ) : LFNST_SIG_NZ_LUMA + LFNST_SIG_NZ_CHROMA;
if( lfnstIdx && cuCtx.numNonZeroCoeffNonTs <= nonZeroCoeffThr )
{
bool isMDIS = false;
{
CHECK( CU::getNumPUs( cu ) > 1, "PLanarPDPC: encoder MDIS condition not defined for multi PU" );
const PredictionUnit* pu = cu.firstPU;
isMDIS = IntraPrediction::useFilteredIntraRefSamples( COMPONENT_Y, *pu, true, *pu );
#if HM_MDIS_AS_IN_JEM
if( pu->intraDir[ 0 ] == PLANAR_IDX ) { isMDIS |= IntraPrediction::getPlanarMDISCondition( *pu ); }
#endif
}
if( cuCtx.numNonZeroCoeffNonTs > 0 || isMDIS )
if (cuCtx.numNonZeroCoeffNonTs > 0)
{
tempCS->cost = MAX_DOUBLE;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment