Changeset 666 in 3DVCSoftware


Ignore:
Timestamp:
4 Nov 2013, 16:21:28 (10 years ago)
Author:
zhang
Message:

JCT3V-F0123, JCT3V-F0108

Location:
branches/HTM-8.2-dev1-Qualcomm
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-8.2-dev1-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp

    r655 r666  
    664664  pcCU->clipMv(cMv);
    665665#if H_3D_ARP
     666#if QC_MTK_INTERVIEW_ARP_F0123_F0108
     667  if(pcCU->getARPW( uiPartAddr ) > 0  && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC())
     668  {
     669      xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi );
     670  }
     671  else
     672#endif
    666673  if(  pcCU->getARPW( uiPartAddr ) > 0
    667674    && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N
     
    841848  }
    842849}
     850#if QC_MTK_INTERVIEW_ARP_F0123_F0108
     851Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled )
     852{
     853  Int         iRefIdx       = pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr );           
     854  TComMv      cDMv          = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr );
     855  TComMv      cTempDMv      = cDMv;
     856  UChar       dW            = pcCU->getARPW ( uiPartAddr );
     857
     858  TComPic* pcPicYuvBaseTRef = NULL;
     859  TComPic* pcPicYuvCurrTRef = NULL;
     860  TComPic* pcPicYuvBaseCol  = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx ); 
     861  TComPicYuv* pcYuvBaseCol  = pcPicYuvBaseCol->getPicYuvRec();   
     862  Bool bTMVAvai = false;     
     863  TComMv cBaseTMV;
     864  if( pNewMvFiled )
     865  {
     866    iRefIdx = pNewMvFiled->getRefIdx();
     867    cDMv = pNewMvFiled->getMv();
     868  }
     869  pcCU->clipMv(cTempDMv);
     870
     871  assert(dW > 0);
     872  Int uiLCUAddr,uiAbsPartAddr;
     873  Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2  + ((cDMv.getHor() + 2)>>2);
     874  Int irefPUY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[uiPartAddr]] + iHeight/2 + ((cDMv.getVer() + 2)>>2);
     875
     876  irefPUX = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()-> getPicWidthInLumaSamples()-1, irefPUX);
     877  irefPUY = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples()-1, irefPUY); 
     878  pcYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr);
     879  TComDataCU *pColCU = pcPicYuvBaseCol->getCU( uiLCUAddr );
     880
     881  if(!pColCU->isIntra(uiAbsPartAddr))
     882  {
     883    TComMvField puMVField;
     884    for(Int iList = 0; iList < (pColCU->getSlice()->isInterB() ? 2: 1) && !bTMVAvai; iList ++)
     885    {
     886      RefPicList eRefPicListCurr = RefPicList(iList);
     887      Int iRef = pColCU->getCUMvField(eRefPicListCurr)->getRefIdx(uiAbsPartAddr);
     888      if( iRef != -1)
     889      {
     890        pcPicYuvBaseTRef = pColCU->getSlice()->getRefPic(eRefPicListCurr, iRef); 
     891        Int  iCurrPOC    = pColCU->getSlice()->getPOC();
     892        Int  iCurrRefPOC = pcPicYuvBaseTRef->getPOC();
     893        Int  iCurrRef    = pcCU->getSlice()->getFirstTRefIdx(eRefPicListCurr);
     894        if( iCurrRef >= 0)
     895        {
     896          pcPicYuvCurrTRef =  pcCU->getSlice()->getRefPic(eRefPicListCurr,iCurrRef); 
     897          Int iTargetPOC = pcPicYuvCurrTRef->getPOC();
     898          {
     899            pcPicYuvBaseTRef =  pcCU->getSlice()->getBaseViewRefPic(iTargetPOC,  pcPicYuvBaseCol->getViewIndex() ); 
     900            if(pcPicYuvBaseTRef)
     901            {
     902              cBaseTMV = pColCU->getCUMvField(eRefPicListCurr)->getMv(uiAbsPartAddr);
     903              Int iScale = pcCU-> xGetDistScaleFactor(iCurrPOC, iTargetPOC, iCurrPOC, iCurrRefPOC);
     904              if ( iScale != 4096 )
     905                cBaseTMV = cBaseTMV.scaleMv( iScale );                 
     906              bTMVAvai = true;
     907              break;
     908            }
     909          }
     910        }
     911      }
     912    }
     913  }
     914  if (bTMVAvai == false)
     915  {
     916    bTMVAvai = true;
     917    cBaseTMV.set(0, 0);
     918    pcPicYuvBaseTRef =  pColCU->getSlice()->getRefPic(eRefPicList,  pcCU->getSlice()->getFirstTRefIdx(eRefPicList)); 
     919    pcPicYuvCurrTRef =  pcCU->getSlice()->getRefPic  (eRefPicList,  pcCU->getSlice()->getFirstTRefIdx(eRefPicList));     
     920  }
     921
     922  xPredInterLumaBlk  ( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi,        bTMVAvai);
     923  xPredInterChromaBlk( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi,        bTMVAvai);
     924
     925  if( dW > 0 && bTMVAvai )
     926  {
     927    TComYuv*    pYuvCurrTRef    = &m_acYuvPredBase[0];
     928    TComYuv*    pYuvBaseTRef    = &m_acYuvPredBase[1];
     929    TComPicYuv* pcYuvCurrTref   = pcPicYuvCurrTRef->getPicYuvRec();       
     930    TComPicYuv* pcYuvBaseTref   = pcPicYuvBaseTRef->getPicYuvRec(); 
     931    TComMv      cTempMv         = cDMv + cBaseTMV;
     932
     933    pcCU->clipMv(cBaseTMV);
     934    pcCU->clipMv(cTempMv);
     935
     936    xPredInterLumaBlk  ( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, bi,   true);
     937    xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, bi,   true);
     938    xPredInterLumaBlk  ( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, bi,   true);
     939    xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, bi,   true);
     940
     941    pYuvCurrTRef->subtractARP( pYuvCurrTRef , pYuvBaseTRef , uiPartAddr , iWidth , iHeight ); 
     942    if(dW == 2)
     943    {
     944      pYuvCurrTRef->multiplyARP( uiPartAddr , iWidth , iHeight , dW );
     945    }
     946    rpcYuvPred->addARP( rpcYuvPred , pYuvCurrTRef , uiPartAddr , iWidth , iHeight , !bi );
     947  }
     948}
     949#endif
     950
    843951#endif
    844952
  • branches/HTM-8.2-dev1-Qualcomm/source/Lib/TLibCommon/TComPrediction.h

    r655 r666  
    9393#if H_3D_ARP
    9494  Void xPredInterUniARP         ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false, TComMvField * pNewMvFiled = NULL );
     95#if QC_MTK_INTERVIEW_ARP_F0123_F0108
     96  Void xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled = NULL );
     97#endif
    9598#endif
    9699  Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false          );
  • branches/HTM-8.2-dev1-Qualcomm/source/Lib/TLibCommon/TComSlice.cpp

    r655 r666  
    751751    if ( this->getNumRefIdx( RefPicList( uiRefListIdx ) ) == 0)
    752752        continue;
    753 
     753#if QC_MTK_INTERVIEW_ARP_F0123_F0108
     754     for(Int i = 0; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ )
     755     {
     756       if ( this->getRefPic(RefPicList(uiRefListIdx), i)->getPOC() != getPOC() )
     757       {
     758         this->setFirstTRefIdx (RefPicList(uiRefListIdx), i);
     759         break;
     760       }
     761     }
     762#endif
    754763    Bool bZeroIdxLtFlag = this->getRefPic(RefPicList(uiRefListIdx), 0)->getIsLongTerm();
    755764    for(Int i = 1; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ )
     
    28342843{
    28352844  Bool bAllIvRef = true;
    2836 
     2845#if QC_MTK_INTERVIEW_ARP_F0123_F0108
     2846  if(!getVPS()->getUseAdvRP(getLayerId()) || this->isIRAP())
     2847#else
    28372848  if(!getVPS()->getUseAdvRP(getLayerId()))
     2849#endif
    28382850  {
    28392851    m_nARPStepNum = 0;
  • branches/HTM-8.2-dev1-Qualcomm/source/Lib/TLibCommon/TComSlice.h

    r655 r666  
    17321732  TComList<TComPic*> * m_pBaseViewRefPicList[MAX_NUM_LAYERS];
    17331733  UInt                 m_nARPStepNum;
     1734#if QC_MTK_INTERVIEW_ARP_F0123_F0108
     1735  Int         m_aiFirstTRefIdx    [2];
     1736#endif
    17341737#endif
    17351738#if H_3D_IC
     
    20192022  Int       getAlterRefIdx          ( RefPicList e )        { return  m_aiAlterRefIdx[e];     }
    20202023#endif
     2024#if QC_MTK_INTERVIEW_ARP_F0123_F0108
     2025  Int       getFirstTRefIdx        ( RefPicList e )                { return  m_aiFirstTRefIdx[e];     }
     2026  Void      setFirstTRefIdx        ( RefPicList e, Int i )         { m_aiFirstTRefIdx[e]    = i;      }
     2027#endif
    20212028  Void      setIsDepth            ( Bool isDepth )   { m_isDepth = isDepth; }
    20222029  Bool      getIsDepth            ()                 { return m_isDepth; }
  • branches/HTM-8.2-dev1-Qualcomm/source/Lib/TLibCommon/TypeDef.h

    r655 r666  
    207207#if H_3D_ARP
    208208#define H_3D_ARP_WFNR                     3
     209#define QC_MTK_INTERVIEW_ARP_F0123_F0108  1 //JCT3V-F0123; JCT3V-F0108
     210#define QC_MTK_INTERVIEW_ARP_F0123_F0108  1 //JCT3V-F0123; JCT3V-F0108
    209211#endif
    210212
  • branches/HTM-8.2-dev1-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp

    r655 r666  
    18451845          rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
    18461846
    1847 #if H_3D_ARP
     1847#if H_3D_ARP && !QC_MTK_INTERVIEW_ARP_F0123_F0108
    18481848          if( nARPW )
    18491849          {
     
    20502050
    20512051    m_pcPredSearch->motionCompensation( rpcTempCU , m_ppcPredYuvTemp[uhDepth] );
    2052 
     2052#if !QC_MTK_INTERVIEW_ARP_F0123_F0108
    20532053    if(rpcTempCU->getPartitionSize(0)==SIZE_2Nx2N)
    20542054    {
     
    20682068      }
    20692069    }
     2070#endif
    20702071  }
    20712072  else
     
    20872088   {
    20882089     m_ppcWeightedTempCU[uhDepth]->copyPartFrom( rpcTempCU , 0 , uhDepth );
    2089 
     2090#if !QC_MTK_INTERVIEW_ARP_F0123_F0108
    20902091     Bool bSignalflag[2] = { true, true };
    20912092     for(UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ )
     
    21022103       rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth );
    21032104     }
     2105#endif
    21042106   }
    21052107  }
Note: See TracChangeset for help on using the changeset viewer.