Ticket #334: HM-5.2-remove-global-MRG-flag.patch
File HM-5.2-remove-global-MRG-flag.patch, 30.0 KB (added by thomasd, 12 years ago) |
---|
-
cfg/encoder_intra.cfg
diff --git a/cfg/encoder_intra.cfg b/cfg/encoder_intra.cfg index ca8f1e3..ca69132 100644
a b LoopFilterBetaOffset : 0 # Range: -26 ~ 26 45 45 InternalBitDepth : 8 # internal bit-depth = BitDepth + BitIncrement 46 46 47 47 #=========== Coding Tools ================= 48 MRG : 1 # Merge mode (0: OFF, 1: ON)49 48 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 50 49 ALF : 1 # Adaptive loop filter (0: OFF, 1: ON) 51 50 ALFEncodePassReduction : 0 # Reduce ALF encoding passes (0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding) -
cfg/encoder_intra_10.cfg
diff --git a/cfg/encoder_intra_10.cfg b/cfg/encoder_intra_10.cfg index 43c46bc..f3928bf 100644
a b LoopFilterBetaOffset : 0 # Range: -26 ~ 26 45 45 InternalBitDepth : 10 # internal bit-depth = BitDepth + BitIncrement 46 46 47 47 #=========== Coding Tools ================= 48 MRG : 1 # Merge mode (0: OFF, 1: ON)49 48 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 50 49 ALF : 1 # Adaptive loop filter (0: OFF, 1: ON) 51 50 ALFEncodePassReduction : 0 # Reduce ALF encoding passes (0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding) -
cfg/encoder_intra_loco.cfg
diff --git a/cfg/encoder_intra_loco.cfg b/cfg/encoder_intra_loco.cfg index d738b5a..00ae70c 100644
a b LoopFilterBetaOffset : 0 # Range: -26 ~ 26 46 46 InternalBitDepth : 8 # internal bit-depth = BitDepth + BitIncrement 47 47 48 48 #=========== Coding Tools ================= 49 MRG : 1 # Merge mode (0: OFF, 1: ON)50 49 SAO : 0 # Sample adaptive offset (0: OFF, 1: ON) 51 50 ALF : 0 # Adaptive loop filter (0: OFF, 1: ON) 52 51 ALFEncodePassReduction : 0 # Reduce ALF encoding passes (0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding) -
cfg/encoder_lowdelay.cfg
diff --git a/cfg/encoder_lowdelay.cfg b/cfg/encoder_lowdelay.cfg index 642587c..8b02e12 100644
a b LoopFilterBetaOffset : 0 # Range: -26 ~ 26 51 51 InternalBitDepth : 8 # internal bit-depth = BitDepth + BitIncrement 52 52 53 53 #=========== Coding Tools ================= 54 MRG : 1 # Merge mode (0: OFF, 1: ON)55 54 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 56 55 ALF : 1 # Adaptive loop filter (0: OFF, 1: ON) 57 56 ALFEncodePassReduction : 0 # Reduce ALF encoding passes (0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding) -
cfg/encoder_lowdelay_10.cfg
diff --git a/cfg/encoder_lowdelay_10.cfg b/cfg/encoder_lowdelay_10.cfg index 8612e73..a481b91 100644
a b LoopFilterBetaOffset : 0 # Range: -26 ~ 26 51 51 InternalBitDepth : 10 # internal bit-depth = BitDepth + BitIncrement 52 52 53 53 #=========== Coding Tools ================= 54 MRG : 1 # Merge mode (0: OFF, 1: ON)55 54 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 56 55 ALF : 1 # Adaptive loop filter (0: OFF, 1: ON) 57 56 ALFEncodePassReduction : 0 # Reduce ALF encoding passes (0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding) -
cfg/encoder_lowdelay_P.cfg
diff --git a/cfg/encoder_lowdelay_P.cfg b/cfg/encoder_lowdelay_P.cfg index 77ffe9c..74c38b4 100644
a b LoopFilterBetaOffset : 0 # Range: -26 ~ 26 51 51 InternalBitDepth : 8 # internal bit-depth = BitDepth + BitIncrement 52 52 53 53 #=========== Coding Tools ================= 54 MRG : 1 # Merge mode (0: OFF, 1: ON)55 54 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 56 55 ALF : 1 # Adaptive loop filter (0: OFF, 1: ON) 57 56 ALFEncodePassReduction : 0 # Reduce ALF encoding passes (0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding) -
cfg/encoder_lowdelay_P_10.cfg
diff --git a/cfg/encoder_lowdelay_P_10.cfg b/cfg/encoder_lowdelay_P_10.cfg index 256923d..b15fc52 100644
a b LoopFilterBetaOffset : 0 # Range: -26 ~ 26 51 51 InternalBitDepth : 10 # internal bit-depth = BitDepth + BitIncrement 52 52 53 53 #=========== Coding Tools ================= 54 MRG : 1 # Merge mode (0: OFF, 1: ON)55 54 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 56 55 ALF : 1 # Adaptive loop filter (0: OFF, 1: ON) 57 56 ALFEncodePassReduction : 0 # Reduce ALF encoding passes (0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding) -
cfg/encoder_lowdelay_P_loco.cfg
diff --git a/cfg/encoder_lowdelay_P_loco.cfg b/cfg/encoder_lowdelay_P_loco.cfg index 12562ec..f422ae0 100644
a b LoopFilterBetaOffset : 0 # Range: -26 ~ 26 51 51 InternalBitDepth : 8 # internal bit-depth = BitDepth + BitIncrement 52 52 53 53 #=========== Coding Tools ================= 54 MRG : 1 # Merge mode (0: OFF, 1: ON)55 54 SAO : 0 # Sample adaptive offset (0: OFF, 1: ON) 56 55 ALF : 0 # Adaptive loop filter (0: OFF, 1: ON) 57 56 ALFEncodePassReduction : 0 # Reduce ALF encoding passes (0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding) -
cfg/encoder_lowdelay_loco.cfg
diff --git a/cfg/encoder_lowdelay_loco.cfg b/cfg/encoder_lowdelay_loco.cfg index 3afac50..be8329d 100644
a b LoopFilterBetaOffset : 0 # Range: -26 ~ 26 51 51 InternalBitDepth : 8 # internal bit-depth = BitDepth + BitIncrement 52 52 53 53 #=========== Coding Tools ================= 54 MRG : 1 # Merge mode (0: OFF, 1: ON)55 54 SAO : 0 # Sample adaptive offset (0: OFF, 1: ON) 56 55 ALF : 0 # Adaptive loop filter (0: OFF, 1: ON) 57 56 ALFEncodePassReduction : 0 # Reduce ALF encoding passes (0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding) -
cfg/encoder_randomaccess.cfg
diff --git a/cfg/encoder_randomaccess.cfg b/cfg/encoder_randomaccess.cfg index 62e6835..34d320b 100644
a b LoopFilterBetaOffset : 0 # Range: -26 ~ 26 56 56 InternalBitDepth : 8 # internal bit-depth = BitDepth + BitIncrement 57 57 58 58 #=========== Coding Tools ================= 59 MRG : 1 # Merge mode (0: OFF, 1: ON)60 59 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 61 60 ALF : 1 # Adaptive loop filter (0: OFF, 1: ON) 62 61 ALFEncodePassReduction : 0 # Reduce ALF encoding passes (0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding) -
cfg/encoder_randomaccess_10.cfg
diff --git a/cfg/encoder_randomaccess_10.cfg b/cfg/encoder_randomaccess_10.cfg index 6a6b638..e0f7cc3 100644
a b LoopFilterBetaOffset : 0 # Range: -26 ~ 26 56 56 InternalBitDepth : 10 # internal bit-depth = BitDepth + BitIncrement 57 57 58 58 #=========== Coding Tools ================= 59 MRG : 1 # Merge mode (0: OFF, 1: ON)60 59 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 61 60 ALF : 1 # Adaptive loop filter (0: OFF, 1: ON) 62 61 ALFEncodePassReduction : 0 # Reduce ALF encoding passes (0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding) -
cfg/encoder_randomaccess_loco.cfg
diff --git a/cfg/encoder_randomaccess_loco.cfg b/cfg/encoder_randomaccess_loco.cfg index 7c6c6da..52bd42a 100644
a b LoopFilterBetaOffset : 0 # Range: -26 ~ 26 56 56 InternalBitDepth : 8 # internal bit-depth = BitDepth + BitIncrement 57 57 58 58 #=========== Coding Tools ================= 59 MRG : 1 # Merge mode (0: OFF, 1: ON)60 59 SAO : 0 # Sample adaptive offset (0: OFF, 1: ON) 61 60 ALF : 0 # Adaptive loop filter (0: OFF, 1: ON) 62 61 ALFEncodePassReduction : 0 # Reduce ALF encoding passes (0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding) -
source/App/TAppEncoder/TAppEncCfg.cpp
diff --git a/source/App/TAppEncoder/TAppEncCfg.cpp b/source/App/TAppEncoder/TAppEncCfg.cpp index 25f2028..951f088 100644
a b Bool TAppEncCfg::parseCfg( Int argc, Char* argv[] ) 236 236 ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0 ) 237 237 238 238 /* Coding tools */ 239 ("MRG", m_bUseMRG, true, "merging of motion partitions")240 241 239 ("LMChroma", m_bUseLMChroma, true, "intra chroma prediction based on recontructed luma") 242 240 243 241 ("ALF", m_bUseALF, true, "Adaptive Loop Filter") … … Void TAppEncCfg::xPrintParameter() 809 807 printf("ECU:%d ", m_bUseEarlyCU ); 810 808 printf("CFM:%d ", m_bUseCbfFastMode ); 811 809 printf("RQT:%d ", 1 ); 812 printf("MRG:%d ", m_bUseMRG ); // SOPH: Merge Mode813 810 printf("LMC:%d ", m_bUseLMChroma ); 814 811 printf("Slice: G=%d M=%d ", m_iSliceGranularity, m_iSliceMode); 815 812 if (m_iSliceMode!=0) … … Void TAppEncCfg::xPrintUsage() 868 865 printf( " FEN - fast encoder setting\n"); 869 866 printf( " ECU - Early CU setting\n"); 870 867 printf( " CFM - Cbf fast mode setting\n"); 871 printf( " MRG - merging of motion partitions\n"); // SOPH: Merge Mode872 868 873 869 printf( " LMC - intra chroma prediction based on luma\n"); 874 870 -
source/App/TAppEncoder/TAppEncCfg.h
diff --git a/source/App/TAppEncoder/TAppEncCfg.h b/source/App/TAppEncoder/TAppEncCfg.h index e6b06c0..ec1f398 100644
a b protected: 137 137 Int m_loopFilterBetaOffsetDiv2; ///< beta offset for deblocking filter 138 138 Int m_loopFilterTcOffsetDiv2; ///< tc offset for deblocking filter 139 139 140 // coding tools (inter - merge motion partitions)141 Bool m_bUseMRG; ///< SOPH: flag for using motion partition Merge Mode142 143 140 Bool m_bUseLMChroma; ///< JL: Chroma intra prediction based on luma signal 144 141 145 142 // coding tools (PCM) -
source/App/TAppEncoder/TAppEncTop.cpp
diff --git a/source/App/TAppEncoder/TAppEncTop.cpp b/source/App/TAppEncoder/TAppEncTop.cpp index 07c1fbf..fb04807 100644
a b Void TAppEncTop::xInitLibCfg() 147 147 m_cTEncTop.setUseFastEnc ( m_bUseFastEnc ); 148 148 m_cTEncTop.setUseEarlyCU ( m_bUseEarlyCU ); 149 149 m_cTEncTop.setUseCbfFastMode ( m_bUseCbfFastMode ); 150 m_cTEncTop.setUseMRG ( m_bUseMRG ); // SOPH:151 150 152 151 m_cTEncTop.setUseLMChroma ( m_bUseLMChroma ); 153 152 m_cTEncTop.setUseConstrainedIntraPred ( m_bUseConstrainedIntraPred ); -
source/Lib/TLibCommon/TComDataCU.cpp
diff --git a/source/Lib/TLibCommon/TComDataCU.cpp b/source/Lib/TLibCommon/TComDataCU.cpp index 2c9c5c2..2f68d0f 100644
a b Bool TComDataCU::isSkipped( UInt uiPartIdx ) 3215 3215 { 3216 3216 return false; 3217 3217 } 3218 if ( getSlice()->getSPS()->getUseMRG() ) 3219 { 3220 return ( m_pePredMode[ uiPartIdx ] == MODE_SKIP && getMergeFlag( uiPartIdx ) && !getQtRootCbf( uiPartIdx ) ); 3221 } 3222 else 3223 { 3224 if ( m_pcSlice->isInterP() ) 3225 { 3226 return ( ( m_pePredMode[ uiPartIdx ] == MODE_SKIP ) && ( ( m_puhCbf[0][uiPartIdx] & 0x1 ) + ( m_puhCbf[1][uiPartIdx] & 0x1 ) + ( m_puhCbf[2][uiPartIdx] & 0x1 ) == 0) ); 3227 } 3228 else //if ( m_pcSlice->isInterB() ) 3229 { 3230 return ( ( m_pePredMode[ uiPartIdx ] == MODE_SKIP ) && ( ( m_puhCbf[0][uiPartIdx] & 0x1 ) + ( m_puhCbf[1][uiPartIdx] & 0x1 ) + ( m_puhCbf[2][uiPartIdx] & 0x1 ) == 0) && (m_puhInterDir[uiPartIdx] == 3) ); 3231 } 3232 } 3218 3219 return ( m_pePredMode[ uiPartIdx ] == MODE_SKIP && getMergeFlag( uiPartIdx ) && !getQtRootCbf( uiPartIdx ) ); 3233 3220 } 3234 3221 3235 3222 // ==================================================================================================================== -
source/Lib/TLibCommon/TComSlice.cpp
diff --git a/source/Lib/TLibCommon/TComSlice.cpp b/source/Lib/TLibCommon/TComSlice.cpp index 7a2f8c3..f929b48 100644
a b TComSPS::TComSPS() 1162 1162 , m_bDisInter4x4 ( 1) 1163 1163 , m_bUseALF (false) 1164 1164 , m_bUsePAD (false) 1165 , m_bUseMRG (false)1166 1165 , m_bUseLMChroma (false) 1167 1166 , m_bUseLComb (false) 1168 1167 , m_bLCMod (false) -
source/Lib/TLibCommon/TComSlice.h
diff --git a/source/Lib/TLibCommon/TComSlice.h b/source/Lib/TLibCommon/TComSlice.h index c5b2fcd..3b0c93f 100644
a b private: 96 96 Bool m_useAMP; 97 97 Bool m_bUseALF; 98 98 Bool m_bUsePAD; 99 Bool m_bUseMRG; // SOPH:100 99 101 100 Bool m_bUseLMChroma; // JL: 102 101 … … public: 205 204 Bool getUseALF () { return m_bUseALF; } 206 205 207 206 Bool getUsePAD () { return m_bUsePAD; } 208 Bool getUseMRG () { return m_bUseMRG; } // SOPH:209 207 210 208 Void setUseALF ( Bool b ) { m_bUseALF = b; } 211 209 212 210 Void setUsePAD ( Bool b ) { m_bUsePAD = b; } 213 Void setUseMRG ( Bool b ) { m_bUseMRG = b; } // SOPH:214 211 215 212 Void setUseLComb (Bool b) { m_bUseLComb = b; } 216 213 Bool getUseLComb () { return m_bUseLComb; } -
source/Lib/TLibDecoder/TDecCAVLC.cpp
diff --git a/source/Lib/TLibDecoder/TDecCAVLC.cpp b/source/Lib/TLibDecoder/TDecCAVLC.cpp index d29f85f..366fd5d 100644
a b Void TDecCavlc::parseSPS(TComSPS* pcSPS) 765 765 xReadUvlc ( uiCode ); pcSPS->setPadX ( uiCode ); 766 766 xReadUvlc ( uiCode ); pcSPS->setPadY ( uiCode ); 767 767 768 xReadFlag( uiCode ); pcSPS->setUseMRG ( uiCode ? true : false );769 770 768 // AMVP mode for each depth (AM_NONE or AM_EXPL) 771 769 for (Int i = 0; i < pcSPS->getMaxCUDepth(); i++) 772 770 { -
source/Lib/TLibDecoder/TDecCu.cpp
diff --git a/source/Lib/TLibDecoder/TDecCu.cpp b/source/Lib/TLibDecoder/TDecCu.cpp index 918baab..f14bd06 100644
a b Void TDecCu::xDecodeCU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt& 280 280 281 281 if( pcCU->isSkipped(uiAbsPartIdx) ) 282 282 { 283 if ( pcCU->getSlice()->getSPS()->getUseMRG() ) 283 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); 284 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); 285 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists 286 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS]; 287 Int numValidMergeCand = 0; 288 for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ++ui ) 284 289 { 285 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); 286 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); 287 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists 288 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS]; 289 Int numValidMergeCand = 0; 290 for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ++ui ) 291 { 292 uhInterDirNeighbours[ui] = 0; 293 } 294 m_pcEntropyDecoder->decodeMergeIndex( pcCU, 0, uiAbsPartIdx, SIZE_2Nx2N, uhInterDirNeighbours, cMvFieldNeighbours, uiDepth ); 295 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 290 uhInterDirNeighbours[ui] = 0; 291 } 292 m_pcEntropyDecoder->decodeMergeIndex( pcCU, 0, uiAbsPartIdx, SIZE_2Nx2N, uhInterDirNeighbours, cMvFieldNeighbours, uiDepth ); 293 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 296 294 297 298 295 UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx); 296 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 299 297 300 TComMv cTmpMv( 0, 0 ); 301 if ( pcCU->getSlice()->getNumRefIdx( REF_PIC_LIST_0 ) > 0 ) //if ( ref. frame list0 has at least 1 entry ) 302 { 303 pcCU->setMVPIdxSubParts( 0, REF_PIC_LIST_0, uiAbsPartIdx, 0, uiDepth); 304 pcCU->setMVPNumSubParts( 0, REF_PIC_LIST_0, uiAbsPartIdx, 0, uiDepth); 305 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 306 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 307 } 308 if ( pcCU->getSlice()->getNumRefIdx( REF_PIC_LIST_1 ) > 0 ) //if ( ref. frame list1 has at least 1 entry ) 309 { 310 pcCU->setMVPIdxSubParts( 0, REF_PIC_LIST_1, uiAbsPartIdx, 0, uiDepth); 311 pcCU->setMVPNumSubParts( 0, REF_PIC_LIST_1, uiAbsPartIdx, 0, uiDepth); 312 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 313 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + 1 ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 314 } 298 TComMv cTmpMv( 0, 0 ); 299 if ( pcCU->getSlice()->getNumRefIdx( REF_PIC_LIST_0 ) > 0 ) //if ( ref. frame list0 has at least 1 entry ) 300 { 301 pcCU->setMVPIdxSubParts( 0, REF_PIC_LIST_0, uiAbsPartIdx, 0, uiDepth); 302 pcCU->setMVPNumSubParts( 0, REF_PIC_LIST_0, uiAbsPartIdx, 0, uiDepth); 303 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 304 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 315 305 } 316 else306 if ( pcCU->getSlice()->getNumRefIdx( REF_PIC_LIST_1 ) > 0 ) //if ( ref. frame list1 has at least 1 entry ) 317 307 { 318 pcCU->setMVPIdxSubParts( -1, REF_PIC_LIST_0, uiAbsPartIdx, 0, uiDepth); 319 pcCU->setMVPNumSubParts( -1, REF_PIC_LIST_0, uiAbsPartIdx, 0, uiDepth); 320 321 pcCU->setMVPIdxSubParts( -1, REF_PIC_LIST_1, uiAbsPartIdx, 0, uiDepth); 322 pcCU->setMVPNumSubParts( -1, REF_PIC_LIST_1, uiAbsPartIdx, 0, uiDepth); 323 324 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 325 { 326 if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 327 { 328 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, RefPicList( uiRefListIdx ) ); 329 m_pcEntropyDecoder->decodeMVPIdxPU( m_ppcCU[uiDepth], 0, uiDepth, 0, RefPicList( uiRefListIdx )); 330 } 331 } 308 pcCU->setMVPIdxSubParts( 0, REF_PIC_LIST_1, uiAbsPartIdx, 0, uiDepth); 309 pcCU->setMVPNumSubParts( 0, REF_PIC_LIST_1, uiAbsPartIdx, 0, uiDepth); 310 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 311 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + 1 ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 332 312 } 313 333 314 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 334 315 return; 335 316 } -
source/Lib/TLibDecoder/TDecEntropy.cpp
diff --git a/source/Lib/TLibDecoder/TDecEntropy.cpp b/source/Lib/TLibDecoder/TDecEntropy.cpp index 9a16548..0152f90 100644
a b Void TDecEntropy::decodePUWise( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDept 397 397 { 398 398 uhInterDirNeighbours[ui] = 0; 399 399 } 400 if ( pcCU->getSlice()->getSPS()->getUseMRG() ) 401 { 402 decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx ); 403 } 400 decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx ); 401 404 402 if ( pcCU->getMergeFlag( uiSubPartIdx ) ) 405 403 { 406 404 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, ePartSize, uhInterDirNeighbours, cMvFieldNeighbours, uiDepth ); -
source/Lib/TLibDecoder/TDecSbac.cpp
diff --git a/source/Lib/TLibDecoder/TDecSbac.cpp b/source/Lib/TLibDecoder/TDecSbac.cpp index 6e107c5..ab1fc71 100644
a b Void TDecSbac::parseSkipFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth 459 459 pcCU->setPredModeSubParts( MODE_SKIP, uiAbsPartIdx, uiDepth ); 460 460 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 461 461 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 462 463 if ( pcCU->getSlice()->getSPS()->getUseMRG() ) 464 { 465 pcCU->setMergeFlagSubParts( true , uiAbsPartIdx, 0, uiDepth ); 466 } 467 else 468 { 469 TComMv cZeroMv(0,0); 470 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvd ( cZeroMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 471 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvd ( cZeroMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 472 473 pcCU->setTrIdxSubParts( 0, uiAbsPartIdx, uiDepth ); 474 pcCU->setCbfSubParts ( 0, 0, 0, uiAbsPartIdx, uiDepth ); 475 476 if ( pcCU->getSlice()->isInterP() ) 477 { 478 pcCU->setInterDirSubParts( 1, uiAbsPartIdx, 0, uiDepth ); 479 480 if ( pcCU->getSlice()->getNumRefIdx( REF_PIC_LIST_0 ) > 0 ) 481 { 482 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllRefIdx( 0, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 483 } 484 if ( pcCU->getSlice()->getNumRefIdx( REF_PIC_LIST_1 ) > 0 ) 485 { 486 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllRefIdx( NOT_VALID, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 487 } 488 } 489 else 490 { 491 pcCU->setInterDirSubParts( 3, uiAbsPartIdx, 0, uiDepth ); 492 493 if ( pcCU->getSlice()->getNumRefIdx( REF_PIC_LIST_0 ) > 0 ) 494 { 495 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllRefIdx( 0, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 496 } 497 if ( pcCU->getSlice()->getNumRefIdx( REF_PIC_LIST_1 ) > 0 ) 498 { 499 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllRefIdx( 0, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 500 } 501 } 502 } 462 pcCU->setMergeFlagSubParts( true , uiAbsPartIdx, 0, uiDepth ); 503 463 } 504 464 } 505 465 -
source/Lib/TLibEncoder/TEncCavlc.cpp
diff --git a/source/Lib/TLibEncoder/TEncCavlc.cpp b/source/Lib/TLibEncoder/TEncCavlc.cpp index b5537fc..2c9227f 100644
a b Void TEncCavlc::codeSPS( TComSPS* pcSPS ) 403 403 xWriteUvlc ( pcSPS->getPad (0) ); 404 404 xWriteUvlc ( pcSPS->getPad (1) ); 405 405 406 // Tools407 xWriteFlag ( (pcSPS->getUseMRG ()) ? 1 : 0 ); // SOPH:408 409 406 // AMVP mode for each depth 410 407 for (Int i = 0; i < pcSPS->getMaxCUDepth(); i++) 411 408 { -
source/Lib/TLibEncoder/TEncCfg.h
diff --git a/source/Lib/TLibEncoder/TEncCfg.h b/source/Lib/TLibEncoder/TEncCfg.h index d1e5e4e..f088b13 100644
a b protected: 175 175 Bool m_bUseFastEnc; 176 176 Bool m_bUseEarlyCU; 177 177 Bool m_bUseCbfFastMode; 178 Bool m_bUseMRG; // SOPH:179 178 Bool m_bUseLMChroma; 180 179 181 180 Int* m_aidQP; … … public: 368 367 Void setUseFastEnc ( Bool b ) { m_bUseFastEnc = b; } 369 368 Void setUseEarlyCU ( Bool b ) { m_bUseEarlyCU = b; } 370 369 Void setUseCbfFastMode ( Bool b ) { m_bUseCbfFastMode = b; } 371 Void setUseMRG ( Bool b ) { m_bUseMRG = b; } // SOPH:372 370 Void setUseConstrainedIntraPred ( Bool b ) { m_bUseConstrainedIntraPred = b; } 373 371 Void setPCMInputBitDepthFlag ( Bool b ) { m_bPCMInputBitDepthFlag = b; } 374 372 Void setPCMFilterDisableFlag ( Bool b ) { m_bPCMFilterDisableFlag = b; } … … public: 394 392 Bool getUseFastEnc () { return m_bUseFastEnc; } 395 393 Bool getUseEarlyCU () { return m_bUseEarlyCU; } 396 394 Bool getUseCbfFastMode () { return m_bUseCbfFastMode; } 397 Bool getUseMRG () { return m_bUseMRG; } // SOPH:398 395 Bool getUseConstrainedIntraPred () { return m_bUseConstrainedIntraPred; } 399 396 #if NS_HAD 400 397 Bool getUseNSQT () { return m_useNSQT; } -
source/Lib/TLibEncoder/TEncCu.cpp
diff --git a/source/Lib/TLibEncoder/TEncCu.cpp b/source/Lib/TLibEncoder/TEncCu.cpp index 2f93d12..5fd6af7 100644
a b Void TEncCu::xCompressCU( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UInt u 450 450 { 451 451 // SKIP 452 452 453 if( pcPic->getSlice(0)->getSPS()->getUseMRG() ) 454 { 455 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU ); 456 rpcTempCU->initEstData( uiDepth, iQP ); 457 } 458 else 459 { 460 xCheckRDCostAMVPSkip ( rpcBestCU, rpcTempCU ); 461 rpcTempCU->initEstData( uiDepth, iQP ); 462 } 453 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU ); 454 rpcTempCU->initEstData( uiDepth, iQP ); 463 455 464 456 // fast encoder decision for early skip 465 457 if ( m_pcEncCfg->getUseFastEnc() ) … … Void TEncCu::xEncodeCU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1116 1108 1117 1109 if( pcCU->isSkipped( uiAbsPartIdx ) ) 1118 1110 { 1119 if ( pcCU->getSlice()->getSPS()->getUseMRG() ) 1120 { 1121 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); 1122 } 1123 else 1124 { 1125 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 1126 { 1127 if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 1128 { 1129 m_pcEntropyCoder->encodeMVPIdxPU( pcCU, uiAbsPartIdx, RefPicList( uiRefListIdx )); 1130 } 1131 } 1132 } 1111 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); 1133 1112 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1113 1134 1114 return; 1135 1115 } 1136 1116 m_pcEntropyCoder->encodePredMode( pcCU, uiAbsPartIdx ); -
source/Lib/TLibEncoder/TEncEntropy.cpp
diff --git a/source/Lib/TLibEncoder/TEncEntropy.cpp b/source/Lib/TLibEncoder/TEncEntropy.cpp index 5e9e6bd..1d5ed0a 100644
a b Void TEncEntropy::encodePUWise( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 744 744 745 745 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 746 746 { 747 if ( pcCU->getSlice()->getSPS()->getUseMRG() ) 748 { 749 { 750 encodeMergeFlag( pcCU, uiSubPartIdx, uiPartIdx ); 751 } 752 } 747 encodeMergeFlag( pcCU, uiSubPartIdx, uiPartIdx ); 753 748 if ( pcCU->getMergeFlag( uiSubPartIdx ) ) 754 749 { 755 750 encodeMergeIndex( pcCU, uiSubPartIdx, uiPartIdx ); -
source/Lib/TLibEncoder/TEncSearch.cpp
diff --git a/source/Lib/TLibEncoder/TEncSearch.cpp b/source/Lib/TLibEncoder/TEncSearch.cpp index 16f694f..4fce867 100644
a b Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& 2826 2826 } // end if bTestNormalMC 2827 2827 #endif 2828 2828 2829 if ( pcCU->get Slice()->getSPS()->getUseMRG() && pcCU->getPartitionSize( uiPartAddr ) != SIZE_2Nx2N )2829 if ( pcCU->getPartitionSize( uiPartAddr ) != SIZE_2Nx2N ) 2830 2830 { 2831 2831 UInt uiMRGInterDir = 0; 2832 2832 TComMvField cMRGMvField[2]; … … Void TEncSearch::encodeResAndCalcRdInterCU( TComDataCU* pcCU, TComYuv* pcYuvOrg, 3679 3679 3680 3680 m_pcEntropyCoder->resetBits(); 3681 3681 m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true); 3682 if ( pcCU->getSlice()->getSPS()->getUseMRG() ) 3683 { 3684 m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true ); 3685 } 3686 else 3687 { 3688 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 3689 { 3690 if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 3691 { 3692 m_pcEntropyCoder->encodeMVPIdxPU( pcCU, 0, RefPicList( uiRefListIdx )); 3693 } 3694 } 3695 } 3682 m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true ); 3696 3683 3697 3684 uiBits = m_pcEntropyCoder->getNumberOfWrittenBits(); 3698 3685 pcCU->getTotalBits() = uiBits; … … Void TEncSearch::xAddSymbolBitsInter( TComDataCU* pcCU, UInt uiQp, UInt uiTrMod 4844 4831 ruiBits = m_pcEntropyCoder->getNumberOfWrittenBits(); 4845 4832 4846 4833 m_pcEntropyCoder->resetBits(); 4847 if ( pcCU->getSlice()->getSPS()->getUseMRG() ) 4848 { 4849 m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, 0, true); 4850 } 4851 else 4852 { 4853 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 4854 { 4855 if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 4856 { 4857 m_pcEntropyCoder->encodeMVPIdxPU( pcCU, 0, RefPicList( uiRefListIdx )); 4858 } 4859 } 4860 } 4834 m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, 0, true); 4861 4835 ruiBits += m_pcEntropyCoder->getNumberOfWrittenBits(); 4862 4836 } 4863 4837 else -
source/Lib/TLibEncoder/TEncTop.cpp
diff --git a/source/Lib/TLibEncoder/TEncTop.cpp b/source/Lib/TLibEncoder/TEncTop.cpp index 27a5e10..dfe9de9 100644
a b Void TEncTop::xInitSPS() 468 468 469 469 m_cSPS.setUsePAD ( m_bUsePAD ); 470 470 471 m_cSPS.setUseMRG ( m_bUseMRG ); // SOPH:472 473 471 m_cSPS.setUseLMChroma ( m_bUseLMChroma ); 474 472 475 473 m_cSPS.setMaxTrSize ( 1 << m_uiQuadtreeTULog2MaxSize );