diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 13cfd5424359547960b93fb5074f78821db48a82..9648f03c03c30349f44bd21e7d3b883e998c3768 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -225,7 +225,9 @@ void EncApp::xInitLibCfg() #else m_cEncLib.setSubPuMvpMode ( m_SubPuMvpMode > 0 ? 3 : 0 ); #endif +#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK m_cEncLib.setSubPuMvpLog2Size ( m_SubPuMvpLog2Size ); +#endif m_cEncLib.setAffine ( m_Affine ); m_cEncLib.setAffineType ( m_AffineType ); #if !REMOVE_MV_ADAPT_PREC diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 93ba9529181ae4b5ec1b27040803aace83871196..61ef4ebaa7cd82bbb43a32e39dec4f51c1bd556c 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -820,7 +820,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) #else ("SubPuMvp", m_SubPuMvpMode, 0, "Enable Sub-PU temporal motion vector prediction (0:off, 1:on) [default: off]") #endif +#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK ("SubPuMvpLog2Size", m_SubPuMvpLog2Size, 2u, "Sub-PU TMVP size index: 2^n") +#endif #if !REMOVE_MV_ADAPT_PREC ("HighPrecMv", m_highPrecisionMv, false, "High precision motion vectors for temporal merging (0:off, 1:on) [default: off]") #endif @@ -1974,8 +1976,10 @@ 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" ); @@ -3159,10 +3163,12 @@ 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, "QTBT:%d ", m_QTBT ); if( m_QTBT ) msg( VERBOSE, "DualITree:%d ", m_dualTree ); msg( VERBOSE, "LargeCTU:%d ", m_LargeCTU ); diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 27b243101c3994867ca1562fc96e7abfa0501d92..f71a85b0aacc33f679224e4fef13c831a17c4a59 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -208,7 +208,9 @@ 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; #if !REMOVE_MV_ADAPT_PREC diff --git a/source/Lib/CommonLib/CommonDef.h b/source/Lib/CommonLib/CommonDef.h index 5a33b266bb8d60e1a42303749c89a58586114ae0..a75d7eb89385e4b98595249c57766ddfb3d74245 100644 --- a/source/Lib/CommonLib/CommonDef.h +++ b/source/Lib/CommonLib/CommonDef.h @@ -418,6 +418,9 @@ static const int MAX_LADF_INTERVALS = 5; /// max n static const int NTAPS_BILINEAR = 2; ///< Number of taps for bilinear filter #endif +#if JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK +static const int ATMVP_SUB_BLOCK_SIZE = 3; ///< sub-block size for ATMVP +#endif // ==================================================================================================================== // Macro functions // ==================================================================================================================== diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp index 7a7979567ab97666f770c1f50d3039e8eaab252d..52eb710aa8a30bf8df8e98cf73da557540c0c9e0 100644 --- a/source/Lib/CommonLib/InterPrediction.cpp +++ b/source/Lib/CommonLib/InterPrediction.cpp @@ -282,11 +282,18 @@ 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; diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index 366b4ae302ec4324df2fb8c3fc37b924fd0039f5..d0010f49a2ea6a7d3e264304b413459a5d4a89a2 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -125,8 +125,10 @@ 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 ) @@ -222,8 +224,10 @@ 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 #if JVET_L0266_HMVP resetMotionLUTs(); #endif @@ -841,8 +845,10 @@ 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; #if JVET_L0632_AFFINE_MERGE m_maxNumAffineMergeCand = pSrc->m_maxNumAffineMergeCand; @@ -1779,7 +1785,9 @@ SPSNext::SPSNext( SPS& sps ) #if JVET_L0217_L0678_PARTITION_HIGHLEVEL_CONSTRAINT , 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 , m_subPuMrgMode ( 0 ) , m_ImvMode ( IMV_OFF ) , m_MTTMode ( 0 ) diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 617855753cf51071d9bc7cfbb1e8f45774085c37..c0dc3d739b36c354cfdcd6e35823643fb2085ce0 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -851,7 +851,9 @@ private: #endif unsigned m_dualITree; // sub-pu merging +#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK unsigned m_subPuLog2Size; +#endif int m_subPuMrgMode; //imv ImvMode m_ImvMode; @@ -955,8 +957,10 @@ public: bool getUseDualITree () const { return m_dualITree; } // 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; } @@ -1598,8 +1602,10 @@ 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. @@ -1882,10 +1888,12 @@ 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; } diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 0946ac1ed2805bb613806e8db674423fdb2dbf14..5705cf8da8951f748bd454fc133605ab83bac52d 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -164,6 +164,8 @@ #endif #define JVET_L0217_L0678_PARTITION_HIGHLEVEL_CONSTRAINT 1 +#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 // ==================================================================================================================== // NEXT software switches diff --git a/source/Lib/CommonLib/UnitTools.cpp b/source/Lib/CommonLib/UnitTools.cpp index d83b2b1637c8e73aa0edeee9b66b9aaa945028d7..2751f355f06024c1c0f1f03b84f7b63b703a430f 100644 --- a/source/Lib/CommonLib/UnitTools.cpp +++ b/source/Lib/CommonLib/UnitTools.cpp @@ -3682,6 +3682,20 @@ bool PU::getInterMergeSubPuMvpCand(const PredictionUnit &pu, MergeCtx& mrgCtx, b bool terminate = false; for (unsigned currRefListId = 0; currRefListId < (slice.getSliceType() == B_SLICE ? 2 : 1) && !terminate; currRefListId++) { +#if JVET_L0198_ATMVP_SCAN_SIMP + if ( count ) + { + RefPicList currRefPicList = RefPicList(slice.getCheckLDC() ? (slice.getColFromL0Flag() ? currRefListId : 1 - currRefListId) : currRefListId); + + if ((mrgCtx.interDirNeighbours[0] & (1 << currRefPicList)) && slice.getRefPic(currRefPicList, mrgCtx.mvFieldNeighbours[0 * 2 + currRefPicList].refIdx) == pColPic) + { + cTMv = mrgCtx.mvFieldNeighbours[0 * 2 + currRefPicList].mv; + terminate = true; + fetchRefPicList = currRefPicList; + break; + } + } +#else for (int uiN = 0; uiN < count && !terminate; uiN++) { RefPicList currRefPicList = RefPicList(slice.getCheckLDC() ? (slice.getColFromL0Flag() ? currRefListId : 1 - currRefListId) : currRefListId); @@ -3694,6 +3708,7 @@ bool PU::getInterMergeSubPuMvpCand(const PredictionUnit &pu, MergeCtx& mrgCtx, b break; } } +#endif } /////////////////////////////////////////////////////////////////////// @@ -3719,10 +3734,17 @@ 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. diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 9113f8ec21bc523ad85b6a6bd68ae25b8f007e9a..01f7de1bc2de55d656cff28f3a2bda97ee0d8f96 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -895,8 +895,9 @@ void HLSyntaxReader::parseSPSNext( SPSNext& spsNext, const bool usePCM ) 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 #if ENABLE_BMS int subPuMode = 1; spsNext.setSubPuMvpMode( subPuMode ); @@ -1899,6 +1900,8 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, ParameterSetManager *para if( firstSliceSegmentInPic ) { 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"); @@ -1913,6 +1916,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, ParameterSetManager *para pcSlice->setSubPuMvpSubblkLog2Size(sps->getSpsNext().getSubPuMvpLog2Size()); } } +#endif } if(pps->getSliceHeaderExtensionPresentFlag()) diff --git a/source/Lib/EncoderLib/CABACWriter.cpp b/source/Lib/EncoderLib/CABACWriter.cpp index 45a506f16f063321aab4959944dab4bff1432965..cc956a3f82528134f27b087d26a6dc982e8ab57e 100644 --- a/source/Lib/EncoderLib/CABACWriter.cpp +++ b/source/Lib/EncoderLib/CABACWriter.cpp @@ -507,6 +507,7 @@ 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; @@ -517,6 +518,7 @@ void CABACWriter::coding_tree(const CodingStructure& cs, Partitioner& partitione m_EncCu->incrementSubMergeBlkNum(layerId, 1); } } +#endif // coding unit coding_unit( cu, partitioner, cuCtx ); diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index bd830168053bb9becc808c128506452be9d52742..d346ec04c147b9679c350633b2ba812a1b3e9b7a 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -194,7 +194,9 @@ 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; #if !REMOVE_MV_ADAPT_PREC @@ -632,8 +634,10 @@ 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; } diff --git a/source/Lib/EncoderLib/EncCu.cpp b/source/Lib/EncoderLib/EncCu.cpp index 1ae62284049c75ecaf21581df7cde9eb2075b85d..23a755c29d257852cb5aef781eed7826eda1fecf 100644 --- a/source/Lib/EncoderLib/EncCu.cpp +++ b/source/Lib/EncoderLib/EncCu.cpp @@ -340,7 +340,9 @@ 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 } // ==================================================================================================================== diff --git a/source/Lib/EncoderLib/EncCu.h b/source/Lib/EncoderLib/EncCu.h index 3607a2f23ecd8ce64a1d3ad6fef7fc600a2c9bf2..fbc2b7603b387a6a7672c4409e4a34090a5f00f5 100644 --- a/source/Lib/EncoderLib/EncCu.h +++ b/source/Lib/EncoderLib/EncCu.h @@ -124,7 +124,9 @@ 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 #if ENABLE_SPLIT_PARALLELISM || ENABLE_WPP_PARALLELISM EncLib* m_pcEncLib; #endif @@ -153,6 +155,7 @@ public: EncModeCtrl* getModeCtrl () { return m_modeCtrl; } +#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK void clearSubMergeStatics() { ::memset(m_subMergeBlkSize, 0, sizeof(m_subMergeBlkSize)); @@ -172,6 +175,7 @@ public: unsigned int getPrevPOC() { return m_prevPOC; } void setClearSubMergeStatic(bool b) { m_clearSubMergeStatic = b; } bool getClearSubMergeStatic() { return m_clearSubMergeStatic; } +#endif ~EncCu(); diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index c3c395ad5ec73da70419ee61000a9490b477a0db..d46b5e17bc818c45b301fe91159d4d277a20de2b 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -838,7 +838,9 @@ void EncLib::xInitSPS(SPS &sps) sps.getSpsNext().setMaxBTDepth ( m_uiMaxBTDepth, m_uiMaxBTDepthI, m_uiMaxBTDepthIChroma ); sps.getSpsNext().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 ); #if !REMOVE_MV_ADAPT_PREC diff --git a/source/Lib/EncoderLib/EncSlice.cpp b/source/Lib/EncoderLib/EncSlice.cpp index 65d3b6c66e10014511d7ec3a3b12d02d760bd77f..b8678d4b742bbef5392d3cecfa747331fb259908 100644 --- a/source/Lib/EncoderLib/EncSlice.cpp +++ b/source/Lib/EncoderLib/EncSlice.cpp @@ -1191,6 +1191,7 @@ 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() ) @@ -1201,6 +1202,9 @@ void EncSlice::compressSlice( Picture* pcPic, const bool bCompressEntireSlice, c 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); @@ -1233,6 +1237,7 @@ void EncSlice::compressSlice( Picture* pcPic, const bool bCompressEntireSlice, c { pcSlice->setSubPuMvpSliceSubblkSizeEnable(true); } +#endif } else { @@ -1248,6 +1253,7 @@ void EncSlice::compressSlice( Picture* pcPic, const bool bCompressEntireSlice, c } } } +#endif //------------------------------------------------------------------------------ // Weighted Prediction parameters estimation. diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index c8a270f6a806496b6fd8aaab005262859ef8e8a2..0a020ba065a55e4650890427b374e02cbf8ac3d4 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -609,10 +609,12 @@ void HLSWriter::codeSPSNext( const SPSNext& spsNext, const bool usePCM ) } } +#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() ) { @@ -1350,6 +1352,7 @@ 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"); @@ -1358,6 +1361,7 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) 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");