Ignore:
Timestamp:
5 Nov 2012, 02:24:25 (12 years ago)
Author:
qualcomm
Message:

JCT3V-B0047

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp

    r163 r167  
    35133513  {
    35143514#if LGE_DVMCP
    3515 #if LGE_IVMP_PARALLEL_MERGE_B0136
     3515#if LGE_IVMP_PARALLEL_MERGE_B0136 && !QC_SIMPLE_NBDV_B0047
    35163516    getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo, true, REF_PIC_LIST_X, -1, true );
    35173517#else
    3518     getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo, true );
     3518    getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo
     3519#if LGE_IVMP_PARALLEL_MERGE_B0136==QC_SIMPLE_NBDV_B0047
     3520,
     3521true
     3522#endif
     3523);
    35193524#endif
    35203525#else
     
    49014906
    49024907#if LGE_DVMCP
     4908#if QC_SIMPLE_NBDV_B0047
     4909Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo
     4910#if LGE_IVMP_PARALLEL_MERGE_B0136
     4911                                , Bool bParMerge
     4912#endif
     4913#else
    49034914Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo, Bool bMerge, RefPicList eRefPicList0, Int iRefIdx0
    49044915#if LGE_IVMP_PARALLEL_MERGE_B0136
    49054916                                , Bool bParMerge
    49064917#endif
     4918#endif
    49074919                                )
    49084920{
    49094921  PartSize eCUMode = getPartitionSize( uiPartAddr );
    49104922  TComDataCU* pcTmpCU = NULL;
     4923#if !QC_SIMPLE_NBDV_B0047
    49114924  TComDataCU* pcCULeft = NULL;
     4925#endif
    49124926  pDInfo->iN = 0;
    49134927
     
    49174931  UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth();
    49184932
    4919   Int   aiDvMcpDvCand[2][7] = {{0,},    {0,}}; // dummy, 5 spatial + 1 temporal, DV-MCP ÁÖº¯ ºúÓ°¿¡¼­ »ç¿E?DV¸¦ ÀúÀE
     4933#if QC_SIMPLE_NBDV_B0047
     4934  const Int iNumofDvMCP = 7;
     4935  Int   aiDvMcpDvCand[2][iNumofDvMCP] = {{0,},    {0,}}; // dummy, 5 spatial + 1 temporal
     4936  Bool  abDvMcpFlag  [2][iNumofDvMCP] = {{false,},{false,}};
     4937#else
     4938  Int   aiDvMcpDvCand[2][7] = {{0,},    {0,}}; // dummy, 5 spatial + 1 temporal
    49204939  Bool  abDvMcpFlag  [2][7] = {{false,},{false,}};
    49214940  //Int   aiRefPOC     [2][7] = {{-1,},{-1}}; // debug
     4941#endif
    49224942  TComMv cTmpMvPred, cMv;
    49234943  Bool  bTmpIsSkipped = false;
     
    49584978#endif
    49594979
    4960 
     4980#if !QC_SIMPLE_NBDV_B0047
    49614981  pcCULeft = pcTmpCU;
    49624982  UInt uiLeftPartIdx = uiIdx;
     4983#endif
     4984
    49634985  if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) )
    49644986  {
     
    52125234  if ( getSlice()->getPPS()->getEnableTMVPFlag() )
    52135235  {
     5236#if !QC_SIMPLE_NBDV_B0047
    52145237    UInt uiPUIdx = uiPartIdx;
    52155238    UInt uiAbsPartAddr = uiPartAddr;
     
    53695392      }
    53705393    }
     5394#else
     5395    TComMv cColMv;
     5396    Int iTargetViewIdx = 0;
     5397    Int iTStartViewIdx = 0;
     5398    UInt uiPartIdxRB, uiBRIdx;
     5399    Int uiViewIdxCurr= getSlice()->getViewId();
     5400    UInt uiPartIdxCenter;
     5401    xDeriveCenterIdx( eCUMode, uiPartIdx, uiPartIdxCenter );
     5402
     5403    Int uiLCUIdx = getAddr();
     5404    Int uiLCUnew = uiLCUIdx;
     5405    eCUMode = getPartitionSize( 0 );
     5406    deriveRightBottomIdx( eCUMode, uiPartIdx, uiPartIdxRB ); 
     5407    uiBRIdx = uiPartIdxLT;
     5408    UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB];
     5409    if ( (( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) < m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) &&(( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getSPS()->getPicHeightInLumaSamples() ))  // image boundary check
     5410    {
     5411      if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) &&           // is not at the last column of LCU
     5412      ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row    of LCU
     5413      {
     5414        uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ];
     5415      }
     5416      else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 )           // is not at the last column of LCU But is last row of LCU
     5417      {
     5418        uiBRIdx = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ];
     5419        uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU();
     5420      }
     5421      else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU
     5422      {
     5423        uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ];
     5424        uiLCUnew = uiLCUIdx + 1;
     5425      }
     5426      else //is the right bottom corner of LCU                       
     5427      {
     5428        uiBRIdx = 0;
     5429        uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU() + 1;
     5430      }
     5431    }
     5432    const Int iNumofCandPic = 2;
     5433    for(Int i =0; i < iNumofCandPic; i++)
     5434    {
     5435      Int lpRef=0;
     5436      if(i == 0)
     5437      {   //check the col-located picture
     5438        eRefPicList = RefPicList(getSlice()->isInterB() ? getSlice()->getColDir() : 0);
     5439#if COLLOCATED_REF_IDX
     5440        lpRef = getSlice()->getColRefIdx();
     5441#else
     5442        Int lpRef = 0;
     5443#endif
     5444      }
     5445      else
     5446      {
     5447        if(!(getPic()->getRapbCheck()))
     5448          break;
     5449        eRefPicList=getPic()->getRapRefList();
     5450        lpRef=getPic()->getRapRefIdx();
     5451      }
     5452
     5453      if( m_pcSlice->getViewId() == getSlice()->getRefPic( eRefPicList, lpRef)->getViewId() )
     5454      {
     5455        if (uiViewIdxCurr > 1) 
     5456        {
     5457          if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) )
     5458          {
     5459            clipMv(cColMv);
     5460            pDInfo->m_acMvCand[pDInfo->iN] = cColMv;
     5461            pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx;
     5462            return ;
     5463          }
     5464        }
     5465
     5466        if(xGetColDisMV( eRefPicList, lpRef, uiLCUIdx, uiPartIdxCenter,  cColMv, iTargetViewIdx, iTStartViewIdx ))
     5467        {
     5468          clipMv(cColMv);
     5469          pDInfo->m_acMvCand[pDInfo->iN] = cColMv;
     5470          pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx;
     5471          return ;
     5472        }
     5473        if(uiViewIdxCurr == 1) 
     5474        {
     5475          if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) )
     5476          {
     5477            clipMv(cColMv);
     5478            pDInfo->m_acMvCand[pDInfo->iN] = cColMv;
     5479            pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx;
     5480            return ;
     5481          }
     5482        }
     5483      }
     5484    }
     5485#endif
    53715486  } // if TMVP Flag
    53725487
    53735488  if( bDvMcpIsFound ) // skip dvmcp
    53745489  {
     5490#if QC_SIMPLE_NBDV_B0047
     5491    for( Int i=1 ; i<iNumofDvMCP-1 ; i++ ) // 5 spatial
     5492#else
    53755493    for( Int i=1 ; i<7 ; i++ ) // 5 spatial + 1 temporal
     5494#endif
    53765495    {
    53775496      for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
     
    53895508    }
    53905509  }
    5391 
    53925510  return;
    5393 
    5394 }
    5395 #endif
    5396 
     5511}
     5512#endif
    53975513#endif
    53985514
     
    54345550      cDisInfo.iN = 0;
    54355551#if LGE_DVMCP
     5552#if QC_SIMPLE_NBDV_B0047
     5553      getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo);
     5554#else
    54365555      getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx );
     5556#endif
    54375557#else
    54385558      getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo );
     
    54865606  {
    54875607#if LGE_DVMCP
     5608#if QC_SIMPLE_NBDV_B0047
     5609    getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo);
     5610#else
    54885611    getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx );
     5612#endif
    54895613#else
    54905614    getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo );
     
    61726296Bool TComDataCU::xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx )
    61736297{
    6174 #if LGE_DVMCP
     6298#if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047
    61756299  Int  iDvMcpDispX[2] = {-1,};
    61766300  Bool bDvMcpFlag [2] = { false, };
     
    61916315    return false;
    61926316  }
    6193 #if LGE_DVMCP
     6317#if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047
    61946318  Bool bColIsSkipped = pColCU->isSkipped( uiAbsPartAddr );
    61956319#endif
     
    62156339    if ( iColViewIdx    == iColRefViewIdx ) // temporal vector
    62166340    {
    6217 #if LGE_DVMCP
     6341#if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047
    62186342      if( iColViewIdx >0 )
    62196343      {
     
    62426366  }
    62436367
    6244 #if LGE_DVMCP
     6368#if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047
    62456369  for( Int ilist=0 ; ilist<2 ; ilist++ )
    62466370  {
     
    73607484  m_pePartSize[0] =  SIZE_2Nx2N;
    73617485#if LGE_DVMCP
     7486#if QC_SIMPLE_NBDV_B0047
     7487  getDisMvpCand2( 0, 0,  &cDisInfo);
     7488#else
    73627489  getDisMvpCand2( 0, 0,  &cDisInfo, true );
     7490#endif
    73637491#else
    73647492  getDisMvpCand        ( 0, 0,  &cDisInfo );
Note: See TracChangeset for help on using the changeset viewer.