diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index ab7fcde8ec6df67dad3d9bf65d03174e30a64e04..9a24d2519a637771e8f8a638a89c8a99b8c3d708 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 fc12314b2aeedd2f4357acd99e0cba4fe8f0f06d..1a7f985210eec0e0e26fc03ee09528a70a42ae3a 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 @@ -1968,8 +1970,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" ); @@ -3138,10 +3142,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 712a0e1276075c1389a703d31eba94034b292c90..dcfe96e34a250e739b3f4d7288b8a43dd3041390 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 02bbfa14e463147ba051ba1c709dec33cc5ef0bb..d99bc8cd3b32aa3328dda838af5f4f82d7fe1552 100644 --- a/source/Lib/CommonLib/CommonDef.h +++ b/source/Lib/CommonLib/CommonDef.h @@ -407,6 +407,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 d980b24cc05c874241e46be5acb47342d03830ad..62735bdd00487fc719dbb8b5a9d67bef0534b500 100644 --- a/source/Lib/CommonLib/InterPrediction.cpp +++ b/source/Lib/CommonLib/InterPrediction.cpp @@ -267,11 +267,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 61e3c8fd94c8b40ed4dd23ce7710a32ca06e2c92..6c41a25bda56c00d8cc693e9ceeb5f24992eca26 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -122,8 +122,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 ) @@ -216,8 +218,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 @@ -835,8 +839,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( cpyAlmostAll ) m_encCABACTableIdx = pSrc->m_encCABACTableIdx; #if JVET_L0217_L0678_PARTITION_HIGHLEVEL_CONSTRAINT @@ -1767,7 +1773,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 8cbcfee8795e65767309db01ed782f10b68b45ef..29206bd7f921e6a9176cff81964bf1479458fd83 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -848,7 +848,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; @@ -952,8 +954,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; } @@ -1587,8 +1591,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. @@ -1867,10 +1873,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 61f67ef29d25ce1c5ee3b17a31e736b9ce3fd852..505992e77ef7520886937cc96dc9962690791992 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -144,6 +144,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 217ac49b644006ddf60a01974b8f733f7bf84441..1ae6bd144c1835c2a5062e650dedae9ff2f0bd1a 100644 --- a/source/Lib/CommonLib/UnitTools.cpp +++ b/source/Lib/CommonLib/UnitTools.cpp @@ -2593,6 +2593,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); @@ -2605,6 +2619,7 @@ bool PU::getInterMergeSubPuMvpCand(const PredictionUnit &pu, MergeCtx& mrgCtx, b break; } } +#endif } /////////////////////////////////////////////////////////////////////// @@ -2630,10 +2645,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 908bd0020d4c585116b5414f000b47b2aff9f038..1f1a3ce737918085779366b5b5809be1330a0768 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -892,8 +892,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 ); @@ -1877,6 +1878,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"); @@ -1891,6 +1894,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 7636c2b34f332af8b0c695fa3854eb66ccde4002..b1f926bf2f7bdfda31c6686652410876f2a8c9ed 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 00826ad0231d92fbcea10c1c35c75a093149368e..82afb0a215dc60a87ac21bd9154d51cab4ddc731 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 @@ -625,8 +627,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 e2721cf645858fb11d041f17ece419b4733d0590..a800f79ff849b8f124a29f8224be1f0cb9c98ac5 100644 --- a/source/Lib/EncoderLib/EncCu.cpp +++ b/source/Lib/EncoderLib/EncCu.cpp @@ -328,7 +328,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 91dce9f29bf40ac80bb7bb47a7342a2f7842cc41..0142e6d7f66d7e8b2b609f7429571ab4c0a1e999 100644 --- a/source/Lib/EncoderLib/EncCu.h +++ b/source/Lib/EncoderLib/EncCu.h @@ -121,7 +121,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 @@ -150,6 +152,7 @@ public: EncModeCtrl* getModeCtrl () { return m_modeCtrl; } +#if !JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK void clearSubMergeStatics() { ::memset(m_subMergeBlkSize, 0, sizeof(m_subMergeBlkSize)); @@ -169,6 +172,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 5f0cdc5613c9418498a623bf9db84c66a1ce12d3..488a27a88dae41a6ea7d76379b59241c92910a94 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 84994c21fa1caedb22671714471d3e72aae63503..abec820f06d7264ac5b6e4c86882877ad1d15c27 100644 --- a/source/Lib/EncoderLib/EncSlice.cpp +++ b/source/Lib/EncoderLib/EncSlice.cpp @@ -1188,6 +1188,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() ) @@ -1198,6 +1199,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); @@ -1230,6 +1234,7 @@ void EncSlice::compressSlice( Picture* pcPic, const bool bCompressEntireSlice, c { pcSlice->setSubPuMvpSliceSubblkSizeEnable(true); } +#endif } else { @@ -1245,6 +1250,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 7ad505f512d60bc9a81a7895d096f1ceb4ddee52..013e14f50e805496d0e38df5d0677be220557c60 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -606,10 +606,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() ) { @@ -1322,6 +1324,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"); @@ -1330,6 +1333,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");