Ignore:
Timestamp:
21 May 2015, 15:43:58 (10 years ago)
Author:
rwth
Message:
  • migration of DBBP (to be tested)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncCu.cpp

    r1217 r1222  
    7979  m_ppcRecoYuvTemp = new TComYuv*[m_uhTotalDepth-1];
    8080  m_ppcOrigYuv     = new TComYuv*[m_uhTotalDepth-1];
    81 #if H_3D_DBBP
     81#if NH_3D_DBBP
    8282  m_ppcOrigYuvDBBP = new TComYuv*[m_uhTotalDepth-1];
    8383#endif
     
    105105
    106106    m_ppcOrigYuv    [i] = new TComYuv; m_ppcOrigYuv    [i]->create(uiWidth, uiHeight, chromaFormat);
    107 #if H_3D_DBBP
    108     m_ppcOrigYuvDBBP[i] = new TComYuv; m_ppcOrigYuvDBBP[i]->create(uiWidth, uiHeight);
     107#if NH_3D_DBBP
     108    m_ppcOrigYuvDBBP[i] = new TComYuv; m_ppcOrigYuvDBBP[i]->create(uiWidth, uiHeight, chromaFormat);
    109109#endif
    110110
     
    180180      m_ppcOrigYuv[i]->destroy();     delete m_ppcOrigYuv[i];     m_ppcOrigYuv[i] = NULL;
    181181    }
    182 #if H_3D_DBBP
     182#if NH_3D_DBBP
    183183    if(m_ppcOrigYuvDBBP[i])
    184184    {
     
    240240    m_ppcOrigYuv = NULL;
    241241  }
    242 #if H_3D_DBBP
     242#if NH_3D_DBBP
    243243  if(m_ppcOrigYuvDBBP)
    244244  {
     
    693693            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    694694#endif
    695 #if H_3D_DBBP
     695#if NH_3D_DBBP
    696696            if( rpcTempCU->getSlice()->getDepthBasedBlkPartFlag() && rpcTempCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
    697697            {
     
    16111611  // prediction Info ( Intra : direction mode, Inter : Mv, reference idx )
    16121612  m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
    1613 #if H_3D
     1613#if NH_3D_DBBP
    16141614  m_pcEntropyCoder->encodeDBBPFlag( pcCU, uiAbsPartIdx );
    16151615#endif
     
    23842384}
    23852385
    2386 #if H_3D_DBBP
     2386#if NH_3D_DBBP
    23872387Void TEncCu::xInvalidateOriginalSegments( TComYuv* pOrigYuv, TComYuv* pOrigYuvTemp, Bool* pMask, UInt uiValidSegment )
    23882388{
    2389   UInt  uiWidth     = pOrigYuv->getWidth ( );
    2390   UInt  uiHeight    = pOrigYuv->getHeight( );
    2391   Pel*  piSrc       = pOrigYuv->getLumaAddr( );
    2392   UInt  uiSrcStride = pOrigYuv->getStride();
    2393   Pel*  piDst       = pOrigYuvTemp->getLumaAddr( );
    2394   UInt  uiDstStride = pOrigYuvTemp->getStride();
     2389  UInt  uiWidth     = pOrigYuv->getWidth (COMPONENT_Y);
     2390  UInt  uiHeight    = pOrigYuv->getHeight(COMPONENT_Y);
     2391  Pel*  piSrc       = pOrigYuv->getAddr(COMPONENT_Y);
     2392  UInt  uiSrcStride = pOrigYuv->getStride(COMPONENT_Y);
     2393  Pel*  piDst       = pOrigYuvTemp->getAddr(COMPONENT_Y);
     2394  UInt  uiDstStride = pOrigYuvTemp->getStride(COMPONENT_Y);
    23952395 
    23962396  UInt  uiMaskStride= MAX_CU_SIZE;
     
    24172417 
    24182418  // now invalidate chroma
    2419   Pel*  piSrcU       = pOrigYuv->getCbAddr();
    2420   Pel*  piSrcV       = pOrigYuv->getCrAddr();
    2421   UInt  uiSrcStrideC = pOrigYuv->getCStride();
    2422   Pel*  piDstU       = pOrigYuvTemp->getCbAddr( );
    2423   Pel*  piDstV       = pOrigYuvTemp->getCrAddr( );
    2424   UInt  uiDstStrideC = pOrigYuvTemp->getCStride();
     2419  Pel*  piSrcU       = pOrigYuv->getAddr(COMPONENT_Cb);
     2420  Pel*  piSrcV       = pOrigYuv->getAddr(COMPONENT_Cr);
     2421  UInt  uiSrcStrideC = pOrigYuv->getStride(COMPONENT_Cb);
     2422  Pel*  piDstU       = pOrigYuvTemp->getAddr(COMPONENT_Cb);
     2423  Pel*  piDstV       = pOrigYuvTemp->getAddr(COMPONENT_Cr);
     2424  UInt  uiDstStrideC = pOrigYuvTemp->getStride(COMPONENT_Cb);
    24252425  pMask = pMaskStart;
    24262426 
     
    24432443  }
    24442444}
    2445 
     2445#endif
     2446
     2447#if H_3D_DIS
    24462448Void TEncCu::xCheckRDCostDIS( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize )
    24472449{
     
    25172519  xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);
    25182520}
    2519 
     2521#endif
     2522
     2523#if NH_3D_DBBP
    25202524Void TEncCu::xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG )
    25212525{
     
    25392543  AOF( uiWidth == uiHeight );
    25402544 
    2541 #if H_3D_DBBP
     2545#if NH_3D_DBBP
    25422546  // Is this correct here, was under the macro SEC_DBBP_DISALLOW_8x8_I0078, however the function is related to Single Depth Mode
    25432547  if(uiWidth <= 8)
     
    25912595    rpcTempCU->getDBBPTmpData()->eVirtualPartSize = eVirtualPartSize;
    25922596    rpcTempCU->getDBBPTmpData()->uiVirtualPartIndex = uiSegment;
    2593     m_pcPredSearch->predInterSearch( rpcTempCU, m_ppcOrigYuvDBBP[uhDepth], apPredYuv[uiSegment], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], false, false, bUseMRG );
     2597
     2598    m_pcPredSearch->predInterSearch( rpcTempCU, m_ppcOrigYuvDBBP[uhDepth], apPredYuv[uiSegment], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], false, bUseMRG );
    25942599    m_pcRdCost->setUseMask(false);
    25952600   
     
    25992604    pDBBPTmpData->abMergeFlag[uiSegment] = rpcTempCU->getMergeFlag(0);
    26002605    pDBBPTmpData->auhMergeIndex[uiSegment] = rpcTempCU->getMergeIndex(0);
    2601    
     2606
     2607#if NH_3D_VSP
    26022608    AOF( rpcTempCU->getSPIVMPFlag(0) == false );
    26032609    AOF( rpcTempCU->getVSPFlag(0) == 0 );
     2610#endif
    26042611   
    26052612    for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
     
    26202627  rpcTempCU->setPredModeSubParts  ( MODE_INTER, 0, uhDepth );
    26212628 
    2622   UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( rpcTempCU->getSlice()->getSPS()->getMaxCUDepth() - uhDepth ) << 1 ) ) >> 4;
     2629  UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( rpcTempCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uhDepth ) << 1 ) ) >> 4;
    26232630  for( UInt uiSegment = 0; uiSegment < 2; uiSegment++ )
    26242631  {
     
    26462653 
    26472654  // reconstruct final prediction signal by combining both segments
    2648   m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize);
     2655  Int bitDepthY = rpcTempCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA);
     2656  m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize, bitDepthY);
    26492657  m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false );
    26502658 
Note: See TracChangeset for help on using the changeset viewer.