Ticket #703: max_num_merge_cand.patch
File max_num_merge_cand.patch, 8.4 KB (added by bheng, 12 years ago) |
---|
-
App/TAppEncoder/TAppEncCfg.cpp
308 308 ("ScalingList", m_useScalingListId, 0, "0: no scaling list, 1: default scaling lists, 2: scaling lists specified in ScalingListFile") 309 309 ("ScalingListFile", cfg_ScalingListFile, string(""), "Scaling list file name") 310 310 ("SignHideFlag,-SBH", m_signHideFlag, 1) 311 ("MaxNumMergeCand", m_uiMaxNumMergeCand, 5u, "Maximum number of merge candidates") 312 311 313 /* Misc. */ 312 314 ("SEIpictureDigest", m_pictureDigestEnabled, 0, "Control generation of picture_digest SEI messages\n" 313 315 "\t3: checksum\n" … … 546 548 xConfirmPara( m_uiQuadtreeTUMaxDepthIntra < 1, "QuadtreeTUMaxDepthIntra must be greater than or equal to 1" ); 547 549 xConfirmPara( m_uiQuadtreeTUMaxDepthIntra > m_uiQuadtreeTULog2MaxSize - m_uiQuadtreeTULog2MinSize + 1, "QuadtreeTUMaxDepthIntra must be less than or equal to the difference between QuadtreeTULog2MaxSize and QuadtreeTULog2MinSize plus 1" ); 548 550 551 xConfirmPara( m_uiMaxNumMergeCand < 1, "MaxNumMergeCand must be 1 or greater."); 552 xConfirmPara( m_uiMaxNumMergeCand > 5, "MaxNumMergeCand must be 5 or smaller."); 553 549 554 #if ADAPTIVE_QP_SELECTION 550 555 xConfirmPara( m_bUseAdaptQpSelect == true && m_iQP < 0, "AdaptiveQpSelection must be disabled when QP < 0."); 551 556 xConfirmPara( m_bUseAdaptQpSelect == true && (m_cbQpOffset !=0 || m_crQpOffset != 0 ), "AdaptiveQpSelection must be disabled when ChromaQpOffset is not equal to 0."); … … 1002 1007 printf("TargetBitrate : %d\n", m_targetBitrate); 1003 1008 printf("NumLCUInUnit : %d\n", m_numLCUInUnit); 1004 1009 } 1010 printf("Max Num Merge Candidates : %d\n", m_uiMaxNumMergeCand); 1005 1011 printf("\n"); 1006 1012 1007 1013 printf("TOOL CFG: "); -
App/TAppEncoder/TAppEncCfg.h
200 200 Bool m_useWeightedBiPred; ///< Use of Bi-Directional Weighting Prediction (B_SLICE) 201 201 202 202 UInt m_log2ParallelMergeLevel; ///< Parallel merge estimation region 203 UInt m_uiMaxNumMergeCand; ///< Max number of merge candidates 203 204 204 205 Int m_TMVPModeId; 205 206 Int m_signHideFlag; -
App/TAppEncoder/TAppEncTop.cpp
179 179 m_cTEncTop.setPCMLog2MinSize ( m_uiPCMLog2MinSize); 180 180 m_cTEncTop.setUsePCM ( m_usePCM ); 181 181 m_cTEncTop.setPCMLog2MaxSize ( m_pcmLog2MaxSize); 182 m_cTEncTop.setMaxNumMergeCand ( m_uiMaxNumMergeCand ); 183 182 184 183 185 //====== Weighted Prediction ======== 184 186 m_cTEncTop.setUseWP ( m_bUseWeightPred ); -
Lib/TLibCommon/TComDataCU.cpp
3090 3090 ++refcnt; 3091 3091 } 3092 3092 } 3093 if (uiArrayAddr > MRG_MAX_NUM_CANDS_SIGNALED)3093 if (uiArrayAddr > getSlice()->getMaxNumMergeCand()) 3094 3094 { 3095 uiArrayAddr = MRG_MAX_NUM_CANDS_SIGNALED;3095 uiArrayAddr = getSlice()->getMaxNumMergeCand(); 3096 3096 } 3097 3097 numValidMergeCand = uiArrayAddr; 3098 3098 } -
Lib/TLibCommon/TComSlice.cpp
201 201 202 202 m_aiNumRefIdx[REF_PIC_LIST_C] = 0; 203 203 204 m_uiMaxNumMergeCand = MRG_MAX_NUM_CANDS_SIGNALED;204 m_uiMaxNumMergeCand = 5; 205 205 206 206 m_bFinalized=false; 207 207 -
Lib/TLibCommon/TypeDef.h
140 140 #define MAX_NUM_PPS 256 141 141 #define MAX_NUM_APS 32 //< !!!KS: number not defined in WD yet 142 142 143 #define MRG_MAX_NUM_CANDS_SIGNALED 5 //<G091: value of maxNumMergeCand signaled in slice header144 143 145 144 #define WEIGHTED_CHROMA_DISTORTION 1 ///< F386: weighting of chroma for RDO 146 145 #define RDOQ_CHROMA_LAMBDA 1 ///< F386: weighting of chroma for RDOQ -
Lib/TLibDecoder/TDecCAVLC.cpp
1352 1352 1353 1353 READ_UVLC( uiCode, "5_minus_max_num_merge_cand"); 1354 1354 rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode); 1355 assert(rpcSlice->getMaxNumMergeCand()==MRG_MAX_NUM_CANDS_SIGNALED);1356 1355 1357 1356 if (!bDependentSlice) 1358 1357 { -
Lib/TLibEncoder/TEncCavlc.cpp
919 919 920 920 // !!!! sytnax elements not in the WD !!!! 921 921 922 assert(pcSlice->getMaxNumMergeCand()<=MRG_MAX_NUM_CANDS_SIGNALED); 923 assert(MRG_MAX_NUM_CANDS_SIGNALED<=MRG_MAX_NUM_CANDS); 922 assert(pcSlice->getMaxNumMergeCand()<=MRG_MAX_NUM_CANDS); 924 923 WRITE_UVLC(MRG_MAX_NUM_CANDS - pcSlice->getMaxNumMergeCand(), "maxNumMergeCand"); 925 924 926 925 #if !REMOVE_ALF -
Lib/TLibEncoder/TEncCfg.h
239 239 Bool m_bUseWeightPred; //< Use of Weighting Prediction (P_SLICE) 240 240 Bool m_useWeightedBiPred; //< Use of Bi-directional Weighting Prediction (B_SLICE) 241 241 UInt m_log2ParallelMergeLevelMinus2; // Parallel merge estimation region 242 UInt m_uiMaxNumMergeCand; ///< Maximum number of merge candidates 242 243 Int m_useScalingListId; ///< Using quantization matrix i.e. 0=off, 1=default, 2=file. 243 244 char* m_scalingListFile; ///< quantization matrix file name 244 245 Int m_TMVPModeId; … … 559 560 Bool getWPBiPred () { return m_useWeightedBiPred; } 560 561 Void setLog2ParallelMergeLevelMinus2 ( UInt u ) { m_log2ParallelMergeLevelMinus2 = u; } 561 562 UInt getLog2ParallelMergeLevelMinus2 () { return m_log2ParallelMergeLevelMinus2; } 563 Void setMaxNumMergeCand ( UInt u ) { m_uiMaxNumMergeCand = u; } 564 UInt getMaxNumMergeCand () { return m_uiMaxNumMergeCand; } 562 565 Void setUseScalingListId ( Int u ) { m_useScalingListId = u; } 563 566 Int getUseScalingListId () { return m_useScalingListId; } 564 567 Void setScalingListFile ( char* pch ){ m_scalingListFile = pch; } -
Lib/TLibEncoder/TEncSearch.cpp
3128 3128 3129 3129 xGetInterPredictionError( pcCU, pcYuvOrg, iPUIdx, uiCostCand, m_pcEncCfg->getUseHADME() ); 3130 3130 uiBitsCand = uiMergeCand + 1; 3131 if (uiMergeCand == MRG_MAX_NUM_CANDS_SIGNALED-1)3131 if (uiMergeCand == m_pcEncCfg->getMaxNumMergeCand() -1) 3132 3132 { 3133 3133 uiBitsCand--; 3134 3134 } -
Lib/TLibEncoder/TEncSlice.cpp
402 402 rpcSlice->setSliceArgument ( m_pcCfg->getSliceArgument() ); 403 403 rpcSlice->setDependentSliceMode ( m_pcCfg->getDependentSliceMode() ); 404 404 rpcSlice->setDependentSliceArgument ( m_pcCfg->getDependentSliceArgument() ); 405 rpcSlice->setMaxNumMergeCand ( MRG_MAX_NUM_CANDS_SIGNALED);405 rpcSlice->setMaxNumMergeCand ( m_pcCfg->getMaxNumMergeCand() ); 406 406 xStoreWPparam( pPPS->getUseWP(), pPPS->getWPBiPred() ); 407 407 } 408 408