Commit 6981f879 authored by Karsten Suehring's avatar Karsten Suehring

remove macro JVET_L0124_L0208_TRIANGLE

parent 77e8c485
......@@ -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 );
......
......@@ -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);
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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 )
......
......@@ -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__
......@@ -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();
......
......@@ -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
......
......@@ -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 )
......
......@@ -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 );
......
......@@ -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
//! \}
......@@ -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__
......@@ -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
......
......@@ -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; }
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 )
{
......
......@@ -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);
......
......@@ -271,7 +271,6 @@ void CDTrace::dtrace_polygon_vector(int k, int poc, const std::vector<Position>
dtrace<false>(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<Position>& 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 */)
......
......@@ -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<BlockStatistic, std::tuple<std::string, BlockStatisticType
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
{ BlockStatistic::MHIntraFlag, std::tuple<std::string, BlockStatisticType, std::string>{"MHIntraFlag", BlockStatisticType::Flag, ""}},
#endif
#if JVET_L0124_L0208_TRIANGLE
{ 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"}},
{ BlockStatistic::TriangleMVL1, std::tuple<std::string, BlockStatisticType, std::string>{"TriangleMVL1", BlockStatisticType::VectorPolygon, "Scale: 4"}},
#endif
#if JVET_L0646_GBI
{ BlockStatistic::GBIIndex, std::tuple<std::string, BlockStatisticType, std::string>{"GBIIndex", BlockStatisticType::Integer, "[0, 4]"}},
#endif
......
......@@ -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
......
......@@ -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 );
......
......@@ -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
}
......
......@@ -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
};
//! \}
......
......@@ -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
......
......@@ -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
......
......@@ -134,9 +134,7 @@ public:
void MHIntra_flag ( const PredictionUnit& pu );
void MHIntra_luma_pred_modes ( const CodingUnit& cu );