Commit 39a17a6b authored by Frank Bossen's avatar Frank Bossen
Browse files

Merge branch 'JVET-O0050' into 'master'

JVET-O0050: avoid small intra prediction with a local dual-tree technique

See merge request jvet/VVCSoftware_VTM!757
parents adca2315 c374fb74
......@@ -141,6 +141,7 @@ ISPFast : 0
FastMrg : 1
AMaxBT : 1
FastMIP : 0
FastLocalDualTree : 1
# Encoder optimization tools
AffineAmvrEncOpt : 0
......
......@@ -145,6 +145,7 @@ ISPFast : 0
FastMrg : 1
AMaxBT : 1
FastMIP : 0
FastLocalDualTree : 1
# Encoder optimization tools
AffineAmvrEncOpt : 0
......
......@@ -164,6 +164,7 @@ FastMrg : 1
AMaxBT : 1
FastMIP : 0
FastLFNST : 0
FastLocalDualTree : 0
# Encoder optimization tools
AffineAmvrEncOpt : 1
......
......@@ -357,6 +357,9 @@ void EncApp::xInitLibCfg()
#endif
m_cEncLib.setUseMIP ( m_MIP );
m_cEncLib.setUseFastMIP ( m_useFastMIP );
#if JVET_O0050_LOCAL_DUAL_TREE
m_cEncLib.setUseFastLocalDualTree ( m_useFastLocalDualTree );
#endif
m_cEncLib.setCrossComponentPredictionEnabledFlag ( m_crossComponentPredictionEnabledFlag );
m_cEncLib.setUseReconBasedCrossCPredictionEstimate ( m_reconBasedCrossCPredictionEstimate );
m_cEncLib.setLog2SaoOffsetScale ( CHANNEL_TYPE_LUMA , m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA] );
......
......@@ -968,6 +968,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
#endif
("MIP", m_MIP, true, "Enable MIP (matrix-based intra prediction)")
("FastMIP", m_useFastMIP, false, "Fast encoder search for MIP (matrix-based intra prediction)")
#if JVET_O0050_LOCAL_DUAL_TREE
("FastLocalDualTree", m_useFastLocalDualTree, false, "Fast intra pass coding for local dual-tree in intra coding region (SCIPU)")
#endif
// Unit definition parameters
("MaxCUWidth", m_uiMaxCUWidth, 64u)
("MaxCUHeight", m_uiMaxCUHeight, 64u)
......@@ -3572,6 +3575,9 @@ void EncAppCfg::xPrintParameter()
msg( VERBOSE, "MaxNumAlfAlternativesChroma:%d ", m_maxNumAlfAlternativesChroma );
#endif
if( m_MIP ) msg(VERBOSE, "FastMIP:%d ", m_useFastMIP);
#if JVET_O0050_LOCAL_DUAL_TREE
msg( VERBOSE, "FastLocalDualTree:%d ", m_useFastLocalDualTree );
#endif
msg( VERBOSE, "NumSplitThreads:%d ", m_numSplitThreads );
if( m_numSplitThreads > 1 )
......
......@@ -345,6 +345,9 @@ protected:
#endif
bool m_MIP;
bool m_useFastMIP;
#if JVET_O0050_LOCAL_DUAL_TREE
bool m_useFastLocalDualTree;
#endif
int m_numSplitThreads;
......
......@@ -1107,10 +1107,13 @@ void AdaptiveLoopFilter::filterBlk(AlfClassifier** classifier, const PelUnitBuf
for( blkX=0; blkX<4; blkX+=2 )
{
Position pos(j + blkDst.x + blkX, i + blkDst.y + blkY);
#if JVET_O0090_ALF_CHROMA_FILTER_ALTERNATIVES_CTB
#if JVET_O0090_ALF_CHROMA_FILTER_ALTERNATIVES_CTB && !JVET_O0050_LOCAL_DUAL_TREE
const CodingUnit* cu = isDualTree ? cs.getCU(pos, CH_C) : cs.getCU(recalcPosition(nChromaFormat, CH_C, CH_L, pos), CH_L);
#else
CodingUnit* cu = isDualTree ? cs.getCU(pos, CH_C) : cs.getCU(recalcPosition(nChromaFormat, CH_C, CH_L, pos), CH_L);
#endif
#if JVET_O0050_LOCAL_DUAL_TREE
cu = cu->isSepTree() ? cs.getCU( pos, CH_C ) : cu;
#endif
*flags++ = cu->ipcm ? 1 : 0;
}
......
......@@ -96,7 +96,10 @@ CodingStructure::CodingStructure(CUCache& cuCache, PUCache& puCache, TUCache& tu
m_motionBuf = nullptr;
features.resize( NUM_ENC_FEATURES );
#if JVET_O0050_LOCAL_DUAL_TREE
treeType = TREE_D;
modeType = MODE_TYPE_ALL;
#endif
}
void CodingStructure::destroy()
......@@ -193,14 +196,99 @@ void CodingStructure::setDecomp(const UnitArea &_area, const bool _isCoded /*= t
}
}
#if JVET_O0050_LOCAL_DUAL_TREE
const int CodingStructure::signalModeCons( const PartSplit split, Partitioner &partitioner, const ModeType modeTypeParent ) const
{
if( CS::isDualITree( *this ) || modeTypeParent != MODE_TYPE_ALL )
return LDT_MODE_TYPE_INHERIT;
int width = partitioner.currArea().lwidth();
int height = partitioner.currArea().lheight();
if( width * height == 64 )
{
if( split == CU_QUAD_SPLIT || split == CU_TRIH_SPLIT || split == CU_TRIV_SPLIT ) // qt or tt
return LDT_MODE_TYPE_INFER; //only intra mode allowed for child nodes (have 4x4)
else // bt
return slice->isIntra() ? LDT_MODE_TYPE_INFER : LDT_MODE_TYPE_SIGNAL;
}
else if( width * height == 128 )
{
if( split == CU_TRIH_SPLIT || split == CU_TRIV_SPLIT ) // tt
return slice->isIntra() ? LDT_MODE_TYPE_INFER : LDT_MODE_TYPE_SIGNAL;
else // bt
return LDT_MODE_TYPE_INHERIT;
}
else
{
return LDT_MODE_TYPE_INHERIT;
}
}
void CodingStructure::clearCuPuTuIdxMap( const UnitArea &_area, uint32_t numCu, uint32_t numPu, uint32_t numTu, uint32_t* pOffset )
{
UnitArea clippedArea = clipArea( _area, *picture );
uint32_t numCh = ::getNumberValidChannels( _area.chromaFormat );
for( uint32_t i = 0; i < numCh; i++ )
{
const CompArea &_selfBlk = area.blocks[i];
const CompArea &_blk = clippedArea.blocks[i];
const UnitScale& scale = unitScale[_blk.compID];
const Area scaledSelf = scale.scale( _selfBlk );
const Area scaledBlk = scale.scale( _blk );
const size_t offset = rsAddr( scaledBlk.pos(), scaledSelf.pos(), scaledSelf.width );
unsigned *idxPtrCU = m_cuIdx[i] + offset;
AreaBuf<uint32_t>( idxPtrCU, scaledSelf.width, scaledBlk.size() ).fill( 0 );
unsigned *idxPtrPU = m_puIdx[i] + offset;
AreaBuf<uint32_t>( idxPtrPU, scaledSelf.width, scaledBlk.size() ).fill( 0 );
unsigned *idxPtrTU = m_tuIdx[i] + offset;
AreaBuf<uint32_t>( idxPtrTU, scaledSelf.width, scaledBlk.size() ).fill( 0 );
}
//pop cu/pu/tus
for( int i = m_numTUs; i > numTu; i-- )
{
m_tuCache.cache( tus.back() );
tus.pop_back();
m_numTUs--;
}
for( int i = m_numPUs; i > numPu; i-- )
{
m_puCache.cache( pus.back() );
pus.pop_back();
m_numPUs--;
}
for( int i = m_numCUs; i > numCu; i-- )
{
m_cuCache.cache( cus.back() );
cus.pop_back();
m_numCUs--;
}
for( int i = 0; i < 3; i++ )
{
m_offsets[i] = pOffset[i];
}
}
#endif
CodingUnit* CodingStructure::getCU( const Position &pos, const ChannelType effChType )
{
const CompArea &_blk = area.blocks[effChType];
#if JVET_O0050_LOCAL_DUAL_TREE
if( !_blk.contains( pos ) || (treeType == TREE_C && effChType == CHANNEL_TYPE_LUMA) )
#else
if( !_blk.contains( pos ) )
#endif
{
#if JVET_O0050_LOCAL_DUAL_TREE
if( treeType == TREE_C && effChType == CHANNEL_TYPE_LUMA )
CHECK( parent->treeType != TREE_D, "wrong parent treeType " );
#endif
if( parent ) return parent->getCU( pos, effChType );
else return nullptr;
}
......@@ -217,8 +305,16 @@ const CodingUnit* CodingStructure::getCU( const Position &pos, const ChannelType
{
const CompArea &_blk = area.blocks[effChType];
#if JVET_O0050_LOCAL_DUAL_TREE
if( !_blk.contains( pos ) || (treeType == TREE_C && effChType == CHANNEL_TYPE_LUMA) )
#else
if( !_blk.contains( pos ) )
#endif
{
#if JVET_O0050_LOCAL_DUAL_TREE
if( treeType == TREE_C && effChType == CHANNEL_TYPE_LUMA )
CHECK( parent->treeType != TREE_D, "wrong parent treeType" );
#endif
if( parent ) return parent->getCU( pos, effChType );
else return nullptr;
}
......@@ -299,6 +395,10 @@ TransformUnit* CodingStructure::getTU( const Position &pos, const ChannelType ef
while( !tus[idx - 1 + extraIdx]->blocks[getFirstComponentOfChannel( effChType )].contains( pos ) )
{
extraIdx++;
#if JVET_O0050_LOCAL_DUAL_TREE
CHECK( tus[idx - 1 + extraIdx]->cu->treeType == TREE_C, "tu searched by position points to a chroma tree CU" );
CHECK( extraIdx > 3, "extraIdx > 3" );
#endif
}
}
}
......@@ -340,6 +440,10 @@ const TransformUnit * CodingStructure::getTU( const Position &pos, const Channel
while ( !tus[idx - 1 + extraIdx]->blocks[getFirstComponentOfChannel( effChType )].contains(pos) )
{
extraIdx++;
#if JVET_O0050_LOCAL_DUAL_TREE
CHECK( tus[idx - 1 + extraIdx]->cu->treeType == TREE_C, "tu searched by position points to a chroma tree CU" );
CHECK( extraIdx > 3, "extraIdx > 3" );
#endif
}
}
}
......@@ -365,6 +469,10 @@ CodingUnit& CodingStructure::addCU( const UnitArea &unit, const ChannelType chTy
cu->firstTU = nullptr;
cu->lastTU = nullptr;
cu->chType = chType;
#if JVET_O0050_LOCAL_DUAL_TREE
cu->treeType = treeType;
cu->modeType = modeType;
#endif
CodingUnit *prevCU = m_numCUs > 0 ? cus.back() : nullptr;
......@@ -573,8 +681,45 @@ CUTraverser CodingStructure::traverseCUs( const UnitArea& unit, const ChannelTyp
{
CodingUnit* firstCU = getCU( isLuma( effChType ) ? unit.lumaPos() : unit.chromaPos(), effChType );
CodingUnit* lastCU = firstCU;
#if JVET_O0050_LOCAL_DUAL_TREE
if( !CS::isDualITree( *this ) ) //for a more generalized separate tree
{
bool bContinue = true;
CodingUnit* currCU = firstCU;
while( bContinue )
{
if( currCU == nullptr )
{
bContinue = false;
lastCU = currCU;
}
else if( currCU->chType != effChType )
{
lastCU = currCU;
currCU = currCU->next;
}
else
{
if( unit.contains( *currCU ) )
{
lastCU = currCU;
currCU = currCU->next;
}
else
{
bContinue = false;
lastCU = currCU;
}
}
}
}
else
{
#endif
do { } while( lastCU && ( lastCU = lastCU->next ) && unit.contains( *lastCU ) );
#if JVET_O0050_LOCAL_DUAL_TREE
}
#endif
return CUTraverser( firstCU, lastCU );
}
......@@ -876,6 +1021,11 @@ void CodingStructure::initSubStructure( CodingStructure& subStruct, const Channe
subStruct.prevPLT = prevPLT;
#endif
#if JVET_O0050_LOCAL_DUAL_TREE
subStruct.treeType = treeType;
subStruct.modeType = modeType;
#endif
subStruct.initStructData( currQP[_chType], isLossless );
if( isTuEnc )
......@@ -968,8 +1118,11 @@ void CodingStructure::useSubStructure( const CodingStructure& subStruct, const C
{
// add an analogue CU into own CU store
const UnitArea &cuPatch = *pcu;
#if JVET_O0050_LOCAL_DUAL_TREE
CodingUnit &cu = addCU( cuPatch, pcu->chType );
#else
CodingUnit &cu = addCU( cuPatch, chType );
#endif
// copy the CU info from subPatch
cu = *pcu;
......@@ -987,8 +1140,11 @@ void CodingStructure::useSubStructure( const CodingStructure& subStruct, const C
{
// add an analogue PU into own PU store
const UnitArea &puPatch = *ppu;
#if JVET_O0050_LOCAL_DUAL_TREE
PredictionUnit &pu = addPU( puPatch, ppu->chType );
#else
PredictionUnit &pu = addPU( puPatch, chType );
#endif
// copy the PU info from subPatch
pu = *ppu;
......@@ -999,8 +1155,11 @@ void CodingStructure::useSubStructure( const CodingStructure& subStruct, const C
{
// add an analogue TU into own TU store
const UnitArea &tuPatch = *ptu;
#if JVET_O0050_LOCAL_DUAL_TREE
TransformUnit &tu = addTU( tuPatch, ptu->chType );
#else
TransformUnit &tu = addTU( tuPatch, chType );
#endif
// copy the TU info from subPatch
tu = *ptu;
......@@ -1032,8 +1191,11 @@ void CodingStructure::useSubStructure( const CodingStructure& subStruct, const C
{
// add an analogue CU into own CU store
const UnitArea &cuPatch = *pcu;
#if JVET_O0050_LOCAL_DUAL_TREE
CodingUnit &cu = addCU( cuPatch, pcu->chType );
#else
CodingUnit &cu = addCU( cuPatch, chType );
#endif
// copy the CU info from subPatch
cu = *pcu;
......@@ -1051,8 +1213,11 @@ void CodingStructure::useSubStructure( const CodingStructure& subStruct, const C
{
// add an analogue PU into own PU store
const UnitArea &puPatch = *ppu;
#if JVET_O0050_LOCAL_DUAL_TREE
PredictionUnit &pu = addPU( puPatch, ppu->chType );
#else
PredictionUnit &pu = addPU( puPatch, chType );
#endif
// copy the PU info from subPatch
pu = *ppu;
......@@ -1063,8 +1228,11 @@ void CodingStructure::useSubStructure( const CodingStructure& subStruct, const C
{
// add an analogue TU into own TU store
const UnitArea &tuPatch = *ptu;
#if JVET_O0050_LOCAL_DUAL_TREE
TransformUnit &tu = addTU( tuPatch, ptu->chType );
#else
TransformUnit &tu = addTU( tuPatch, chType );
#endif
// copy the TU info from subPatch
tu = *ptu;
......@@ -1519,7 +1687,11 @@ IbcLumaCoverage CodingStructure::getIbcLumaCoverage(const CompArea& chromaArea)
for (SizeType x = 0; x < lumaArea.width; x += MIN_PU_SIZE)
{
Position pos = lumaArea.offset(x, y);
#if JVET_O0050_LOCAL_DUAL_TREE
if (picture->cs->getMotionInfo(pos).isInter && picture->cs->getMotionInfo(pos).isIBCmot)
#else
if (picture->cs->getMotionInfo(pos).isInter) // need to change if inter slice allows dualtree
#endif
{
ibcArea += unitAreaSubBlock;
}
......
......@@ -175,6 +175,10 @@ public:
uint64_t fracBits;
Distortion dist;
Distortion interHad;
#if JVET_O0050_LOCAL_DUAL_TREE
TreeType treeType; //because partitioner can not go deep to tu and cu coding (e.g., addCU()), need another variable for indicating treeType
ModeType modeType;
#endif
void initStructData (const int &QP = MAX_INT, const bool &_isLosses = false, const bool &skipMotBuf = false);
void initSubStructure( CodingStructure& cs, const ChannelType chType, const UnitArea &subArea, const bool &isTuEnc);
......@@ -186,6 +190,15 @@ public:
void clearTUs();
void clearPUs();
void clearCUs();
#if JVET_O0050_LOCAL_DUAL_TREE
const int signalModeCons( const PartSplit split, Partitioner &partitioner, const ModeType modeTypeParent ) const;
void clearCuPuTuIdxMap ( const UnitArea &_area, uint32_t numCu, uint32_t numPu, uint32_t numTu, uint32_t* pOffset );
void getNumCuPuTuOffset ( uint32_t* pArray )
{
pArray[0] = m_numCUs; pArray[1] = m_numPUs; pArray[2] = m_numTUs;
pArray[3] = m_offsets[0]; pArray[4] = m_offsets[1]; pArray[5] = m_offsets[2];
}
#endif
private:
......
......@@ -480,6 +480,13 @@ static const int SBT_MAX_SIZE = 64; ///< maxi
static const int SBT_NUM_SL = 10; ///< maximum number of historical PU decision saved for a CU
static const int SBT_NUM_RDO = 2; ///< maximum number of SBT mode tried for a PU
#if JVET_O0050_LOCAL_DUAL_TREE
static const int NUM_INTER_CU_INFO_SAVE = 8; ///< maximum number of inter cu information saved for fast algorithm
static const int LDT_MODE_TYPE_INHERIT = 0; ///< No need to signal mode_constraint_flag, and the modeType of the region is inherited from its parent node
static const int LDT_MODE_TYPE_INFER = 1; ///< No need to signal mode_constraint_flag, and the modeType of the region is inferred as MODE_TYPE_INTRA
static const int LDT_MODE_TYPE_SIGNAL = 2; ///< Need to signal mode_constraint_flag, and the modeType of the region is determined by the flag
#endif
static const int IBC_MAX_CAND_SIZE = 16; // max block size for ibc search
static const int IBC_NUM_CANDIDATES = 64; ///< Maximum number of candidates to store/test
static const int CHROMA_REFINEMENT_CANDIDATES = 8; /// 8 candidates BV to choose from
......
......@@ -134,7 +134,21 @@ void CoeffCodingContext::initSubblock( int SubsetId, bool sigGroupFlag )
}
#if JVET_O0050_LOCAL_DUAL_TREE
unsigned DeriveCtx::CtxModeConsFlag( const CodingStructure& cs, Partitioner& partitioner )
{
assert( partitioner.chType == CHANNEL_TYPE_LUMA );
const Position pos = partitioner.currArea().blocks[partitioner.chType];
const unsigned curSliceIdx = cs.slice->getIndependentSliceIdx();
const unsigned curTileIdx = cs.picture->brickMap->getBrickIdxRsMap( partitioner.currArea().lumaPos() );
const CodingUnit* cuLeft = cs.getCURestricted( pos.offset( -1, 0 ), pos, curSliceIdx, curTileIdx, partitioner.chType );
const CodingUnit* cuAbove = cs.getCURestricted( pos.offset( 0, -1 ), pos, curSliceIdx, curTileIdx, partitioner.chType );
unsigned ctxId = ((cuAbove && cuAbove->predMode == MODE_INTRA) || (cuLeft && cuLeft->predMode == MODE_INTRA)) ? 1 : 0;
return ctxId;
}
#endif
void DeriveCtx::CtxSplit( const CodingStructure& cs, Partitioner& partitioner, unsigned& ctxSpl, unsigned& ctxQt, unsigned& ctxHv, unsigned& ctxHorBt, unsigned& ctxVerBt, bool* _canSplit /*= nullptr */ )
......
......@@ -543,6 +543,9 @@ public:
namespace DeriveCtx
{
void CtxSplit ( const CodingStructure& cs, Partitioner& partitioner, unsigned& ctxSpl, unsigned& ctxQt, unsigned& ctxHv, unsigned& ctxHorBt, unsigned& ctxVerBt, bool* canSplit = nullptr );
#if JVET_O0050_LOCAL_DUAL_TREE
unsigned CtxModeConsFlag( const CodingStructure& cs, Partitioner& partitioner );
#endif
#if JVET_O0193_REMOVE_TR_DEPTH_IN_CBF_CTX
unsigned CtxQtCbf ( const ComponentID compID, const bool prevCbf = false, const int ispIdx = 0 );
#else
......
......@@ -240,6 +240,16 @@ const CtxSet ContextSetCfg::Split12Flag = ContextSetCfg::addCtxSet
{ 12, 12, 12, 12, },
});
#if JVET_O0050_LOCAL_DUAL_TREE
const CtxSet ContextSetCfg::ModeConsFlag = ContextSetCfg::addCtxSet
({
{ 192, 168, },
{ 179, 139, },
{ CNU, CNU, },
{ 5, 2, },
});
#endif
const CtxSet ContextSetCfg::SkipFlag = ContextSetCfg::addCtxSet
({
{ 197, 214, 216, },
......
......@@ -201,6 +201,9 @@ public:
static const CtxSet SplitQtFlag;
static const CtxSet SplitHvFlag;
static const CtxSet Split12Flag;
#if JVET_O0050_LOCAL_DUAL_TREE
static const CtxSet ModeConsFlag;
#endif
static const CtxSet SkipFlag;
static const CtxSet MergeFlag;
static const CtxSet RegularMergeFlag;
......
......@@ -724,7 +724,11 @@ unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De
}
const TransformUnit& tuQ = *cuQ.cs->getTU(posQ, cuQ.chType);
#if JVET_O0050_LOCAL_DUAL_TREE
const TransformUnit& tuP = *cuP.cs->getTU(posP, cuQ.chType); //based on chType of the current cu, because cuQ.chType and cuP.chType are not the same when local dual-tree is applied
#else
const TransformUnit& tuP = *cuP.cs->getTU(posP, cuP.chType);
#endif
const PreCalcValues& pcv = *cu.cs->pcv;
const unsigned rasterIdx = getRasterIdx( Position{ localPos.x, localPos.y }, pcv );
if (m_aapucBS[edgeDir][rasterIdx] && (cuP.firstPU->mhIntraFlag || cuQ.firstPU->mhIntraFlag))
......
......@@ -149,6 +149,7 @@
#define JVET_N0288_PROPOSAL1 1 // JVET-N0288 Proposal 1
#define JVET_O0090_ALF_CHROMA_FILTER_ALTERNATIVES_CTB 1 // JVET-O0090 test 2: CTB selection of ALF alternative chroma filters
#define JVET_O0050_LOCAL_DUAL_TREE 1 // JVET-O0050: avoid small intra chroma block by a "local dual-tree" technique
#define JVET_O0216_ALF_COEFF_EG3 1 // JVET-O0216/O0302/O0648: using EG3 for ALF coefficients coding
......@@ -459,6 +460,9 @@ typedef uint32_t Intermediate_UInt; ///< used as intermediate v
#endif
typedef uint64_t SplitSeries; ///< used to encoded the splits that caused a particular CU size
#if JVET_O0050_LOCAL_DUAL_TREE
typedef uint64_t ModeTypeSeries; ///< used to encoded the ModeType at different split depth
#endif
typedef uint64_t Distortion; ///< distortion measurement
......@@ -584,6 +588,22 @@ enum ChannelType
MAX_NUM_CHANNEL_TYPE = 2
};
#if JVET_O0050_LOCAL_DUAL_TREE
enum TreeType
{
TREE_D = 0, //default tree status (for single-tree slice, TREE_D means joint tree; for dual-tree I slice, TREE_D means TREE_L for luma and TREE_C for chroma)
TREE_L = 1, //separate tree only contains luma (may split)
TREE_C = 2, //separate tree only contains chroma (not split), to avoid small chroma block
};
enum ModeType
{
MODE_TYPE_ALL = 0, //all modes can try
MODE_TYPE_INTER = 1, //can try inter
MODE_TYPE_INTRA = 2, //can try intra, ibc, palette
};
#endif
#define CH_L CHANNEL_TYPE_LUMA
#define CH_C CHANNEL_TYPE_CHROMA
......
......@@ -298,6 +298,11 @@ CodingUnit& CodingUnit::operator=( const CodingUnit& other )
memcpy(curPLT[idx], other.curPLT[idx], MAXPLTSIZE * sizeof(Pel));
memcpy(reuseflag[idx], other.reuseflag[idx], MAXPLTPREDSIZE * sizeof(bool));
}
#endif
#if JVET_O0050_LOCAL_DUAL_TREE
treeType = other.treeType;
modeType = other.modeType;
modeTypeSeries = other.modeTypeSeries;
#endif
return *this;
}
......@@ -348,14 +353,30 @@ void CodingUnit::initData()
memset(reuseflag[idx], false, MAXPLTPREDSIZE * sizeof(bool));
}
#endif
#if JVET_O0050_LOCAL_DUAL_TREE
treeType = TREE_D;
modeType = MODE_TYPE_ALL;
modeTypeSeries = 0;
#endif
}
#if JVET_O0050_LOCAL_DUAL_TREE
const bool CodingUnit::isSepTree() const
{
return treeType != TREE_D || CS::isDualITree( *cs );
}
#endif
#if JVET_O1124_ALLOW_CCLM_COND
const bool CodingUnit::checkCCLMAllowed() const
{
bool allowCCLM = false;
if( chType != CHANNEL_TYPE_CHROMA ) //single tree
#if JVET_O0050_LOCAL_DUAL_TREE
if( !CS::isDualITree( *cs ) ) //single tree I slice or non-I slice (Note: judging chType is no longer equivalent to checking dual-tree I slice since the local dual-tree is introduced)
#else
if( chType != CHANNEL_TYPE_CHROMA ) //single tree I slice or non-I slice
#endif
{
allowCCLM = true;
}
......
......@@ -303,6 +303,11 @@ struct CodingUnit : public UnitArea
int8_t chromaQpAdj;
int8_t qp;
SplitSeries splitSeries;
#if JVET_O0050_LOCAL_DUAL_TREE
TreeType treeType;
ModeType modeType;
ModeTypeSeries modeTypeSeries;
#endif
bool skip;