Changeset 254 in 3DVCSoftware for branches/HTM-5.1-dev2-Mediatek/source


Ignore:
Timestamp:
4 Feb 2013, 02:58:35 (12 years ago)
Author:
mediatek-htm
Message:

Integration of JCT3V-C0137

The added texture merging candidate is controlled by the MACRO "MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137"

From MediaTek
yiwen.chen@…

Location:
branches/HTM-5.1-dev2-Mediatek/source/Lib
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibCommon/TComDataCU.cpp

    r244 r254  
    36243624{
    36253625#if HHI_INTER_VIEW_MOTION_PRED
     3626#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     3627  const Int extraMergeCand = ( ( getSlice()->getIsDepth() || getSlice()->getSPS()->getMultiviewMvPredMode() )? 1 : 0 );
     3628#else
    36263629  const Int extraMergeCand = ( getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 );
     3630#endif
    36273631#endif
    36283632
     
    36513655  deriveLeftRightTopIdxGeneral( cCurPS, uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT );
    36523656  deriveLeftBottomIdxGeneral( cCurPS, uiAbsPartIdx, uiPUIdx, uiPartIdxLB );
     3657
     3658#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     3659  if( m_pcSlice->getIsDepth())
     3660  {
     3661    UInt uiPartIdxCenter;
     3662    xDeriveCenterIdx( cCurPS, uiPUIdx, uiPartIdxCenter );   
     3663    TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() );
     3664    if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdxCenter ) )
     3665    {
     3666      abCandIsInter[iCount] = true;     
     3667      puhInterDirNeighbours[iCount] = pcTextureCU->getInterDir( uiPartIdxCenter );
     3668      if( ( puhInterDirNeighbours[iCount] & 1 ) == 1 )
     3669      {
     3670        pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
     3671        TComMv cMvPred = pcMvFieldNeighbours[iCount<<1].getMv();
     3672        const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
     3673        cMvPred+=cAdd;
     3674        cMvPred>>=2;
     3675        clipMv(cMvPred);
     3676        pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,pcMvFieldNeighbours[iCount<<1].getRefIdx());
     3677      }
     3678      if ( getSlice()->isInterB() )
     3679      {
     3680        if( ( puhInterDirNeighbours[iCount] & 2 ) == 2 )
     3681        {
     3682          pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
     3683          TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv();
     3684          const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
     3685          cMvPred+=cAdd;
     3686          cMvPred>>=2;
     3687          clipMv(cMvPred);
     3688          pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx());
     3689        }
     3690      }
     3691#if SIMP_MRG_PRUN
     3692      if ( mrgCandIdx == iCount )
     3693      {
     3694        return;
     3695      }
     3696#endif
     3697      iCount ++;
     3698    }
     3699  }
     3700#endif
    36533701
    36543702#if HHI_INTER_VIEW_MOTION_PRED
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibCommon/TypeDef.h

    r244 r254  
    115115
    116116///// ***** MOTION PARAMETER INHERITANCE  *********
    117 #define HHI_MPI                           1   // motion parameter inheritance from texture picture for depth map coding
     117#define MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137   1   // JCT3V-C0137
     118#define HHI_MPI                           0   // motion parameter inheritance from texture picture for depth map coding
    118119#if HHI_MPI
    119120#define FIX_MPI_B0065                     1   // JCT3V-B0065, fix the MPI bug when RQT is off
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r210 r254  
    14681468#endif
    14691469#endif
    1470 #if HHI_MPI
     1470#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    14711471Void TDecCavlc::parseSPS(TComSPS* pcSPS, Bool bIsDepth)
    14721472#else
     
    18921892
    18931893#if LCU_SYNTAX_ALF
     1894#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     1895Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth)
     1896#else
    18941897Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet)
     1898#endif
    18951899#else
    18961900Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl)
     
    24952499  #elif HHI_MPI
    24962500  const int iExtraMergeCandidates = sps->getUseMVI() ? 1 : 0;
     2501  #elif MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     2502  const int iExtraMergeCandidates = (  (isDepth || sps->getMultiviewMvPredMode()) ) ? 1 : 0;   
    24972503  #else
    24982504  const int iExtraMergeCandidates = sps->getMultiviewMvPredMode() ? 1 : 0;
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibDecoder/TDecCAVLC.h

    r210 r254  
    118118  Void  parseVPS            ( TComVPS* pcVPS );
    119119#endif
    120 #if HHI_MPI
     120#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    121121  Void  parseSPS            ( TComSPS* pcSPS, Bool bIsDepth );
    122122#else
     
    131131  Void  parseAPS            ( TComAPS* pAPS );
    132132#if LCU_SYNTAX_ALF
     133#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     134  Void  parseSliceHeader    ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth);
     135#else
    133136  Void  parseSliceHeader    ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet);
     137#endif
    134138#else
    135139  Void  parseSliceHeader    ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl );
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibDecoder/TDecEntropy.h

    r244 r254  
    7474  virtual Void  parseVPS                  ( TComVPS* pcVPS )                       = 0;
    7575#endif
    76 #if HHI_MPI
     76#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    7777  virtual Void  parseSPS                  ( TComSPS* pcSPS, Bool bIsDepth )                       = 0;
    7878#else
     
    8888
    8989#if LCU_SYNTAX_ALF
     90#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     91  virtual Void parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth)       = 0;
     92#else
    9093  virtual Void parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet)       = 0;
     94#endif
    9195#else
    9296  virtual Void parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl )                                = 0;
     
    179183#endif
    180184 
    181 #if HHI_MPI
     185#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    182186  Void    decodeSPS                   ( TComSPS* pcSPS, Bool bIsDepth ) { m_pcEntropyDecoderIf->parseSPS(pcSPS, bIsDepth); }
    183187#else
     
    193197
    194198#if LCU_SYNTAX_ALF
     199#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     200  Void    decodeSliceHeader           ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth)  { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager, alfCUCtrl, alfParamSet, isDepth);         }
     201#else
    195202  Void    decodeSliceHeader           ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet)  { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager, alfCUCtrl, alfParamSet);         }
     203#endif
    196204#else
    197205  Void    decodeSliceHeader           ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl )  { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager, alfCUCtrl);         }
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibDecoder/TDecSbac.h

    r210 r254  
    9090  Void  parseVPS                  ( TComVPS* pcVPS )  {}
    9191#endif
    92 #if HHI_MPI
     92#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    9393  Void  parseSPS                  ( TComSPS* pcSPS, Bool bIsDepth ) {}
    9494#else
     
    104104
    105105#if LCU_SYNTAX_ALF
     106#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     107  Void  parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth) {}
     108#else
    106109  Void  parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet) {}
     110#endif
    107111#else
    108112  Void  parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl ) {}
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibDecoder/TDecTop.cpp

    r210 r254  
    700700  // ALF CU parameters should be part of the slice header -> needs to be fixed
    701701#if LCU_SYNTAX_ALF
     702#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     703  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_cGopDecoder.getAlfCuCtrlParam(), m_cGopDecoder.getAlfParamSet(),m_apcSlicePilot->getVPS()->getDepthFlag(nalu.m_layerId));
     704#else
    702705  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_cGopDecoder.getAlfCuCtrlParam(), m_cGopDecoder.getAlfParamSet());
     706#endif
    703707#else
    704708  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_cGopDecoder.getAlfCuCtrlParam() );
     
    11531157  sps->setRPSList(rps);
    11541158#endif
    1155 #if HHI_MPI
     1159#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    11561160  m_cEntropyDecoder.decodeSPS( sps, m_isDepth );
    11571161#else
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncCavlc.cpp

    r210 r254  
    508508#endif
    509509#endif
    510 #if HHI_MPI
     510#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    511511Void TEncCavlc::codeSPS( TComSPS* pcSPS, Bool bIsDepth )
    512512#else
     
    13041304  #elif HHI_MPI
    13051305  const int iExtraMergeCandidates = pcSlice->getSPS()->getUseMVI() ? 1 : 0;
     1306  #elif MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     1307  const int iExtraMergeCandidates = ( pcSlice->getIsDepth() || pcSlice->getSPS()->getMultiviewMvPredMode() ) ? 1 : 0;
    13061308  #else
    13071309  const int iExtraMergeCandidates = pcSlice->getSPS()->getMultiviewMvPredMode() ? 1 : 0;
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncCavlc.h

    r210 r254  
    118118#endif
    119119
    120 #if HHI_MPI
     120#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    121121  Void  codeSPS                 ( TComSPS* pcSPS, Bool bIsDepth );
    122122#else
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncEntropy.cpp

    r244 r254  
    133133#endif
    134134
    135 #if HHI_MPI
     135#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    136136Void TEncEntropy::encodeSPS( TComSPS* pcSPS, Bool bIsDepth )
    137137{
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncEntropy.h

    r244 r254  
    8080#endif
    8181
    82 #if HHI_MPI
     82#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    8383  virtual Void  codeSPS                 ( TComSPS* pcSPS, Bool bIsDepth )                       = 0;
    8484#else
     
    246246#endif
    247247  // SPS
    248 #if HHI_MPI
     248#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    249249  Void encodeSPS               ( TComSPS* pcSPS, Bool bIsDepth );
    250250#else
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncGOP.cpp

    r210 r254  
    247247      std::vector<TComAPS>& vAPS = m_pcEncTop->getAPS();
    248248#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
     249#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     250    m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, uiPOCCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getEncTop()->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS(), m_pcEncTop->getIsDepth() );
     251#else
    249252    m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, uiPOCCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getEncTop()->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS() );
     253#endif
    250254#else
    251255      m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, uiPOCCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getSPS(), m_pcEncTop->getPPS() );
     
    906910        pcSlice->getSPS()->setNumSubstreams( pcSlice->getPPS()->getNumSubstreams() );
    907911#endif
    908 #if HHI_MPI
     912#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    909913        m_pcEntropyCoder->encodeSPS(pcSlice->getSPS(), m_pcEncTop->getIsDepth());
    910914#else
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncSbac.cpp

    r210 r254  
    404404#endif
    405405
    406 #if HHI_MPI
     406#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    407407Void TEncSbac::codeSPS( TComSPS* pcSPS, Bool bIsDepth )
    408408#else
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncSbac.h

    r210 r254  
    102102#endif
    103103 
    104 #if HHI_MPI
     104#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    105105  Void  codeSPS                 ( TComSPS* pcSPS, Bool bIsDepth );
    106106#else
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncSlice.cpp

    r210 r254  
    163163 */
    164164#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
     165#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     166Void TEncSlice::initEncSlice( TComPic* pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS * pVPS, TComSPS* pSPS, TComPPS *pPPS, bool isDepth )
     167#else
    165168Void TEncSlice::initEncSlice( TComPic* pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS * pVPS, TComSPS* pSPS, TComPPS *pPPS )
     169#endif
    166170#else
    167171Void TEncSlice::initEncSlice( TComPic* pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS )
     
    470474  #elif HHI_MPI
    471475  const int iExtraMergeCandidates = pSPS->getUseMVI() ? 1 : 0;
     476  #elif MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     477  const int iExtraMergeCandidates = ( isDepth || pSPS->getMultiviewMvPredMode() ) ? 1 : 0;
    472478  #else
    473479  const int iExtraMergeCandidates = pSPS->getMultiviewMvPredMode() ? 1 : 0;
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncSlice.h

    r210 r254  
    111111  /// preparation of slice encoding (reference marking, QP and lambda)
    112112#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
     113#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     114  Void    initEncSlice        ( TComPic*  pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, bool isDepth );
     115#else
    113116  Void    initEncSlice        ( TComPic*  pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS );
     117#endif
    114118#else
    115119  Void    initEncSlice        ( TComPic*  pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS );
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibExtractor/TExtrTop.cpp

    r210 r254  
    8181     cSPS.setRPSList( &cRPS );
    8282#endif
    83 #if HHI_MPI
     83#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    8484#if VIDYO_VPS_INTEGRATION
    8585     m_cEntropyDecoder.decodeSPS( &cSPS, m_cVPS.getDepthFlag(uiLayerId) );
Note: See TracChangeset for help on using the changeset viewer.