Commit 82ab0c64 authored by Karsten Suehring's avatar Karsten Suehring

remove macro JVET_L0059_MTS_SIMP

parent 6981f879
...@@ -619,9 +619,6 @@ const int g_invQuantScales[SCALING_LIST_REM_NUM] = ...@@ -619,9 +619,6 @@ const int g_invQuantScales[SCALING_LIST_REM_NUM] =
//structures //structures
//EMT threshold //EMT threshold
#if !JVET_L0059_MTS_SIMP
const uint32_t g_EmtSigNumThr = 2;
#endif
#if !JVET_L0285_8BIT_TRANSFORM_CORE #if !JVET_L0285_8BIT_TRANSFORM_CORE
//EMT transform coeficient variable //EMT transform coeficient variable
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
#define TRAINED_CABAC_INIT_TABLES 1 // Trained values for VTM3 #define TRAINED_CABAC_INIT_TABLES 1 // Trained values for VTM3
#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 #define JVET_L0100_MULTI_HYPOTHESIS_INTRA 1 // Combine intra mode with an extra merge indexed prediction
#define JVET_L0165_6MPM 1 // Use 6 MPM for 67 intra prediction modes #define JVET_L0165_6MPM 1 // Use 6 MPM for 67 intra prediction modes
#define JVET_L0279_WAIP_CLEANUP 1 // WAIP cleanup #define JVET_L0279_WAIP_CLEANUP 1 // WAIP cleanup
......
...@@ -2288,18 +2288,7 @@ void CABACReader::residual_coding( TransformUnit& tu, ComponentID compID ) ...@@ -2288,18 +2288,7 @@ void CABACReader::residual_coding( TransformUnit& tu, ComponentID compID )
{ {
if( CU::isIntra( *tu.cu ) ) if( CU::isIntra( *tu.cu ) )
{ {
#if JVET_L0059_MTS_SIMP
emt_tu_index(tu); emt_tu_index(tu);
#else
if (numSig > g_EmtSigNumThr)
{
emt_tu_index(tu);
}
else
{
tu.emtIdx = 0; //default transform
}
#endif
} }
else else
{ {
......
...@@ -2220,18 +2220,7 @@ void CABACWriter::residual_coding( const TransformUnit& tu, ComponentID compID ) ...@@ -2220,18 +2220,7 @@ void CABACWriter::residual_coding( const TransformUnit& tu, ComponentID compID )
{ {
if( CU::isIntra( *tu.cu ) ) if( CU::isIntra( *tu.cu ) )
{ {
#if JVET_L0059_MTS_SIMP
emt_tu_index(tu); emt_tu_index(tu);
#else
if( numSig > g_EmtSigNumThr )
{
emt_tu_index( tu );
}
else
{
CHECK( tu.emtIdx != 0, "If the number of significant coefficients is <= g_EmtSigNumThr, then the tu index must be 0" );
}
#endif
} }
else else
{ {
......
...@@ -1297,9 +1297,6 @@ void IntraSearch::xIntraCodingTUBlock(TransformUnit &tu, const ComponentID &comp ...@@ -1297,9 +1297,6 @@ void IntraSearch::xIntraCodingTUBlock(TransformUnit &tu, const ComponentID &comp
const bool bUseCrossCPrediction = pps.getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() && isChroma( compID ) && PU::isChromaIntraModeCrossCheckMode( pu ) && checkCrossCPrediction; const bool bUseCrossCPrediction = pps.getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() && isChroma( compID ) && PU::isChromaIntraModeCrossCheckMode( pu ) && checkCrossCPrediction;
const bool ccUseRecoResi = m_pcEncCfg->getUseReconBasedCrossCPredictionEstimate(); const bool ccUseRecoResi = m_pcEncCfg->getUseReconBasedCrossCPredictionEstimate();
#if !JVET_L0059_MTS_SIMP
const uint8_t transformIndex = tu.cu->emtFlag && compID == COMPONENT_Y ? tu.emtIdx : DCT2_EMT ;
#endif
//===== init availability pattern ===== //===== init availability pattern =====
PelBuf sharedPredTS( m_pSharedPredTransformSkip[compID], area ); PelBuf sharedPredTS( m_pSharedPredTransformSkip[compID], area );
...@@ -1370,29 +1367,6 @@ void IntraSearch::xIntraCodingTUBlock(TransformUnit &tu, const ComponentID &comp ...@@ -1370,29 +1367,6 @@ void IntraSearch::xIntraCodingTUBlock(TransformUnit &tu, const ComponentID &comp
m_pcTrQuant->transformNxN(tu, compID, cQP, uiAbsSum, m_CABACEstimator->getCtx()); m_pcTrQuant->transformNxN(tu, compID, cQP, uiAbsSum, m_CABACEstimator->getCtx());
#if !JVET_L0059_MTS_SIMP
if( transformIndex != DCT2_EMT && ( !tu.transformSkip[COMPONENT_Y] ) ) //this can only be true if compID is luma
{
*numSig = 0;
TCoeff* coeffBuffer = tu.getCoeffs(compID).buf;
for( uint32_t uiX = 0; uiX < tu.Y().area(); uiX++ )
{
if( coeffBuffer[uiX] )
{
( *numSig )++;
if( *numSig > g_EmtSigNumThr )
{
break;
}
}
}
//if the number of significant coeffs is less than the threshold, then only the default transform (which has a 0 index, but it is the DST7) is allowed
if( transformIndex != 0 && *numSig <= g_EmtSigNumThr && !tu.transformSkip[compID] )
{
return;
}
}
#endif
DTRACE( g_trace_ctx, D_TU_ABS_SUM, "%d: comp=%d, abssum=%d\n", DTRACE_GET_COUNTER( g_trace_ctx, D_TU_ABS_SUM ), compID, uiAbsSum ); DTRACE( g_trace_ctx, D_TU_ABS_SUM, "%d: comp=%d, abssum=%d\n", DTRACE_GET_COUNTER( g_trace_ctx, D_TU_ABS_SUM ), compID, uiAbsSum );
...@@ -1571,12 +1545,7 @@ void IntraSearch::xRecurIntraCodingLumaQT( CodingStructure &cs, Partitioner &par ...@@ -1571,12 +1545,7 @@ void IntraSearch::xRecurIntraCodingLumaQT( CodingStructure &cs, Partitioner &par
//----- determine rate and r-d cost ----- //----- determine rate and r-d cost -----
//the condition (transformIndex != DCT2_EMT) seems to be irrelevant, since DCT2_EMT=7 and the highest value of transformIndex is 4 //the condition (transformIndex != DCT2_EMT) seems to be irrelevant, since DCT2_EMT=7 and the highest value of transformIndex is 4
#if JVET_L0059_MTS_SIMP
if( ( modeId == lastCheckId && checkTransformSkip && !TU::getCbfAtDepth( tu, COMPONENT_Y, currDepth ) ) ) if( ( modeId == lastCheckId && checkTransformSkip && !TU::getCbfAtDepth( tu, COMPONENT_Y, currDepth ) ) )
#else
if( ( modeId == lastCheckId && checkTransformSkip && !TU::getCbfAtDepth( tu, COMPONENT_Y, currDepth ) )
|| ( tu.emtIdx > 0 && ( checkTransformSkip ? transformIndex != lastCheckId : true ) && tu.emtIdx != DCT2_EMT && numSig <= g_EmtSigNumThr ) )
#endif
{ {
//In order not to code TS flag when cbf is zero, the case for TS with cbf being zero is forbidden. //In order not to code TS flag when cbf is zero, the case for TS with cbf being zero is forbidden.
singleCostTmp = MAX_DOUBLE; singleCostTmp = 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