Commit 45a53f22 authored by Karsten Suehring's avatar Karsten Suehring

remove SPSNext extension and sort SPS

- all elements of SPSNext are moved into SPS
- syntax elements of SPS are sorted according to draft (as far as possible)
- comments were added where software and draft diverge
parent afd7ed42
......@@ -349,7 +349,7 @@ unsigned DeriveCtx::CtxQtCbf( const ComponentID compID, const unsigned trDepth,
unsigned DeriveCtx::CtxInterDir( const PredictionUnit& pu )
{
if( pu.cs->sps->getSpsNext().getUseLargeCTU() )
if( pu.cs->sps->getUseLargeCTU() )
{
return Clip3( 0, 3, 7 - ( ( g_aucLog2[pu.lumaSize().width] + g_aucLog2[pu.lumaSize().height] + 1 ) >> 1 ) ); // VG-ASYMM DONE
}
......
......@@ -516,7 +516,7 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred)
}
#endif
if (pu.cu->cs->sps->getSpsNext().getUseGBi() && bioApplied && pu.cu->GBiIdx != GBI_DEFAULT)
if (pu.cu->cs->sps->getUseGBi() && bioApplied && pu.cu->GBiIdx != GBI_DEFAULT)
{
bioApplied = false;
}
......
......@@ -1639,7 +1639,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom
}
}
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
else if( pu.cs->sps->getSpsNext().getCclmCollocatedChromaFlag() )
else if( pu.cs->sps->getCclmCollocatedChromaFlag() )
{
piSrc = pRecSrc0 - iRecStride2;
......@@ -1686,7 +1686,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom
for (int j = 0; j < uiCHeight + addedLeftBelow; j++)
{
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
if( pu.cs->sps->getSpsNext().getCclmCollocatedChromaFlag() )
if( pu.cs->sps->getCclmCollocatedChromaFlag() )
{
if( j == 0 && !bAboveAvaillable )
{
......@@ -1722,7 +1722,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom
for( int i = 0; i < uiCWidth; i++ )
{
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
if( pu.cs->sps->getSpsNext().getCclmCollocatedChromaFlag() )
if( pu.cs->sps->getCclmCollocatedChromaFlag() )
{
if( i == 0 && !bLeftAvaillable )
{
......
......@@ -696,7 +696,7 @@ unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De
void LoopFilter::deriveLADFShift( const Pel* src, const int stride, int& shift, const DeblockEdgeDir edgeDir, const SPS sps )
{
uint32_t lumaLevel = 0;
shift = sps.getSpsNext().getLadfQpOffset(0);
shift = sps.getLadfQpOffset(0);
if (edgeDir == EDGE_VER)
{
......@@ -707,12 +707,12 @@ void LoopFilter::deriveLADFShift( const Pel* src, const int stride, int& shift,
lumaLevel = (src[0] + src[3] + src[-stride] + src[-stride + 3]) >> 2;
}
for ( int k = 1; k < sps.getSpsNext().getLadfNumIntervals(); k++ )
for ( int k = 1; k < sps.getLadfNumIntervals(); k++ )
{
const int th = sps.getSpsNext().getLadfIntervalLowerBound( k );
const int th = sps.getLadfIntervalLowerBound( k );
if ( lumaLevel > th )
{
shift = sps.getSpsNext().getLadfQpOffset( k );
shift = sps.getLadfQpOffset( k );
}
else
{
......@@ -816,7 +816,7 @@ void LoopFilter::xEdgeFilterLuma(const CodingUnit& cu, const DeblockEdgeDir edge
iQP = (cuP.qp + cuQ.qp + 1) >> 1;
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
if ( sps.getSpsNext().getLadfEnabled() )
if ( sps.getLadfEnabled() )
{
int iShift = 0;
deriveLADFShift( piTmpSrc + iSrcStep * (iIdx*pelsInPart), iStride, iShift, edgeDir, sps );
......
......@@ -451,7 +451,7 @@ void Slice::setRefPicList( PicList& rcListPic, bool checkNumPocTotalCurr, bool b
}
}
#if JVET_M0483_IBC==0
if (getSPS()->getSpsNext().getIBCMode())
if (getSPS()->getIBCMode())
{
RefPicSetLtCurr[NumPicLtCurr] = getPic();
//getPic()->setIsLongTerm(true);
......@@ -472,7 +472,7 @@ void Slice::setRefPicList( PicList& rcListPic, bool checkNumPocTotalCurr, bool b
if (getRapPicFlag())
{
#if JVET_M0483_IBC==0
if (getSPS()->getSpsNext().getIBCMode())
if (getSPS()->getIBCMode())
{
CHECK(numPicTotalCurr != 1, "Invalid state");
}
......@@ -549,7 +549,7 @@ void Slice::setRefPicList( PicList& rcListPic, bool checkNumPocTotalCurr, bool b
}
}
#if JVET_M0483_IBC==0
if (getSPS()->getSpsNext().getIBCMode())
if (getSPS()->getIBCMode())
{
m_apcRefPicList[REF_PIC_LIST_0][m_aiNumRefIdx[REF_PIC_LIST_0] - 1] = getPic();
m_bIsUsedAsLongTerm[REF_PIC_LIST_0][m_aiNumRefIdx[REF_PIC_LIST_0] - 1] = true;
......@@ -588,7 +588,7 @@ int Slice::getNumRpsCurrTempList() const
#if JVET_M0483_IBC
if (getSPS()->getIBCFlag())
#else
if (getSPS()->getSpsNext().getIBCMode())
if (getSPS()->getIBCMode())
#endif
{
return numRpsCurrTempList + 1;
......@@ -1883,51 +1883,6 @@ SPSRExt::SPSRExt()
}
SPSNext::SPSNext( SPS& sps )
: m_SPS ( sps )
, m_NextEnabled ( false )
// disable all tool enabling flags by default
, m_LargeCTU ( false )
, m_IMV ( false )
, m_DisableMotionCompression ( false )
, m_LMChroma ( false )
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
, m_cclmCollocatedChromaFlag ( false )
#endif
#if JVET_M0464_UNI_MTS
, m_IntraMTS ( false )
, m_InterMTS ( false )
#else
, m_IntraEMT ( false )
, m_InterEMT ( false )
#endif
, m_Affine ( false )
, m_AffineType ( false )
, m_MTTEnabled ( false )
, m_MHIntra ( false )
, m_Triangle ( false )
#if ENABLE_WPP_PARALLELISM
, m_NextDQP ( false )
#endif
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
, m_LadfEnabled ( false )
, m_LadfNumIntervals ( 0 )
, m_LadfQpOffset { 0 }
, m_LadfIntervalLowerBound { 0 }
#endif
// default values for additional parameters
, m_ImvMode ( IMV_OFF )
, m_MTTMode ( 0 )
, m_compositeRefEnabled ( false )
#if !JVET_M0483_IBC
, m_IBCMode ( 0 )
#endif
// ADD_NEW_TOOL : (sps extension) add tool enabling flags here (with "false" as default values)
{
}
SPS::SPS()
: m_SPSId ( 0)
, m_bIntraOnlyConstraintFlag (false)
......@@ -2003,7 +1958,6 @@ SPS::SPS()
#endif
, m_vuiParametersPresentFlag (false)
, m_vuiParameters ()
, m_spsNextExtension (*this)
, m_wrapAroundEnabledFlag (false)
, m_wrapAroundOffset ( 0)
#if JVET_M0483_IBC
......@@ -2012,6 +1966,44 @@ SPS::SPS()
#if JVET_M0427_INLOOP_RESHAPER
, m_lumaReshapeEnable (false)
#endif
// KJS: BEGIN former SPSNext parameters
, m_LargeCTU ( false )
, m_IMV ( false )
, m_DisableMotionCompression ( false )
, m_LMChroma ( false )
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
, m_cclmCollocatedChromaFlag ( false )
#endif
#if JVET_M0464_UNI_MTS
, m_IntraMTS ( false )
, m_InterMTS ( false )
#else
, m_IntraEMT ( false )
, m_InterEMT ( false )
#endif
, m_Affine ( false )
, m_AffineType ( false )
, m_MTTEnabled ( false )
, m_MHIntra ( false )
, m_Triangle ( false )
#if ENABLE_WPP_PARALLELISM
, m_NextDQP ( false )
#endif
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
, m_LadfEnabled ( false )
, m_LadfNumIntervals ( 0 )
, m_LadfQpOffset { 0 }
, m_LadfIntervalLowerBound { 0 }
#endif
// default values for additional parameters
, m_ImvMode ( IMV_OFF )
, m_MTTMode ( 0 )
, m_compositeRefEnabled ( false )
#if !JVET_M0483_IBC
, m_IBCMode ( 0 )
#endif
// KJS: END former SPSNext parameters
{
for(int ch=0; ch<MAX_NUM_CHANNEL_TYPE; ch++)
{
......
......@@ -822,151 +822,6 @@ public:
};
class SPS;
// Deprecated: SPSNext is going to be removed! Do not add any parameters to SPSNext
class SPSNext
{
private:
SPS& m_SPS;
bool m_NextEnabled;
//===== tool enabling flags (4 bytes - NOTE: last flag must be used for new extensions) =====
bool m_LargeCTU; // 5
bool m_IMV; // 9
bool m_DisableMotionCompression; // 13
bool m_LMChroma; // 17
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
bool m_cclmCollocatedChromaFlag;
#endif
#if JVET_M0303_IMPLICIT_MTS
bool m_MTS;
#endif
#if JVET_M0464_UNI_MTS
bool m_IntraMTS; // 18
bool m_InterMTS; // 19
#else
bool m_IntraEMT; // 18
bool m_InterEMT; // 19
#endif
bool m_Affine;
bool m_AffineType;
bool m_GBi; //
bool m_MTTEnabled; //
bool m_MHIntra;
bool m_Triangle;
#if ENABLE_WPP_PARALLELISM
bool m_NextDQP;
#endif
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
bool m_LadfEnabled;
int m_LadfNumIntervals;
int m_LadfQpOffset[MAX_LADF_INTERVALS];
int m_LadfIntervalLowerBound[MAX_LADF_INTERVALS];
#endif
public:
const static int NumReservedFlags = 32 - 27; /* current number of tool enabling flags */
private:
//===== additional parameters =====
// qtbt
//imv
ImvMode m_ImvMode;
// multi type tree (QTBT + triple split)
unsigned m_MTTMode;
bool m_compositeRefEnabled; //composite longterm reference
#if !JVET_M0483_IBC
unsigned m_IBCMode;
#endif
public:
SPSNext( SPS& sps );
const SPS& getSPS () const { return m_SPS; }
SPS& getSPS () { return m_SPS; }
bool nextToolsEnabled () const { return m_NextEnabled; }
void setNextToolsEnabled ( bool next ) { m_NextEnabled = next; }
//===== tool enabling flags and extension bit =====
void setUseLargeCTU ( bool b ) { m_LargeCTU = b; }
bool getUseLargeCTU () const { return m_LargeCTU; }
void setUseIMV ( bool b ) { m_IMV = b; }
bool getUseIMV () const { return m_IMV; }
void setUseAffine ( bool b ) { m_Affine = b; }
bool getUseAffine () const { return m_Affine; }
void setUseAffineType ( bool b ) { m_AffineType = b; }
bool getUseAffineType () const { return m_AffineType; }
void setDisableMotCompress ( bool b ) { m_DisableMotionCompression = b; }
bool getDisableMotCompress () const { return m_DisableMotionCompression; }
bool getMTTEnabled () const { return m_MTTEnabled; }
#if ENABLE_WPP_PARALLELISM
void setUseNextDQP ( bool b ) { m_NextDQP = b; }
bool getUseNextDQP () const { return m_NextDQP; }
#endif
void setUseLMChroma ( bool b ) { m_LMChroma = b; }
bool getUseLMChroma () const { return m_LMChroma; }
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
void setCclmCollocatedChromaFlag( bool b ) { m_cclmCollocatedChromaFlag = b; }
bool getCclmCollocatedChromaFlag() const { return m_cclmCollocatedChromaFlag; }
#endif
#if JVET_M0303_IMPLICIT_MTS
void setUseMTS ( bool b ) { m_MTS = b; }
bool getUseMTS () const { return m_MTS; }
#if JVET_M0464_UNI_MTS
bool getUseImplicitMTS () const { return m_MTS && !m_IntraMTS && !m_InterMTS; }
#else
bool getUseImplicitMTS () const { return m_MTS && !m_IntraEMT && !m_InterEMT; }
#endif
#endif
#if JVET_M0464_UNI_MTS
void setUseIntraMTS ( bool b ) { m_IntraMTS = b; }
bool getUseIntraMTS () const { return m_IntraMTS; }
void setUseInterMTS ( bool b ) { m_InterMTS = b; }
bool getUseInterMTS () const { return m_InterMTS; }
#else
void setUseIntraEMT ( bool b ) { m_IntraEMT = b; }
bool getUseIntraEMT () const { return m_IntraEMT; }
void setUseInterEMT ( bool b ) { m_InterEMT = b; }
bool getUseInterEMT () const { return m_InterEMT; }
#endif
void setUseGBi ( bool b ) { m_GBi = b; }
bool getUseGBi () const { return m_GBi; }
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
void setLadfEnabled ( bool b ) { m_LadfEnabled = b; }
bool getLadfEnabled () const { return m_LadfEnabled; }
void setLadfNumIntervals ( int i ) { m_LadfNumIntervals = i; }
int getLadfNumIntervals () const { return m_LadfNumIntervals; }
void setLadfQpOffset ( int value, int idx ) { m_LadfQpOffset[ idx ] = value; }
int getLadfQpOffset ( int idx ) const { return m_LadfQpOffset[ idx ]; }
void setLadfIntervalLowerBound( int value, int idx ) { m_LadfIntervalLowerBound[ idx ] = value; }
int getLadfIntervalLowerBound( int idx ) const { return m_LadfIntervalLowerBound[ idx ]; }
#endif
//===== additional parameters =====
// qtbt
// sub pu tmvp
void setImvMode(ImvMode m) { m_ImvMode = m; m_IMV = m != 0; }
ImvMode getImvMode () const { return m_ImvMode; }
// multi type tree
unsigned getMTTMode () const { return m_MTTMode; }
void setMTTMode ( unsigned mode ) { m_MTTMode = mode; m_MTTEnabled = ( m_MTTMode != 0 ); }
void setUseCompositeRef(bool b) { m_compositeRefEnabled = b; }
bool getUseCompositeRef() const { return m_compositeRefEnabled; }
void setUseMHIntra ( bool b ) { m_MHIntra = b; }
bool getUseMHIntra () const { return m_MHIntra; }
void setUseTriangle ( bool b ) { m_Triangle = b; }
bool getUseTriangle () const { return m_Triangle; }
#if !JVET_M0483_IBC
void setIBCMode (unsigned IBCMode) { m_IBCMode = IBCMode; }
unsigned getIBCMode () const { return m_IBCMode; }
#endif
};
/// SPS class
class SPS
{
......@@ -1078,7 +933,6 @@ private:
VUI m_vuiParameters;
SPSRExt m_spsRangeExtension;
SPSNext m_spsNextExtension;
static const int m_winUnitX[NUM_CHROMA_FORMAT];
static const int m_winUnitY[NUM_CHROMA_FORMAT];
......@@ -1095,6 +949,51 @@ private:
#if JVET_M0427_INLOOP_RESHAPER
bool m_lumaReshapeEnable;
#endif
// KJS: BEGIN former SPSNext parameters
bool m_LargeCTU; // 5
bool m_IMV; // 9
bool m_DisableMotionCompression; // 13
bool m_LMChroma; // 17
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
bool m_cclmCollocatedChromaFlag;
#endif
#if JVET_M0303_IMPLICIT_MTS
bool m_MTS;
#endif
#if JVET_M0464_UNI_MTS
bool m_IntraMTS; // 18
bool m_InterMTS; // 19
#else
bool m_IntraEMT; // 18
bool m_InterEMT; // 19
#endif
bool m_Affine;
bool m_AffineType;
bool m_GBi; //
bool m_MTTEnabled; //
bool m_MHIntra;
bool m_Triangle;
#if ENABLE_WPP_PARALLELISM
bool m_NextDQP;
#endif
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
bool m_LadfEnabled;
int m_LadfNumIntervals;
int m_LadfQpOffset[MAX_LADF_INTERVALS];
int m_LadfIntervalLowerBound[MAX_LADF_INTERVALS];
#endif
//===== additional parameters =====
//imv
ImvMode m_ImvMode;
// multi type tree (QTBT + triple split)
unsigned m_MTTMode;
bool m_compositeRefEnabled; //composite longterm reference
#if !JVET_M0483_IBC
unsigned m_IBCMode;
#endif
// KJS: END former SPSNext parameters
public:
......@@ -1310,9 +1209,6 @@ public:
const SPSRExt& getSpsRangeExtension() const { return m_spsRangeExtension; }
SPSRExt& getSpsRangeExtension() { return m_spsRangeExtension; }
const SPSNext& getSpsNext() const { return m_spsNextExtension; }
SPSNext& getSpsNext() { return m_spsNextExtension; }
void setWrapAroundEnabledFlag(bool b) { m_wrapAroundEnabledFlag = b; }
bool getWrapAroundEnabledFlag() const { return m_wrapAroundEnabledFlag; }
void setWrapAroundOffset(unsigned offset) { m_wrapAroundOffset = offset; }
......@@ -1331,6 +1227,83 @@ public:
void setMaxSbtSize( uint8_t val ) { m_MaxSbtSize = val; }
uint8_t getMaxSbtSize() const { return m_MaxSbtSize; }
#endif
// KJS: BEGIN former SPSNext parameters
void setUseLargeCTU ( bool b ) { m_LargeCTU = b; }
bool getUseLargeCTU () const { return m_LargeCTU; }
void setUseIMV ( bool b ) { m_IMV = b; }
bool getUseIMV () const { return m_IMV; }
void setUseAffine ( bool b ) { m_Affine = b; }
bool getUseAffine () const { return m_Affine; }
void setUseAffineType ( bool b ) { m_AffineType = b; }
bool getUseAffineType () const { return m_AffineType; }
void setDisableMotCompress ( bool b ) { m_DisableMotionCompression = b; }
bool getDisableMotCompress () const { return m_DisableMotionCompression; }
bool getMTTEnabled () const { return m_MTTEnabled; }
#if ENABLE_WPP_PARALLELISM
void setUseNextDQP ( bool b ) { m_NextDQP = b; }
bool getUseNextDQP () const { return m_NextDQP; }
#endif
void setUseLMChroma ( bool b ) { m_LMChroma = b; }
bool getUseLMChroma () const { return m_LMChroma; }
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
void setCclmCollocatedChromaFlag( bool b ) { m_cclmCollocatedChromaFlag = b; }
bool getCclmCollocatedChromaFlag() const { return m_cclmCollocatedChromaFlag; }
#endif
#if JVET_M0303_IMPLICIT_MTS
void setUseMTS ( bool b ) { m_MTS = b; }
bool getUseMTS () const { return m_MTS; }
#if JVET_M0464_UNI_MTS
bool getUseImplicitMTS () const { return m_MTS && !m_IntraMTS && !m_InterMTS; }
#else
bool getUseImplicitMTS () const { return m_MTS && !m_IntraEMT && !m_InterEMT; }
#endif
#endif
#if JVET_M0464_UNI_MTS
void setUseIntraMTS ( bool b ) { m_IntraMTS = b; }
bool getUseIntraMTS () const { return m_IntraMTS; }
void setUseInterMTS ( bool b ) { m_InterMTS = b; }
bool getUseInterMTS () const { return m_InterMTS; }
#else
void setUseIntraEMT ( bool b ) { m_IntraEMT = b; }
bool getUseIntraEMT () const { return m_IntraEMT; }
void setUseInterEMT ( bool b ) { m_InterEMT = b; }
bool getUseInterEMT () const { return m_InterEMT; }
#endif
void setUseGBi ( bool b ) { m_GBi = b; }
bool getUseGBi () const { return m_GBi; }
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
void setLadfEnabled ( bool b ) { m_LadfEnabled = b; }
bool getLadfEnabled () const { return m_LadfEnabled; }
void setLadfNumIntervals ( int i ) { m_LadfNumIntervals = i; }
int getLadfNumIntervals () const { return m_LadfNumIntervals; }
void setLadfQpOffset ( int value, int idx ) { m_LadfQpOffset[ idx ] = value; }
int getLadfQpOffset ( int idx ) const { return m_LadfQpOffset[ idx ]; }
void setLadfIntervalLowerBound( int value, int idx ) { m_LadfIntervalLowerBound[ idx ] = value; }
int getLadfIntervalLowerBound( int idx ) const { return m_LadfIntervalLowerBound[ idx ]; }
#endif
//===== additional parameters =====
// qtbt
// sub pu tmvp
void setImvMode(ImvMode m) { m_ImvMode = m; m_IMV = m != 0; }
ImvMode getImvMode () const { return m_ImvMode; }
// multi type tree
unsigned getMTTMode () const { return m_MTTMode; }
void setMTTMode ( unsigned mode ) { m_MTTMode = mode; m_MTTEnabled = ( m_MTTMode != 0 ); }
void setUseCompositeRef(bool b) { m_compositeRefEnabled = b; }
bool getUseCompositeRef() const { return m_compositeRefEnabled; }
void setUseMHIntra ( bool b ) { m_MHIntra = b; }
bool getUseMHIntra () const { return m_MHIntra; }
void setUseTriangle ( bool b ) { m_Triangle = b; }
bool getUseTriangle () const { return m_Triangle; }
#if !JVET_M0483_IBC
void setIBCMode (unsigned IBCMode) { m_IBCMode = IBCMode; }
unsigned getIBCMode () const { return m_IBCMode; }
#endif
// KJS: END former SPSNext parameters
};
......@@ -2288,7 +2261,7 @@ public:
PreCalcValues( const SPS& sps, const PPS& pps, bool _isEncoder )
: chrFormat ( sps.getChromaFormatIdc() )
, multiBlock422 ( false )
, noMotComp ( sps.getSpsNext().getDisableMotCompress() )
, noMotComp ( sps.getDisableMotCompress() )
, maxCUWidth ( sps.getMaxCUWidth() )
, maxCUHeight ( sps.getMaxCUHeight() )
, maxCUWidthMask ( maxCUWidth - 1 )
......
......@@ -293,13 +293,13 @@ void TrQuant::invRdpcmNxN(TransformUnit& tu, const ComponentID &compID, PelBuf &
void TrQuant::getTrTypes ( TransformUnit tu, const ComponentID compID, int &trTypeHor, int &trTypeVer )
{
#if JVET_M0464_UNI_MTS
bool mtsActivated = CU::isIntra( *tu.cu ) ? tu.cs->sps->getSpsNext().getUseIntraMTS() : tu.cs->sps->getSpsNext().getUseInterMTS();
bool mtsActivated = CU::isIntra( *tu.cu ) ? tu.cs->sps->getUseIntraMTS() : tu.cs->sps->getUseInterMTS();
#else
bool emtActivated = CU::isIntra( *tu.cu ) ? tu.cs->sps->getSpsNext().getUseIntraEMT() : tu.cs->sps->getSpsNext().getUseInterEMT();
bool emtActivated = CU::isIntra( *tu.cu ) ? tu.cs->sps->getUseIntraEMT() : tu.cs->sps->getUseInterEMT();
#endif
#if JVET_M0303_IMPLICIT_MTS
bool mtsImplicit = CU::isIntra( *tu.cu ) && tu.cs->sps->getSpsNext().getUseImplicitMTS() && compID == COMPONENT_Y;
bool mtsImplicit = CU::isIntra( *tu.cu ) && tu.cs->sps->getUseImplicitMTS() && compID == COMPONENT_Y;
#endif
trTypeHor = DCT2;
......
......@@ -249,7 +249,7 @@ void QTBTPartitioner::splitCurrArea( const PartSplit split, const CodingStructur
break;
case CU_TRIH_SPLIT:
case CU_TRIV_SPLIT:
CHECK( ( cs.sps->getSpsNext().getMTTMode() & 1 ) != 1, "Triple splits are not allowed" );
CHECK( ( cs.sps->getMTTMode() & 1 ) != 1, "Triple splits are not allowed" );
m_partStack.push_back( PartLevel( split, PartitionerImpl::getCUSubPartitions( currArea(), cs, split ) ) );
break;
case TU_MAX_TR_SPLIT:
......@@ -359,13 +359,13 @@ void QTBTPartitioner::canSplit( const CodingStructure &cs, bool& canNo, bool& ca
if( canBtt && ( area.width <= minBtSize && area.height <= minBtSize )
&& ( ( area.width <= minTtSize && area.height <= minTtSize )
|| cs.sps->getSpsNext().getMTTMode() == 0 ) )
|| cs.sps->getMTTMode() == 0 ) )
{
canBtt = false;
}
if( canBtt && ( area.width > maxBtSize || area.height > maxBtSize )
&& ( ( area.width > maxTtSize || area.height > maxTtSize )
|| cs.sps->getSpsNext().getMTTMode() == 0 ) )
|| cs.sps->getMTTMode() == 0 ) )
{
canBtt = false;
}
......@@ -384,12 +384,12 @@ void QTBTPartitioner::canSplit( const CodingStructure &cs, bool& canNo, bool& ca
if( area.width <= minBtSize || area.width > maxBtSize ) canBv = false;
if( area.width <= MAX_TU_SIZE_FOR_PROFILE && area.height > MAX_TU_SIZE_FOR_PROFILE ) canBv = false;
if( ( cs.sps->getSpsNext().getMTTMode() & 1 ) != 1 ) canTh = false;
if( ( cs.sps->getMTTMode() & 1 ) != 1 ) canTh = false;
if( area.height <= 2 * minTtSize || area.height > maxTtSize || area.width > maxTtSize )
canTh = false;
if( area.width > MAX_TU_SIZE_FOR_PROFILE || area.height > MAX_TU_SIZE_FOR_PROFILE ) canTh = false;
if( ( cs.sps->getSpsNext().getMTTMode() & 1 ) != 1 ) canTv = false;
if( ( cs.sps->getMTTMode() & 1 ) != 1 ) canTv = false;
if( area.width <= 2 * minTtSize || area.width > maxTtSize || area.height > maxTtSize )
canTv = false;
if( area.width > MAX_TU_SIZE_FOR_PROFILE || area.height > MAX_TU_SIZE_FOR_PROFILE ) canTv = false;
......@@ -515,9 +515,9 @@ bool QTBTPartitioner::canSplit( const PartSplit split, const CodingStructure &cs
{
if( currMtDepth >= maxBTD ) return false;
if( ( area.width <= minBtSize && area.height <= minBtSize )
&& ( ( area.width <= minTtSize && area.height <= minTtSize ) || cs.sps->getSpsNext().getMTTMode() == 0 ) ) return false;
&& ( ( area.width <= minTtSize && area.height <= minTtSize ) || cs.sps->getMTTMode() == 0 ) ) return false;
if( ( area.width > maxBtSize || area.height > maxBtSize )
&& ( ( area.width > maxTtSize || area.height > maxTtSize ) || cs.sps->getSpsNext().getMTTMode() == 0 ) ) return false;
&& ( ( area.width > maxTtSize || area.height > maxTtSize ) || cs.sps->getMTTMode() == 0 ) ) return false;
if (CS::isDualITree(cs) && (area.width > 64 || area.height > 64))
{
return false;
......@@ -543,12 +543,12 @@ bool QTBTPartitioner::canSplit( const PartSplit split, const CodingStructure &cs
if( area.width <= MAX_TU_SIZE_FOR_PROFILE && area.height > MAX_TU_SIZE_FOR_PROFILE ) return false;
break;
case CU_TRIH_SPLIT:
if( ( cs.sps->getSpsNext().getMTTMode() & 1 ) != 1 ) return false;
if( ( cs.sps->getMTTMode() & 1 ) != 1 ) return false;