Changeset 384 in 3DVCSoftware for branches/HTM-6.2-dev1-MediaTek/source


Ignore:
Timestamp:
9 May 2013, 07:51:01 (12 years ago)
Author:
mediatek-htm
Message:

D0156 source code

Location:
branches/HTM-6.2-dev1-MediaTek/source
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-6.2-dev1-MediaTek/source/App/TAppEncoder/TAppEncCfg.cpp

    r332 r384  
    384384#if H3D_IVRP
    385385  ("MultiviewResPred", m_uiMultiviewResPredMode,   (UInt)0, "usage of inter-view residual prediction" )
     386#endif
     387
     388#if MTK_D0156
     389  ("UseVSPCompensation", m_bUseVSPCompensation,   true, "Depth dependent tools: BVSP" )
     390  ("UseDVPRefine", m_bUseDVPRefine,   true, "Depth dependent tools: DoNBDV" )
    386391#endif
    387392
     
    17081713  printf("DLT:%d ", m_bUseDLT ? 1 : 0 );
    17091714#endif
     1715
     1716#if MTK_D0156
     1717  printf("BVSP:%d ", m_bUseVSPCompensation ? 1 : 0 );
     1718  printf("DoNBDV:%d ",  m_bUseDVPRefine ? 1 : 0 );
     1719#endif
     1720
    17101721#if LGE_WVSO_A0119
    17111722  if ( m_bUseWVSO )
    17121723    printf("\nVSO : VSD : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight );
    17131724#endif
     1725
    17141726  printf("\n\n");
    17151727 
  • branches/HTM-6.2-dev1-MediaTek/source/App/TAppEncoder/TAppEncCfg.h

    r332 r384  
    317317#endif
    318318
     319#if MTK_D0156
     320
     321#if MERL_VSP_COMPENSATION_C0152
     322  Bool      m_bUseVSPCompensation;
     323#endif
     324
     325  Bool      m_bUseDVPRefine;
     326#endif
     327
    319328  // internal member functions
    320329  Void  xSetGlobal      ();                                   ///< set global variables
  • branches/HTM-6.2-dev1-MediaTek/source/App/TAppEncoder/TAppEncTop.cpp

    r332 r384  
    226226#endif
    227227
     228#if MTK_D0156
     229
     230#if MERL_VSP_COMPENSATION_C0152
     231    m_acTEncTopList[iViewIdx]->setUseVSPCompensation           ( iViewIdx ? m_bUseVSPCompensation : 0 );
     232#endif
     233    m_acTEncTopList[iViewIdx]->setUseDVPRefine                  ( iViewIdx ? m_bUseDVPRefine : 0 );
     234#endif
     235
    228236  //====== Tool list ========
    229237    m_acTEncTopList[iViewIdx]->setUseSBACRD                    ( m_bUseSBACRD   );
     
    564572#endif
    565573
     574#if MTK_D0156
     575
     576#if MERL_VSP_COMPENSATION_C0152
     577      m_acTEncDepthTopList[iViewIdx]->setUseVSPCompensation           ( iViewIdx ? true : false );
     578#endif
     579
     580      m_acTEncDepthTopList[iViewIdx]->setUseDVPRefine                 ( iViewIdx ? true : false );
     581#endif
     582
    566583      //====== Weighted Prediction ========
    567584      m_acTEncDepthTopList[iViewIdx]->setUseWP                        ( m_bUseWeightPred      );
  • branches/HTM-6.2-dev1-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp

    r380 r384  
    5353#if MERL_VSP_C0152
    5454
     55#if MTK_D0156
     56#define CHECK_ADD_YET(pcCURef,uiIdx,vspIdx) && ( (!m_pcSlice->getSPS()->getUseVSPCompensation()) || (!( (pcCURef)->getVSPIndex(uiIdx) == vspIdx && bVspMvZeroDone[vspIdx-1] )))
     57#else
    5558#define CHECK_ADD_YET(pcCURef,uiIdx,vspIdx) && !( (pcCURef)->getVSPIndex(uiIdx) == vspIdx && bVspMvZeroDone[vspIdx-1] )
     59#endif
    5660
    5761inline Void TComDataCU::xInheritVspMode( TComDataCU* pcCURef, UInt uiIdx, Bool* bVspMvZeroDone, Int iCount, Int* iVSPIndexTrue, TComMvField* pcMvFieldNeighbours, DisInfo* pDInfo
     
    6165)
    6266{
     67#if MTK_D0156
     68    if( !m_pcSlice->getSPS()->getUseVSPCompensation() )
     69    {
     70        return;
     71    }
     72#endif
     73
    6374  Int vspIdx = (Int) pcCURef->getVSPIndex(uiIdx);
    6475  if( vspIdx != 0 )
     
    8899                                          UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, Int* iVSPIndexTrue, Int mrgCandIdx, DisInfo* pDInfo )
    89100{
     101#if MTK_D0156
     102    if( !m_pcSlice->getSPS()->getUseVSPCompensation() )
     103    {
     104        return true;
     105    }
     106#endif
     107
    90108#if MERL_VSP_C0152_BugFix_ForNoDepthCase
    91109  TComPic* pRefPicBaseDepth = NULL;
     
    43474365        bValid = false;
    43484366#endif
     4367
     4368#if MTK_D0156
     4369      if( !m_pcSlice->getSPS()->getUseVSPCompensation())
     4370      {
     4371          bValid = true;
     4372      }
     4373#endif
     4374
    43494375      if (abCandIsInter[i] && abCandIsInter[j]&& (puhInterDirNeighbours[i]&0x1)&&(puhInterDirNeighbours[j]&0x2)
    43504376#if MERL_VSP_C0152
     
    51705196  }
    51715197
     5198#if MTK_D0156
     5199  if( !m_pcSlice->getSPS()->getUseDVPRefine() )
     5200  {
     5201      bDepthRefine = false;
     5202  }
     5203#endif
     5204
    51725205  // Get Positions 
    51735206  PartSize eCUMode    = getPartitionSize( uiPartAddr );   
  • branches/HTM-6.2-dev1-MediaTek/source/Lib/TLibCommon/TComSlice.h

    r374 r384  
    180180  Bool          m_bIVScalingFlag;
    181181#endif
     182
     183#if MTK_D0156
     184#if MERL_VSP_COMPENSATION_C0152
     185  Bool      m_abUseVSPCompensation[ MAX_TLAYER ];
     186#endif
     187  Bool      m_abUseDVPRefine[ MAX_TLAYER ];
     188#endif
     189
    182190public:
    183191  TComVPS();
     
    245253 
    246254#endif
     255
     256#if MTK_D0156
     257#if MERL_VSP_COMPENSATION_C0152
     258  Bool    getUseVSPCompensation( UInt tLayer ){  return m_abUseVSPCompensation[ tLayer ];}
     259  Void    setUseVSPCompensation( Bool bValue, UInt tLayer ){ m_abUseVSPCompensation[ tLayer ] = bValue;}
     260#endif
     261  Bool    getUseDVPRefine( UInt tLayer ){  return m_abUseDVPRefine[ tLayer ];}
     262  Void    setUseDVPRefine( Bool bValue, UInt tLayer ){ m_abUseDVPRefine[ tLayer ] = bValue;}
     263#endif
    247264};
    248265
     
    398415#if H3D_IVRP
    399416  TComResidualGenerator* m_pcResidualGenerator;
     417#endif
     418
     419#if MTK_D0156
     420#if MERL_VSP_COMPENSATION_C0152
     421  Bool      m_bUseVSPCompensation;
     422#endif
     423  Bool      m_bUseDVPRefine;
    400424#endif
    401425
     
    669693  TComResidualGenerator*  getResidualGenerator()                                              { return m_pcResidualGenerator; }
    670694#endif
     695
     696#if MTK_D0156
     697
     698#if MERL_VSP_COMPENSATION_C0152
     699  Bool    getUseVSPCompensation( ){  return m_bUseVSPCompensation;}
     700  Void    setUseVSPCompensation( Bool bValue ){ m_bUseVSPCompensation = bValue;}
     701#endif
     702
     703  Bool    getUseDVPRefine( ){  return m_bUseDVPRefine;}
     704  Void    setUseDVPRefine( Bool bValue ){ m_bUseDVPRefine = bValue;}
     705
     706#endif
    671707};
    672708
     
    11211157  Int          m_iShiftPrec;
    11221158#endif
     1159
    11231160
    11241161public:
  • branches/HTM-6.2-dev1-MediaTek/source/Lib/TLibCommon/TypeDef.h

    r374 r384  
    176176#endif
    177177
     178
    178179///// ***** VSP *********
    179180#define MERL_VSP_C0152                    1 // JCT3V-C0152: 1: enable VSP-related tools; 0: disable VSP-related tools
     
    183184#define MERL_VSP_C0152_BugFix_ForNoDepthCase     1// MERL bugfix for test condition of no depth
    184185#define QC_BVSP_CleanUP_D0191                    1
     186
     187#define MTK_D0156                 1
    185188/*
    186189 * Two macros are used to configure combinations of JCT3V-C0152 and JCT3V-C0131
  • branches/HTM-6.2-dev1-MediaTek/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r374 r384  
    16021602#endif
    16031603      }
     1604
     1605#if MTK_D0156
     1606
     1607      pcSPS->setUseVSPCompensation( false );
     1608      pcSPS->setUseDVPRefine( false );
     1609
     1610      //Comments: Currently, BVSP and DoNBDV are not used for depth coding
     1611#if MERL_VSP_COMPENSATION_C0152
     1612      READ_FLAG( uiCode, "view_synthesis_pred_flag" );pcSPS->setUseVSPCompensation( uiCode ? true : false );
     1613#endif
     1614      READ_FLAG( uiCode, "dv_refine_flag" );          pcSPS->setUseDVPRefine( uiCode ? true : false );
     1615#endif
    16041616    }
    16051617    READ_FLAG( uiCode, "sps_extension2_flag");
  • branches/HTM-6.2-dev1-MediaTek/source/Lib/TLibDecoder/TDecCu.cpp

    r355 r384  
    373373    Int iVSPIndexTrue[3] = {-1, -1, -1};
    374374    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue, uiMergeIndex );
     375   
     376#if MTK_D0156
     377    if( !pcCU->getSlice()->getSPS()->getUseVSPCompensation() )
     378    {
     379        pcCU->setVSPIndexSubParts( 0, uiAbsPartIdx, 0, uiDepth );
     380    }
     381    else
     382#endif
    375383    {
    376384      Int iVSPIdx = 0;
  • branches/HTM-6.2-dev1-MediaTek/source/Lib/TLibDecoder/TDecEntropy.cpp

    r355 r384  
    317317      else // MPI not used
    318318#endif
     319#if MTK_D0156
     320          if( !pcCU->getSlice()->getSPS()->getUseVSPCompensation() )
     321          {
     322              pcCU->setVSPIndexSubParts( 0, uiSubPartIdx, uiPartIdx, uiDepth );
     323          }
     324          else
     325#endif
    319326      {
    320327        Int iVSPIdx = 0;
  • branches/HTM-6.2-dev1-MediaTek/source/Lib/TLibEncoder/TEncCavlc.cpp

    r374 r384  
    716716      }
    717717#endif
    718     }
     718
     719    }
     720
     721#if MTK_D0156
     722#if MERL_VSP_COMPENSATION_C0152
     723    WRITE_FLAG( pcSPS->getUseVSPCompensation() ? 1 : 0,              "view_synthesis_pred_flag" );
     724#endif
     725
     726    WRITE_FLAG( pcSPS->getUseDVPRefine() ? 1 : 0,                    "dv_refine_flag" );
     727#endif
    719728  }
    720729  else
  • branches/HTM-6.2-dev1-MediaTek/source/Lib/TLibEncoder/TEncCfg.h

    r332 r384  
    336336#endif
    337337
     338#if MTK_D0156
     339
     340#if MERL_VSP_COMPENSATION_C0152
     341  Bool      m_bUseVSPCompensation;
     342#endif
     343  Bool      m_bUseDVPRefine;
     344#endif
     345
    338346public:
    339347  TEncCfg()          {}
     
    809817  Int       getViewOrderIdx                 ()      { return  m_iViewOrderIdx; }    // will be changed to view_id
    810818#endif
     819
     820#if MTK_D0156
     821
     822#if MERL_VSP_COMPENSATION_C0152
     823  Bool    getUseVSPCompensation( ){  return m_bUseVSPCompensation;}
     824  Void    setUseVSPCompensation( Bool bValue ){ m_bUseVSPCompensation = bValue;}
     825#endif
     826
     827
     828  Bool    getUseDVPRefine( ){  return m_bUseDVPRefine;}
     829  Void    setUseDVPRefine( Bool bValue ){ m_bUseDVPRefine = bValue;}
     830#endif
     831
    811832};
    812833
  • branches/HTM-6.2-dev1-MediaTek/source/Lib/TLibEncoder/TEncCu.cpp

    r374 r384  
    19261926          rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to LCU level
    19271927#if MERL_VSP_C0152
     1928
     1929#if MTK_D0156
     1930          if( !rpcTempCU->getSlice()->getSPS()->getUseVSPCompensation() )
     1931          {
     1932              rpcTempCU->setVSPIndexSubParts( 0, 0, 0, uhDepth );
     1933          }
     1934          else
     1935#endif
    19281936          {
    19291937            Int iVSPIdx = 0;
  • branches/HTM-6.2-dev1-MediaTek/source/Lib/TLibEncoder/TEncSearch.cpp

    r355 r384  
    29892989      pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    29902990#if MERL_VSP_C0152
     2991#if MTK_D0156
     2992      if( !pcCU->getSlice()->getSPS()->getUseVSPCompensation() )
     2993      {
     2994          pcCU->setVSPIndexSubParts( 0, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     2995      }
     2996      else
     2997#endif
    29912998      {
    29922999        Int iVSPIdx = 0;
     
    37183725        pcCU->setMergeIndexSubParts( uiMRGIndex,    uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    37193726#if MERL_VSP_C0152
     3727
     3728#if MTK_D0156
     3729        if( !pcCU->getSlice()->getSPS()->getUseVSPCompensation() )
     3730        {
     3731            pcCU->setVSPIndexSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     3732        }
     3733        else
     3734#endif
    37203735        {
    37213736          Int iVSPIdx = 0;
  • branches/HTM-6.2-dev1-MediaTek/source/Lib/TLibEncoder/TEncTop.cpp

    r332 r384  
    710710#endif
    711711
     712
     713#if MTK_D0156
     714#if MERL_VSP_COMPENSATION_C0152
     715  m_cSPS.setUseVSPCompensation           ( m_bUseVSPCompensation );
     716#endif
     717  m_cSPS.setUseDVPRefine                 ( m_bUseDVPRefine       );
     718#endif
     719
    712720  if( m_isDepth )
    713721  {
     
    744752      m_cSPS.setMultiviewResPredMode  ( m_uiMultiviewResPredMode );
    745753#endif
     754
    746755    }
    747756    else
Note: See TracChangeset for help on using the changeset viewer.