Commit 4408e289 authored by Karsten Suehring's avatar Karsten Suehring

remove macro JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK

parent 00918743
......@@ -218,9 +218,6 @@ void EncApp::xInitLibCfg()
m_cEncLib.setDualITree ( m_dualTree );
m_cEncLib.setLargeCTU ( m_LargeCTU );
m_cEncLib.setSubPuMvpMode ( m_SubPuMvpMode );
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
m_cEncLib.setSubPuMvpLog2Size ( m_SubPuMvpLog2Size );
#endif
m_cEncLib.setAffine ( m_Affine );
m_cEncLib.setAffineType ( m_AffineType );
m_cEncLib.setBIO (m_BIO);
......
......@@ -813,9 +813,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
("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]")
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
("SubPuMvpLog2Size", m_SubPuMvpLog2Size, 2u, "Sub-PU TMVP size index: 2^n")
#endif
("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")
......@@ -1935,10 +1932,6 @@ bool EncAppCfg::xCheckParameter()
#if ENABLE_WPP_PARALLELISM
xConfirmPara( !m_AltDQPCoding && ( m_numWppThreads + m_numWppExtraLines ) > 1, "Wavefront parallel encoding only supported with AltDQPCoding" );
#endif
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
xConfirmPara( m_SubPuMvpLog2Size < MIN_CU_LOG2, "SubPuMvpLog2Size must be 2 or greater." );
xConfirmPara( m_SubPuMvpLog2Size > 6, "SubPuMvpLog2Size must be 6 or smaller." );
#endif
if( m_depQuantEnabledFlag )
{
xConfirmPara( !m_useRDOQ || !m_useRDOQTS, "RDOQ and RDOQTS must be equal to 1 if dependent quantization is enabled" );
......@@ -3088,12 +3081,6 @@ void EncAppCfg::xPrintParameter()
msg( VERBOSE, "AffineType:%d ", m_AffineType );
}
msg(VERBOSE, "SubPuMvp:%d+%d ", m_SubPuMvpMode & 1, (m_SubPuMvpMode & 2) == 2);
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
if (m_SubPuMvpMode != 0)
{
msg(VERBOSE, "SubPuMvpLog2Size:%d ", m_SubPuMvpLog2Size);
}
#endif
msg( VERBOSE, "DualITree:%d ", m_dualTree );
msg( VERBOSE, "LargeCTU:%d ", m_LargeCTU );
msg( VERBOSE, "IMV:%d ", m_ImvMode );
......
......@@ -205,9 +205,6 @@ protected:
bool m_dualTree;
bool m_LargeCTU;
int m_SubPuMvpMode;
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
unsigned m_SubPuMvpLog2Size;
#endif
bool m_Affine;
bool m_AffineType;
bool m_BIO;
......
......@@ -381,9 +381,7 @@ static const int MAX_LADF_INTERVALS = 5; /// max n
static const int NTAPS_BILINEAR = 2; ///< Number of taps for bilinear filter
#if JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
static const int ATMVP_SUB_BLOCK_SIZE = 3; ///< sub-block size for ATMVP
#endif
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;
......
......@@ -270,18 +270,10 @@ void InterPrediction::xSubPuMC( PredictionUnit& pu, PelUnitBuf& predBuf, const R
int numPartLine, numPartCol, puHeight, puWidth;
{
#if JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
numPartLine = std::max(puSize.width >> ATMVP_SUB_BLOCK_SIZE, 1u);
numPartCol = std::max(puSize.height >> ATMVP_SUB_BLOCK_SIZE, 1u);
puHeight = numPartCol == 1 ? puSize.height : 1 << ATMVP_SUB_BLOCK_SIZE;
puWidth = numPartLine == 1 ? puSize.width : 1 << ATMVP_SUB_BLOCK_SIZE;
#else
const Slice& slice = *pu.cs->slice;
numPartLine = std::max(puSize.width >> slice.getSubPuMvpSubblkLog2Size(), 1u);
numPartCol = std::max(puSize.height >> slice.getSubPuMvpSubblkLog2Size(), 1u);
puHeight = numPartCol == 1 ? puSize.height : 1 << slice.getSubPuMvpSubblkLog2Size();
puWidth = numPartLine == 1 ? puSize.width : 1 << slice.getSubPuMvpSubblkLog2Size();
#endif
}
PredictionUnit subPu;
......
......@@ -121,10 +121,6 @@ Slice::Slice()
, m_temporalLayerNonReferenceFlag ( false )
, m_LFCrossSliceBoundaryFlag ( false )
, m_enableTMVPFlag ( true )
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
, m_subPuMvpSubBlkSizeSliceEnable(false)
, m_subPuMvpSubBlkLog2Size (2)
#endif
, m_encCABACTableIdx (I_SLICE)
, m_iProcessingStartTime ( 0 )
, m_dProcessingTime ( 0 )
......@@ -210,10 +206,6 @@ void Slice::initSlice()
m_cabacInitFlag = false;
m_cabacWinUpdateMode = 0;
m_enableTMVPFlag = true;
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
m_subPuMvpSubBlkSizeSliceEnable = false;
m_subPuMvpSubBlkLog2Size = 2;
#endif
resetMotionLUTs();
}
......@@ -851,10 +843,6 @@ void Slice::copySliceInfo(Slice *pSrc, bool cpyAlmostAll)
m_bLMvdL1Zero = pSrc->m_bLMvdL1Zero;
m_LFCrossSliceBoundaryFlag = pSrc->m_LFCrossSliceBoundaryFlag;
m_enableTMVPFlag = pSrc->m_enableTMVPFlag;
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
m_subPuMvpSubBlkSizeSliceEnable = pSrc->m_subPuMvpSubBlkSizeSliceEnable;
m_subPuMvpSubBlkLog2Size = pSrc->m_subPuMvpSubBlkLog2Size;
#endif
m_maxNumMergeCand = pSrc->m_maxNumMergeCand;
m_maxNumAffineMergeCand = pSrc->m_maxNumAffineMergeCand;
if( cpyAlmostAll ) m_encCABACTableIdx = pSrc->m_encCABACTableIdx;
......@@ -1768,9 +1756,6 @@ SPSNext::SPSNext( SPS& sps )
#endif
// default values for additional parameters
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
, m_subPuLog2Size ( 0 )
#endif
, m_subPuMrgMode ( 0 )
, m_ImvMode ( IMV_OFF )
, m_MTTMode ( 0 )
......
......@@ -829,9 +829,6 @@ private:
//===== additional parameters =====
// qtbt
// sub-pu merging
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
unsigned m_subPuLog2Size;
#endif
int m_subPuMrgMode;
//imv
ImvMode m_ImvMode;
......@@ -894,10 +891,6 @@ public:
//===== additional parameters =====
// qtbt
// sub pu tmvp
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
void setSubPuMvpLog2Size ( unsigned log2Size ) { m_subPuLog2Size = log2Size; }
unsigned getSubPuMvpLog2Size () const { return m_subPuLog2Size; }
#endif
void setImvMode(ImvMode m) { m_ImvMode = m; m_IMV = m != 0; }
ImvMode getImvMode () const { return m_ImvMode; }
......@@ -1642,10 +1635,6 @@ private:
bool m_enableTMVPFlag;
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
bool m_subPuMvpSubBlkSizeSliceEnable;
int m_subPuMvpSubBlkLog2Size;
#endif
SliceType m_encCABACTableIdx; // Used to transmit table selection across slices.
......@@ -1920,12 +1909,6 @@ public:
void setEncCABACTableIdx( SliceType idx ) { m_encCABACTableIdx = idx; }
SliceType getEncCABACTableIdx() const { return m_encCABACTableIdx; }
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
void setSubPuMvpSliceSubblkSizeEnable(bool b) { m_subPuMvpSubBlkSizeSliceEnable = b; }
bool getSubPuMvpSliceSubblkSizeEnable() const { return m_subPuMvpSubBlkSizeSliceEnable; }
void setSubPuMvpSubblkLog2Size(int n) { m_subPuMvpSubBlkLog2Size = n; }
int getSubPuMvpSubblkLog2Size() const { return m_subPuMvpSubBlkLog2Size; }
#endif
void setSliceQpBase( int i ) { m_iSliceQpBase = i; }
int getSliceQpBase() const { return m_iSliceQpBase; }
......
......@@ -131,7 +131,6 @@
#endif
#define JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK 1 // Fix sub-block size to 8x8 in ATMVP as proposed in L0198, L0468 and L0104
#define JVET_L0198_ATMVP_SCAN_SIMP 1 // Simplification for scan process in ATMVP cTMv derivation
#define JVET_L0696_CONSTRAINT_SYNTAX 1 // Starting point for interoperability point syntax
#define JVET_L0428_DQP_SEP_TREE 1 // Delta QP for Separate Tree
......
......@@ -3242,17 +3242,10 @@ bool PU::getInterMergeSubPuMvpCand(const PredictionUnit &pu, MergeCtx& mrgCtx, b
// compute the location of the current PU
Position puPos = pu.lumaPos();
Size puSize = pu.lumaSize();
#if JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
int numPartLine = std::max(puSize.width >> ATMVP_SUB_BLOCK_SIZE, 1u);
int numPartCol = std::max(puSize.height >> ATMVP_SUB_BLOCK_SIZE, 1u);
int puHeight = numPartCol == 1 ? puSize.height : 1 << ATMVP_SUB_BLOCK_SIZE;
int puWidth = numPartLine == 1 ? puSize.width : 1 << ATMVP_SUB_BLOCK_SIZE;
#else
int numPartLine = std::max(puSize.width >> slice.getSubPuMvpSubblkLog2Size(), 1u);
int numPartCol = std::max(puSize.height >> slice.getSubPuMvpSubblkLog2Size(), 1u);
int puHeight = numPartCol == 1 ? puSize.height : 1 << slice.getSubPuMvpSubblkLog2Size();
int puWidth = numPartLine == 1 ? puSize.width : 1 << slice.getSubPuMvpSubblkLog2Size();
#endif
Mv cColMv;
// use coldir.
......
......@@ -819,9 +819,6 @@ void HLSyntaxReader::parseSPSNext( SPSNext& spsNext, const bool usePCM )
// additional parameters
if( spsNext.getUseSubPuMvp() )
{
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
READ_CODE( 3, symbol, "log2_sub_pu_tmvp_size_minus2" ); spsNext.setSubPuMvpLog2Size( symbol + MIN_CU_LOG2 );
#endif
int subPuMode = 1;
spsNext.setSubPuMvpMode( subPuMode );
}
......@@ -1858,22 +1855,6 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, ParameterSetManager *para
{
pcSlice->setDefaultClpRng( *sps );
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
if (sps->getSpsNext().getUseSubPuMvp() && !pcSlice->isIntra())
{
READ_FLAG(uiCode, "slice_atmvp_subblk_size_enable_flag");
pcSlice->setSubPuMvpSliceSubblkSizeEnable(uiCode);
if (pcSlice->getSubPuMvpSliceSubblkSizeEnable())
{
READ_CODE(3, uiCode, "log2_slice_sub_pu_tmvp_size_minus2");
pcSlice->setSubPuMvpSubblkLog2Size(uiCode + MIN_CU_LOG2);
}
else
{
pcSlice->setSubPuMvpSubblkLog2Size(sps->getSpsNext().getSubPuMvpLog2Size());
}
}
#endif
}
if(pps->getSliceHeaderExtensionPresentFlag())
......
......@@ -507,18 +507,6 @@ void CABACWriter::coding_tree(const CodingStructure& cs, Partitioner& partitione
cuCtx.qp = CU::predictQP( cu, cuCtx.qp );
}
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
if (!cs.slice->isIntra() && m_EncCu)
{
PredictionUnit& pu = *cu.firstPU;
if (pu.mergeFlag && (pu.mergeType == MRG_TYPE_SUBPU_ATMVP))
{
unsigned int layerId = cs.slice->getDepth();
m_EncCu->incrementSubMergeBlkSize(layerId, cu.Y().width*cu.Y().height);
m_EncCu->incrementSubMergeBlkNum(layerId, 1);
}
}
#endif
// coding unit
coding_unit( cu, partitioner, cuCtx );
......
......@@ -210,9 +210,6 @@ protected:
int m_FastInterEMT;
bool m_LargeCTU;
int m_SubPuMvpMode;
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
unsigned m_SubPuMvpLog2Size;
#endif
bool m_Affine;
bool m_AffineType;
bool m_BIO;
......@@ -684,10 +681,6 @@ public:
void setSubPuMvpMode(int n) { m_SubPuMvpMode = n; }
bool getSubPuMvpMode() const { return m_SubPuMvpMode; }
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
void setSubPuMvpLog2Size(unsigned n) { m_SubPuMvpLog2Size = n; }
unsigned getSubPuMvpLog2Size() const { return m_SubPuMvpLog2Size; }
#endif
void setAffine ( bool b ) { m_Affine = b; }
bool getAffine () const { return m_Affine; }
......
......@@ -279,9 +279,6 @@ void EncCu::init( EncLib* pcEncLib, const SPS& sps PARL_PARAM( const int tId ) )
::memset(m_subMergeBlkSize, 0, sizeof(m_subMergeBlkSize));
::memset(m_subMergeBlkNum, 0, sizeof(m_subMergeBlkNum));
m_prevPOC = MAX_UINT;
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
m_clearSubMergeStatic = false;
#endif
if (m_pcEncCfg->getCPRHashSearch() && m_pcEncCfg->getCPRMode())
{
......
......@@ -120,9 +120,6 @@ private:
unsigned int m_subMergeBlkSize[10];
unsigned int m_subMergeBlkNum[10];
unsigned int m_prevPOC;
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
bool m_clearSubMergeStatic;
#endif
int m_ctuCprSearchRangeX;
int m_ctuCprSearchRangeY;
#if ENABLE_SPLIT_PARALLELISM || ENABLE_WPP_PARALLELISM
......@@ -151,27 +148,6 @@ public:
EncModeCtrl* getModeCtrl () { return m_modeCtrl; }
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
void clearSubMergeStatics()
{
::memset(m_subMergeBlkSize, 0, sizeof(m_subMergeBlkSize));
::memset(m_subMergeBlkNum, 0, sizeof(m_subMergeBlkNum));
}
void clearOneTLayerSubMergeStatics(unsigned int layer)
{
m_subMergeBlkSize[layer] = 0;
m_subMergeBlkNum[layer] = 0;
}
unsigned int getSubMergeBlkSize(unsigned int layer) { return m_subMergeBlkSize[layer]; }
unsigned int getSubMergeBlkNum(unsigned int layer) { return m_subMergeBlkNum[layer]; }
void incrementSubMergeBlkSize(unsigned int layer, unsigned int inc) { m_subMergeBlkSize[layer] += inc; }
void incrementSubMergeBlkNum(unsigned int layer, unsigned int inc) { m_subMergeBlkNum[layer] += inc; }
void setPrevPOC(unsigned int poc) { m_prevPOC = poc; }
unsigned int getPrevPOC() { return m_prevPOC; }
void setClearSubMergeStatic(bool b) { m_clearSubMergeStatic = b; }
bool getClearSubMergeStatic() { return m_clearSubMergeStatic; }
#endif
void setMergeBestSATDCost(double cost) { m_mergeBestSATDCost = cost; }
double getMergeBestSATDCost() { return m_mergeBestSATDCost; }
......
......@@ -850,9 +850,6 @@ void EncLib::xInitSPS(SPS &sps)
sps.setMaxBTDepth ( m_uiMaxBTDepth, m_uiMaxBTDepthI, m_uiMaxBTDepthIChroma );
sps.setUseDualITree ( m_dualITree );
sps.getSpsNext().setSubPuMvpMode ( m_SubPuMvpMode );
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
sps.getSpsNext().setSubPuMvpLog2Size(m_SubPuMvpLog2Size);
#endif
sps.getSpsNext().setImvMode ( ImvMode(m_ImvMode) );
sps.getSpsNext().setUseIMV ( m_ImvMode != IMV_OFF );
sps.getSpsNext().setUseBIO ( m_BIO );
......
......@@ -1185,69 +1185,6 @@ void EncSlice::compressSlice( Picture* pcPic, const bool bCompressEntireSlice, c
#endif
m_pcCuEncoder->getModeCtrl()->setFastDeltaQp(bFastDeltaQP);
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
if (pcSlice->getSPS()->getSpsNext().getUseSubPuMvp())
{
if (!pcSlice->isIRAP() )
{
if (pcSlice->getPOC() > m_pcCuEncoder->getPrevPOC() && m_pcCuEncoder->getClearSubMergeStatic())
{
m_pcCuEncoder->clearSubMergeStatics();
m_pcCuEncoder->setClearSubMergeStatic(false);
}
#if JVET_L0198_ATMVP_8x8SUB_BLOCK
pcSlice->setSubPuMvpSubblkLog2Size(ATMVP_SUB_BLOCK_SIZE);
#else
unsigned int layer = pcSlice->getDepth();
unsigned int subMergeBlkSize = m_pcCuEncoder->getSubMergeBlkSize(layer);
unsigned int subMergeBlkNum = m_pcCuEncoder->getSubMergeBlkNum(layer);
if (subMergeBlkNum > 0)
{
unsigned int subMergeBlkSizeTh = pcSlice->getCheckLDC() ? 75 : 27;
unsigned int aveBlkSize = subMergeBlkSize / subMergeBlkNum;
if (aveBlkSize < (subMergeBlkSizeTh*subMergeBlkSizeTh))
{
pcSlice->setSubPuMvpSubblkLog2Size(2);
}
else
{
pcSlice->setSubPuMvpSubblkLog2Size(3);
}
m_pcCuEncoder->clearOneTLayerSubMergeStatics(layer);
}
else
{
pcSlice->setSubPuMvpSubblkLog2Size(pcSlice->getSPS()->getSpsNext().getSubPuMvpLog2Size());
CHECK(subMergeBlkSize != 0, "subMerge blksize should be 0");
}
if (pcSlice->getSubPuMvpSubblkLog2Size() == pcSlice->getSPS()->getSpsNext().getSubPuMvpLog2Size())
{
pcSlice->setSubPuMvpSliceSubblkSizeEnable(false);
}
else
{
pcSlice->setSubPuMvpSliceSubblkSizeEnable(true);
}
#endif
}
else
{
m_pcCuEncoder->setPrevPOC(pcSlice->getPOC());
if (m_pcCfg->getGOPSize() != m_pcCfg->getIntraPeriod())
{
m_pcCuEncoder->setClearSubMergeStatic(true);
}
else
{
m_pcCuEncoder->clearSubMergeStatics();
m_pcCuEncoder->setClearSubMergeStatic(false);
}
}
}
#endif
//------------------------------------------------------------------------------
// Weighted Prediction parameters estimation.
......
......@@ -558,12 +558,6 @@ void HLSWriter::codeSPSNext( const SPSNext& spsNext, const bool usePCM )
#endif
// additional parameters
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
if( spsNext.getUseSubPuMvp() )
{
WRITE_CODE( spsNext.getSubPuMvpLog2Size() - MIN_CU_LOG2, 3, "log2_sub_pu_tmvp_size_minus2" );
}
#endif
if( spsNext.getUseIMV() )
{
......@@ -1324,16 +1318,6 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice )
}
#endif
#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK
if (pcSlice->getSPS()->getSpsNext().getUseSubPuMvp() && !pcSlice->isIntra())
{
WRITE_FLAG(pcSlice->getSubPuMvpSliceSubblkSizeEnable(), "slice_atmvp_subblk_size_enable_flag");
if (pcSlice->getSubPuMvpSliceSubblkSizeEnable())
{
WRITE_CODE(pcSlice->getSubPuMvpSubblkLog2Size() - MIN_CU_LOG2, 3, "log2_slice_sub_pu_tmvp_size_minus2");
}
}
#endif
if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag())
{
WRITE_UVLC(0,"slice_segment_header_extension_length");
......
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