Ignore:
Timestamp:
1 Nov 2012, 19:22:41 (12 years ago)
Author:
mitsubishi-htm
Message:

Initial integration of VSP into HTM 4.0.1. The version used for JCT3V-B0102 at Shanghai meeting.

  • VC9 project/solution files updated. Other Visual C++ project/solution files are not updated.
  • Linux make file updated.

TODO

  • A second release is expected to include some bug fix and improvements on the interface, e.g. to move switches from macro definition to the configuration file.
  • A third release is expected after being integrated within HTM 5.x, which is to be used for CE1.h anchor.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDataCU.cpp

    r100 r166  
    4949Int * TComDataCU::m_pcGlbArlCoeffCb = NULL;
    5050Int * TComDataCU::m_pcGlbArlCoeffCr = NULL;
     51#endif
     52
     53#if FORCE_REF_VSP==1
     54#define CHECK_ADD_YET(pcCURef,uiIdx)
     55#define SET_AOUND_MVINFO(pcCURef,uiIdx)  \
     56{\
     57  if((pcCURef)->isVspMode((uiIdx))){\
     58    pcMvFieldNeighbours[iCount<<1].setRefIdx(getSlice()->getRefIdxVsp(REF_PIC_LIST_0));\
     59    if(getSlice()->isInterB()){\
     60      pcMvFieldNeighbours[(iCount<<1)+1].setRefIdx(getSlice()->getRefIdxVsp(REF_PIC_LIST_1));\
     61    }\
     62  }\
     63}
     64
     65#elif FORCE_REF_VSP==2
     66#define CHECK_ADD_YET(pcCURef,uiIdx)  &&!((pcCURef)->isVspMode((uiIdx),TComMv(0,0))&&bVspMvZeroDone)
     67#define SET_AOUND_MVINFO(pcCURef,uiIdx)   if((pcCURef)->isVspMode((uiIdx),TComMv(0,0))){bVspMvZeroDone=true;}
     68
     69inline bool TComDataCU::xAddVspSkip(UChar ucVspMergePos, Bool bVspMvZeroDone, UInt uiDepth, Bool* abCandIsInter, Int& iCount,
     70                                    UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, Int mrgCandIdx)
     71{
     72#if VSP_SLICE_HEADER
     73  if( !getSlice()->getVspFlag() ) return true;
     74#endif
     75
     76  if( ucVspMergePos == VSP_MERGE_POS )
     77  {
     78#if VSP_TEXT_ONLY
     79    if( !getSlice()->getSPS()->isDepth() )
     80#endif
     81    if( getSlice()->getSPS()->getViewId()!=0 && !bVspMvZeroDone )
     82    {
     83      Bool bSubCUCanBeSynthesized[4];
     84      Bool * pbSubCUCanBeSynthesized = bSubCUCanBeSynthesized;
     85      getPic()->checkSynthesisAvailability( getAddr(), getZorderIdxInCU(), uiDepth, pbSubCUCanBeSynthesized );
     86      if( bSubCUCanBeSynthesized[0] && bSubCUCanBeSynthesized[1] && bSubCUCanBeSynthesized[2] && bSubCUCanBeSynthesized[3] )
     87      {
     88        abCandIsInter[iCount] = true;
     89        // get Inter Dir
     90        Int iInterDir = ((getSlice()->getNumRefIdx(REF_PIC_LIST_0) > 0 && getSlice()->getNumRefIdx(REF_PIC_LIST_1) > 0) ? 3 :
     91          (getSlice()->getNumRefIdx(REF_PIC_LIST_0) > 0 ? 1 : 2));
     92        puhInterDirNeighbours[iCount] = iInterDir; //pcCUAboveLeft->getInterDir( uiAboveLeftPartIdx );
     93        // get Mv from Left
     94        pcMvFieldNeighbours[iCount<<1].setMvField( TComMv(0, 0), getSlice()->getRefIdxVsp(REF_PIC_LIST_0) ); //pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
     95        if ( getSlice()->isInterB() )
     96        {
     97          pcMvFieldNeighbours[(iCount<<1)+1].setMvField( TComMv(0, 0), getSlice()->getRefIdxVsp(REF_PIC_LIST_1) ); //pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
     98        }
     99#if SIMP_MRG_PRUN
     100        if ( mrgCandIdx == iCount )
     101        {
     102          return false;
     103        }
     104#endif
     105        iCount ++;
     106      }
     107    }
     108  }
     109  return true;
     110}
    51111#endif
    52112
     
    34503510#endif
    34513511
     3512#if FORCE_REF_VSP==2
     3513  bool bVspMvZeroDone = false;
     3514#endif
     3515
    34523516  Int iCount = 0;
    34533517
     
    35133577#endif
    35143578
    3515   //left
     3579#if FORCE_REF_VSP==2
     3580  //===== vsp 0 =====
     3581  if ( !xAddVspSkip(0, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, mrgCandIdx) )
     3582    return;
     3583#endif
     3584
     3585  //===== left =====
    35163586  UInt uiLeftPartIdx = 0;
    35173587  TComDataCU* pcCULeft = 0;
     
    35333603  if (!(uiPUIdx == 1 && (partSize == SIZE_Nx2N || partSize == SIZE_nLx2N || partSize == SIZE_nRx2N)))
    35343604  {
    3535   if ( pcCULeft && !pcCULeft->isIntra( uiLeftPartIdx ) )
     3605  if ( pcCULeft && !pcCULeft->isIntra( uiLeftPartIdx )
     3606#if FORCE_REF_VSP
     3607    CHECK_ADD_YET(pcCULeft, uiLeftPartIdx)
     3608#endif
     3609  )
    35363610  {
    35373611    abCandIsInter[iCount] = true;
     
    35483622    pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
    35493623#endif
     3624#if FORCE_REF_VSP
     3625    SET_AOUND_MVINFO(pcCULeft, uiLeftPartIdx)
     3626#endif
    35503627#if SIMP_MRG_PRUN
    35513628    if ( mrgCandIdx == iCount )
     
    35813658#endif
    35823659
    3583   // above
     3660#if FORCE_REF_VSP==2
     3661  //===== vsp 1 =====
     3662  if ( !xAddVspSkip(1, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, mrgCandIdx) )
     3663    return;
     3664#endif
     3665
     3666  //===== above =====
    35843667#if !SIMP_MRG_PRUN
    35853668  partSize = getPartitionSize( uiAbsPartIdx );
     
    36053688#if SIMP_MRG_PRUN
    36063689  if ( pcCUAbove && !pcCUAbove->isIntra( uiAbovePartIdx )
     3690#if FORCE_REF_VSP
     3691    CHECK_ADD_YET(pcCUAbove, uiAbovePartIdx)
     3692#endif
    36073693    && !(uiPUIdx == 1 && (cCurPS == SIZE_2NxN || cCurPS == SIZE_2NxnU || cCurPS == SIZE_2NxnD))
    36083694    && ( !pcCULeft || pcCULeft->isIntra( uiLeftPartIdx ) || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAbove, uiAbovePartIdx ) ) )
     
    36243710    pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
    36253711#endif
     3712#if FORCE_REF_VSP
     3713    SET_AOUND_MVINFO(pcCUAbove, uiAbovePartIdx)
     3714#endif
    36263715#if SIMP_MRG_PRUN
    36273716    if ( mrgCandIdx == iCount )
     
    36593748#endif
    36603749
    3661   // above right
     3750#if FORCE_REF_VSP==2
     3751  //===== vsp 2 =====
     3752  if ( !xAddVspSkip(2, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, mrgCandIdx) )
     3753    return;
     3754#endif
     3755
     3756  //===== above right =====
    36623757  UInt uiAboveRightPartIdx = 0;
    36633758  TComDataCU* pcCUAboveRight = 0;
     
    36773772#endif
    36783773#if SIMP_MRG_PRUN
    3679   if ( pcCUAboveRight && !pcCUAboveRight->isIntra( uiAboveRightPartIdx ) && ( !pcCUAbove || pcCUAbove->isIntra( uiAbovePartIdx ) || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveRight, uiAboveRightPartIdx ) ) )
     3774  if ( pcCUAboveRight && !pcCUAboveRight->isIntra( uiAboveRightPartIdx )
     3775#if FORCE_REF_VSP
     3776    CHECK_ADD_YET(pcCUAboveRight, uiAboveRightPartIdx)
     3777#endif
     3778    && ( !pcCUAbove || pcCUAbove->isIntra( uiAbovePartIdx ) || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveRight, uiAboveRightPartIdx ) ) )
    36803779#else
    36813780  if ( pcCUAboveRight && !pcCUAboveRight->isIntra( uiAboveRightPartIdx ) )
     
    36953794    pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
    36963795#endif
     3796#if FORCE_REF_VSP
     3797    SET_AOUND_MVINFO(pcCUAboveRight, uiAboveRightPartIdx)
     3798#endif
    36973799#if SIMP_MRG_PRUN
    36983800    if ( mrgCandIdx == iCount )
     
    37273829#endif
    37283830
    3729   //left bottom
     3831#if FORCE_REF_VSP==2
     3832  //===== vsp 3 =====
     3833  if ( !xAddVspSkip(3, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, mrgCandIdx) )
     3834    return;
     3835#endif
     3836
     3837  //===== left bottom =====
     3838#if VSP_MERGE_POS < 4
     3839#if HHI_INTER_VIEW_MOTION_PRED
     3840  if( iCount < 4 + extraMergeCand )
     3841#else
     3842  if( iCount < 4 )
     3843#endif
     3844  {
     3845#endif
    37303846  UInt uiLeftBottomPartIdx = 0;
    37313847  TComDataCU* pcCULeftBottom = 0;
     
    37453861#endif
    37463862#if SIMP_MRG_PRUN
    3747   if ( pcCULeftBottom && !pcCULeftBottom->isIntra( uiLeftBottomPartIdx ) && ( !pcCULeft || pcCULeft->isIntra( uiLeftPartIdx ) || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) )
     3863  if ( pcCULeftBottom && !pcCULeftBottom->isIntra( uiLeftBottomPartIdx )
     3864#if FORCE_REF_VSP
     3865    CHECK_ADD_YET(pcCULeftBottom, uiLeftBottomPartIdx)
     3866#endif
     3867    && ( !pcCULeft || pcCULeft->isIntra( uiLeftPartIdx ) || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) )
    37483868#else
    37493869  if ( pcCULeftBottom && !pcCULeftBottom->isIntra( uiLeftBottomPartIdx ) )
     
    37633883    pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
    37643884#endif
     3885#if FORCE_REF_VSP
     3886    SET_AOUND_MVINFO(pcCULeftBottom, uiLeftBottomPartIdx)
     3887#endif
    37653888#if SIMP_MRG_PRUN
    37663889    if ( mrgCandIdx == iCount )
     
    37713894    iCount ++;
    37723895  }
     3896#if VSP_MERGE_POS < 4
     3897  }
     3898#endif
    37733899
    37743900#if HHI_INTER_VIEW_MOTION_PRED
     
    37953921#endif
    37963922
    3797   // above left
     3923#if FORCE_REF_VSP==2
     3924  //===== vsp 4 =====
     3925  if( iCount < 4 + extraMergeCand )
     3926  {
     3927    if ( !xAddVspSkip(4, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, mrgCandIdx) )
     3928      return;
     3929  }
     3930#endif
     3931
     3932  //===== above left =====
    37983933#if HHI_INTER_VIEW_MOTION_PRED
    37993934  if( iCount < 4 + extraMergeCand )
     
    38203955#if SIMP_MRG_PRUN
    38213956    if( pcCUAboveLeft && !pcCUAboveLeft->isIntra( uiAboveLeftPartIdx )
     3957#if FORCE_REF_VSP
     3958     CHECK_ADD_YET(pcCUAboveLeft, uiAboveLeftPartIdx)
     3959#endif
    38223960     && ( !pcCULeft || pcCULeft->isIntra( uiLeftPartIdx ) || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) )
    38233961     && ( !pcCUAbove || pcCUAbove->isIntra( uiAbovePartIdx ) || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) )
     
    38403978      pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
    38413979#endif
     3980#if FORCE_REF_VSP
     3981      SET_AOUND_MVINFO(pcCUAboveLeft, uiAboveLeftPartIdx)
     3982#endif
    38423983#if SIMP_MRG_PRUN
    38433984      if ( mrgCandIdx == iCount )
     
    38493990    }
    38503991  }
     3992
     3993#if FORCE_REF_VSP==2
     3994  //===== vsp 5 =====
     3995#if HHI_INTER_VIEW_MOTION_PRED
     3996  if( iCount < 4 + extraMergeCand )
     3997#else
     3998  if( iCount < 4 )
     3999#endif
     4000  {
     4001    if ( !xAddVspSkip(5, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, mrgCandIdx) )
     4002      return;
     4003  }
     4004#endif
    38514005
    38524006  if ( getSlice()->getPPS()->getEnableTMVPFlag() )
     
    42684422  if( uiIter == 0 )
    42694423  {
    4270     if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) )
     4424    if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx )
     4425#if FORCE_REF_VSP==1
     4426     && !pcCorner->isVspMode( uiCornerPUIdx )
     4427#endif
     4428    )
    42714429    {
    42724430      rbValidCand = true;
     
    43034461  else
    43044462  {
    4305     if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) )
     4463    if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx )
     4464#if FORCE_REF_VSP==1
     4465     && !pcCorner->isVspMode( uiCornerPUIdx )
     4466#endif
     4467    )
    43064468    {
    43074469      rbValidCand = true;
     
    44524614#endif
    44534615  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) )
     4616#if VSP_N
     4617  if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)
     4618#endif
    44544619  {
    44554620    for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
     
    44784643
    44794644  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))
     4645#if VSP_N
     4646  if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)
     4647#endif
    44804648  {
    44814649    for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
     
    45044672#endif
    45054673  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) )
     4674#if VSP_N
     4675  if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)
     4676#endif
    45064677  {
    45074678    for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
     
    45294700#endif
    45304701  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))
     4702#if VSP_N
     4703  if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)
     4704#endif
    45314705  {
    45324706    for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
     
    45574731#endif
    45584732  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))
     4733#if VSP_N
     4734  if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)
     4735#endif
    45594736  {
    45604737    for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
     
    47684945  UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth();
    47694946
    4770   Int   aiDvMcpDvCand[2][7] = {{0,},    {0,}}; // dummy, 5 spatial + 1 temporal, DV-MCP ÁÖº¯ ºí·°¿¡¼­ »ç¿ëµÈ DV¸¦ ÀúÀå
     4947  Int   aiDvMcpDvCand[2][7] = {{0,},    {0,}}; // dummy, 5 spatial + 1 temporal, DV-MCP ÁÖº¯ ºúÓ°¿¡¼­ »ç¿EÈ DV¸¦ ÀúÀE
    47714948  Bool  abDvMcpFlag  [2][7] = {{false,},{false,}};
    47724949  //Int   aiRefPOC     [2][7] = {{-1,},{-1}}; // debug
     
    47884965  UInt uiLeftPartIdx = uiIdx;
    47894966  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) )
     4967#if VSP_N
     4968  if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)
     4969#endif
    47904970  {
    47914971    bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );
     
    48265006
    48275007  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))
     5008#if VSP_N
     5009  if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)
     5010#endif
    48285011  {
    48295012    bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );
     
    48635046#endif
    48645047  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) )
     5048#if VSP_N
     5049  if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)
     5050#endif
    48655051  {
    48665052    bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );
     
    49005086#endif
    49015087  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))
     5088#if VSP_N
     5089  if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)
     5090#endif
    49025091  {
    49035092    bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );
     
    49395128#endif
    49405129  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))
     5130#if VSP_N
     5131  if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)
     5132#endif
    49415133  {
    49425134    bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );
     
    55515743}
    55525744
     5745#if FORCE_REF_VSP==2
     5746Int TComDataCU::isVspMode ( UInt uiPartIdx )
     5747{
     5748  if( m_pePredMode[ uiPartIdx ] == MODE_SKIP  ) return 0;
     5749  if( m_pePredMode[ uiPartIdx ] == MODE_INTRA ) return 0;
     5750
     5751  Int aiRefIdx[2] = {NOT_VALID, NOT_VALID}, iRet = 0;
     5752  for( Int iList = 0; iList < 2; iList++ )
     5753  {
     5754    aiRefIdx[iList] = getCUMvField( RefPicList(iList) )->getRefIdx( uiPartIdx );
     5755    if( aiRefIdx[iList] >= 0 && getSlice()->getRefViewId( RefPicList(iList), aiRefIdx[iList] ) == NUM_VIEW_VSP )
     5756    {
     5757      iRet |= (iList ? 0x02 : 0x01); // L0=1, L1=2, BI=3
     5758      continue;
     5759    }
     5760  }
     5761
     5762  return iRet;
     5763}
     5764
     5765Int TComDataCU::isVspMode ( UInt uiPartIdx, TComMv cCompMv )
     5766{
     5767  TComMv cMv;
     5768  Int iRet = 0, iList = 0;
     5769
     5770  if( (iList = isVspMode( uiPartIdx )) )
     5771  {
     5772    switch( iList )
     5773    {
     5774    case 1:
     5775      cMv = getCUMvField( RefPicList(0) )->getMv( uiPartIdx );
     5776      if( cMv == cCompMv )
     5777      {
     5778        iRet = 1; // L0=1
     5779      }
     5780      break;
     5781    case 2:
     5782      cMv = getCUMvField( RefPicList(1) )->getMv( uiPartIdx );
     5783      if( cMv == cCompMv )
     5784      {
     5785        iRet = 2; // L1=2
     5786      }
     5787      break;
     5788    case 3:
     5789      cMv = getCUMvField( RefPicList(0) )->getMv( uiPartIdx );
     5790      if( cMv == cCompMv )
     5791      {
     5792        cMv = getCUMvField( RefPicList(1) )->getMv( uiPartIdx );
     5793        if( cMv == cCompMv )
     5794        {
     5795          iRet = 3; // BI=3
     5796        }
     5797      }
     5798      break;
     5799    }
     5800  }
     5801
     5802  return iRet;
     5803}
     5804#endif
     5805
    55535806// ====================================================================================================================
    55545807// Protected member functions
     
    56125865  }
    56135866 
     5867#if AMVP_VSP_UNAVAILABLE
     5868  if( pcTmpCU != NULL && pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) >= 0 && pcTmpCU->getSlice()->getRefViewId( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) == NUM_VIEW_VSP )
     5869  {
     5870    return false;
     5871  }
     5872#endif
     5873
    56145874  if ( pcTmpCU != NULL && m_pcSlice->isEqualRef(eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx), iRefIdx) )
    56155875  {
     
    57135973  TComDataCU* pcTmpCU = NULL;
    57145974  UInt uiIdx;
     5975#if VSP_N
     5976  Bool bRefVsp = false;
     5977#endif
    57155978  switch( eDir )
    57165979  {
     
    57706033    return false;
    57716034  }
     6035
     6036#if AMVP_VSP_UNAVAILABLE
     6037  if( pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) >= 0 && pcTmpCU->getSlice()->getRefViewId( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) == NUM_VIEW_VSP )
     6038  {
     6039    return false;
     6040  }
     6041#endif
    57726042 
    57736043  RefPicList eRefPicList2nd = REF_PIC_LIST_0;
     
    58156085    }
    58166086
     6087#if VSP_N
     6088    if( pcTmpCU->getSlice()->getRefViewId( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) == NUM_VIEW_VSP )
     6089    {
     6090      bRefVsp = true;
     6091    }
     6092    Int iScale = bRefVsp ? 4096 : xGetDistScaleFactor( iCurrPOC, iCurrRefPOC, iNeibPOC, iNeibRefPOC );
     6093#else
    58176094    Int iScale = xGetDistScaleFactor( iCurrPOC, iCurrRefPOC, iNeibPOC, iNeibRefPOC );
     6095#endif
    58186096    if ( iScale == 4096 )
    58196097    {
     
    58426120    }
    58436121
     6122#if VSP_N
     6123    if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) == NUM_VIEW_VSP )
     6124    {
     6125      bRefVsp = true;
     6126    }
     6127    Int iScale = bRefVsp ? 4096 : xGetDistScaleFactor( iCurrPOC, iCurrRefPOC, iNeibPOC, iNeibRefPOC );
     6128#else
    58446129    Int iScale = xGetDistScaleFactor( iCurrPOC, iCurrRefPOC, iNeibPOC, iNeibRefPOC );
     6130#endif
    58456131    if ( iScale == 4096 )
    58466132    {
     
    58756161  Int iColViewIdx, iColRefViewIdx;
    58766162  TComPic *pColPic = getSlice()->getRefPic( eRefPicList, refidx);
     6163#if VSP_MV_ZERO // shimizu
    58776164  TComDataCU *pColCU = pColPic->getCU( uiCUAddr );
    58786165  iColViewIdx = pColCU->getSlice()->getViewId();
    5879 
     6166#if VSP_N
     6167  if( iColViewIdx == NUM_VIEW_VSP )
     6168  {
     6169    return false;
     6170  }
     6171#endif
     6172#else 
     6173#if VSP_N
     6174  if( pColPic->getSlice(0)->getViewId() == NUM_VIEW_VSP )
     6175  {
     6176    return false;
     6177  }
     6178#endif
     6179  TComDataCU *pColCU = pColPic->getCU( uiCUAddr );
     6180  iColViewIdx = pColCU->getSlice()->getViewId();
     6181#endif
    58806182
    58816183  if (pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE||pColCU->isIntra(uiAbsPartAddr))
     
    59046206
    59056207    iColRefViewIdx = pColCU->getSlice()->getRefPic(eColRefPicList, iColRefIdx)->getViewId();
     6208#if VSP_N
     6209    if( iColRefViewIdx == NUM_VIEW_VSP )
     6210    {
     6211      continue;
     6212    }
     6213#endif
    59066214
    59076215    if ( iColViewIdx    == iColRefViewIdx ) // temporal vector
     
    60406348  iScale = 0;
    60416349  iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();
     6350#if VSP_N
     6351//  UInt uiColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewId();
     6352  UInt uiCurRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId();
     6353  if( uiCurRefViewId == NUM_VIEW_VSP )
     6354    iScale = 4096;
     6355  else
     6356#endif
    60426357  if((iColPOC != iColRefPOC)&&(iCurrPOC != iCurrRefPOC))
    60436358    iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
     
    60526367  if ( iScale == 4096 )
    60536368  {
     6369#if VSP_MV_ZERO
     6370    if( uiCurRefViewId == NUM_VIEW_VSP )
     6371      rcMv.setZero();
     6372    else
     6373#endif
    60546374    rcMv = cColMv;
    60556375  }
     
    61516471    return false;
    61526472  }
     6473
     6474#if VSP_N //??
     6475  if (pColCU->isSkipped(uiPartIdxCenter))
     6476    return false;
     6477#endif
    61536478 
    61546479  if( m_pcSlice->getRefPic( eRefPicList, iRefIdx )->getViewId() != m_pcSlice->getViewId() )
     
    77058030
    77068031//! \}
     8032
Note: See TracChangeset for help on using the changeset viewer.