diff --git a/doc/software-manual.tex b/doc/software-manual.tex index bc360772d040e0ceffa998b6e81b59ecd82d1b97..708b98cf48d2ef12264bb611b8dcea5ff9defac9 100755 --- a/doc/software-manual.tex +++ b/doc/software-manual.tex @@ -2159,12 +2159,6 @@ Sets the Weighted Prediction method to be used. \\ -\Option{Log2ParallelMergeLevel} & -%\ShortOption{\None} & -\Default{2} & -Defines the PPS-derived Log2ParMrgLevel variable. -\\ - \Option{SignHideFlag (-SBH)} & %\ShortOption{-SBH} & \Default{true} & diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index ac44dfd597a6e3a170ea7f8ad1cab4b5d8679dde..762ec495c6ab45d835db602324b001391ed547b3 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -441,9 +441,6 @@ void EncApp::xInitLibCfg() m_cEncLib.setUseWP ( m_useWeightedPred ); m_cEncLib.setWPBiPred ( m_useWeightedBiPred ); - //====== Parallel Merge Estimation ======== - m_cEncLib.setLog2ParallelMergeLevelMinus2 ( m_log2ParallelMergeLevel - 2 ); - //====== Slice ======== m_cEncLib.setSliceMode ( m_sliceMode ); m_cEncLib.setSliceArgument ( m_sliceArgument ); diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index af18ecd6b2b220dede17f8a93c565fa0012159f5..807fe202fe39785c094a2c347a135acd5104b8db 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -1194,7 +1194,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("WeightedPredP,-wpP", m_useWeightedPred, false, "Use weighted prediction in P slices") ("WeightedPredB,-wpB", m_useWeightedBiPred, false, "Use weighted (bidirectional) prediction in B slices") ("WeightedPredMethod,-wpM", tmpWeightedPredictionMethod, int(WP_PER_PICTURE_WITH_SIMPLE_DC_COMBINED_COMPONENT), "Weighted prediction method") - ("Log2ParallelMergeLevel", m_log2ParallelMergeLevel, 2u, "Parallel merge estimation region") //deprecated copies of renamed tile parameters ("UniformSpacingIdc", m_tileUniformSpacingFlag, false, "deprecated alias of TileUniformSpacing") ("TileUniformSpacing", m_tileUniformSpacingFlag, false, "Indicates that tile columns and rows are distributed uniformly") @@ -3494,8 +3493,6 @@ bool EncAppCfg::xCheckParameter() xConfirmPara(!m_TransquantBypassEnabledFlag && m_CUTransquantBypassFlagForce, "CUTransquantBypassFlagForce cannot be 1 when TransquantBypassEnableFlag is 0"); - xConfirmPara(m_log2ParallelMergeLevel < 2, "Log2ParallelMergeLevel should be larger than or equal to 2"); - #if HEVC_SEI if (m_framePackingSEIEnabled) { @@ -3744,7 +3741,6 @@ void EncAppCfg::xPrintParameter() msg( VERBOSE, "WPP:%d ", (int)m_useWeightedPred); msg( VERBOSE, "WPB:%d ", (int)m_useWeightedBiPred); - msg( VERBOSE, "PME:%d ", m_log2ParallelMergeLevel); const int iWaveFrontSubstreams = m_entropyCodingSyncEnabledFlag ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1; msg( VERBOSE, " WaveFrontSynchro:%d WaveFrontSubstreams:%d", m_entropyCodingSyncEnabledFlag?1:0, iWaveFrontSubstreams); msg( VERBOSE, " ScalingList:%d ", m_useScalingListId ); diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index db4244e4ce1a20a83f6a36834bb20109cef819eb..9aec8317313856250273fc68ad2face6824b5b28 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -550,7 +550,6 @@ protected: bool m_useWeightedBiPred; ///< Use of bi-directional weighted prediction in B slices WeightedPredictionMethod m_weightedPredictionMethod; - uint32_t m_log2ParallelMergeLevel; ///< Parallel merge estimation region uint32_t m_maxNumMergeCand; ///< Max number of merge candidates uint32_t m_maxNumAffineMergeCand; ///< Max number of affine merge candidates uint32_t m_maxNumTriangleCand; diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index a87309355adaef3c41e1181feacf744c7346e0b0..5e16b868013fed9357967398caa072f1d07594d4 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -1483,7 +1483,6 @@ private: int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter bool m_listsModificationPresentFlag; - uint32_t m_log2ParallelMergeLevelMinus2; #if !JVET_P1006_PICTURE_HEADER bool m_loopFilterAcrossVirtualBoundariesDisabledFlag; @@ -1715,8 +1714,6 @@ public: int getDeblockingFilterTcOffsetDiv2() const { return m_deblockingFilterTcOffsetDiv2; } //!< get tc offset for deblocking filter bool getListsModificationPresentFlag() const { return m_listsModificationPresentFlag; } void setListsModificationPresentFlag( bool b ) { m_listsModificationPresentFlag = b; } - uint32_t getLog2ParallelMergeLevelMinus2() const { return m_log2ParallelMergeLevelMinus2; } - void setLog2ParallelMergeLevelMinus2(uint32_t mrgLevel) { m_log2ParallelMergeLevelMinus2 = mrgLevel; } void setLoopFilterAcrossSlicesEnabledFlag( bool bValue ) { m_loopFilterAcrossSlicesEnabledFlag = bValue; } bool getLoopFilterAcrossSlicesEnabledFlag() const { return m_loopFilterAcrossSlicesEnabledFlag; } #if JVET_P1006_PICTURE_HEADER diff --git a/source/Lib/CommonLib/UnitTools.cpp b/source/Lib/CommonLib/UnitTools.cpp index e913c85d8f1c4576fc19cd86cdbcc25f9181cfaf..62ff927bae9c8648d10fe4bf74073a3cf35937bd 100644 --- a/source/Lib/CommonLib/UnitTools.cpp +++ b/source/Lib/CommonLib/UnitTools.cpp @@ -663,7 +663,7 @@ int PU::getWideAngIntraMode( const TransformUnit &tu, const uint32_t dirMode, co } -bool PU::addMergeHMVPCand(const CodingStructure &cs, MergeCtx& mrgCtx, const bool canFastExit, const int& mrgCandIdx, const uint32_t maxNumMergeCandMin1, int &cnt +bool PU::addMergeHMVPCand(const CodingStructure &cs, MergeCtx& mrgCtx, const int& mrgCandIdx, const uint32_t maxNumMergeCandMin1, int &cnt , const bool isAvailableA1, const MotionInfo miLeft, const bool isAvailableB1, const MotionInfo miAbove , const bool ibcFlag #if !JVET_P0400_REMOVE_SHARED_MERGE_LIST @@ -701,7 +701,7 @@ bool PU::addMergeHMVPCand(const CodingStructure &cs, MergeCtx& mrgCtx, const boo mrgCtx.mvFieldNeighbours[(cnt << 1) + 1].setMvField(miNeighbor.mv[1], miNeighbor.refIdx[1]); } - if (mrgCandIdx == cnt && canFastExit) + if (mrgCandIdx == cnt) { return true; } @@ -731,7 +731,6 @@ void PU::getIBCMergeCandidates(const PredictionUnit &pu, MergeCtx& mrgCtx, const #else const uint32_t maxNumMergeCand = slice.getMaxNumIBCMergeCand(); #endif - const bool canFastExit = pu.cs->pps->getLog2ParallelMergeLevelMinus2() == 0; for (uint32_t ui = 0; ui < maxNumMergeCand; ++ui) { @@ -776,7 +775,7 @@ void PU::getIBCMergeCandidates(const PredictionUnit &pu, MergeCtx& mrgCtx, const mrgCtx.interDirNeighbours[cnt] = miLeft.interDir; // get Mv from Left mrgCtx.mvFieldNeighbours[cnt << 1].setMvField(miLeft.mv[0], miLeft.refIdx[0]); - if (mrgCandIdx == cnt && canFastExit) + if (mrgCandIdx == cnt) { return; } @@ -806,7 +805,7 @@ void PU::getIBCMergeCandidates(const PredictionUnit &pu, MergeCtx& mrgCtx, const mrgCtx.interDirNeighbours[cnt] = miAbove.interDir; // get Mv from Above mrgCtx.mvFieldNeighbours[cnt << 1].setMvField(miAbove.mv[0], miAbove.refIdx[0]); - if (mrgCandIdx == cnt && canFastExit) + if (mrgCandIdx == cnt) { return; } @@ -826,7 +825,7 @@ void PU::getIBCMergeCandidates(const PredictionUnit &pu, MergeCtx& mrgCtx, const #if !JVET_P0400_REMOVE_SHARED_MERGE_LIST bool isShared = ((pu.Y().lumaSize().width != pu.shareParentSize.width) || (pu.Y().lumaSize().height != pu.shareParentSize.height)); #endif - bool bFound = addMergeHMVPCand(cs, mrgCtx, canFastExit, mrgCandIdx, maxNumMergeCand, cnt + bool bFound = addMergeHMVPCand(cs, mrgCtx, mrgCandIdx, maxNumMergeCand, cnt , isAvailableA1, miLeft, isAvailableB1, miAbove , true #if !JVET_P0400_REMOVE_SHARED_MERGE_LIST @@ -848,7 +847,7 @@ void PU::getIBCMergeCandidates(const PredictionUnit &pu, MergeCtx& mrgCtx, const mrgCtx.mvFieldNeighbours[cnt * 2].setMvField(Mv(0, 0), MAX_NUM_REF); mrgCtx.interDirNeighbours[cnt] = 1; cnt++; - if (mrgCandIdx == cnt && canFastExit) + if (mrgCandIdx == cnt) { return; } @@ -868,8 +867,6 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, #else const uint32_t maxNumMergeCand = slice.getMaxNumMergeCand(); #endif - const bool canFastExit = pu.cs->pps->getLog2ParallelMergeLevelMinus2() == 0; - for (uint32_t ui = 0; ui < maxNumMergeCand; ++ui) { @@ -912,7 +909,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, { mrgCtx.mvFieldNeighbours[(cnt << 1) + 1].setMvField(miAbove.mv[1], miAbove.refIdx[1]); } - if (mrgCandIdx == cnt && canFastExit) + if (mrgCandIdx == cnt) { return; } @@ -948,7 +945,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, { mrgCtx.mvFieldNeighbours[(cnt << 1) + 1].setMvField(miLeft.mv[1], miLeft.refIdx[1]); } - if (mrgCandIdx == cnt && canFastExit) + if (mrgCandIdx == cnt) { return; } @@ -978,7 +975,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, { mrgCtx.mvFieldNeighbours[(cnt << 1) + 1].setMvField(miLeft.mv[1], miLeft.refIdx[1]); } - if (mrgCandIdx == cnt && canFastExit) + if (mrgCandIdx == cnt) { return; } @@ -1016,7 +1013,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, { mrgCtx.mvFieldNeighbours[( cnt << 1 ) + 1].setMvField( miAbove.mv[1], miAbove.refIdx[1] ); } - if (mrgCandIdx == cnt && canFastExit) + if (mrgCandIdx == cnt) { return; } @@ -1056,7 +1053,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, mrgCtx.mvFieldNeighbours[( cnt << 1 ) + 1].setMvField( miAboveRight.mv[1], miAboveRight.refIdx[1] ); } - if (mrgCandIdx == cnt && canFastExit) + if (mrgCandIdx == cnt) { return; } @@ -1094,7 +1091,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, mrgCtx.mvFieldNeighbours[( cnt << 1 ) + 1].setMvField( miBelowLeft.mv[1], miBelowLeft.refIdx[1] ); } - if (mrgCandIdx == cnt && canFastExit) + if (mrgCandIdx == cnt) { return; } @@ -1135,7 +1132,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, mrgCtx.mvFieldNeighbours[( cnt << 1 ) + 1].setMvField( miAboveLeft.mv[1], miAboveLeft.refIdx[1] ); } - if (mrgCandIdx == cnt && canFastExit) + if (mrgCandIdx == cnt) { return; } @@ -1205,7 +1202,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, mrgCtx.interDirNeighbours[uiArrayAddr] = dir; mrgCtx.GBiIdx[uiArrayAddr] = GBI_DEFAULT; mrgCtx.useAltHpelIf[uiArrayAddr] = false; - if (mrgCandIdx == cnt && canFastExit) + if (mrgCandIdx == cnt) { return; } @@ -1230,7 +1227,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, #if JVET_P0400_REMOVE_SHARED_MERGE_LIST bool isGt4x4 = true; #endif - bool bFound = addMergeHMVPCand(cs, mrgCtx, canFastExit, mrgCandIdx, maxNumMergeCandMin1, cnt + bool bFound = addMergeHMVPCand(cs, mrgCtx, mrgCandIdx, maxNumMergeCandMin1, cnt , isAvailableA1, miLeft, isAvailableB1, miAbove , CU::isIBC(*pu.cu) #if !JVET_P0400_REMOVE_SHARED_MERGE_LIST @@ -1608,14 +1605,12 @@ bool PU::isDiffMER(const PredictionUnit &pu1, const PredictionUnit &pu2) const unsigned xP = pu2.lumaPos().x; const unsigned yP = pu2.lumaPos().y; - unsigned plevel = pu1.cs->pps->getLog2ParallelMergeLevelMinus2() + 2; - - if ((xN >> plevel) != (xP >> plevel)) + if ((xN >> 2) != (xP >> 2)) { return true; } - if ((yN >> plevel) != (yP >> plevel)) + if ((yN >> 2) != (yP >> 2)) { return true; } diff --git a/source/Lib/CommonLib/UnitTools.h b/source/Lib/CommonLib/UnitTools.h index 49747d61a254b7624c6cf4962735ece4ecd0c8a2..590d7c599d94c2eb24a462346aa3a66d89084fe1 100644 --- a/source/Lib/CommonLib/UnitTools.h +++ b/source/Lib/CommonLib/UnitTools.h @@ -154,7 +154,7 @@ namespace PU void fillAffineMvpCand ( PredictionUnit &pu, const RefPicList &eRefPicList, const int &refIdx, AffineAMVPInfo &affiAMVPInfo); bool addMVPCandUnscaled (const PredictionUnit &pu, const RefPicList &eRefPicList, const int &iRefIdx, const Position &pos, const MvpDir &eDir, AMVPInfo &amvpInfo); void xInheritedAffineMv ( const PredictionUnit &pu, const PredictionUnit* puNeighbour, RefPicList eRefPicList, Mv rcMv[3] ); - bool addMergeHMVPCand (const CodingStructure &cs, MergeCtx& mrgCtx, const bool canFastExit, const int& mrgCandIdx, const uint32_t maxNumMergeCandMin1, int &cnt + bool addMergeHMVPCand (const CodingStructure &cs, MergeCtx& mrgCtx, const int& mrgCandIdx, const uint32_t maxNumMergeCandMin1, int &cnt , const bool isAvailableA1, const MotionInfo miLeft, const bool isAvailableB1, const MotionInfo miAbove , const bool ibcFlag #if !JVET_P0400_REMOVE_SHARED_MERGE_LIST diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index a0e0cac86566703eb6219c2a0238c14f7575396c..176e097ca7bce218769db3b3cf05820ce5ad6358 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -858,11 +858,6 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS, ParameterSetManager *parameterSetMana } #endif - - - READ_UVLC( uiCode, "log2_parallel_merge_level_minus2"); - pcPPS->setLog2ParallelMergeLevelMinus2 (uiCode); - #if JVET_P1006_PICTURE_HEADER READ_FLAG( uiCode, "picture_header_extension_present_flag"); pcPPS->setPictureHeaderExtensionPresentFlag(uiCode); diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 59829ae966d92ab6a04e0aa55a9e4a03031c709a..fcfdbaf6b50ceeb1e6bd0c72847019c9b14b3dd4 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -596,7 +596,6 @@ protected: bool m_useWeightedPred; //< Use of Weighting Prediction (P_SLICE) bool m_useWeightedBiPred; //< Use of Bi-directional Weighting Prediction (B_SLICE) WeightedPredictionMethod m_weightedPredictionMethod; - uint32_t m_log2ParallelMergeLevelMinus2; ///< Parallel merge estimation region uint32_t m_maxNumMergeCand; ///< Maximum number of merge candidates uint32_t m_maxNumAffineMergeCand; ///< Maximum number of affine merge candidates uint32_t m_maxNumTriangleCand; @@ -1551,8 +1550,6 @@ public: void setWPBiPred ( bool b ) { m_useWeightedBiPred = b; } bool getUseWP () { return m_useWeightedPred; } bool getWPBiPred () { return m_useWeightedBiPred; } - void setLog2ParallelMergeLevelMinus2 ( uint32_t u ) { m_log2ParallelMergeLevelMinus2 = u; } - uint32_t getLog2ParallelMergeLevelMinus2 () { return m_log2ParallelMergeLevelMinus2; } void setMaxNumMergeCand ( uint32_t u ) { m_maxNumMergeCand = u; } uint32_t getMaxNumMergeCand () { return m_maxNumMergeCand; } void setMaxNumAffineMergeCand ( uint32_t u ) { m_maxNumAffineMergeCand = u; } diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 2939b1bb7a27a8fa0ab0da7d04baf60143a3355e..53c56ebe06a01de899d3b8e890a1688c718b54a3 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -1798,7 +1798,6 @@ void EncLib::xInitPPS(PPS &pps, const SPS &sps) pps.setDeblockingFilterControlPresentFlag(deblockingFilterControlPresentFlag); - pps.setLog2ParallelMergeLevelMinus2 (m_log2ParallelMergeLevelMinus2 ); pps.setCabacInitPresentFlag(CABAC_INIT_PRESENT_FLAG); pps.setLoopFilterAcrossSlicesEnabledFlag( m_bLFCrossSliceBoundaryFlag ); diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 316e3934f53dc53e81bf4d457af3db614bfcc219..8954744cd83c3d9bedbe1feef4f1f08c7ac3fac2 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -471,7 +471,6 @@ void HLSWriter::codePPS( const PPS* pcPPS, const SPS* pcSPS ) } #endif - WRITE_UVLC( pcPPS->getLog2ParallelMergeLevelMinus2(), "log2_parallel_merge_level_minus2"); #if JVET_P1006_PICTURE_HEADER WRITE_FLAG( pcPPS->getPictureHeaderExtensionPresentFlag() ? 1 : 0, "picture_header_extension_present_flag"); #endif