Commit bf184831 authored by Karsten Suehring's avatar Karsten Suehring Committed by Frank Bossen

SPS cleanup - removal of deprecated SPSNext parameters

parent 05150659
......@@ -87,7 +87,6 @@ TemporalSubsampleRatio : 8
#============ NEXT ====================
# General
LargeCTU : 1 # Large CTU
CTUSize : 128
LCTUFast : 1
QuadtreeTULog2MaxSize : 6
......@@ -99,7 +98,6 @@ MinQTNonISlice : 8
MaxBTDepth : 3
MaxBTDepthISliceL : 3
MaxBTDepthISliceC : 3
MTT : 1
MTS : 1
MTSIntraMaxCand : 3
......
......@@ -103,7 +103,6 @@ CrQpOffset : 1
#============ NEXT ====================
# General
LargeCTU : 1 # Large CTU
CTUSize : 128
LCTUFast : 1
QuadtreeTULog2MaxSize : 6
......@@ -115,7 +114,6 @@ MinQTNonISlice : 8
MaxBTDepth : 3
MaxBTDepthISliceL : 3
MaxBTDepthISliceC : 3
MTT : 1
MTS : 1
MTSIntraMaxCand : 3
......
......@@ -103,7 +103,6 @@ CrQpOffset : 1
#============ NEXT ====================
# General
LargeCTU : 1 # Large CTU
CTUSize : 128
LCTUFast : 1
QuadtreeTULog2MaxSize : 6
......@@ -115,7 +114,6 @@ MinQTNonISlice : 8
MaxBTDepth : 3
MaxBTDepthISliceL : 3
MaxBTDepthISliceC : 3
MTT : 1
MTS : 1
MTSIntraMaxCand : 3
......
......@@ -117,7 +117,6 @@ CrQpOffset : 1
#============ NEXT ====================
# General
LargeCTU : 1 # Large CTU
CTUSize : 128
LCTUFast : 1
QuadtreeTULog2MaxSize : 6
......@@ -129,7 +128,6 @@ MinQTNonISlice : 8
MaxBTDepth : 3
MaxBTDepthISliceL : 3
MaxBTDepthISliceC : 3
MTT : 1
MTS : 1
MTSIntraMaxCand : 3
......
......@@ -215,20 +215,14 @@ void EncApp::xInitLibCfg()
m_cEncLib.setMinQTSizes ( m_uiMinQT );
m_cEncLib.setMaxBTDepth ( m_uiMaxBTDepth, m_uiMaxBTDepthI, m_uiMaxBTDepthIChroma );
m_cEncLib.setDualITree ( m_dualTree );
m_cEncLib.setLargeCTU ( m_LargeCTU );
m_cEncLib.setSubPuMvpMode ( m_SubPuMvpMode );
m_cEncLib.setAffine ( m_Affine );
m_cEncLib.setAffineType ( m_AffineType );
m_cEncLib.setBIO (m_BIO);
m_cEncLib.setDisableMotionCompression ( m_DisableMotionCompression );
m_cEncLib.setMTTMode ( m_MTT );
m_cEncLib.setUseLMChroma ( m_LMChroma );
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
m_cEncLib.setCclmCollocatedChromaFlag ( m_cclmCollocatedChromaFlag );
#endif
#if ENABLE_WPP_PARALLELISM
m_cEncLib.setUseAltDQPCoding ( m_AltDQPCoding );
#endif
#if JVET_M0464_UNI_MTS
m_cEncLib.setIntraMTS ( m_MTS & 1 );
m_cEncLib.setIntraMTSMaxCand ( m_MTSIntraMaxCand );
......
......@@ -799,7 +799,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
("InterlacedSource", m_interlacedSourceFlag, false, "Indicate that source is interlaced")
("NonPackedSource", m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing")
("FrameOnly", m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames")
("MTT", m_MTT, 0u, "Multi type tree type (0: off, 1:QTBT + triple split) [default: 0]")
("CTUSize", m_uiCTUSize, 128u, "CTUSize (specifies the CTU size if QTBT is on) [default: 128]")
("EnablePartitionConstraintsOverride", m_SplitConsOverrideEnabledFlag, true, "Enable partition constraints override")
("MinQTISlice", m_uiMinQT[0], 8u, "MinQTISlice")
......@@ -811,20 +810,15 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
("MaxBTDepthISliceL", m_uiMaxBTDepthI, 3u, "MaxBTDepthISliceL")
("MaxBTDepthISliceC", m_uiMaxBTDepthIChroma, 3u, "MaxBTDepthISliceC")
("DualITree", m_dualTree, false, "Use separate QTBT trees for intra slice luma and chroma channel types")
("LargeCTU", m_LargeCTU, false, "Enable large CTU (0:off, 1:on) [default: off]")
("SubPuMvp", m_SubPuMvpMode, 0, "Enable Sub-PU temporal motion vector prediction (0:off, 1:ATMVP, 2:STMVP, 3:ATMVP+STMVP) [default: off]")
("Affine", m_Affine, false, "Enable affine prediction (0:off, 1:on) [default: off]")
("AffineType", m_AffineType, true, "Enable affine type prediction (0:off, 1:on) [default: on]" )
("BIO", m_BIO, false, "Enable bi-directional optical flow")
("DisableMotCompression", m_DisableMotionCompression, false, "Disable motion data compression for all modes")
("IMV", m_ImvMode, 2, "Adaptive MV precision Mode (IMV)\n"
"\t0: disabled IMV\n"
"\t1: IMV default (Full-Pel)\n"
"\t2: IMV Full-Pel and 4-PEL\n")
("IMV4PelFast", m_Imv4PelFast, 1, "Fast 4-Pel Adaptive MV precision Mode 0:disabled, 1:enabled) [default: 1]")
#if ENABLE_WPP_PARALLELISM
("AltDQPCoding", m_AltDQPCoding, false, "Improved predictive delta-QP coding (0:off, 1:on) [default: off]")
#endif
("LMChroma", m_LMChroma, 1, " LMChroma prediction "
"\t0: Disable LMChroma\n"
"\t1: Enable LMChroma\n")
......@@ -1886,9 +1880,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
}
#if QP_SWITCHING_FOR_PARALLEL
if( m_LargeCTU && ( m_iQP < 38 ) && ( m_iGOPSize > 4 ) && m_bUsePerceptQPA && !m_bUseAdaptiveQP && ( m_iSourceHeight <= 1280 ) && ( m_iSourceWidth <= 2048 ) )
if( ( m_iQP < 38 ) && ( m_iGOPSize > 4 ) && m_bUsePerceptQPA && !m_bUseAdaptiveQP && ( m_iSourceHeight <= 1280 ) && ( m_iSourceWidth <= 2048 ) )
#else
if( m_LargeCTU && ( ( int ) m_fQP < 38 ) && ( m_iGOPSize > 4 ) && m_bUsePerceptQPA && !m_bUseAdaptiveQP && ( m_iSourceHeight <= 1280 ) && ( m_iSourceWidth <= 2048 ) )
if( ( ( int ) m_fQP < 38 ) && ( m_iGOPSize > 4 ) && m_bUsePerceptQPA && !m_bUseAdaptiveQP && ( m_iSourceHeight <= 1280 ) && ( m_iSourceWidth <= 2048 ) )
#endif
#else
if( false )
......@@ -1966,9 +1960,6 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara( m_numWppThreads > 1, "WPP-style parallelization only supported with NEXT profile" );
#endif
xConfirmPara( m_LMChroma, "LMChroma only allowed with NEXT profile" );
xConfirmPara( m_LargeCTU, "Large CTU is only allowed with NEXT profile" );
xConfirmPara( m_DisableMotionCompression, "Disable motion data compression only allowed with NEXT profile" );
xConfirmPara( m_MTT, "Multi type tree is only allowed with NEXT profile" );
xConfirmPara( m_ImvMode, "IMV is only allowed with NEXT profile" );
xConfirmPara(m_IBCMode, "IBC Mode only allowed with NEXT profile");
#if JVET_M0253_HASH_ME
......@@ -1994,9 +1985,6 @@ bool EncAppCfg::xCheckParameter()
}
else
{
#if ENABLE_WPP_PARALLELISM
xConfirmPara( !m_AltDQPCoding && ( m_numWppThreads + m_numWppExtraLines ) > 1, "Wavefront parallel encoding only supported with AltDQPCoding" );
#endif
if( m_depQuantEnabledFlag )
{
xConfirmPara( !m_useRDOQ || !m_useRDOQTS, "RDOQ and RDOQTS must be equal to 1 if dependent quantization is enabled" );
......@@ -2313,13 +2301,6 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara( m_quadtreeTULog2MinSize < 2, "QuadtreeTULog2MinSize must be 2 or greater." );
if( !m_LargeCTU )
{
xConfirmPara( m_uiMaxCUHeight > 64, "CTU bigger than 64 only allowed with large CTU." );
xConfirmPara( m_uiMaxCUWidth > 64, "CTU bigger than 64 only allowed with large CTU." );
xConfirmPara( m_uiCTUSize > 64, "CTU bigger than 64 only allowed with large CTU." );
}
if( m_profile == Profile::NEXT )
{
xConfirmPara( m_quadtreeTULog2MaxSize > 7, "QuadtreeTULog2MaxSize must be 7 or smaller." );
......@@ -3184,14 +3165,8 @@ void EncAppCfg::xPrintParameter()
}
msg(VERBOSE, "SubPuMvp:%d+%d ", m_SubPuMvpMode & 1, (m_SubPuMvpMode & 2) == 2);
msg( VERBOSE, "DualITree:%d ", m_dualTree );
msg( VERBOSE, "LargeCTU:%d ", m_LargeCTU );
msg( VERBOSE, "IMV:%d ", m_ImvMode );
msg( VERBOSE, "BIO:%d ", m_BIO );
msg( VERBOSE, "DisMDC:%d ", m_DisableMotionCompression );
msg( VERBOSE, "MTT:%d ", m_MTT );
#if ENABLE_WPP_PARALLELISM
msg( VERBOSE, "AltDQPCoding:%d ", m_AltDQPCoding );
#endif
msg( VERBOSE, "LMChroma:%d ", m_LMChroma );
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
if( m_LMChroma && m_chromaFormatIDC == CHROMA_420 )
......@@ -3248,10 +3223,7 @@ void EncAppCfg::xPrintParameter()
}
#endif
msg( VERBOSE, "\nFAST TOOL CFG: " );
if( m_LargeCTU )
{
msg( VERBOSE, "LCTUFast:%d ", m_useFastLCTU );
}
msg( VERBOSE, "LCTUFast:%d ", m_useFastLCTU );
msg( VERBOSE, "FastMrg:%d ", m_useFastMrg );
msg( VERBOSE, "PBIntraFast:%d ", m_usePbIntraFast );
if( m_ImvMode == 2 ) msg( VERBOSE, "IMV4PelFast:%d ", m_Imv4PelFast );
......
......@@ -202,16 +202,10 @@ protected:
unsigned m_uiMaxBTDepthI;
unsigned m_uiMaxBTDepthIChroma;
bool m_dualTree;
bool m_LargeCTU;
int m_SubPuMvpMode;
bool m_Affine;
bool m_AffineType;
bool m_BIO;
bool m_DisableMotionCompression;
unsigned m_MTT;
#if ENABLE_WPP_PARALLELISM
bool m_AltDQPCoding;
#endif
int m_LMChroma;
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
bool m_cclmCollocatedChromaFlag;
......
......@@ -349,11 +349,7 @@ unsigned DeriveCtx::CtxQtCbf( const ComponentID compID, const unsigned trDepth,
unsigned DeriveCtx::CtxInterDir( const PredictionUnit& pu )
{
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
}
return pu.cu->qtDepth;
return Clip3( 0, 3, 7 - ( ( g_aucLog2[pu.lumaSize().width] + g_aucLog2[pu.lumaSize().height] + 1 ) >> 1 ) ); // VG-ASYMM DONE
}
unsigned DeriveCtx::CtxAffineFlag( const CodingUnit& cu )
......
......@@ -1967,9 +1967,7 @@ SPS::SPS()
, 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 )
......@@ -1983,12 +1981,8 @@ SPS::SPS()
#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 )
......@@ -1998,7 +1992,6 @@ SPS::SPS()
// default values for additional parameters
, m_ImvMode ( IMV_OFF )
, m_MTTMode ( 0 )
, m_compositeRefEnabled ( false )
#if !JVET_M0483_IBC
, m_IBCMode ( 0 )
......
......@@ -950,9 +950,7 @@ private:
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;
......@@ -970,12 +968,8 @@ private:
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;
......@@ -985,8 +979,6 @@ private:
//===== 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
......@@ -1229,21 +1221,12 @@ public:
#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
......@@ -1288,10 +1271,6 @@ public:
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; }
......@@ -2261,7 +2240,6 @@ public:
PreCalcValues( const SPS& sps, const PPS& pps, bool _isEncoder )
: chrFormat ( sps.getChromaFormatIdc() )
, multiBlock422 ( false )
, noMotComp ( sps.getDisableMotCompress() )
, maxCUWidth ( sps.getMaxCUWidth() )
, maxCUHeight ( sps.getMaxCUHeight() )
, maxCUWidthMask ( maxCUWidth - 1 )
......@@ -2294,7 +2272,6 @@ public:
const ChromaFormat chrFormat;
const bool multiBlock422;
const bool noMotComp;
const unsigned maxCUWidth;
const unsigned maxCUHeight;
// to get CTU position, use (x & maxCUWidthMask) rather than (x % maxCUWidth)
......
......@@ -249,7 +249,6 @@ void QTBTPartitioner::splitCurrArea( const PartSplit split, const CodingStructur
break;
case CU_TRIH_SPLIT:
case CU_TRIV_SPLIT:
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:
......@@ -358,14 +357,12 @@ 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->getMTTMode() == 0 ) )
&& ( ( area.width <= minTtSize && area.height <= minTtSize ) ) )
{
canBtt = false;
}
if( canBtt && ( area.width > maxBtSize || area.height > maxBtSize )
&& ( ( area.width > maxTtSize || area.height > maxTtSize )
|| cs.sps->getMTTMode() == 0 ) )
&& ( ( area.width > maxTtSize || area.height > maxTtSize ) ) )
{
canBtt = false;
}
......@@ -384,12 +381,10 @@ 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->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->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 +510,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->getMTTMode() == 0 ) ) return false;
&& ( ( area.width <= minTtSize && area.height <= minTtSize ) ) ) return false;
if( ( area.width > maxBtSize || area.height > maxBtSize )
&& ( ( area.width > maxTtSize || area.height > maxTtSize ) || cs.sps->getMTTMode() == 0 ) ) return false;
&& ( ( area.width > maxTtSize || area.height > maxTtSize ) ) ) return false;
if (CS::isDualITree(cs) && (area.width > 64 || area.height > 64))
{
return false;
......@@ -543,12 +538,10 @@ 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->getMTTMode() & 1 ) != 1 ) return false;
if( area.height <= 2 * minTtSize || area.height > maxTtSize || area.width > maxTtSize) return false;
if( area.width > MAX_TU_SIZE_FOR_PROFILE || area.height > MAX_TU_SIZE_FOR_PROFILE ) return false;
break;
case CU_TRIV_SPLIT:
if( ( cs.sps->getMTTMode() & 1 ) != 1 ) return false;
if( area.width <= 2 * minTtSize || area.width > maxTtSize || area.height > maxTtSize) return false;
if( area.width > MAX_TU_SIZE_FOR_PROFILE || area.height > MAX_TU_SIZE_FOR_PROFILE ) return false;
break;
......
......@@ -189,25 +189,6 @@ int CU::predictQP( const CodingUnit& cu, const int prevQP )
{
const CodingStructure &cs = *cu.cs;
#if ENABLE_WPP_PARALLELISM
if( cs.sps->getUseNextDQP() )
{
// Inter-CTU 2D "planar" c(orner) a(bove)
// predictor arrangement: b(efore) p(rediction)
// restrict the lookup, as it might cross CTU/slice/tile boundaries
const CodingUnit *cuA = cs.getCURestricted( cu.blocks[cu.chType].pos().offset( 0, -1 ), cu, cu.chType );
const CodingUnit *cuB = cs.getCURestricted( cu.blocks[cu.chType].pos().offset( -1, 0 ), cu, cu.chType );
const CodingUnit *cuC = cs.getCURestricted( cu.blocks[cu.chType].pos().offset( -1, -1 ), cu, cu.chType );
const int a = cuA ? cuA->qp : cs.slice->getSliceQpBase();
const int b = cuB ? cuB->qp : cs.slice->getSliceQpBase();
const int c = cuC ? cuC->qp : cs.slice->getSliceQpBase();
return Clip3( ( a < b ? a : b ), ( a > b ? a : b ), a + b - c ); // derived from Martucci's Median Adaptive Prediction, 1990
}
#endif
// only predict within the same CTU, use HEVC's above+left prediction
const int a = ( cu.blocks[cu.chType].y & ( cs.pcv->maxCUHeightMask >> getChannelTypeScaleY( cu.chType, cu.chromaFormat ) ) ) ? ( cs.getCU( cu.blocks[cu.chType].pos().offset( 0, -1 ), cu.chType ) )->qp : prevQP;
const int b = ( cu.blocks[cu.chType].x & ( cs.pcv->maxCUWidthMask >> getChannelTypeScaleX( cu.chType, cu.chromaFormat ) ) ) ? ( cs.getCU( cu.blocks[cu.chType].pos().offset( -1, 0 ), cu.chType ) )->qp : prevQP;
......@@ -2344,7 +2325,7 @@ void PU::getInterMMVDMergeCandidates(const PredictionUnit &pu, MergeCtx& mrgCtx,
bool PU::getColocatedMVP(const PredictionUnit &pu, const RefPicList &eRefPicList, const Position &_pos, Mv& rcMv, const int &refIdx )
{
// don't perform MV compression when generally disabled or subPuMvp is used
const unsigned scale = ( pu.cs->pcv->noMotComp ? 1 : 4 * std::max<int>(1, 4 * AMVP_DECIMATION_FACTOR / 4) );
const unsigned scale = 4 * std::max<int>(1, 4 * AMVP_DECIMATION_FACTOR / 4);
const unsigned mask = ~( scale - 1 );
const Position pos = Position{ PosType( _pos.x & mask ), PosType( _pos.y & mask ) };
......
......@@ -1108,26 +1108,13 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
#endif
// KJS: BEGIN former SPSNext parameters
READ_FLAG( uiCode, "large_ctu_flag" ); pcSPS->setUseLargeCTU ( uiCode != 0 );
READ_FLAG( uiCode, "disable_motion_compression_flag" ); pcSPS->setDisableMotCompress ( uiCode != 0 );
READ_FLAG( uiCode, "mtt_enabled_flag" ); pcSPS->setMTTMode ( uiCode );
#if ENABLE_WPP_PARALLELISM
READ_FLAG( uiCode, "next_dqp_enabled_flag" ); pcSPS->setUseNextDQP ( uiCode != 0 );
#endif
if( pcSPS->getUseIMV() )
{
READ_UVLC( uiCode, "imv_mode_minus1" ); pcSPS->setImvMode( ImvMode( uiCode + 1 ) );
}
if( pcSPS->getMTTEnabled() )
{
READ_UVLC( uiCode, "mtt_mode_minus1" ); pcSPS->setMTTMode( uiCode + 1 );
}
// KJS: END former SPSNext parameters
// KJS: referece picture sets to be replaced
// KJS: reference picture sets to be replaced
READ_UVLC( uiCode, "num_short_term_ref_pic_sets" );
CHECK(uiCode > 64, "Invalid code");
pcSPS->createRPSList(uiCode);
......
......@@ -221,17 +221,11 @@ protected:
#if JVET_M0140_SBT
bool m_SBT; ///< Sub-Block Transform for inter blocks
#endif
bool m_LargeCTU;
int m_SubPuMvpMode;
bool m_Affine;
bool m_AffineType;
bool m_BIO;
bool m_DisableMotionCompression;
unsigned m_MTTMode;
#if ENABLE_WPP_PARALLELISM
bool m_AltDQPCoding;
#endif
bool m_compositeRefEnabled; //composite reference
bool m_GBi;
bool m_GBiFast;
......@@ -706,9 +700,6 @@ public:
void setDualITree ( bool b ) { m_dualITree = b; }
bool getDualITree () const { return m_dualITree; }
void setLargeCTU ( bool b ) { m_LargeCTU = b; }
bool getLargeCTU () const { return m_LargeCTU; }
void setUseLMChroma ( int n ) { m_LMChroma = n; }
int getUseLMChroma() const { return m_LMChroma; }
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
......@@ -725,16 +716,6 @@ public:
bool getAffineType() const { return m_AffineType; }
void setBIO(bool b) { m_BIO = b; }
bool getBIO() const { return m_BIO; }
void setDisableMotionCompression ( bool b ) { m_DisableMotionCompression = b; }
bool getDisableMotionCompression () const { return m_DisableMotionCompression; }
void setMTTMode ( unsigned u ) { m_MTTMode = u; }
unsigned getMTTMode () const { return m_MTTMode; }
#if ENABLE_WPP_PARALLELISM
void setUseAltDQPCoding ( bool b ) { m_AltDQPCoding = b; }
bool getUseAltDQPCoding () const { return m_AltDQPCoding; }
#endif
#if JVET_M0464_UNI_MTS
void setIntraMTSMaxCand ( unsigned u ) { m_IntraMTSMaxCand = u; }
......
......@@ -878,7 +878,6 @@ void EncLib::xInitSPS(SPS &sps)
sps.setCTUSize ( m_CTUSize );
sps.setSplitConsOverrideEnabledFlag ( m_useSplitConsOverride );
sps.setMinQTSizes ( m_uiMinQT );
sps.setUseLargeCTU ( m_LargeCTU );
sps.setMaxBTDepth ( m_uiMaxBTDepth, m_uiMaxBTDepthI, m_uiMaxBTDepthIChroma );
sps.setUseDualITree ( m_dualITree );
sps.setSBTMVPEnabledFlag ( m_SubPuMvpMode );
......@@ -887,15 +886,10 @@ void EncLib::xInitSPS(SPS &sps)
sps.setBDOFEnabledFlag ( m_BIO );
sps.setUseAffine ( m_Affine );
sps.setUseAffineType ( m_AffineType );
sps.setDisableMotCompress ( m_DisableMotionCompression );
sps.setMTTMode ( m_MTTMode );
sps.setUseLMChroma ( m_LMChroma ? true : false );
#if JVET_M0142_CCLM_COLLOCATED_CHROMA
sps.setCclmCollocatedChromaFlag( m_cclmCollocatedChromaFlag );
#endif
#if ENABLE_WPP_PARALLELISM
sps.setUseNextDQP ( m_AltDQPCoding );
#endif
#if JVET_M0464_UNI_MTS
#if JVET_M0303_IMPLICIT_MTS
sps.setUseMTS ( m_IntraMTS || m_InterMTS || m_ImplicitMTS );
......
......@@ -1147,8 +1147,8 @@ void EncModeCtrlMTnoRQT::initCULevel( Partitioner &partitioner, const CodingStru
cuECtx.set( BEST_HORZ_SPLIT_COST, MAX_DOUBLE );
cuECtx.set( BEST_TRIH_SPLIT_COST, MAX_DOUBLE );
cuECtx.set( BEST_TRIV_SPLIT_COST, MAX_DOUBLE );
cuECtx.set( DO_TRIH_SPLIT, cs.sps->getMTTMode() & 1 );
cuECtx.set( DO_TRIV_SPLIT, cs.sps->getMTTMode() & 1 );
cuECtx.set( DO_TRIH_SPLIT, 1 );
cuECtx.set( DO_TRIV_SPLIT, 1 );
cuECtx.set( BEST_IMV_COST, MAX_DOUBLE * .5 );
cuECtx.set( BEST_NO_IMV_COST, MAX_DOUBLE * .5 );
cuECtx.set( QT_BEFORE_BT, qtBeforeBt );
......@@ -1957,31 +1957,28 @@ bool EncModeCtrlMTnoRQT::useModeResult( const EncTestMode& encTestmode, CodingSt
cuECtx.set( MAX_QT_SUB_DEPTH, maxQtD );
}
if( ( tempCS->sps->getMTTMode() & 1 ) == 1 )
{
int maxMtD = tempCS->pcv->getMaxBtDepth( *tempCS->slice, partitioner.chType ) + partitioner.currImplicitBtDepth;
int maxMtD = tempCS->pcv->getMaxBtDepth( *tempCS->slice, partitioner.chType ) + partitioner.currImplicitBtDepth;
if( encTestmode.type == ETM_SPLIT_BT_H )
if( encTestmode.type == ETM_SPLIT_BT_H )
{
if( tempCS->cus.size() > 2 )
{
if( tempCS->cus.size() > 2 )
{
int h_2 = tempCS->area.blocks[partitioner.chType].height / 2;
int cu1_h = tempCS->cus.front()->blocks[partitioner.chType].height;
int cu2_h = tempCS->cus.back() ->blocks[partitioner.chType].height;
int h_2 = tempCS->area.blocks[partitioner.chType].height / 2;
int cu1_h = tempCS->cus.front()->blocks[partitioner.chType].height;
int cu2_h = tempCS->cus.back() ->blocks[partitioner.chType].height;
cuECtx.set( DO_TRIH_SPLIT, cu1_h < h_2 || cu2_h < h_2 || partitioner.currMtDepth + 1 == maxMtD );
}
cuECtx.set( DO_TRIH_SPLIT, cu1_h < h_2 || cu2_h < h_2 || partitioner.currMtDepth + 1 == maxMtD );
}
else if( encTestmode.type == ETM_SPLIT_BT_V )
}
else if( encTestmode.type == ETM_SPLIT_BT_V )
{
if( tempCS->cus.size() > 2 )
{
if( tempCS->cus.size() > 2 )
{
int w_2 = tempCS->area.blocks[partitioner.chType].width / 2;
int cu1_w = tempCS->cus.front()->blocks[partitioner.chType].width;
int cu2_w = tempCS->cus.back() ->blocks[partitioner.chType].width;
int w_2 = tempCS->area.blocks[partitioner.chType].width / 2;
int cu1_w = tempCS->cus.front()->blocks[partitioner.chType].width;
int cu2_w = tempCS->cus.back() ->blocks[partitioner.chType].width;
cuECtx.set( DO_TRIV_SPLIT, cu1_w < w_2 || cu2_w < w_2 || partitioner.currMtDepth + 1 == maxMtD );
}
cuECtx.set( DO_TRIV_SPLIT, cu1_w < w_2 || cu2_w < w_2 || partitioner.currMtDepth + 1 == maxMtD );
}
}
......
......@@ -782,18 +782,8 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
#endif
// KJS: BEGIN former SPSNext paramaters
// KJS: BEGIN former SPSNext parameters
// tool enabling flags
WRITE_FLAG( pcSPS->getUseLargeCTU() ? 1 : 0, "large_ctu_flag" );
WRITE_FLAG( pcSPS->getDisableMotCompress() ? 1 : 0, "disable_motion_compression_flag" );
WRITE_FLAG( pcSPS->getMTTEnabled() ? 1 : 0, "mtt_enabled_flag" );
#if ENABLE_WPP_PARALLELISM
WRITE_FLAG( pcSPS->getUseNextDQP(), "next_dqp_enabled_flag" );
#endif
// additional parameters
if( pcSPS->getUseIMV() )
......@@ -801,13 +791,9 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
WRITE_UVLC( pcSPS->getImvMode()-1, "imv_mode_minus1" );
}
if( pcSPS->getMTTEnabled() )
{
WRITE_UVLC( pcSPS->getMTTMode() - 1, "mtt_mode_minus1" );
}
// KJS: END former SPSNext paramaters
// KJS: END former SPSNext parameters
// KJS: referece picture sets to be replaced
// KJS: reference picture sets to be replaced
const RPSList* rpsList = pcSPS->getRPSList();
WRITE_UVLC(rpsList->getNumberOfReferencePictureSets(), "num_short_term_ref_pic_sets" );
......
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