Commit 958c49b4 authored by Karsten Suehring's avatar Karsten Suehring

remove macro JVET_L0100_MULTI_HYPOTHESIS_INTRA

parent 82ab0c64
......@@ -255,9 +255,7 @@ void EncApp::xInitLibCfg()
}
}
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
m_cEncLib.setUseMHIntra ( m_MHIntra );
#endif
m_cEncLib.setUseTriangle ( m_Triangle );
#if JVET_L0293_CPR
......
......@@ -856,9 +856,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
("LadfQpOffset", cfg_LadfQpOffset, cfg_LadfQpOffset, "LADF QP offset")
("LadfIntervalLowerBound", cfg_LadfIntervalLowerBound, cfg_LadfIntervalLowerBound, "LADF lower bound for 2nd lowest interval")
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
("MHIntra", m_MHIntra, false, "Enable MHIntra mode")
#endif
("Triangle", m_Triangle, false, "Enable triangular shape motion vector prediction (0:off, 1:on)")
#if JVET_L0293_CPR
......@@ -3144,9 +3142,7 @@ void EncAppCfg::xPrintParameter()
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
msg( VERBOSE, "LADF:%d ", m_LadfEnabed );
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
msg(VERBOSE, "MHIntra:%d ", m_MHIntra);
#endif
msg( VERBOSE, "Triangle:%d ", m_Triangle );
}
#if JVET_L0293_CPR
......
......@@ -236,9 +236,7 @@ protected:
int m_LadfIntervalLowerBound[MAX_LADF_INTERVALS];
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
bool m_MHIntra;
#endif
bool m_Triangle;
......
......@@ -103,9 +103,7 @@ enum CodingStatisticsType
#endif
STATS__CABAC_BITS__EMT_CU_FLAG,
STATS__CABAC_BITS__EMT_TU_INDEX,
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
STATS__CABAC_BITS__MH_INTRA_FLAG,
#endif
STATS__CABAC_BITS__TRIANGLE_FLAG,
STATS__CABAC_BITS__TRIANGLE_INDEX,
#if JVET_L0283_MULTI_REF_LINE
......@@ -188,9 +186,7 @@ static inline const char* getName(CodingStatisticsType name)
#endif
"CABAC_BITS__EMT_CU_FLAG",
"CABAC_BITS__EMT_TU_INDX",
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
"CABAC_BITS__MH_INTRA_FLAG",
#endif
"CABAC_BITS__TRIANGLE_FLAG",
"CABAC_BITS__TRIANGLE_INDEX",
#if JVET_L0283_MULTI_REF_LINE
......
......@@ -1110,7 +1110,6 @@ const CtxSet ContextSetCfg::ctbAlfFlag =
} )
};
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
const CtxSet ContextSetCfg::MHIntraFlag = ContextSetCfg::addCtxSet
({
#if TRAINED_CABAC_INIT_TABLES
......@@ -1136,7 +1135,6 @@ const CtxSet ContextSetCfg::MHIntraPredMode = ContextSetCfg::addCtxSet
{ 184, CNU, CNU, CNU, },
#endif
});
#endif
const CtxSet ContextSetCfg::TriangleFlag = ContextSetCfg::addCtxSet
({
......
......@@ -206,10 +206,8 @@ public:
static const CtxSet GBiIdx;
#endif
static const CtxSet ctbAlfFlag;
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
static const CtxSet MHIntraFlag;
static const CtxSet MHIntraPredMode;
#endif
static const CtxSet TriangleFlag;
static const CtxSet TriangleIdx;
static const unsigned NumberOfContexts;
......
......@@ -141,7 +141,6 @@ IntraPrediction::IntraPrediction()
m_piYuvExt[ch][buf] = nullptr;
}
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
for (uint32_t ch = 0; ch < MAX_NUM_COMPONENT; ch++)
{
for (uint32_t buf = 0; buf < 4; buf++)
......@@ -149,7 +148,6 @@ IntraPrediction::IntraPrediction()
m_yuvExt2[ch][buf] = nullptr;
}
}
#endif
m_piTemp = nullptr;
#if JVET_L0338_MDLM
......@@ -172,7 +170,6 @@ void IntraPrediction::destroy()
m_piYuvExt[ch][buf] = nullptr;
}
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
for (uint32_t ch = 0; ch < MAX_NUM_COMPONENT; ch++)
{
for (uint32_t buf = 0; buf < 4; buf++)
......@@ -181,7 +178,6 @@ void IntraPrediction::destroy()
m_yuvExt2[ch][buf] = nullptr;
}
}
#endif
delete[] m_piTemp;
m_piTemp = nullptr;
......@@ -199,12 +195,10 @@ void IntraPrediction::init(ChromaFormat chromaFormatIDC, const unsigned bitDepth
destroy();
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if (m_yuvExt2[COMPONENT_Y][0] != nullptr && m_currChromaFormat != chromaFormatIDC)
{
destroy();
}
#endif
m_currChromaFormat = chromaFormatIDC;
......@@ -229,7 +223,6 @@ void IntraPrediction::init(ChromaFormat chromaFormatIDC, const unsigned bitDepth
}
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if (m_yuvExt2[COMPONENT_Y][0] == nullptr) // check if first is null (in which case, nothing initialised yet)
{
m_yuvExtSize2 = (MAX_CU_SIZE) * (MAX_CU_SIZE);
......@@ -242,7 +235,6 @@ void IntraPrediction::init(ChromaFormat chromaFormatIDC, const unsigned bitDepth
}
}
}
#endif
int shift = bitDepthY + 4;
for (int i = 32; i < 64; i++)
......@@ -1013,7 +1005,6 @@ bool IntraPrediction::useDPCMForFirstPassIntraEstimation(const PredictionUnit &p
return CU::isRDPCMEnabled(*pu.cu) && pu.cu->transQuantBypass && (uiDirMode == HOR_IDX || uiDirMode == VER_IDX);
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void IntraPrediction::geneWeightedPred(const ComponentID compId, PelBuf &pred, const PredictionUnit &pu, Pel *srcBuf)
{
const int width = pred.width;
......@@ -1135,7 +1126,6 @@ void IntraPrediction::geneIntrainterPred(const CodingUnit &cu)
switchBuffer(*pu, currCompID2, tmpBuf, getPredictorPtr2(currCompID2, 0));
}
}
#endif
inline bool isAboveLeftAvailable ( const CodingUnit &cu, const ChannelType &chType, const Position &posLT );
inline int isAboveAvailable ( const CodingUnit &cu, const ChannelType &chType, const Position &posLT, const uint32_t uiNumUnitsInPU, const uint32_t unitWidth, bool *validFlags );
......
......@@ -69,10 +69,8 @@ private:
Pel* m_piYuvExt[MAX_NUM_COMPONENT][NUM_PRED_BUF];
int m_iYuvExtSize;
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
Pel* m_yuvExt2[MAX_NUM_COMPONENT][4];
int m_yuvExtSize2;
#endif
static const uint8_t m_aucIntraFilter[MAX_NUM_CHANNEL_TYPE][MAX_INTRA_FILTER_DEPTHS];
......@@ -153,12 +151,10 @@ public:
static bool useFilteredIntraRefSamples( const ComponentID &compID, const PredictionUnit &pu, bool modeSpecific, const UnitArea &tuArea );
static bool useDPCMForFirstPassIntraEstimation(const PredictionUnit &pu, const uint32_t &uiDirMode);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void geneWeightedPred (const ComponentID compId, PelBuf &pred, const PredictionUnit &pu, Pel *srcBuf);
Pel* getPredictorPtr2 (const ComponentID compID, uint32_t idx) { return m_yuvExt2[compID][idx]; }
void switchBuffer (const PredictionUnit &pu, ComponentID compID, PelBuf srcBuff, Pel *dst);
void geneIntrainterPred (const CodingUnit &cu);
#endif
};
//! \}
......
......@@ -1787,9 +1787,7 @@ SPSNext::SPSNext( SPS& sps )
, m_Affine ( false )
, m_AffineType ( false )
, m_MTTEnabled ( false )
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
, m_MHIntra ( false )
#endif
, m_Triangle ( false )
#if ENABLE_WPP_PARALLELISM
, m_NextDQP ( false )
......
......@@ -816,9 +816,7 @@ private:
bool m_GBi; //
#endif
bool m_MTTEnabled; //
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
bool m_MHIntra;
#endif
bool m_Triangle;
#if ENABLE_WPP_PARALLELISM
bool m_NextDQP;
......@@ -972,10 +970,8 @@ public:
void setUseCompositeRef(bool b) { m_compositeRefEnabled = b; }
bool getUseCompositeRef() const { return m_compositeRefEnabled; }
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void setUseMHIntra ( bool b ) { m_MHIntra = b; }
bool getUseMHIntra () const { return m_MHIntra; }
#endif
void setUseTriangle ( bool b ) { m_Triangle = b; }
bool getUseTriangle () const { return m_Triangle; }
#if JVET_L0293_CPR
......
......@@ -54,7 +54,6 @@
#define TRAINED_CABAC_INIT_TABLES 1 // Trained values for VTM3
#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_L0279_WAIP_CLEANUP 1 // WAIP cleanup
......
......@@ -364,9 +364,7 @@ void PredictionUnit::initData()
}
#endif
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
mhIntraFlag = false;
#endif
}
PredictionUnit& PredictionUnit::operator=(const IntraPredictionData& predData)
......@@ -414,9 +412,7 @@ PredictionUnit& PredictionUnit::operator=(const InterPredictionData& predData)
}
#endif
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
mhIntraFlag = predData.mhIntraFlag;
#endif
return *this;
}
......@@ -461,9 +457,7 @@ PredictionUnit& PredictionUnit::operator=( const PredictionUnit& other )
}
#endif
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
mhIntraFlag = other.mhIntraFlag;
#endif
return *this;
}
......
......@@ -372,9 +372,7 @@ struct InterPredictionData
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
Mv mvAffi[NUM_REF_PIC_LIST_01][3];
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
bool mhIntraFlag;
#endif
#if JVET_L0293_CPR
Mv bv; // block vector for CPR
Mv bvd; // block vector difference for CPR
......
......@@ -458,11 +458,7 @@ int PU::getIntraMPMs( const PredictionUnit &pu, unsigned* mpm, const ChannelType
// Get intra direction of left PU
const PredictionUnit *puLeft = pu.cs->getPURestricted(pos.offset(-1, 0), pu, channelType);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if (puLeft && (CU::isIntra(*puLeft->cu) || (channelType == CHANNEL_TYPE_LUMA && puLeft->mhIntraFlag)))
#else
if (puLeft && CU::isIntra(*puLeft->cu))
#endif
{
leftIntraDir = puLeft->intraDir[channelType];
......@@ -475,11 +471,7 @@ int PU::getIntraMPMs( const PredictionUnit &pu, unsigned* mpm, const ChannelType
// Get intra direction of above PU
const PredictionUnit *puAbove = pu.cs->getPURestricted(pos.offset(0, -1), pu, channelType);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if (puAbove && (CU::isIntra(*puAbove->cu) || (channelType == CHANNEL_TYPE_LUMA && puAbove->mhIntraFlag)) && CU::isSameCtu(*pu.cu, *puAbove->cu))
#else
if (puAbove && CU::isIntra(*puAbove->cu) && CU::isSameCtu(*pu.cu, *puAbove->cu))
#endif
{
aboveIntraDir = puAbove->intraDir[channelType];
......@@ -729,7 +721,6 @@ bool PU::isChromaIntraModeCrossCheckMode( const PredictionUnit &pu )
return pu.intraDir[CHANNEL_TYPE_CHROMA] == DM_CHROMA_IDX;
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
int PU::getMHIntraMPMs(const PredictionUnit &pu, unsigned* mpm, const ChannelType &channelType /*= CHANNEL_TYPE_LUMA*/, const bool isChromaMDMS /*= false*/, const unsigned startIdx /*= 0*/)
{
const int numMPMs = 3; // Multi-hypothesis intra uses only 3 MPM
......@@ -873,7 +864,6 @@ int PU::getNarrowShape(const int width, const int height)
return 0;
}
}
#endif
uint32_t PU::getFinalIntraMode( const PredictionUnit &pu, const ChannelType &chType )
{
......
......@@ -179,10 +179,8 @@ namespace PU
bool isLMCMode ( unsigned mode);
bool isLMCModeEnabled (const PredictionUnit &pu, unsigned mode);
bool isChromaIntraModeCrossCheckMode(const PredictionUnit &pu);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
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
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);
......@@ -306,7 +304,6 @@ uint32_t updateCandList( T uiMode, double uiCost, static_vector<T, N>& candModeL
return 0;
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
template<typename T, size_t N>
#if JVET_L0054_MMVD
uint32_t updateDoubleCandList(T mode, double cost, static_vector<T, N>& candModeList, static_vector<double, N>& candCostList, static_vector<T, N>& candModeList2, T mode2, size_t fastCandNum = N, int* iserttPos = nullptr)
......@@ -367,7 +364,6 @@ uint32_t updateDoubleCandList(T mode, double cost, static_vector<T, N>& candMode
#endif
return 0;
}
#endif
#endif
......@@ -488,13 +488,11 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea)
DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::MMVDMergeIdx), pu.mmvdMergeIdx);
}
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::MHIntraFlag), pu.mhIntraFlag);
if (pu.mhIntraFlag)
{
DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::Luma_IntraMode), pu.intraDir[COMPONENT_Y]);
}
#endif
DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::TriangleFlag), pu.cu->triangle);
}
DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::AffineFlag), pu.cu->affine);
......@@ -876,7 +874,6 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea)
DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_CODED, pu, GetBlockStatisticName(BlockStatistic::AffineFlag), pu.cu->affine);
}
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if (pu.cs->sps->getSpsNext().getUseMHIntra() && !pu.cu->skip && !pu.cu->affine && !(pu.cu->lwidth() * pu.cu->lheight() < 64 || pu.cu->lwidth() >= MAX_CU_SIZE || pu.cu->lheight() >= MAX_CU_SIZE)
#if JVET_L0054_MMVD
&& !pu.mmvdMergeFlag
......@@ -893,7 +890,6 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea)
}
}
}
#endif
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);
......
......@@ -106,9 +106,7 @@ enum class BlockStatistic {
MMVDMergeFlag,
MMVDMergeIdx,
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
MHIntraFlag,
#endif
TriangleFlag,
TrianglePartitioning,
TriangleMVL0, //<< currently only uni-prediction enabled
......@@ -200,9 +198,7 @@ static const std::map<BlockStatistic, std::tuple<std::string, BlockStatisticType
{ BlockStatistic::MMVDMergeFlag, std::tuple<std::string, BlockStatisticType, std::string>{"MMVDMergeFlag", BlockStatisticType::Flag, ""}},
{ BlockStatistic::MMVDMergeIdx, std::tuple<std::string, BlockStatisticType, std::string>{"MMVDMergeIdx", BlockStatisticType::Integer, "[0, 1]"}},
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
{ BlockStatistic::MHIntraFlag, std::tuple<std::string, BlockStatisticType, std::string>{"MHIntraFlag", BlockStatisticType::Flag, ""}},
#endif
{ BlockStatistic::TriangleFlag, std::tuple<std::string, BlockStatisticType, std::string>{"TriangleFlag", BlockStatisticType::Flag, ""}},
{ BlockStatistic::TrianglePartitioning, std::tuple<std::string, BlockStatisticType, std::string>{"TrianglePartitioning", BlockStatisticType::Line, ""}},
{ BlockStatistic::TriangleMVL0, std::tuple<std::string, BlockStatisticType, std::string>{"TriangleMVL0", BlockStatisticType::VectorPolygon, "Scale: 4"}},
......
......@@ -1262,14 +1262,12 @@ void CABACReader::prediction_unit( PredictionUnit& pu, MergeCtx& mrgCtx )
#else
affine_flag ( *pu.cu );
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
MHIntra_flag(pu);
if (pu.mhIntraFlag)
{
MHIntra_luma_pred_modes(*pu.cu);
pu.intraDir[1] = DM_CHROMA_IDX;
}
#endif
triangle_mode( *pu.cu );
#if JVET_L0054_MMVD
if (pu.mmvdMergeFlag)
......@@ -1714,7 +1712,6 @@ void CABACReader::mvp_flag( PredictionUnit& pu, RefPicList eRefList )
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void CABACReader::MHIntra_flag(PredictionUnit& pu)
{
if (!pu.cs->sps->getSpsNext().getUseMHIntra())
......@@ -1844,7 +1841,6 @@ void CABACReader::MHIntra_luma_pred_modes(CodingUnit &cu)
pu = pu->next;
}
}
#endif
void CABACReader::triangle_mode( CodingUnit& cu )
{
......
......@@ -114,10 +114,8 @@ public:
void inter_pred_idc ( PredictionUnit& pu );
void ref_idx ( PredictionUnit& pu, RefPicList eRefList );
void mvp_flag ( PredictionUnit& pu, RefPicList eRefList );
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void MHIntra_flag ( PredictionUnit& pu );
void MHIntra_luma_pred_modes ( CodingUnit& cu );
#endif
void triangle_mode ( CodingUnit& cu );
// pcm samples (clause 7.3.8.7)
......
......@@ -345,15 +345,11 @@ void DecCu::xReconInter(CodingUnit &cu)
}
else
{
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
m_pcIntraPred->geneIntrainterPred(cu);
#endif
// inter prediction
#if JVET_L0293_CPR
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
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");
CHECK(cu.cpr && cu.triangle, "CPR and triangle cannot be used together");
#if JVET_L0054_MMVD
......@@ -380,14 +376,12 @@ void DecCu::xReconInter(CodingUnit &cu)
cu.slice->updateMotionLUTs(cu.slice->getMotionLUTs(), cu);
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if (cu.firstPU->mhIntraFlag)
{
m_pcIntraPred->geneWeightedPred(COMPONENT_Y, cu.cs->getPredBuf(*cu.firstPU).Y(), *cu.firstPU, m_pcIntraPred->getPredictorPtr2(COMPONENT_Y, 0));
m_pcIntraPred->geneWeightedPred(COMPONENT_Cb, cu.cs->getPredBuf(*cu.firstPU).Cb(), *cu.firstPU, m_pcIntraPred->getPredictorPtr2(COMPONENT_Cb, 0));
m_pcIntraPred->geneWeightedPred(COMPONENT_Cr, cu.cs->getPredBuf(*cu.firstPU).Cr(), *cu.firstPU, m_pcIntraPred->getPredictorPtr2(COMPONENT_Cr, 0));
}
#endif
DTRACE ( g_trace_ctx, D_TMP, "pred " );
DTRACE_CRC( g_trace_ctx, D_TMP, *cu.cs, cu.cs->getPredBuf( cu ), &cu.Y() );
......@@ -489,9 +483,7 @@ void DecCu::xDeriveCUMV( CodingUnit &cu )
#if JVET_L0054_MMVD
if (pu.mmvdMergeFlag || pu.cu->mmvdSkip)
{
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
CHECK(pu.mhIntraFlag == true, "invalid MHIntra");
#endif
if (pu.cs->sps->getSpsNext().getUseSubPuMvp())
{
Size bufSize = g_miScaling.scale(pu.lumaSize());
......
......@@ -814,9 +814,7 @@ void HLSyntaxReader::parseSPSNext( SPSNext& spsNext, const bool usePCM )
READ_FLAG( symbol, "reserved_flag" ); if( symbol != 0 ) EXIT("Incompatible version: SPSNext reserved flag not equal to zero (bitstream was probably created with newer software version)" );
}
READ_FLAG( symbol, "mtt_enabled_flag" ); spsNext.setMTTMode ( symbol );
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
READ_FLAG( symbol, "mhintra_flag" ); spsNext.setUseMHIntra ( symbol != 0 );
#endif
READ_FLAG( symbol, "triangle_flag" ); spsNext.setUseTriangle ( symbol != 0 );
#if ENABLE_WPP_PARALLELISM
READ_FLAG( symbol, "next_dqp_enabled_flag" ); spsNext.setUseNextDQP ( symbol != 0 );
......
......@@ -1279,13 +1279,11 @@ void CABACWriter::prediction_unit( const PredictionUnit& pu )
#else
affine_flag ( *pu.cu );
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
MHIntra_flag( pu );
if ( pu.mhIntraFlag )
{
MHIntra_luma_pred_modes( *pu.cu );
}
#endif
triangle_mode( *pu.cu );
#if JVET_L0054_MMVD
if (pu.mmvdMergeFlag)
......@@ -1699,7 +1697,6 @@ void CABACWriter::mvp_flag( const PredictionUnit& pu, RefPicList eRefList )
DTRACE( g_trace_ctx, D_SYNTAX, "mvpIdx(refList:%d)=%d\n", eRefList, pu.mvpIdx[eRefList] );
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void CABACWriter::MHIntra_flag(const PredictionUnit& pu)
{
if (!pu.cs->sps->getSpsNext().getUseMHIntra())
......@@ -1792,7 +1789,6 @@ void CABACWriter::MHIntra_luma_pred_modes(const CodingUnit& cu)
pu = pu->next;
}
}
#endif
void CABACWriter::triangle_mode( const CodingUnit& cu )
{
......
......@@ -130,10 +130,8 @@ public:
void ref_idx ( const PredictionUnit& pu, RefPicList eRefList );
void mvp_flag ( const PredictionUnit& pu, RefPicList eRefList );
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void MHIntra_flag ( const PredictionUnit& pu );
void MHIntra_luma_pred_modes ( const CodingUnit& cu );
#endif
void triangle_mode ( const CodingUnit& cu );
// pcm samples (clause 7.3.8.7)
......
......@@ -238,9 +238,7 @@ protected:
int m_LadfIntervalLowerBound[MAX_LADF_INTERVALS];
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
bool m_MHIntra;
#endif
bool m_Triangle;
#if JVET_L0293_CPR
......@@ -755,10 +753,8 @@ public:
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
void setUseMHIntra ( bool b ) { m_MHIntra = b; }
bool getUseMHIntra () const { return m_MHIntra; }
#endif
void setUseTriangle ( bool b ) { m_Triangle = b; }
bool getUseTriangle () const { return m_Triangle; }
......
This diff is collapsed.
......@@ -120,9 +120,7 @@ private:
EncModeCtrl *m_modeCtrl;
#if JVET_L0054_MMVD
PelStorage m_acMergeBuffer[MMVD_MRG_MAX_RD_BUF_NUM];
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
PelStorage m_acRealMergeBuffer[MRG_MAX_NUM_CANDS];
#endif
#else
PelStorage m_acMergeBuffer[MRG_MAX_NUM_CANDS];
#endif
......
......@@ -899,9 +899,7 @@ void EncLib::xInitSPS(SPS &sps)
}
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
sps.getSpsNext().setUseMHIntra ( m_MHIntra );
#endif
sps.getSpsNext().setUseTriangle ( m_Triangle );
#if JVET_L0293_CPR
......
......@@ -276,9 +276,7 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner )
const TempCtx ctxStart ( m_CtxCache, m_CABACEstimator->getCtx() );
const TempCtx ctxStartIntraMode ( m_CtxCache, SubCtx( Ctx::IPredMode[CHANNEL_TYPE_LUMA], m_CABACEstimator->getCtx() ) );
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
const TempCtx ctxStartMHIntraMode ( m_CtxCache, SubCtx( Ctx::MHIntraPredMode, m_CABACEstimator->getCtx() ) );
#endif
#if JVET_L0283_MULTI_REF_LINE
const TempCtx ctxStartMrlIdx ( m_CtxCache, SubCtx( Ctx::MultiRefLineIdx, m_CABACEstimator->getCtx() ) );
#endif
......@@ -405,9 +403,7 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner )
// NB xFracModeBitsIntra will not affect the mode for chroma that may have already been pre-estimated.
m_CABACEstimator->getCtx() = SubCtx( Ctx::IPredMode[CHANNEL_TYPE_LUMA], ctxStartIntraMode );
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
m_CABACEstimator->getCtx() = SubCtx( Ctx::MHIntraPredMode, ctxStartMHIntraMode );
#endif
#if JVET_L0283_MULTI_REF_LINE
m_CABACEstimator->getCtx() = SubCtx( Ctx::MultiRefLineIdx, ctxStartMrlIdx );
#endif
......@@ -469,9 +465,7 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner )
// NB xFracModeBitsIntra will not affect the mode for chroma that may have already been pre-estimated.
m_CABACEstimator->getCtx() = SubCtx( Ctx::IPredMode[CHANNEL_TYPE_LUMA], ctxStartIntraMode );
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
m_CABACEstimator->getCtx() = SubCtx( Ctx::MHIntraPredMode, ctxStartMHIntraMode );
#endif
#if JVET_L0283_MULTI_REF_LINE
m_CABACEstimator->getCtx() = SubCtx( Ctx::MultiRefLineIdx, ctxStartMrlIdx );
#endif
......@@ -529,9 +523,7 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner )
// NB xFracModeBitsIntra will not affect the mode for chroma that may have already been pre-estimated.
m_CABACEstimator->getCtx() = SubCtx( Ctx::IPredMode[CHANNEL_TYPE_LUMA], ctxStartIntraMode );
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
m_CABACEstimator->getCtx() = SubCtx( Ctx::MHIntraPredMode, ctxStartMHIntraMode );
#endif
#if JVET_L0283_MULTI_REF_LINE
m_CABACEstimator->getCtx() = SubCtx( Ctx::MultiRefLineIdx, ctxStartMrlIdx );
#endif
......@@ -657,9 +649,7 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner )
//===== reset context models =====
m_CABACEstimator->getCtx() = SubCtx( Ctx::IPredMode[CHANNEL_TYPE_LUMA], ctxStartIntraMode );
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
m_CABACEstimator->getCtx() = SubCtx( Ctx::MHIntraPredMode, ctxStartMHIntraMode );
#endif
#if JVET_L0283_MULTI_REF_LINE
m_CABACEstimator->getCtx() = SubCtx( Ctx::MultiRefLineIdx, ctxStartMrlIdx );
#endif
......@@ -1907,16 +1897,13 @@ uint64_t IntraSearch::xFracModeBitsIntra(PredictionUnit &pu, const uint32_t &uiM
{
uint32_t orgMode = uiMode;
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if (!pu.mhIntraFlag)
#endif
std::swap(orgMode, pu.intraDir[chType]);
m_CABACEstimator->resetBits();
if( isLuma( chType ) )
{
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if ( pu.mhIntraFlag )
m_CABACEstimator->MHIntra_luma_pred_modes(*pu.cu);
else
......@@ -1926,21 +1913,13 @@ uint64_t IntraSearch::xFracModeBitsIntra(PredictionUnit &pu, const uint32_t &uiM
#endif
m_CABACEstimator->intra_luma_pred_mode(pu);
}
#else
#if JVET_L0283_MULTI_REF_LINE
m_CABACEstimator->extend_ref_line(pu);
#endif
m_CABACEstimator->intra_luma_pred_mode( pu );
#endif
}
else
{
m_CABACEstimator->intra_chroma_pred_mode( pu );
}
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
if ( !pu.mhIntraFlag )
#endif
std::swap(orgMode, pu.intraDir[chType]);
return m_CABACEstimator->getEstFracBits();
......
......@@ -122,9 +122,7 @@ public:
void estIntraPredLumaQT ( CodingUnit &cu, Partitioner& pm );
void estIntraPredChromaQT (CodingUnit &cu, Partitioner& pm);
void IPCMSearch (CodingStructure &cs, Partitioner& partitioner);
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
uint64_t xFracModeBitsIntra (PredictionUnit &pu, const uint32_t &uiMode, const ChannelType &compID);
#endif
protected:
......@@ -145,9 +143,6 @@ protected:
uint64_t xGetIntraFracBitsQTChroma(TransformUnit& tu, const ComponentID &compID);
void xEncCoeffQT (CodingStructure &cs, Partitioner& pm, const ComponentID &compID);
#if !JVET_L0100_MULTI_HYPOTHESIS_INTRA
uint64_t xFracModeBitsIntra (PredictionUnit &pu, const uint32_t &uiMode, const ChannelType &compID);
#endif
void xIntraCodingTUBlock (TransformUnit &tu, const ComponentID &compID, const bool &checkCrossCPrediction, Distortion& ruiDist, const int &default0Save1Load2 = 0, uint32_t* numSig = nullptr );
......
......@@ -555,9 +555,7 @@ void HLSWriter::codeSPSNext( const SPSNext& spsNext, const bool usePCM )
}
WRITE_FLAG( spsNext.getMTTEnabled() ? 1 : 0, "mtt_enabled_flag" );
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
WRITE_FLAG( spsNext.getUseMHIntra() ? 1 : 0, "mhintra_flag" );
#endif
WRITE_FLAG( spsNext.getUseTriangle() ? 1: 0, "triangle_flag" );
#if ENABLE_WPP_PARALLELISM
WRITE_FLAG( spsNext.getUseNextDQP(), "next_dqp_enabled_flag" );
......
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