Ignore:
Timestamp:
7 Nov 2012, 18:49:55 (12 years ago)
Author:
qualcomm
Message:

JCT3V-B0047, B0069 and B0086

Location:
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/CommonDef.h

    r127 r169  
    139139#define PDM_NO_INTER_UPDATE               1         // no update for inter (but not inter-view) predicted blocks
    140140#define PDM_MERGE_POS                     0         // position of pdm in merge list (0..4)
     141
     142#if QC_MRG_CANS_B0048
     143#if OL_DISMV_POS_B0069
     144#define DMV_MERGE_POS                     4
     145#else
     146#define DMV_MERGE_POS                     1
     147#endif
     148#endif
     149
    141150#if SAIT_IMPROV_MOTION_PRED_M24829&!QC_MULTI_DIS_CAN
    142151#define PDM_AMVP_POS                      0         // position of pdm in amvp list  (0..3)
  • branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp

    r167 r169  
    35003500
    35013501  //===== add merge with predicted depth maps =====
     3502#if QC_MRG_CANS_B0048
     3503  TComMv  acPdmMv       [4];
     3504  Int     aiPdmRefIdx   [4] = {-1, -1, -1, -1};
     3505  Bool    bLeftAvai         = false;
     3506#if OL_DISMV_POS_B0069
     3507  Int     iPosLeftAbove[2]  = {-1, -1};
     3508#endif
     3509#else
    35023510  TComMv  acPdmMv       [2];
    35033511  Int     aiPdmRefIdx   [2] = {-1, -1};
     3512#endif
    35043513
    35053514#if LGE_DVMCP
     3515#if QC_MRG_CANS_B0048
     3516  acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = acPdmMv[2].m_bDvMcp = acPdmMv[3].m_bDvMcp = false;
     3517#else
    35063518  acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = false;
     3519#endif
    35073520#endif
    35083521
     
    35343547    cDisInfo.m_aVIdxCan[0] = 0;
    35353548  }
    3536   Int     iPdmInterDir      = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo  );
     3549#if QC_MRG_CANS_B0048
     3550  Int iPdmDir[2] = {0, 0};
     3551#endif
     3552  Int     iPdmInterDir      = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo 
     3553#if QC_MRG_CANS_B0048
     3554    , iPdmDir
     3555#endif
     3556    );
    35373557#else
    35383558  Int     iPdmInterDir      = getPdmMergeCandidate( uiPUIdx, aiPdmRefIdx, acPdmMv );
    35393559#endif
    3540 
     3560#if QC_MRG_CANS_B0048
     3561  if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 0 )
     3562#else
    35413563  if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 0 )
     3564#endif
    35423565  {
    35433566    abCandIsInter        [ iCount ] = true;
     3567#if QC_MRG_CANS_B0048
     3568    puhInterDirNeighbours[ iCount ] = iPdmDir[0];
     3569    iPdmInterDir                    = iPdmDir[0];
     3570#else
    35443571    puhInterDirNeighbours[ iCount ] = iPdmInterDir;
     3572#endif
    35453573    if( ( iPdmInterDir & 1 ) == 1 )
    35463574    {
     
    35733601#endif
    35743602
     3603#if QC_MRG_CANS_B0048
     3604  if(extraMergeCand)
     3605  {
     3606    if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 1)
     3607    {
     3608      assert(iCount < MRG_MAX_NUM_CANDS_MEM);
     3609      abCandIsInter        [ iCount ] = true;
     3610      puhInterDirNeighbours[ iCount ] = iPdmDir[1];
     3611      if( ( iPdmDir[1] & 1 ) == 1 )
     3612      {
     3613        pcMvFieldNeighbours[ iCount<<1    ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] );
     3614      }
     3615      if( ( iPdmDir[1] & 2 ) == 2 )
     3616      {
     3617        pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] );
     3618      }
     3619#if LGE_DVMCP
     3620      pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     3621      pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
     3622#endif
     3623#if SIMP_MRG_PRUN
     3624      if ( mrgCandIdx == iCount )
     3625          return;
     3626#endif
     3627      iCount ++;
     3628    }   
     3629  }
     3630#endif
    35753631  //left
    35763632  UInt uiLeftPartIdx = 0;
     
    36103666    }
    36113667#endif
     3668#if QC_MRG_CANS_B0048
     3669    Bool bRemoveSpa = false; //prunign to inter-view candidates
     3670    Int  iCnloop    = iCount - 1;
     3671    for(; iCnloop >= 0; iCnloop --)
     3672    {
     3673      if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
     3674      {
     3675        bRemoveSpa                      = true;
     3676        abCandIsInter        [ iCount ] = false;
     3677      }
     3678    }
     3679    if(!bRemoveSpa)
     3680    {
     3681      bLeftAvai = true;
     3682#if OL_DISMV_POS_B0069
     3683      iPosLeftAbove[0] = iCount;
     3684#endif
     3685#endif
    36123686#if LGE_DVMCP
    36133687    pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     
    36213695#endif
    36223696    iCount ++;
     3697#if QC_MRG_CANS_B0048
     3698      }
     3699#endif
    36233700  }
    36243701  }
    36253702
    36263703#if HHI_INTER_VIEW_MOTION_PRED
     3704#if QC_MRG_CANS_B0048
     3705  if( iPdmDir[0]   && !bNoPdmMerge && PDM_MERGE_POS == 1 )
     3706#else
    36273707  if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 1 )
     3708#endif
    36283709  {
    36293710    abCandIsInter        [ iCount ] = true;
     
    37043785    }
    37053786#endif
     3787#if QC_MRG_CANS_B0048
     3788    Bool bRemoveSpa = false; //prunign to inter-view candidates
     3789    Int  iCnloop    = bLeftAvai? (iCount-2): (iCount-1);
     3790    for(; iCnloop >= 0; iCnloop --)
     3791    {
     3792      if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
     3793      {
     3794        bRemoveSpa                      = true;
     3795        abCandIsInter        [ iCount ] = false;
     3796      }
     3797    }
     3798    if(!bRemoveSpa)
     3799    {
     3800#if OL_DISMV_POS_B0069
     3801      iPosLeftAbove[1] = iCount;
     3802#endif
     3803#endif
    37063804#if LGE_DVMCP
    37073805    pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     
    37153813#endif
    37163814    iCount ++;
     3815#if QC_MRG_CANS_B0048
     3816    }
     3817#endif
    37173818  }
    37183819#if !SIMP_MRG_PRUN
     
    37213822
    37223823#if HHI_INTER_VIEW_MOTION_PRED
     3824#if QC_MRG_CANS_B0048
     3825  if( iPdmDir[0]   && !bNoPdmMerge && PDM_MERGE_POS == 2 )
     3826#else
    37233827  if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 2 )
     3828#endif
    37243829  {
    37253830    abCandIsInter        [ iCount ] = true;
     
    38073912
    38083913#if HHI_INTER_VIEW_MOTION_PRED
     3914#if QC_MRG_CANS_B0048
     3915  if( iPdmDir[0]   && !bNoPdmMerge && PDM_MERGE_POS == 3 )
     3916#else
    38093917  if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 3 )
     3918#endif
    38103919  {
    38113920    abCandIsInter        [ iCount ] = true;
     
    38413950#endif
    38423951
     3952#if OL_DISMV_POS_B0069
     3953  if(extraMergeCand)
     3954  {
     3955    if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 4)
     3956    {
     3957      assert(iCount < MRG_MAX_NUM_CANDS_MEM);
     3958      Bool bRemoveSpa = false; //prunign to A1, B1
     3959      abCandIsInter        [ iCount ] = true;
     3960      puhInterDirNeighbours[ iCount ] = iPdmDir[1];
     3961      if( ( iPdmDir[1] & 1 ) == 1 )
     3962      {
     3963        pcMvFieldNeighbours[ iCount<<1    ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] );
     3964      }
     3965      if( ( iPdmDir[1] & 2 ) == 2 )
     3966      {
     3967        pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] );
     3968      }
     3969      for(Int i = 0; i < 2; i ++)
     3970      {
     3971        Int iCnloop = iPosLeftAbove[i];
     3972        if(iCnloop == -1)
     3973          continue;
     3974        if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
     3975        {
     3976          bRemoveSpa                      = true;
     3977          abCandIsInter        [ iCount ] = false;
     3978        }
     3979      }
     3980      if(!bRemoveSpa)
     3981      {
     3982#if LGE_DVMCP
     3983        pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     3984        pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
     3985#endif
     3986#if SIMP_MRG_PRUN
     3987        if ( mrgCandIdx == iCount )
     3988          return;
     3989#endif
     3990        iCount ++;
     3991      }
     3992    }   
     3993  }
     3994#endif
    38433995  //left bottom
    38443996  UInt uiLeftBottomPartIdx = 0;
     
    38934045
    38944046#if HHI_INTER_VIEW_MOTION_PRED
     4047#if QC_MRG_CANS_B0048
     4048  if( iPdmDir[0]   && !bNoPdmMerge && PDM_MERGE_POS == 4 )
     4049#else
    38954050  if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 4 )
     4051#endif
    38964052  {
    38974053    abCandIsInter        [ iCount ] = true;
     
    39884144  }
    39894145
    3990   if ( getSlice()->getPPS()->getEnableTMVPFlag() )
     4146  if ( getSlice()->getPPS()->getEnableTMVPFlag()
     4147#if QC_MRG_CANS_B0048
     4148       && iCount < (MRG_MAX_NUM_CANDS_SIGNALED + extraMergeCand)
     4149#endif
     4150  )
    39914151  {
    39924152    // col [2]
     
    74417601#else
    74427602Int
    7443 TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo )
     7603TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo
     7604#if QC_MRG_CANS_B0048
     7605  , Int* iPdm
     7606#endif
     7607)
    74447608{
    74457609  TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator();
    74467610  ROFRS( pcDepthMapGenerator, 0 );
    7447   return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo );
     7611  return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo
     7612#if QC_MRG_CANS_B0048
     7613    , iPdm
     7614#endif
     7615    );
    74487616}
    74497617Bool
  • branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComDataCU.h

    r167 r169  
    535535#else
    536536  Bool          getPdmMvPredDisCan( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge = false );
    537   Int           getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo );
     537  Int           getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo
     538#if QC_MRG_CANS_B0048
     539    , Int* iPdm
     540#endif
     541  );
    538542  Void          getDisMvpCand        ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo );
    539543#if LGE_DVMCP
  • branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComDepthMapGenerator.cpp

    r100 r169  
    607607#if QC_MULTI_DIS_CAN
    608608Int
    609 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo )
     609TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo
     610#if QC_MRG_CANS_B0048
     611  , Int* iPdm
     612#endif
     613)
    610614#else
    611615Int
     
    626630  ROTRS( !bPdmMerge, 0 );
    627631
     632#if QC_MRG_CANS_B0048
     633  Bool abPdmAvailable[4] = {false, false, false, false};
     634#else
    628635  Bool abPdmAvailable[2] = {false,false};
     636#endif
    629637
    630638  Int iValid = 0;
     
    725733  }
    726734  Int iPdmInterDir = ( abPdmAvailable[0] ? 1 : 0 ) + ( abPdmAvailable[1] ? 2 : 0 );
    727 
     735#if QC_MRG_CANS_B0048
     736  iPdm[0] = iPdmInterDir;
     737#else
    728738  if (iPdmInterDir == 0)
    729739  {
     740#endif
    730741    for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ )
    731742    {
     
    736747        if( pcSlice->getRefPOC( eRefPicList, iPdmRefIdx ) == pcSlice->getPOC())
    737748        {
     749#if QC_MRG_CANS_B0048
     750          abPdmAvailable[ iRefListId+2 ] = true;
     751          paiPdmRefIdx  [ iRefListId+2 ] = iPdmRefIdx;
     752#else
    738753          abPdmAvailable[ iRefListId ] = true;
    739754          paiPdmRefIdx  [ iRefListId ] = iPdmRefIdx;
     755#endif
    740756#if QC_MULTI_DIS_CAN
    741757          TComMv cMv = pDInfo->m_acMvCand[0];
     
    745761#endif
    746762          pcCU->clipMv( cMv );
     763#if QC_MRG_CANS_B0048
     764          pacPdmMv      [ iRefListId + 2] = cMv;
     765#else
    747766          pacPdmMv      [ iRefListId ] = cMv;
     767#endif
    748768          break;
    749769        }
    750770      }
    751771    }
     772#if QC_MRG_CANS_B0048
     773    iPdmInterDir = ( abPdmAvailable[2] ? 1 : 0 ) + ( abPdmAvailable[3] ? 2 : 0 ) ;
     774    iPdm[1] = iPdmInterDir;
     775#else
    752776    iPdmInterDir = ( abPdmAvailable[0] ? 1 : 0 ) + ( abPdmAvailable[1] ? 2 : 0 ) ;
    753777  }
     778#endif
    754779
    755780  return iPdmInterDir;
  • branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComDepthMapGenerator.h

    r100 r169  
    152152#if HHI_INTER_VIEW_MOTION_PRED
    153153#if QC_MULTI_DIS_CAN
    154   Int   getPdmMergeCandidate ( TComDataCU*   pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo );
     154  Int   getPdmMergeCandidate ( TComDataCU*   pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo
     155#if QC_MRG_CANS_B0048
     156    , Int* iPdm
     157#endif
     158    );
     159
    155160  Bool  getPdmMvPredDisCan    ( TComDataCU*   pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge );
    156161  Bool  getDisCanPdmMvPred    ( TComDataCU*   pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge );
  • branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComMotionInfo.h

    r100 r169  
    9494  Int getHor   () const { return  m_acMv.getHor(); }
    9595  Int getVer   () const { return  m_acMv.getVer(); }
     96#if QC_MRG_CANS_B0048
     97  Bool operator== ( const TComMvField& rcMv ) const
     98  {
     99    return (m_acMv.getHor()==rcMv.getHor() && m_acMv.getVer()==rcMv.getVer() && m_iRefIdx == rcMv.getRefIdx());
     100  }
     101#endif
    96102};
    97103
  • branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TypeDef.h

    r167 r169  
    7575#define QC_MULTI_DIS_CAN                  1   // JCT2-A0097
    7676#if QC_MULTI_DIS_CAN                   
    77     #define DIS_CANS                      1
     77#define DIS_CANS                          1
    7878#endif                                 
    7979#define QC_SIMPLE_NBDV_B0047              1   //JCT2-B0047
     80#define QC_MRG_CANS_B0048                 1   //JCT2-B0048, B0086, B0069
     81#if     QC_MRG_CANS_B0048
     82#define OL_DISMV_POS_B0069                1   //different pos for dispairty MV candidate, B0069
     83#endif
    8084#define MTK_INTERVIEW_MERGE_A0049         1   //  JCT2-A0049 second part
    8185#define SHARP_INTERVIEW_DECOUPLE_B0111    1   //  JCT3V-B0111 decoupling inter-view candidate
Note: See TracChangeset for help on using the changeset viewer.