Ignore:
Timestamp:
21 May 2015, 15:43:58 (10 years ago)
Author:
rwth
Message:
  • migration of DBBP (to be tested)
Location:
branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder
Files:
9 edited

Legend:

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

    r1200 r1222  
    29012901#endif
    29022902   
    2903 #if H_3D_DBBP
     2903#if NH_3D_DBBP
    29042904Void TEncCavlc::codeDBBPFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx )
    29052905{
  • branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncCavlc.h

    r1200 r1222  
    136136  Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    137137#endif
    138 #if H_3D_DBBP
     138#if NH_3D_DBBP
    139139  Void codeDBBPFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    140140#endif
  • 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 
  • branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncCu.h

    r1200 r1222  
    8282  TComYuv**               m_ppcOrigYuv;     ///< Original Yuv for each depth
    8383
    84 #if H_3D_DBBP
     84#if NH_3D_DBBP
    8585  TComYuv**               m_ppcOrigYuvDBBP;
    8686#endif
     
    155155  Void  xCheckRDCostInter   ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize  );
    156156#endif
    157 #if H_3D_DBBP
     157#if NH_3D_DBBP
    158158  Void  xInvalidateOriginalSegments( TComYuv* pOrigYuv, TComYuv* pOrigYuvTemp, Bool* pMask, UInt uiValidSegment );
    159159  Void  xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG = false );
  • branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncEntropy.cpp

    r1200 r1222  
    870870
    871871#endif
    872 #if H_3D_DBBP
     872#if NH_3D_DBBP
    873873Void TEncEntropy::encodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    874874{
    875   if( pcCU->getSlice()->getDepthBasedBlkPartFlag() &&
     875  if( bRD )
     876  {
     877    uiAbsPartIdx = 0;
     878  }
     879 
     880  if( pcCU->getSlice()->getDepthBasedBlkPartFlag() &&
    876881    ( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN ||
    877882      pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) &&
     
    879884      pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
    880885  {
    881     if( bRD )
    882     {
    883       uiAbsPartIdx = 0;
    884     }
    885886    m_pcEntropyCoderIf->codeDBBPFlag( pcCU, uiAbsPartIdx );
    886887  }
  • branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncEntropy.h

    r1200 r1222  
    9494  virtual Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    9595#endif
    96 #if H_3D_DBBP
     96#if NH_3D_DBBP
    9797  virtual Void codeDBBPFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    9898#endif
     
    183183  Void encodeSDCFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    184184#endif
    185 #if H_3D_DBBP
     185#if NH_3D_DBBP
    186186  Void encodeDBBPFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    187187#endif
  • branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncSbac.cpp

    r1200 r1222  
    114114, m_cSDCFlagSCModel                    ( 1,             1,                       NUM_SDC_FLAG_CTX                    , m_contextModels + m_numContextModels, m_numContextModels)
    115115#endif                                                                                                         
    116 #if H_3D_DBBP                                                                                                 
     116#if NH_3D_DBBP
    117117, m_cDBBPFlagSCModel                   ( 1,             1,                       DBBP_NUM_FLAG_CTX                   , m_contextModels + m_numContextModels, m_numContextModels)
    118118#endif
     
    194194  m_cSDCFlagSCModel.initBuffer                    ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
    195195#endif                                           
    196 #if H_3D_DBBP                                   
     196#if NH_3D_DBBP
    197197  m_cDBBPFlagSCModel.initBuffer                   ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG );
    198198#endif
     
    244244      curCost += m_cSDCFlagSCModel.calcCost                    ( curSliceType, qp, (UChar*)INIT_SDC_FLAG );
    245245#endif                                                     
    246 #if H_3D_DBBP                                             
     246#if NH_3D_DBBP
    247247      curCost += m_cDBBPFlagSCModel.calcCost                   ( curSliceType, qp, (UChar*)INIT_DBBP_FLAG );
    248248#endif
     
    321321  m_cSDCFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
    322322#endif
    323 #if H_3D_DBBP
    324   m_cDBBPFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG );
    325 #endif
    326323
    327324
     
    26502647#endif
    26512648
    2652 #if H_3D_DBBP
     2649#if NH_3D_DBBP
    26532650Void TEncSbac::codeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    26542651{
  • branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncSbac.h

    r1200 r1222  
    150150  Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    151151#endif
    152 #if H_3D_DBBP
     152#if NH_3D_DBBP
    153153  Void codeDBBPFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    154154#endif
     
    262262  ContextModel3DBuffer m_cSDCFlagSCModel;
    263263#endif
    264 #if H_3D_DBBP
     264#if NH_3D_DBBP
    265265  ContextModel3DBuffer m_cDBBPFlagSCModel;
    266266#endif
  • branches/HTM-14.1-update-dev4-RWTH/source/Lib/TLibEncoder/TEncSearch.cpp

    r1200 r1222  
    38843884  UInt uiDepth = pcCU->getDepth( uiAbsPartIdx );
    38853885
    3886 #if H_3D_DBBP
     3886#if NH_3D_DBBP
    38873887  DbbpTmpData* pDBBPTmpData = pcCU->getDBBPTmpData();
    38883888  if( pcCU->getDBBPFlag(0) )
     
    38913891    AOF( iPUIdx == 0 );
    38923892    AOF( pcCU->getPartitionSize(0) == SIZE_2Nx2N );
    3893     AOF( pDBBPTmpData->eVirtualPartSize != SIZE_NONE );
     3893    AOF( pDBBPTmpData->eVirtualPartSize != NUMBER_OF_PART_SIZES );
    38943894   
    38953895    // temporary change of partition size for candidate derivation
     
    39163916
    39173917  PartSize partSize = pcCU->getPartitionSize( 0 );
    3918 #if H_3D_DBBP
     3918#if NH_3D_DBBP
    39193919  if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && partSize != SIZE_2Nx2N && pcCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(0) == false )
    39203920#else
     
    39783978  xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    39793979
    3980 #if H_3D_DBBP
     3980#if NH_3D_DBBP
    39813981  if( pcCU->getDBBPFlag(0) )
    39823982  {
     
    40254025#endif
    40264026#if H_3D_VSP
    4027 #if H_3D_DBBP
     4027#if NH_3D_DBBP
    40284028      if ( vspFlag[uiMergeCand] && !pcCU->getDBBPFlag(0) )
    40294029#else
     
    45504550    } // end if bTestNormalMC
    45514551#endif
    4552 #if H_3D_DBBP
     4552#if NH_3D_DBBP
    45534553    // test merge mode for DBBP (2Nx2N)
    45544554    if ( pcCU->getPartitionSize( uiPartAddr ) != SIZE_2Nx2N || pcCU->getDBBPFlag(0) )
     
    46494649#endif
    46504650#if H_3D_VSP
    4651 #if H_3D_DBBP
     4651#if NH_3D_DBBP
    46524652        if ( vspFlag[uiMRGIndex] && !pcCU->getDBBPFlag(uiPartAddr) )
    46534653#else
     
    47474747  {
    47484748
    4749 #if H_3D_DBBP
     4749#if NH_3D_DBBP
    47504750    DbbpTmpData* pDBBPTmpData = pcCU->getDBBPTmpData();
    47514751    if( pcCU->getDBBPFlag(0) )
     
    47544754      AOF( uiPartIdx == 0 );
    47554755      AOF( pcCU->getPartitionSize(0) == SIZE_2Nx2N );
    4756       AOF( pDBBPTmpData->eVirtualPartSize != SIZE_NONE );
     4756      AOF( pDBBPTmpData->eVirtualPartSize != NUMBER_OF_PART_SIZES );
    47574757      AOF( iRoiWidth == iRoiHeight );
    47584758     
     
    47794779
    47804780    pcCU->fillMvpCand( uiPartIdx, uiPartAddr, eRefPicList, iRefIdx, pcAMVPInfo );
    4781 #if H_3D_DBBP
     4781#if NH_3D_DBBP
    47824782    if( pcCU->getDBBPFlag(0) )
    47834783    {
     
    71307130    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
    71317131#endif
    7132 #if H_3D
     7132#if NH_3D_DBBP
    71337133    m_pcEntropyCoder->encodeDBBPFlag( pcCU, 0, true );
    71347134#endif
Note: See TracChangeset for help on using the changeset viewer.