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


Ignore:
Timestamp:
7 Apr 2015, 17:05:30 (9 years ago)
Author:
tech
Message:

Merged branch 13.1-dev0@1178.

File:
1 edited

Legend:

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

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    290290#if H_MV_ENC_DEC_TRAC
    291291  DTRACE_CU_S("=========== coding_unit ===========\n")
     292#if H_MV_ENC_DEC_TRAC
     293#if ENC_DEC_TRACE
     294    stopAtPos  ( pcCU->getSlice()->getPOC(),
     295    pcCU->getSlice()->getLayerId(),
     296    uiLPelX,
     297    uiTPelY,
     298    uiRPelX-uiLPelX+1,
     299    uiBPelY-uiTPelY+1);
     300#endif
     301#endif
     302
    292303#endif
    293304
     
    299310#if H_3D_NBDV
    300311  DisInfo DvInfo;
     312#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    301313  DvInfo.bDV = false;
     314#endif
    302315  DvInfo.m_acNBDV.setZero();
    303316  DvInfo.m_aVIdxCan = 0;
     
    334347      if( pcCU->getSlice()->getIsDepth())
    335348      {
     349#if SEC_ARP_REM_ENC_RESTRICT_K0035
     350        m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);
     351#else
    336352        DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);
     353#endif
    337354      }
    338355      else
     
    342359      if( pcCU->getSlice()->getDepthBasedBlkPartFlag() )  //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done.
    343360      {
     361#if SEC_ARP_REM_ENC_RESTRICT_K0035
     362        m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);
     363#else
    344364        DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);
     365#endif
    345366      }
    346367      else
    347368#endif
    348369      {
     370#if SEC_ARP_REM_ENC_RESTRICT_K0035
     371        m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
     372#else
    349373        DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
     374#endif
    350375      }
    351376#if H_3D_IV_MERGE
     
    520545    return;
    521546  }
     547#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     548  m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth );
     549  if(!pcCU->getDISFlag(uiAbsPartIdx))
     550  {
     551#else
    522552#if H_3D_SINGLE_DEPTH
    523553  m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
     
    525555  {
    526556#endif
     557#endif
    527558  m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
    528559  m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );
    529560
     561#if !HHI_MOVE_SYN_K0052
    530562#if H_3D_DIM_SDC
    531563  m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    532564#endif
     565#endif
    533566  if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
    534567  {
     
    537570    if(pcCU->getIPCMFlag(uiAbsPartIdx))
    538571    {
     572#if HHI_MOVE_SYN_K0052
     573#if H_3D_DIM_SDC
     574      m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
     575#endif
     576#endif
    539577      xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    540578#if H_3D_IV_MERGE
     
    550588  // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
    551589  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
     590
    552591  // Coefficient decoding
    553592  Bool bCodeDQP = getdQPFlag();
    554593  m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP );
    555594  setdQPFlag( bCodeDQP );
     595#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     596  }
     597#else
    556598#if H_3D_SINGLE_DEPTH
    557599  }
     600#endif
    558601#endif
    559602  xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
     
    616659 
    617660  m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth );
    618  
    619 #if H_MV_ENC_DEC_TRAC
    620 #if ENC_DEC_TRACE
    621   stopAtPos  ( m_ppcCU[uiDepth]->getSlice()->getPOC(),
    622     m_ppcCU[uiDepth]->getSlice()->getLayerId(),
    623     m_ppcCU[uiDepth]->getCUPelX(),
    624     m_ppcCU[uiDepth]->getCUPelY(),
    625     m_ppcCU[uiDepth]->getWidth(0),
    626     m_ppcCU[uiDepth]->getHeight(0) );
    627 #endif
    628 #endif
    629661
    630662  switch( m_ppcCU[uiDepth]->getPredictionMode(0) )
     
    656688      break;
    657689    case MODE_INTRA:
     690#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     691      if( m_ppcCU[uiDepth]->getDISFlag(0) )
     692      {
     693        xReconDIS( m_ppcCU[uiDepth], 0, uiDepth );
     694      }
     695#if H_3D_DIM_SDC
     696      else if( m_ppcCU[uiDepth]->getSDCFlag(0) )
     697      {
     698        xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
     699      }
     700#endif
     701      else
     702#else
    658703#if H_3D_SINGLE_DEPTH
    659704      if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) )
     
    671716#endif
    672717#endif
     718#endif
    673719      xReconIntraQT( m_ppcCU[uiDepth], uiDepth );
    674720      break;
     
    704750  }
    705751}
     752
     753#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     754Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     755{
     756  UInt uiWidth        = pcCU->getWidth  ( 0 );
     757  UInt uiHeight       = pcCU->getHeight ( 0 );
     758
     759  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
     760
     761  UInt    uiStride    = pcRecoYuv->getStride  ();
     762  Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
     763
     764
     765  AOF( uiWidth == uiHeight );
     766  AOF( uiAbsPartIdx == 0 );
     767
     768  Bool  bAboveAvail = false;
     769  Bool  bLeftAvail  = false;
     770  pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
     771  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0,
     772    m_pcPrediction->getPredicBuf       (),
     773    m_pcPrediction->getPredicBufWidth  (),
     774    m_pcPrediction->getPredicBufHeight (),
     775    bAboveAvail, bLeftAvail
     776    );
     777
     778  if ( pcCU->getDISType(uiAbsPartIdx) == 0 )
     779  {
     780    m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), VER_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     781  }
     782  else if ( pcCU->getDISType(uiAbsPartIdx) == 1 )
     783  {
     784    m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     785  }
     786  else if ( pcCU->getDISType(uiAbsPartIdx) == 2 )
     787  {
     788    Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     789    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 );
     790    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     791    {
     792      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     793      {
     794        piReco[ uiX ] = pSingleDepth;
     795      }
     796      piReco+= uiStride;
     797    }
     798  }
     799  else if ( pcCU->getDISType(uiAbsPartIdx) == 3 )
     800  {
     801    Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     802    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 );
     803    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     804    {
     805      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     806      {
     807        piReco[ uiX ] = pSingleDepth;
     808      }
     809      piReco+= uiStride;
     810    }
     811  }
     812
     813  // clear UV
     814  UInt  uiStrideC     = pcRecoYuv->getCStride();
     815  Pel   *pRecCb       = pcRecoYuv->getCbAddr();
     816  Pel   *pRecCr       = pcRecoYuv->getCrAddr();
     817
     818  for (Int y=0; y<uiHeight/2; y++)
     819  {
     820    for (Int x=0; x<uiWidth/2; x++)
     821    {
     822      pRecCb[x] = 1<<(g_bitDepthC-1);
     823      pRecCr[x] = 1<<(g_bitDepthC-1);
     824    }
     825
     826    pRecCb += uiStrideC;
     827    pRecCr += uiStrideC;
     828  }
     829}
     830#else
    706831#if H_3D_SINGLE_DEPTH
    707832Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    772897}
    773898#endif
     899#endif
     900
    774901#if H_3D_INTER_SDC
    775902Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    835962  // compute mask by segmenting depth block
    836963  Bool pMask[MAX_CU_SIZE*MAX_CU_SIZE];
     964#if HS_DBBP_CLEAN_K0048
     965  Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask, pcCU);
     966#else
    837967  Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask);
     968#endif
    838969  AOF(bValidMask);
    839970 
Note: See TracChangeset for help on using the changeset viewer.