Ticket #610: HM-7.1-dev@r2488_PME_Signaling.patch

File HM-7.1-dev@r2488_PME_Signaling.patch, 15.7 KB (added by huiyong, 12 years ago)
  • cfg/encoder_lowdelay_he10.cfg

     
    118118TargetBitrate                       : 1000             # input target bitrate when RateCtrl is enable
    119119NumLCUInUnit                        : 1                # Number of LCU in an Unit. Fraction is not allowed
    120120
     121#=========== Parallel Merge Estimation =================
     122Log2ParallelMergeLevel              : 2                # Parallel Merge Estimation Level 2: 4x4(Disable), 3: 8x8, 4: 16x16, 5: 32x32, 6: 64x64
     123
    121124### DO NOT ADD ANYTHING BELOW THIS LINE ###
    122125### DO NOT DELETE THE EMPTY LINE BELOW ###
  • cfg/encoder_lowdelay_main.cfg

     
    118118TargetBitrate                       : 1000             # input target bitrate when RateCtrl is enable
    119119NumLCUInUnit                        : 1                # Number of LCU in an Unit. Fraction is not allowed
    120120
     121#=========== Parallel Merge Estimation =================
     122Log2ParallelMergeLevel              : 2                # Parallel Merge Estimation Level 2: 4x4(Disable), 3: 8x8, 4: 16x16, 5: 32x32, 6: 64x64
     123
    121124### DO NOT ADD ANYTHING BELOW THIS LINE ###
    122125### DO NOT DELETE THE EMPTY LINE BELOW ###
  • cfg/encoder_lowdelay_P_he10.cfg

     
    118118TargetBitrate                       : 1000             # input target bitrate when RateCtrl is enable
    119119NumLCUInUnit                        : 1                # Number of LCU in an Unit. Fraction is not allowed
    120120
     121#=========== Parallel Merge Estimation =================
     122Log2ParallelMergeLevel              : 2                # Parallel Merge Estimation Level 2: 4x4(Disable), 3: 8x8, 4: 16x16, 5: 32x32, 6: 64x64
     123
    121124### DO NOT ADD ANYTHING BELOW THIS LINE ###
    122125### DO NOT DELETE THE EMPTY LINE BELOW ###
  • cfg/encoder_lowdelay_P_main.cfg

     
    118118TargetBitrate                       : 1000             # input target bitrate when RateCtrl is enable
    119119NumLCUInUnit                        : 1                # Number of LCU in an Unit. Fraction is not allowed
    120120
     121#=========== Parallel Merge Estimation =================
     122Log2ParallelMergeLevel              : 2                # Parallel Merge Estimation Level 2: 4x4(Disable), 3: 8x8, 4: 16x16, 5: 32x32, 6: 64x64
     123
    121124### DO NOT ADD ANYTHING BELOW THIS LINE ###
    122125### DO NOT DELETE THE EMPTY LINE BELOW ###
  • cfg/encoder_randomaccess_he10.cfg

     
    122122TargetBitrate                       : 1000             # input target bitrate when RateCtrl is enable
    123123NumLCUInUnit                        : 1                # Number of LCU in an Unit. Fraction is not allowed
    124124
     125#=========== Parallel Merge Estimation =================
     126Log2ParallelMergeLevel              : 2                # Parallel Merge Estimation Level 2: 4x4(Disable), 3: 8x8, 4: 16x16, 5: 32x32, 6: 64x64
     127
    125128### DO NOT ADD ANYTHING BELOW THIS LINE ###
    126129### DO NOT DELETE THE EMPTY LINE BELOW ###
    127130
  • cfg/encoder_randomaccess_main.cfg

     
    122122TargetBitrate                       : 1000             # input target bitrate when RateCtrl is enable
    123123NumLCUInUnit                        : 1                # Number of LCU in an Unit. Fraction is not allowed
    124124
     125#=========== Parallel Merge Estimation =================
     126Log2ParallelMergeLevel              : 2                # Parallel Merge Estimation Level 2: 4x4(Disable), 3: 8x8, 4: 16x16, 5: 32x32, 6: 64x64
     127
    125128### DO NOT ADD ANYTHING BELOW THIS LINE ###
    126129### DO NOT DELETE THE EMPTY LINE BELOW ###
    127130
  • source/App/TAppEncoder/TAppEncCfg.cpp

     
    329329#else
    330330    ("weighted_bipred_idc,-wpBidc", m_uiBiPredIdc,    0u,    "weighted bipred idc (B-Slices)")
    331331#endif
     332    ("Log2ParallelMergeLevel",      m_uiLog2ParallelMergeLevel,     0u,          "Parallel merge estimation region")
    332333#if !TILES_OR_ENTROPY_FIX
    333334    ("TileInfoPresentFlag",         m_iColumnRowInfoPresent,         1,          "0: tiles parameters are NOT present in the PPS. 1: tiles parameters are present in the PPS")
    334335#endif
     
    967968  xConfirmPara(!m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagValue, "CUTransquantBypassFlagValue cannot be 1 when TransquantBypassEnableFlag is 0");
    968969#endif
    969970
     971  xConfirmPara(m_uiLog2ParallelMergeLevel < 2, "Log2ParallelMergeLevel should be larger than or equal to 2");
     972
    970973#undef xConfirmPara
    971974  if (check_failed)
    972975  {
     
    11151118#else
    11161119  printf("WPB:%d ", m_uiBiPredIdc);
    11171120#endif
     1121  printf("PME:%d ", m_uiLog2ParallelMergeLevel);
    11181122#if !EXPLICITLY_SIGNAL_ENTRY_POINTS
    11191123  printf("TileLocationInSliceHdr:%d ", m_iTileLocationInSliceHeaderFlag);
    11201124#endif
  • source/App/TAppEncoder/TAppEncCfg.h

     
    237237#else
    238238  UInt      m_uiBiPredIdc;                                    ///< Use of Bi-Directional Weighting Prediction (B_SLICE): explicit(1) or implicit(2)
    239239#endif
     240 
     241  UInt      m_uiLog2ParallelMergeLevel;                 ///< Parallel merge estimation region
    240242
    241243#if SLICE_TMVP_ENABLE
    242244  Int       m_TMVPModeId;
  • source/App/TAppEncoder/TAppEncTop.cpp

     
    206206#else
    207207  m_cTEncTop.setWPBiPredIdc             ( m_uiBiPredIdc         );
    208208#endif
     209  //====== Parallel Merge Estimation ========
     210  m_cTEncTop.setLog2ParallelMergeLevelMinus2 ( m_uiLog2ParallelMergeLevel - 2 );
     211
    209212  //====== Slice ========
    210213  m_cTEncTop.setSliceMode               ( m_iSliceMode                );
    211214  m_cTEncTop.setSliceArgument           ( m_iSliceArgument            );
  • source/Lib/TLibCommon/TypeDef.h

     
    111111#define IPCM_LOSSLESS_LOOP_FILTERING_UNIFICATION  1  ///< I0586: I_PCM/lossless loop filtering unification
    112112#endif
    113113
    114 #define LOG2_PARALLEL_MERGE_LEVEL_MINUS2 0  //< H0082 parallel merge level 0-> 4x4, 1-> 8x8, 2->16x16, 3->32x32, 4->64x64
    115 #if LOG2_PARALLEL_MERGE_LEVEL_MINUS2
    116 #define CU_BASED_MRG_CAND_LIST           1  //< H0240: single merge candidate list for all PUs inside a 8x8 CU conditioned on LOG2_PARALLEL_MERGE_LEVEL_MINUS2 > 0
    117 #endif
    118 
    119114#define LAST_CTX_DERIVATION              1  //< I0331: table removal of LAST context derivation
    120115#define DISABLING_CLIP_FOR_BIPREDME         1  ///< Ticket #175
    121116 
  • source/Lib/TLibDecoder/TDecCAVLC.cpp

     
    11891189  }
    11901190#endif
    11911191  READ_UVLC( uiCode, "log2_parallel_merge_level_minus2");
    1192   assert(uiCode == LOG2_PARALLEL_MERGE_LEVEL_MINUS2);
    11931192  pcPPS->setLog2ParallelMergeLevelMinus2 (uiCode);
    11941193
    11951194  READ_FLAG( uiCode, "pps_extension_flag");
  • source/Lib/TLibDecoder/TDecEntropy.cpp

     
    179179  UInt uiNumPU = ( ePartSize == SIZE_2Nx2N ? 1 : ( ePartSize == SIZE_NxN ? 4 : 2 ) );
    180180  UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
    181181
    182 #if CU_BASED_MRG_CAND_LIST
    183182  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
    184183  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
    185184
     
    189188  }
    190189  Int numValidMergeCand = 0;
    191190  bool isMerged = false;
    192 #endif
    193191
    194192  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
    195193  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 );
    196194  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
    197195  {
    198 #if !CU_BASED_MRG_CAND_LIST
    199     TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
    200     UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
    201     Int numValidMergeCand = 0;
    202     for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ++ui )
    203     {
    204       uhInterDirNeighbours[ui] = 0;
    205     }
    206 #endif
    207196    decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
    208197    if ( pcCU->getMergeFlag( uiSubPartIdx ) )
    209198    {
    210199      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, ePartSize, uhInterDirNeighbours, cMvFieldNeighbours, uiDepth );
    211 #if CU_BASED_MRG_CAND_LIST
    212200      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    213201      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 )
    214202      {
     
    225213        uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    226214        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    227215      }
    228 #else
    229       UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    230       pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    231 #endif
    232216      pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    233217
    234218      TComMv cTmpMv( 0, 0 );
  • source/Lib/TLibEncoder/TEncCfg.h

     
    276276#else
    277277  UInt      m_uiBiPredIdc;          //< Use of Bi-Directional Weighting Prediction (B_SLICE)
    278278#endif
     279  UInt      m_uiLog2ParallelMergeLevelMinus2;       // Parallel merge estimation region
    279280  Int       m_useScalingListId;            ///< Using quantization matrix i.e. 0=off, 1=default, 2=file.
    280281  char*     m_scalingListFile;          ///< quantization matrix file name
    281282#if SLICE_TMVP_ENABLE
     
    664665#else
    665666  UInt      getWPBiPredIdc         ()            { return m_uiBiPredIdc;       }
    666667#endif
     668  Void      setLog2ParallelMergeLevelMinus2   ( UInt u )    { m_uiLog2ParallelMergeLevelMinus2       = u;    }
     669  UInt      getLog2ParallelMergeLevelMinus2   ()            { return m_uiLog2ParallelMergeLevelMinus2;       }
    667670  Void      setUseScalingListId    ( Int  u )    { m_useScalingListId       = u;   }
    668671  Int       getUseScalingListId    ()            { return m_useScalingListId;      }
    669672  Void      setScalingListFile     ( char*  pch ){ m_scalingListFile     = pch; }
  • source/Lib/TLibEncoder/TEncSearch.cpp

     
    32023202 * \param bValid
    32033203 * \returns Void
    32043204 */
    3205 #if CU_BASED_MRG_CAND_LIST
    32063205Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand )
    3207 #else
    3208 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost )
    3209 #endif
    32103206{
    3211 #if !CU_BASED_MRG_CAND_LIST
    3212   TComMvField  cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
    3213   UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
    3214   Int numValidMergeCand = 0;
    3215 
    3216   for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ++ui )
    3217   {
    3218     uhInterDirNeighbours[ui] = 0;
    3219   }
    3220 #endif
    3221 
    32223207  UInt uiAbsPartIdx = 0;
    32233208  Int iWidth = 0;
    32243209  Int iHeight = 0;
    32253210
    32263211  pcCU->getPartIndexAndSize( iPUIdx, uiAbsPartIdx, iWidth, iHeight );
    32273212  UInt uiDepth = pcCU->getDepth( uiAbsPartIdx );
    3228 #if CU_BASED_MRG_CAND_LIST
    32293213  PartSize partSize = pcCU->getPartitionSize( 0 );
    32303214  if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && partSize != SIZE_2Nx2N && pcCU->getWidth( 0 ) <= 8 )
    32313215  {
     
    32403224  {
    32413225    pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    32423226  }
    3243 #else
    3244   pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, uiDepth, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand );
    3245 #endif
    32463227#if BIPRED_RESTRICT_SMALL_PU
    32473228  xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    32483229#endif
     
    33763357  Int           iZeroMvdDir = -1;
    33773358#endif
    33783359
    3379 #if CU_BASED_MRG_CAND_LIST
    33803360  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
    33813361  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
    33823362  Int numValidMergeCand = 0 ;
    3383 #endif
    33843363
    33853364  for ( Int iPartIdx = 0; iPartIdx < iNumPart; iPartIdx++ )
    33863365  {
     
    39343913
    39353914      // find Merge result
    39363915      UInt uiMRGCost = MAX_UINT;
    3937 #if CU_BASED_MRG_CAND_LIST
    39383916      xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    3939 #else
    3940       xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost );
    3941 #endif
    39423917      if ( uiMRGCost < uiMECost )
    39433918      {
    39443919        // set Merge result
  • source/Lib/TLibEncoder/TEncSearch.h

     
    392392                                    TComMvField*    pacMvField,
    393393                                    UInt&           uiMergeIndex,
    394394                                    UInt&           ruiCost
    395 #if CU_BASED_MRG_CAND_LIST
    396395                                  , TComMvField* cMvFieldNeighbours, 
    397396                                    UChar* uhInterDirNeighbours,
    398397                                    Int& numValidMergeCand
    399 #endif
    400398                                   );
    401399
    402400#if BIPRED_RESTRICT_SMALL_PU
  • source/Lib/TLibEncoder/TEncTop.cpp

     
    666666  m_cPPS.setTSIG(getTSIG());
    667667#endif
    668668  m_cPPS.setDeblockingFilterControlPresent (m_DeblockingFilterControlPresent );
    669   m_cPPS.setLog2ParallelMergeLevelMinus2      (LOG2_PARALLEL_MERGE_LEVEL_MINUS2);
     669  m_cPPS.setLog2ParallelMergeLevelMinus2   (m_uiLog2ParallelMergeLevelMinus2 );
    670670  m_cPPS.setCabacInitPresentFlag(CABAC_INIT_PRESENT_FLAG);
    671671
    672672  Int histogram[8];