Changeset 443 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecCu.cpp


Ignore:
Timestamp:
26 May 2013, 15:41:34 (11 years ago)
Author:
tech
Message:
  • Reintegrated branch 6.2-dev0 rev. 442.
  • Changed version number.
  • Added coding results.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r332 r443  
    5454  m_ppcYuvResi = NULL;
    5555  m_ppcYuvReco = NULL;
    56 #if H3D_IVRP
     56#if H3D_IVRP & !QC_ARP_D0177
    5757  m_ppcYuvResPred = NULL;
    5858#endif
     
    8282  m_ppcYuvResi = new TComYuv*[m_uiMaxDepth-1];
    8383  m_ppcYuvReco = new TComYuv*[m_uiMaxDepth-1];
    84 #if H3D_IVRP
     84#if H3D_IVRP & !QC_ARP_D0177
    8585  m_ppcYuvResPred = new TComYuv*   [m_uiMaxDepth-1];
    8686#endif
     
    9696    m_ppcYuvResi[ui] = new TComYuv;    m_ppcYuvResi[ui]->create( uiWidth, uiHeight );
    9797    m_ppcYuvReco[ui] = new TComYuv;    m_ppcYuvReco[ui]->create( uiWidth, uiHeight );
    98 #if H3D_IVRP
     98#if H3D_IVRP & !QC_ARP_D0177
    9999    m_ppcYuvResPred[ui] = new TComYuv;    m_ppcYuvResPred[ui]->create( uiWidth, uiHeight );
    100100#endif
     
    120120    m_ppcYuvResi[ui]->destroy(); delete m_ppcYuvResi[ui]; m_ppcYuvResi[ui] = NULL;
    121121    m_ppcYuvReco[ui]->destroy(); delete m_ppcYuvReco[ui]; m_ppcYuvReco[ui] = NULL;
    122 #if H3D_IVRP
     122#if H3D_IVRP & !QC_ARP_D0177
    123123    m_ppcYuvResPred[ui]->destroy(); delete m_ppcYuvResPred[ui]; m_ppcYuvResPred[ui] = NULL;
    124124#endif
     
    128128  delete [] m_ppcYuvResi; m_ppcYuvResi = NULL;
    129129  delete [] m_ppcYuvReco; m_ppcYuvReco = NULL;
    130 #if H3D_IVRP
     130#if H3D_IVRP & !QC_ARP_D0177
    131131  delete [] m_ppcYuvResPred; m_ppcYuvResPred = NULL;
    132132#endif
     
    312312    pcCU->setQPSubParts( pcCU->getRefQP(uiAbsPartIdx), uiAbsPartIdx, uiDepth ); // set QP to default QP
    313313  }
    314 
     314#if QC_CU_NBDV_D0181
     315      DisInfo DvInfo;
     316      DvInfo.bDV = false;
     317      if(!pcCU->getSlice()->isIntra())
     318      {
     319#if QC_ARP_D0177
     320        if(( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() || pcCU->getSlice()->getSPS()->getUseAdvRP())             && pcCU->getSlice()->getViewId())
     321#else
     322        if(( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() || pcCU->getSlice()->getSPS()->getMultiviewResPredMode()) && pcCU->getSlice()->getViewId())
     323#endif
     324        { 
     325          m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true );
     326          m_ppcCU[uiDepth]->copyDVInfoFrom( pcCU, uiAbsPartIdx);
     327          PartSize ePartTemp = m_ppcCU[uiDepth]->getPartitionSize(0);
     328          UChar cWidTemp     = m_ppcCU[uiDepth]->getWidth(0);
     329          UChar cHeightTemp  = m_ppcCU[uiDepth]->getHeight(0);
     330          m_ppcCU[uiDepth]->setWidth  ( 0, pcCU->getSlice()->getSPS()->getMaxCUWidth ()/(1<<uiDepth)  );
     331          m_ppcCU[uiDepth]->setHeight ( 0, pcCU->getSlice()->getSPS()->getMaxCUHeight()/(1<<uiDepth)  );
     332          m_ppcCU[uiDepth]->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );     
     333  #if MERL_VSP_C0152
     334          DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(0, 0, &DvInfo, false, true);
     335  #else
     336          DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(0, 0, &DvInfo, false);
     337  #endif
     338          pcCU->setDvInfoSubParts(DvInfo, uiAbsPartIdx, uiDepth);
     339          m_ppcCU[uiDepth]->setPartSizeSubParts( ePartTemp, 0, uiDepth );
     340          m_ppcCU[uiDepth]->setWidth  ( 0, cWidTemp );
     341          m_ppcCU[uiDepth]->setHeight ( 0, cHeightTemp );
     342        }
     343        if(DvInfo.bDV==false)
     344        {
     345          DvInfo.iN=1;
     346#if !SEC_DEFAULT_DV_D0112
     347          DvInfo.m_acMvCand[0].setHor(0);
     348          DvInfo.m_acMvCand[0].setVer(0);
     349          DvInfo.m_aVIdxCan[0] = 0;
     350#endif
     351          pcCU->setDvInfoSubParts(DvInfo, uiAbsPartIdx, uiDepth);
     352        }
     353      }
     354#endif
    315355  // decode CU mode and the partition size
    316356  if( !pcCU->getSlice()->isIntra() && pcCU->getNumSucIPCM() == 0 )
     
    353393        const UChar uhNewDepth = max<UInt>( uiDepth, pcTextureCU->getDepth( uiAbsPartIdx + ui ) );
    354394#if MERL_VSP_C0152
    355         Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui);
    356         pcCU->setVSPIndex( uiAbsPartIdx + ui, vspIdx);
     395        Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui );
     396        pcCU->setVSPIndex( uiAbsPartIdx + ui, vspIdx );
     397#endif
     398#if MERL_VSP_NBDV_RefVId_Fix_D0166
     399        Int vspDir = pcTextureCU->getVSPDir( uiAbsPartIdx + ui );
     400        pcCU->setVSPDir( uiAbsPartIdx + ui, vspDir );
    357401#endif
    358402        pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_SKIP );
     
    371415    UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx);
    372416#if MERL_VSP_C0152
     417#if LGE_VSP_INHERIT_D0092
     418    Int iVSPIndexTrue[MRG_MAX_NUM_CANDS_MEM];
     419    for (Int i=0; i<MRG_MAX_NUM_CANDS_MEM; i++)
     420    {
     421        iVSPIndexTrue[i] = 0;
     422    }
     423#else
    373424    Int iVSPIndexTrue[3] = {-1, -1, -1};
     425#endif
     426#if MERL_VSP_NBDV_RefVId_Fix_D0166
     427    Int iVSPDirTrue[3]   = {-1, -1, -1};
     428    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue, iVSPDirTrue, uiMergeIndex );
     429#else
    374430    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue, uiMergeIndex );
     431#endif
     432#if MTK_D0156
     433    if( !pcCU->getSlice()->getSPS()->getUseVSPCompensation() )
     434    {
     435        pcCU->setVSPIndexSubParts( 0, uiAbsPartIdx, 0, uiDepth );
     436    }
     437    else
     438#endif
    375439    {
    376440      Int iVSPIdx = 0;
     441#if LGE_VSP_INHERIT_D0092
     442      if (iVSPIndexTrue[uiMergeIndex] == 1)
     443      {
     444          iVSPIdx = 1;
     445      }
     446#else
    377447      Int numVspIdx;
    378448      numVspIdx = 3;
     
    385455          }
    386456      }
    387       pcCU->setVSPIndexSubParts( iVSPIdx, uiAbsPartIdx, 0, uiDepth );  //Initialize the VSP, may change later in get InterMergeCandidates()
     457#endif
     458      pcCU->setVSPIndexSubParts( iVSPIdx, uiAbsPartIdx, 0, uiDepth );  // Initialize
     459#if MERL_VSP_NBDV_RefVId_Fix_D0166
     460      pcCU->setVSPDirSubParts( 0, uiAbsPartIdx, 0, uiDepth );
     461#endif
     462#if QC_BVSP_CleanUP_D0191 && !LGE_VSP_INHERIT_D0092
     463      if(iVSPIdx != 0)
     464      {
     465        Int iIVCIdx = pcCU->getSlice()->getRefPic(REF_PIC_LIST_0, 0)->getPOC()==pcCU->getSlice()->getPOC() ? 0: pcCU->getSlice()->getNewRefIdx(REF_PIC_LIST_0);
     466       cMvFieldNeighbours[ 2*uiMergeIndex].setRefIdx(iIVCIdx);
     467      }
     468#endif
    388469    }
    389470#else
     
    409490    }
    410491#endif
     492#if QC_ARP_D0177
     493    if( pcCU->getSlice()->getSPS()->getUseAdvRP() )
     494    {
     495      pcCU->setResPredAvailSubParts ( false, uiAbsPartIdx, 0, uiDepth );
     496      pcCU->setResPredFlagSubParts  ( false, uiAbsPartIdx, 0, uiDepth );
     497      m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth, m_ppcCU[uiDepth], 0 );
     498    }
     499#endif
    411500    xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    412501    return;
     
    460549  }
    461550#endif
    462 
     551#if QC_ARP_D0177
     552  if (pcCU->getSlice()->getSPS()->getUseAdvRP() && pcCU->isIntra( uiAbsPartIdx ) )
     553  {
     554    pcCU->setResPredAvailSubParts ( 0, uiAbsPartIdx, 0, uiDepth );
     555    pcCU->setResPredFlagSubParts  ( 0, uiAbsPartIdx, 0, uiDepth );
     556  }
     557#endif
    463558#if HHI_MPI
    464559    if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth )
     
    476571        Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui);
    477572        pcCU->setVSPIndex( uiAbsPartIdx + ui, vspIdx);
     573#endif
     574#if MERL_VSP_NBDV_RefVId_Fix_D0166
     575        if (pcCU->getSlice()->getIsDepth()) {
     576          pcCU->setVSPDir( uiAbsPartIdx + ui, 0);
     577        }
     578        else {
     579          Int vspDir = pcTextureCU->getVSPDir( uiAbsPartIdx + ui);
     580          pcCU->setVSPDir( uiAbsPartIdx + ui, vspDir);
     581        }
    478582#endif
    479583        pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_INTER );
     
    670774  m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] );
    671775#endif
    672 #if H3D_IVRP
     776#if H3D_IVRP & !QC_ARP_D0177
    673777  if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0))
    674778  {
     
    10321136  // reconstruct residual based on mask + DC residuals
    10331137  Pel apDCResiValues[2];
     1138#if !MERL_General_Fix
    10341139  Pel apDCRecoValues[2];
     1140#endif
    10351141  for( UInt ui = 0; ui < uiNumSegments; ui++ )
    10361142  {
     
    10391145    Pel   pRecoValue  = GetIdx2DepthValue( pPredIdx + pResiIdx );
    10401146   
     1147#if !MERL_General_Fix
    10411148    apDCRecoValues[ui]  = pRecoValue;
     1149#endif
    10421150    apDCResiValues[ui]  = pRecoValue - apDCPredValues[ui];
    10431151  }
     
    10561164      UChar ucSegment = pMask?(UChar)pMask[uiX]:0;
    10571165      assert( ucSegment < uiNumSegments );
     1166#if MTK_SAMPLE_BASED_SDC_D0110     
     1167      Pel pResiDC = apDCResiValues[ucSegment];
    10581168     
     1169      pReco    [ uiX ] = Clip( pPred[ uiX ] + pResiDC );
     1170#else
    10591171      Pel pPredVal= apDCPredValues[ucSegment];
    10601172      Pel pResiDC = apDCResiValues[ucSegment];
    10611173     
    10621174      pReco    [ uiX ] = Clip( pPredVal + pResiDC );
     1175#endif
    10631176      pRecIPred[ uiX ] = pReco[ uiX ];
    10641177    }
Note: See TracChangeset for help on using the changeset viewer.