Commit 00918743 authored by Karsten Suehring's avatar Karsten Suehring

remove macro JVET_L0217_L0678_SPS_CLEANUP

parent e113bbe6
......@@ -1768,13 +1768,6 @@ SPSNext::SPSNext( SPS& sps )
#endif
// default values for additional parameters
#if !JVET_L0217_L0678_SPS_CLEANUP
, m_CTUSize ( 0 )
, m_minQT { 0, 0, 0 }
, m_maxBTDepth { MAX_BT_DEPTH, MAX_BT_DEPTH_INTER, MAX_BT_DEPTH_C }
, m_maxBTSize { MAX_BT_SIZE, MAX_BT_SIZE_INTER, MAX_BT_SIZE_C }
, m_maxTTSize { MAX_TT_SIZE, MAX_TT_SIZE_INTER, MAX_TT_SIZE_C }
#endif
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
, m_subPuLog2Size ( 0 )
#endif
......@@ -1819,13 +1812,11 @@ SPS::SPS()
, m_picHeightInLumaSamples (288)
, m_log2MinCodingBlockSize ( 0)
, m_log2DiffMaxMinCodingBlockSize(0)
#if JVET_L0217_L0678_SPS_CLEANUP
, m_CTUSize(0)
, m_minQT{ 0, 0, 0 }
, m_maxBTDepth{ MAX_BT_DEPTH, MAX_BT_DEPTH_INTER, MAX_BT_DEPTH_C }
, m_maxBTSize{ MAX_BT_SIZE, MAX_BT_SIZE_INTER, MAX_BT_SIZE_C }
, m_maxTTSize{ MAX_TT_SIZE, MAX_TT_SIZE_INTER, MAX_TT_SIZE_C }
#endif
, m_uiMaxCUWidth ( 32)
, m_uiMaxCUHeight ( 32)
, m_uiMaxCodingDepth ( 3)
......
......@@ -828,15 +828,6 @@ public:
private:
//===== additional parameters =====
// qtbt
#if !JVET_L0217_L0678_SPS_CLEANUP
unsigned m_CTUSize;
unsigned m_partitionOverrideEnalbed; // enable partition constraints override function
unsigned m_minQT[3]; // 0: I slice luma; 1: P/B slice; 2: I slice chroma
unsigned m_maxBTDepth[3];
unsigned m_maxBTSize[3];
unsigned m_maxTTSize[3];
unsigned m_dualITree;
#endif
// sub-pu merging
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
unsigned m_subPuLog2Size;
......@@ -902,37 +893,6 @@ public:
#endif
//===== additional parameters =====
// qtbt
#if !JVET_L0217_L0678_SPS_CLEANUP
void setCTUSize ( unsigned ctuSize ) { m_CTUSize = ctuSize; }
unsigned getCTUSize () const { return m_CTUSize; }
void setSplitConsOverrideEnabledFlag(bool b) { m_partitionOverrideEnalbed = b; }
bool getSplitConsOverrideEnabledFlag() const { return m_partitionOverrideEnalbed; }
void setMinQTSizes ( unsigned* minQT ) { m_minQT[0] = minQT[0]; m_minQT[1] = minQT[1]; m_minQT[2] = minQT[2]; }
unsigned getMinQTSize ( SliceType slicetype,
ChannelType chType = CHANNEL_TYPE_LUMA )
const { return slicetype == I_SLICE ? ( chType == CHANNEL_TYPE_LUMA ? m_minQT[0] : m_minQT[2] ) : m_minQT[1]; }
void setMaxBTDepth ( unsigned maxBTDepth,
unsigned maxBTDepthI,
unsigned maxBTDepthIChroma ) { m_maxBTDepth[1] = maxBTDepth; m_maxBTDepth[0] = maxBTDepthI; m_maxBTDepth[2] = maxBTDepthIChroma; }
unsigned getMaxBTDepth () const { return m_maxBTDepth[1]; }
unsigned getMaxBTDepthI () const { return m_maxBTDepth[0]; }
unsigned getMaxBTDepthIChroma () const { return m_maxBTDepth[2]; }
void setMaxBTSize ( unsigned maxBTSize,
unsigned maxBTSizeI,
unsigned maxBTSizeC ) { m_maxBTSize[1] = maxBTSize; m_maxBTSize[0] = maxBTSizeI; m_maxBTSize[2] = maxBTSizeC; }
unsigned getMaxBTSize () const { return m_maxBTSize[1]; }
unsigned getMaxBTSizeI () const { return m_maxBTSize[0]; }
unsigned getMaxBTSizeIChroma () const { return m_maxBTSize[2]; }
void setMaxTTSize (unsigned maxTTSize,
unsigned maxTTSizeI,
unsigned maxTTSizeC) { m_maxTTSize[1] = maxTTSize; m_maxTTSize[0] = maxTTSizeI; m_maxTTSize[2] = maxTTSizeC; }
unsigned getMaxTTSize() const { return m_maxTTSize[1]; }
unsigned getMaxTTSizeI() const { return m_maxTTSize[0]; }
unsigned getMaxTTSizeIChroma() const { return m_maxTTSize[2]; }
void setUseDualITree ( bool b ) { m_dualITree = b; }
bool getUseDualITree () const { return m_dualITree; }
#endif
// sub pu tmvp
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
void setSubPuMvpLog2Size ( unsigned log2Size ) { m_subPuLog2Size = log2Size; }
......@@ -999,7 +959,6 @@ private:
int m_log2MinCodingBlockSize;
int m_log2DiffMaxMinCodingBlockSize;
#if JVET_L0217_L0678_SPS_CLEANUP
unsigned m_CTUSize;
unsigned m_partitionOverrideEnalbed; // enable partition constraints override function
unsigned m_minQT[3]; // 0: I slice luma; 1: P/B slice; 2: I slice chroma
......@@ -1007,7 +966,6 @@ private:
unsigned m_maxBTSize[3];
unsigned m_maxTTSize[3];
unsigned m_dualITree;
#endif
uint32_t m_uiMaxCUWidth;
uint32_t m_uiMaxCUHeight;
uint32_t m_uiMaxCodingDepth; ///< Total CU depth, relative to the smallest possible transform block size.
......@@ -1149,7 +1107,6 @@ public:
void setLog2MinCodingBlockSize(int val) { m_log2MinCodingBlockSize = val; }
int getLog2DiffMaxMinCodingBlockSize() const { return m_log2DiffMaxMinCodingBlockSize; }
void setLog2DiffMaxMinCodingBlockSize(int val) { m_log2DiffMaxMinCodingBlockSize = val; }
#if JVET_L0217_L0678_SPS_CLEANUP
void setCTUSize(unsigned ctuSize) { m_CTUSize = ctuSize; }
unsigned getCTUSize() const { return m_CTUSize; }
void setSplitConsOverrideEnabledFlag(bool b) { m_partitionOverrideEnalbed = b; }
......@@ -1182,7 +1139,6 @@ public:
void setUseDualITree(bool b) { m_dualITree = b; }
bool getUseDualITree() const { return m_dualITree; }
#endif
void setMaxCUWidth( uint32_t u ) { m_uiMaxCUWidth = u; }
uint32_t getMaxCUWidth() const { return m_uiMaxCUWidth; }
......@@ -2236,7 +2192,6 @@ public:
, fastDeltaQPCuMaxSize( Clip3(sps.getMaxCUHeight() >> (sps.getLog2DiffMaxMinCodingBlockSize()), sps.getMaxCUHeight(), 32u) )
, noChroma2x2 ( false )
, isEncoder ( _isEncoder )
#if JVET_L0217_L0678_SPS_CLEANUP
, ISingleTree ( !sps.getUseDualITree() )
, maxBtDepth { sps.getMaxBTDepthI(), sps.getMaxBTDepth(), sps.getMaxBTDepthIChroma() }
, minBtSize { MIN_BT_SIZE, MIN_BT_SIZE_INTER, MIN_BT_SIZE_C }
......@@ -2244,15 +2199,6 @@ public:
, minTtSize { MIN_TT_SIZE, MIN_TT_SIZE_INTER, MIN_TT_SIZE_C }
, maxTtSize { sps.getMaxTTSizeI(), sps.getMaxTTSize(), sps.getMaxTTSizeIChroma() }
, minQtSize { sps.getMinQTSize(I_SLICE, CHANNEL_TYPE_LUMA), sps.getMinQTSize(B_SLICE, CHANNEL_TYPE_LUMA), sps.getMinQTSize(I_SLICE, CHANNEL_TYPE_CHROMA) }
#else
, ISingleTree ( !sps.getSpsNext().getUseDualITree() )
, maxBtDepth { sps.getSpsNext().getMaxBTDepthI(), sps.getSpsNext().getMaxBTDepth(), sps.getSpsNext().getMaxBTDepthIChroma() }
, minBtSize { MIN_BT_SIZE, MIN_BT_SIZE_INTER, MIN_BT_SIZE_C }
, maxBtSize { sps.getSpsNext().getMaxBTSizeI(), sps.getSpsNext().getMaxBTSize(), sps.getSpsNext().getMaxBTSizeIChroma() }
, minTtSize { MIN_TT_SIZE, MIN_TT_SIZE_INTER, MIN_TT_SIZE_C }
, maxTtSize { sps.getSpsNext().getMaxTTSizeI(), sps.getSpsNext().getMaxTTSize(), sps.getSpsNext().getMaxTTSizeIChroma() }
, minQtSize { sps.getSpsNext().getMinQTSize( I_SLICE, CHANNEL_TYPE_LUMA ), sps.getSpsNext().getMinQTSize( B_SLICE, CHANNEL_TYPE_LUMA ), sps.getSpsNext().getMinQTSize( I_SLICE, CHANNEL_TYPE_CHROMA ) }
#endif
{}
const ChromaFormat chrFormat;
......
......@@ -129,7 +129,6 @@
#define NUM_SPLIT_THREADS_IF_MSVC 4
#endif
#define JVET_L0217_L0678_SPS_CLEANUP 1 // move the QT/BT/TT related high level syntax element from SPSNext to SPS, delete HEVC RQT in SPS
#define JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK 1 // Fix sub-block size to 8x8 in ATMVP as proposed in L0198, L0468 and L0104
......
......@@ -132,11 +132,7 @@ void Partitioner::copyState( const Partitioner& other )
void AdaptiveDepthPartitioner::setMaxMinDepth( unsigned& minDepth, unsigned& maxDepth, const CodingStructure& cs ) const
{
unsigned stdMinDepth = 0;
#if JVET_L0217_L0678_SPS_CLEANUP
unsigned stdMaxDepth = ( g_aucLog2[cs.sps->getCTUSize()] - g_aucLog2[cs.sps->getMinQTSize( cs.slice->getSliceType(), chType )]);
#else
unsigned stdMaxDepth = (g_aucLog2[cs.sps->getSpsNext().getCTUSize()] - g_aucLog2[cs.sps->getSpsNext().getMinQTSize(cs.slice->getSliceType(), chType)]);
#endif
const Position pos = currArea().blocks[chType].pos();
const unsigned curSliceIdx = cs.slice->getIndependentSliceIdx();
#if HEVC_TILES_WPP
......
......@@ -1967,11 +1967,7 @@ void PU::xInheritedAffineMv( const PredictionUnit &pu, const PredictionUnit* puN
mvLB = puNeighbour->mvAffi[eRefPicList][2];
bool isTopCtuBoundary = false;
#if JVET_L0217_L0678_SPS_CLEANUP
if ( (posNeiY + neiH) % pu.cs->sps->getCTUSize() == 0 && (posNeiY + neiH) == posCurY )
#else
if ((posNeiY + neiH) % pu.cs->sps->getSpsNext().getCTUSize() == 0 && (posNeiY + neiH) == posCurY)
#endif
{
// use bottom-left and bottom-right sub-block MVs for inheritance
const Position posRB = puNeighbour->Y().bottomRight();
......@@ -3172,24 +3168,13 @@ static bool deriveScaledMotionTemporal( const Slice& slice,
void clipColPos(int& posX, int& posY, const PredictionUnit& pu)
{
Position puPos = pu.lumaPos();
#if JVET_L0217_L0678_SPS_CLEANUP
int log2CtuSize = g_aucLog2[pu.cs->sps->getCTUSize()];
#else
int log2CtuSize = g_aucLog2[pu.cs->sps->getSpsNext().getCTUSize()];
#endif
int ctuX = ((puPos.x >> log2CtuSize) << log2CtuSize);
int ctuY = ((puPos.y >> log2CtuSize) << log2CtuSize);
#if JVET_L0217_L0678_SPS_CLEANUP
int horMax = std::min((int)pu.cs->sps->getPicWidthInLumaSamples() - 1, ctuX + (int)pu.cs->sps->getCTUSize() + 3);
int horMin = std::max((int)0, ctuX);
int verMax = std::min((int)pu.cs->sps->getPicHeightInLumaSamples() - 1, ctuY + (int)pu.cs->sps->getCTUSize() - 1);
int verMin = std::max((int)0, ctuY);
#else
int horMax = std::min((int)pu.cs->sps->getPicWidthInLumaSamples() - 1, ctuX + (int)pu.cs->sps->getSpsNext().getCTUSize() + 3);
int horMin = std::max((int)0, ctuX);
int verMax = std::min((int)pu.cs->sps->getPicHeightInLumaSamples() - 1, ctuY + (int)pu.cs->sps->getSpsNext().getCTUSize() - 1);
int verMin = std::max((int)0, ctuY);
#endif
posX = std::min(horMax, std::max(horMin, posX));
posY = std::min(verMax, std::max(verMin, posY));
......
......@@ -637,11 +637,7 @@ PartSplit CABACReader::split_cu_mode_mt( CodingStructure& cs, Partitioner &parti
bool CABACReader::split_cu_flag( CodingStructure& cs, Partitioner &partitioner )
{
// TODO: make maxQTDepth a slice parameter
#if JVET_L0217_L0678_SPS_CLEANUP
unsigned maxQTDepth = (g_aucLog2[cs.sps->getCTUSize()] - g_aucLog2[cs.sps->getMinQTSize(cs.slice->getSliceType(), partitioner.chType)]);
#else
unsigned maxQTDepth = ( g_aucLog2[cs.sps->getSpsNext().getCTUSize()] - g_aucLog2[cs.sps->getSpsNext().getMinQTSize( cs.slice->getSliceType(), partitioner.chType )] );
#endif
if( partitioner.currDepth == maxQTDepth )
{
return false;
......
......@@ -817,52 +817,6 @@ void HLSyntaxReader::parseSPSNext( SPSNext& spsNext, const bool usePCM )
#endif
// additional parameters
#if !JVET_L0217_L0678_SPS_CLEANUP
unsigned minQT [3] = { 0, 0, 0 };
unsigned maxBTD[3] = { 0, 0, 0 };
unsigned maxBTSize[3] = { 0, 0, 0 };
unsigned maxTTSize[3] = { 0, 0, 0 };
READ_FLAG( symbol, "qtbt_dual_intra_tree" ); spsNext.setUseDualITree( symbol );
READ_UVLC( symbol, "log2_CTU_size_minus2" ); spsNext.setCTUSize( 1 << ( symbol + MIN_CU_LOG2 ) );
spsNext.getSPS().setMaxCodingDepth( symbol ); // overwrite original value
spsNext.getSPS().setMaxCUWidth ( spsNext.getCTUSize() ); // overwrite original value
spsNext.getSPS().setMaxCUHeight ( spsNext.getCTUSize() ); // overwrite original value
READ_FLAG( symbol, "sps_override_partition_constraints_enable_flag"); spsNext.setSplitConsOverrideEnabledFlag( symbol );
READ_UVLC( symbol, "sps_log2_diff_min_qt_min_cb_intra_slice"); minQT[0] = 1 << (symbol + spsNext.getSPS().getLog2MinCodingBlockSize());
READ_UVLC( symbol, "sps_log2_diff_min_qt_min_cb_inter_slice"); minQT[1] = 1 << (symbol + spsNext.getSPS().getLog2MinCodingBlockSize());
READ_UVLC( symbol, "sps_max_mtt_hierarchy_depth_inter_slices"); maxBTD[1] = symbol;
READ_UVLC( symbol, "sps_max_mtt_hierarchy_depth_intra_slices"); maxBTD[0] = symbol;
maxTTSize[0] = maxBTSize[0] = minQT[0];
if (maxBTD[0] != 0)
{
READ_UVLC(symbol, "sps_log2_diff_max_bt_min_qt_intra_slice"); maxBTSize[0] <<= symbol;
READ_UVLC(symbol, "sps_log2_diff_max_tt_min_qt_intra_slice"); maxTTSize[0] <<= symbol;
}
maxTTSize[1] = maxBTSize[1] = minQT[1];
if (maxBTD[1] != 0)
{
READ_UVLC(symbol, "sps_log2_diff_max_bt_min_qt_inter_slice"); maxBTSize[1] <<= symbol;
READ_UVLC(symbol, "sps_log2_diff_max_tt_min_qt_inter_slice"); maxTTSize[1] <<= symbol;
}
if( spsNext.getUseDualITree() )
{
READ_UVLC( symbol, "sps_log2_diff_min_qt_min_cb_intra_slice_chroma" ); minQT [2] = 1 << ( symbol + spsNext.getSPS().getLog2MinCodingBlockSize());
READ_UVLC( symbol, "sps_max_mtt_hierarchy_depth_intra_slices_chroma"); maxBTD[2] = symbol;
maxTTSize[2] = maxBTSize[2] = minQT[2];
if (maxBTD[2] != 0)
{
READ_UVLC(symbol, "sps_log2_diff_max_bt_min_qt_intra_slice_chroma"); maxBTSize[2] <<= symbol;
READ_UVLC(symbol, "sps_log2_diff_max_tt_min_qt_intra_slice_chroma"); maxTTSize[2] <<= symbol;
}
}
spsNext.setMinQTSizes( minQT );
spsNext.setMaxBTDepth( maxBTD[1], maxBTD[0], maxBTD[2] );
spsNext.setMaxBTSize( maxBTSize[1], maxBTSize[0], maxBTSize[2] );
spsNext.setMaxTTSize( maxTTSize[1], maxTTSize[0], maxTTSize[2] );
#endif
if( spsNext.getUseSubPuMvp() )
{
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
......@@ -1007,14 +961,6 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
}
}
#if !JVET_L0217_L0678_SPS_CLEANUP
READ_UVLC( uiCode, "log2_min_luma_coding_block_size_minus2");
int log2MinCUSize = uiCode + 2;
pcSPS->setLog2MinCodingBlockSize(log2MinCUSize);
READ_UVLC( uiCode, "log2_diff_max_min_luma_coding_block_size" );
pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode);
#endif
#if JVET_L0217_L0678_SPS_CLEANUP
unsigned minQT[3] = { 0, 0, 0 };
unsigned maxBTD[3] = { 0, 0, 0 };
......@@ -1064,28 +1010,15 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
pcSPS->setMaxBTDepth(maxBTD[1], maxBTD[0], maxBTD[2]);
pcSPS->setMaxBTSize(maxBTSize[1], maxBTSize[0], maxBTSize[2]);
pcSPS->setMaxTTSize(maxTTSize[1], maxTTSize[0], maxTTSize[2]);
#endif
if (pcSPS->getPTL()->getGeneralPTL()->getLevelIdc() >= Level::LEVEL5)
{
CHECK(log2MinCUSize + pcSPS->getLog2DiffMaxMinCodingBlockSize() < 5, "Invalid code");
}
#if !JVET_L0217_L0678_SPS_CLEANUP
int maxCUDepthDelta = uiCode;
pcSPS->setMaxCUWidth ( 1<<(log2MinCUSize + maxCUDepthDelta) );
pcSPS->setMaxCUHeight ( 1<<(log2MinCUSize + maxCUDepthDelta) );
#endif
READ_UVLC( uiCode, "log2_min_luma_transform_block_size_minus2" ); pcSPS->setQuadtreeTULog2MinSize( uiCode + 2 );
READ_UVLC( uiCode, "log2_diff_max_min_luma_transform_block_size" ); pcSPS->setQuadtreeTULog2MaxSize( uiCode + pcSPS->getQuadtreeTULog2MinSize() );
pcSPS->setMaxTrSize( 1<<(uiCode + pcSPS->getQuadtreeTULog2MinSize()) );
#if !JVET_L0217_L0678_SPS_CLEANUP
READ_UVLC( uiCode, "max_transform_hierarchy_depth_inter" ); pcSPS->setQuadtreeTUMaxDepthInter( uiCode + 1 );
READ_UVLC( uiCode, "max_transform_hierarchy_depth_intra" ); pcSPS->setQuadtreeTUMaxDepthIntra( uiCode + 1 );
int addCuDepth = std::max (0, log2MinCUSize - (int)pcSPS->getQuadtreeTULog2MinSize() );
pcSPS->setMaxCodingDepth( maxCUDepthDelta + addCuDepth );
#endif
READ_FLAG( uiCode, "sps_alf_enable_flag" ); pcSPS->setUseALF( uiCode );
#if HEVC_USE_SCALING_LISTS
......@@ -1771,11 +1704,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, ParameterSetManager *para
}
#endif
if (
#if JVET_L0217_L0678_SPS_CLEANUP
sps->getSplitConsOverrideEnabledFlag()
#else
sps->getSpsNext().getSplitConsOverrideEnabledFlag()
#endif
)
{
READ_FLAG(uiCode, "partition_constrainst_override_flag"); pcSlice->setSplitConsOverrideFlag(uiCode ? true : false);
......@@ -1794,11 +1723,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, ParameterSetManager *para
pcSlice->setMaxTTSize(pcSlice->getMinQTSize());
}
if (
#if JVET_L0217_L0678_SPS_CLEANUP
pcSlice->isIntra() && sps->getUseDualITree()
#else
pcSlice->isIntra() && sps->getSpsNext().getUseDualITree()
#endif
)
{
READ_UVLC(uiCode, "log2_diff_min_qt_min_cb_chroma"); pcSlice->setMinQTSizeIChroma(1 << (uiCode + sps->getLog2MinCodingBlockSize()));
......
......@@ -529,11 +529,7 @@ void CABACWriter::coding_tree(const CodingStructure& cs, Partitioner& partitione
void CABACWriter::split_cu_flag( bool split, const CodingStructure& cs, Partitioner& partitioner )
{
#if JVET_L0217_L0678_SPS_CLEANUP
unsigned maxQTDepth = ( g_aucLog2[cs.sps->getCTUSize()] - g_aucLog2[cs.sps->getMinQTSize(cs.slice->getSliceType(), partitioner.chType)] );
#else
unsigned maxQTDepth = ( g_aucLog2[cs.sps->getSpsNext().getCTUSize()] - g_aucLog2[cs.sps->getSpsNext().getMinQTSize( cs.slice->getSliceType(), partitioner.chType )] );
#endif
if( partitioner.currDepth == maxQTDepth )
{
return;
......
......@@ -1145,11 +1145,7 @@ void EncCu::xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS,
if( m_pcEncCfg->getUseFastLCTU() )
{
unsigned minDepth = 0;
#if JVET_L0217_L0678_SPS_CLEANUP
unsigned maxDepth = g_aucLog2[tempCS->sps->getCTUSize()] - g_aucLog2[tempCS->sps->getMinQTSize(slice.getSliceType(), partitioner.chType)];
#else
unsigned maxDepth = g_aucLog2[tempCS->sps->getSpsNext().getCTUSize()] - g_aucLog2[tempCS->sps->getSpsNext().getMinQTSize( slice.getSliceType(), partitioner.chType )];
#endif
if( auto ad = dynamic_cast<AdaptiveDepthPartitioner*>( &partitioner ) )
{
......
......@@ -843,21 +843,12 @@ void EncLib::xInitSPS(SPS &sps)
sps.setLog2DiffMaxMinCodingBlockSize(m_log2DiffMaxMinCodingBlockSize);
sps.getSpsNext().setNextToolsEnabled ( m_profile == Profile::NEXT );
#if JVET_L0217_L0678_SPS_CLEANUP
sps.setCTUSize ( m_CTUSize );
sps.setSplitConsOverrideEnabledFlag ( m_useSplitConsOverride );
sps.setMinQTSizes ( m_uiMinQT );
sps.getSpsNext().setUseLargeCTU ( m_LargeCTU );
sps.setMaxBTDepth ( m_uiMaxBTDepth, m_uiMaxBTDepthI, m_uiMaxBTDepthIChroma );
sps.setUseDualITree ( m_dualITree );
#else
sps.getSpsNext().setCTUSize (m_CTUSize);
sps.getSpsNext().setSplitConsOverrideEnabledFlag(m_useSplitConsOverride);
sps.getSpsNext().setMinQTSizes ( m_uiMinQT );
sps.getSpsNext().setUseLargeCTU ( m_LargeCTU );
sps.getSpsNext().setMaxBTDepth ( m_uiMaxBTDepth, m_uiMaxBTDepthI, m_uiMaxBTDepthIChroma );
sps.getSpsNext().setUseDualITree ( m_dualITree );
#endif
sps.getSpsNext().setSubPuMvpMode ( m_SubPuMvpMode );
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
sps.getSpsNext().setSubPuMvpLog2Size(m_SubPuMvpLog2Size);
......@@ -1328,11 +1319,7 @@ void EncLib::xInitPPS(PPS &pps, const SPS &sps)
pps.setSliceChromaQpFlag(bChromaDeltaQPEnabled);
#endif
if (
#if JVET_L0217_L0678_SPS_CLEANUP
!pps.getSliceChromaQpFlag() && sps.getUseDualITree()
#else
!pps.getSliceChromaQpFlag() && sps.getSpsNext().getUseDualITree()
#endif
&& (getChromaFormatIdc() != CHROMA_400))
{
pps.setSliceChromaQpFlag(m_chromaCbQpOffsetDualTree != 0 || m_chromaCrQpOffsetDualTree != 0);
......
......@@ -875,11 +875,7 @@ void EncModeCtrlMTnoRQT::initCULevel( Partitioner &partitioner, const CodingStru
{
// Min/max depth
unsigned minDepth = 0;
#if JVET_L0217_L0678_SPS_CLEANUP
unsigned maxDepth = g_aucLog2[cs.sps->getCTUSize()] - g_aucLog2[cs.sps->getMinQTSize( m_slice->getSliceType(), partitioner.chType )];
#else
unsigned maxDepth = g_aucLog2[cs.sps->getSpsNext().getCTUSize()] - g_aucLog2[cs.sps->getSpsNext().getMinQTSize(m_slice->getSliceType(), partitioner.chType)];
#endif
if( m_pcEncCfg->getUseFastLCTU() )
{
if( auto adPartitioner = dynamic_cast<AdaptiveDepthPartitioner*>( &partitioner ) )
......
......@@ -673,7 +673,6 @@ void EncSlice::initEncSlice(Picture* pcPic, const int pocLast, const int pocCurr
#endif
rpcSlice->setMaxNumMergeCand ( m_pcCfg->getMaxNumMergeCand() );
rpcSlice->setMaxNumAffineMergeCand( m_pcCfg->getMaxNumAffineMergeCand() );
#if JVET_L0217_L0678_SPS_CLEANUP
rpcSlice->setSplitConsOverrideFlag(false);
rpcSlice->setMinQTSize( rpcSlice->getSPS()->getMinQTSize(eSliceType));
rpcSlice->setMaxBTDepth( rpcSlice->isIntra() ? rpcSlice->getSPS()->getMaxBTDepthI() : rpcSlice->getSPS()->getMaxBTDepth() );
......@@ -686,20 +685,6 @@ void EncSlice::initEncSlice(Picture* pcPic, const int pocLast, const int pocCurr
rpcSlice->setMaxBTSizeIChroma( rpcSlice->getSPS()->getMaxBTSizeIChroma() );
rpcSlice->setMaxTTSizeIChroma( rpcSlice->getSPS()->getMaxTTSizeIChroma() );
}
#else
rpcSlice->setSplitConsOverrideFlag(false);
rpcSlice->setMinQTSize(rpcSlice->getSPS()->getSpsNext().getMinQTSize(eSliceType));
rpcSlice->setMaxBTDepth(rpcSlice->isIntra() ? rpcSlice->getSPS()->getSpsNext().getMaxBTDepthI() : rpcSlice->getSPS()->getSpsNext().getMaxBTDepth());
rpcSlice->setMaxBTSize(rpcSlice->isIntra() ? rpcSlice->getSPS()->getSpsNext().getMaxBTSizeI() : rpcSlice->getSPS()->getSpsNext().getMaxBTSize());
rpcSlice->setMaxTTSize(rpcSlice->isIntra() ? rpcSlice->getSPS()->getSpsNext().getMaxTTSizeI() : rpcSlice->getSPS()->getSpsNext().getMaxTTSize());
if (eSliceType == I_SLICE && rpcSlice->getSPS()->getSpsNext().getUseDualITree())
{
rpcSlice->setMinQTSizeIChroma(rpcSlice->getSPS()->getSpsNext().getMinQTSize(eSliceType, CHANNEL_TYPE_CHROMA));
rpcSlice->setMaxBTDepthIChroma(rpcSlice->getSPS()->getSpsNext().getMaxBTDepthIChroma());
rpcSlice->setMaxBTSizeIChroma(rpcSlice->getSPS()->getSpsNext().getMaxBTSizeIChroma());
rpcSlice->setMaxTTSizeIChroma(rpcSlice->getSPS()->getSpsNext().getMaxTTSizeIChroma());
}
#endif
}
......
......@@ -558,35 +558,6 @@ void HLSWriter::codeSPSNext( const SPSNext& spsNext, const bool usePCM )
#endif
// additional parameters
#if !JVET_L0217_L0678_SPS_CLEANUP
WRITE_FLAG( spsNext.getUseDualITree(), "qtbt_dual_intra_tree" );
WRITE_UVLC( g_aucLog2[spsNext.getCTUSize()] - MIN_CU_LOG2, "log2_CTU_size_minus2" );
WRITE_FLAG (spsNext.getSplitConsOverrideEnabledFlag(), "sps_override_partition_constraints_enable_flag");
WRITE_UVLC( g_aucLog2[spsNext.getMinQTSize(I_SLICE)] - spsNext.getSPS().getLog2MinCodingBlockSize(), "sps_log2_diff_min_qt_min_cb_intra_slice");
WRITE_UVLC( g_aucLog2[spsNext.getMinQTSize(B_SLICE)] - spsNext.getSPS().getLog2MinCodingBlockSize(), "sps_log2_diff_min_qt_min_cb_inter_slice");
WRITE_UVLC( spsNext.getMaxBTDepth(), "sps_max_mtt_hierarchy_depth_inter_slices");
WRITE_UVLC( spsNext.getMaxBTDepthI(), "sps_max_mtt_hierarchy_depth_intra_slices");
if (spsNext.getMaxBTDepthI() != 0)
{
WRITE_UVLC(g_aucLog2[spsNext.getMaxBTSizeI()] - g_aucLog2[spsNext.getMinQTSize(I_SLICE)], "sps_log2_diff_max_bt_min_qt_intra_slice");
WRITE_UVLC(g_aucLog2[spsNext.getMaxTTSizeI()] - g_aucLog2[spsNext.getMinQTSize(I_SLICE)], "sps_log2_diff_max_tt_min_qt_intra_slice");
}
if (spsNext.getMaxBTDepth() != 0)
{
WRITE_UVLC(g_aucLog2[spsNext.getMaxBTSize()] - g_aucLog2[spsNext.getMinQTSize(B_SLICE)], "sps_log2_diff_max_bt_min_qt_inter_slice");
WRITE_UVLC(g_aucLog2[spsNext.getMaxTTSize()] - g_aucLog2[spsNext.getMinQTSize(B_SLICE)], "sps_log2_diff_max_tt_min_qt_inter_slice");
}
if( spsNext.getUseDualITree() )
{
WRITE_UVLC( g_aucLog2[spsNext.getMinQTSize( I_SLICE, CHANNEL_TYPE_CHROMA )] - spsNext.getSPS().getLog2MinCodingBlockSize(), "sps_log2_diff_min_qt_min_cb_intra_slice_chroma");
WRITE_UVLC( spsNext.getMaxBTDepthIChroma(), "sps_max_mtt_hierarchy_depth_intra_slices_chroma");
if (spsNext.getMaxBTDepthIChroma() != 0)
{
WRITE_UVLC(g_aucLog2[spsNext.getMaxBTSizeIChroma()] - g_aucLog2[spsNext.getMinQTSize(I_SLICE, CHANNEL_TYPE_CHROMA)], "sps_log2_diff_max_bt_min_qt_intra_slice_chroma");
WRITE_UVLC(g_aucLog2[spsNext.getMaxTTSizeIChroma()] - g_aucLog2[spsNext.getMinQTSize(I_SLICE, CHANNEL_TYPE_CHROMA)], "sps_log2_diff_max_tt_min_qt_intra_slice_chroma");
}
}
#endif
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
if( spsNext.getUseSubPuMvp() )
{
......@@ -691,11 +662,6 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
}
}
CHECK( pcSPS->getMaxCUWidth() != pcSPS->getMaxCUHeight(), "Rectangular CTUs not supported" );
#if !JVET_L0217_L0678_SPS_CLEANUP
WRITE_UVLC( pcSPS->getLog2MinCodingBlockSize() - 2, "log2_min_luma_coding_block_size_minus2");
WRITE_UVLC( pcSPS->getLog2DiffMaxMinCodingBlockSize(), "log2_diff_max_min_luma_coding_block_size" );
#endif
#if JVET_L0217_L0678_SPS_CLEANUP
WRITE_FLAG(pcSPS->getUseDualITree(), "qtbt_dual_intra_tree");
WRITE_UVLC(g_aucLog2[pcSPS->getCTUSize()] - MIN_CU_LOG2, "log2_CTU_size_minus2");
WRITE_UVLC(pcSPS->getLog2MinCodingBlockSize() - 2, "log2_min_luma_coding_block_size_minus2");
......@@ -724,13 +690,8 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
WRITE_UVLC(g_aucLog2[pcSPS->getMaxTTSizeIChroma()] - g_aucLog2[pcSPS->getMinQTSize(I_SLICE, CHANNEL_TYPE_CHROMA)], "sps_log2_diff_max_tt_min_qt_intra_slice_chroma");
}
}
#endif
WRITE_UVLC( pcSPS->getQuadtreeTULog2MinSize() - 2, "log2_min_luma_transform_block_size_minus2" );
WRITE_UVLC( pcSPS->getQuadtreeTULog2MaxSize() - pcSPS->getQuadtreeTULog2MinSize(), "log2_diff_max_min_luma_transform_block_size" );
#if !JVET_L0217_L0678_SPS_CLEANUP
WRITE_UVLC( pcSPS->getQuadtreeTUMaxDepthInter() - 1, "max_transform_hierarchy_depth_inter" );
WRITE_UVLC( pcSPS->getQuadtreeTUMaxDepthIntra() - 1, "max_transform_hierarchy_depth_intra" );
#endif
WRITE_FLAG( pcSPS->getUseALF(), "sps_alf_enable_flag" );
#if HEVC_USE_SCALING_LISTS
WRITE_FLAG( pcSPS->getScalingListFlag() ? 1 : 0, "scaling_list_enabled_flag" );
......@@ -1263,11 +1224,7 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice )
}
#endif
if (
#if JVET_L0217_L0678_SPS_CLEANUP
pcSlice->getSPS()->getSplitConsOverrideEnabledFlag()
#else
pcSlice->getSPS()->getSpsNext().getSplitConsOverrideEnabledFlag()
#endif
)
{
WRITE_FLAG(pcSlice->getSplitConsOverrideFlag() ? 1 : 0, "partition_constrainst_override_flag");
......@@ -1283,11 +1240,7 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice )
WRITE_UVLC(g_aucLog2[pcSlice->getMaxTTSize()] - g_aucLog2[pcSlice->getMinQTSize()], "log2_diff_max_tt_min_qt");
}
if (
#if JVET_L0217_L0678_SPS_CLEANUP
pcSlice->isIntra() && pcSlice->getSPS()->getUseDualITree()
#else
pcSlice->isIntra() && pcSlice->getSPS()->getSpsNext().getUseDualITree()
#endif
)
{
WRITE_UVLC(g_aucLog2[pcSlice->getMinQTSizeIChroma()] - pcSlice->getSPS()->getLog2MinCodingBlockSize(), "log2_diff_min_qt_min_cb_chroma");
......
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