Ignore:
Timestamp:
16 Jun 2015, 04:13:09 (9 years ago)
Author:
mediatek-htm
Message:

The reactivation of depth intra skip mode (DIS), the MACRO is "NH_3D_DIS".

by Yi-Wen Chen (yiwen.chen@…)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecCu.cpp

    r1243 r1258  
    512512    return;
    513513  }
    514 #if H_3D
     514#if NH_3D_DIS
    515515  m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth );
    516516  if(!pcCU->getDISFlag(uiAbsPartIdx))
     
    547547  setIsChromaQpAdjCoded( isChromaQpAdjCoded );
    548548  setdQPFlag( bCodeDQP );
    549 #if H_3D
     549#if NH_3D_DIS
    550550  }
    551551#endif
     
    643643    case MODE_INTRA:
    644644#if NH_3D
    645     if( false /*m_ppcCU[uiDepth]->getDISFlag(0)*/ )
    646     {
    647       //xReconDIS( m_ppcCU[uiDepth], 0, uiDepth );
    648     }
     645#if NH_3D_DIS
     646    if( m_ppcCU[uiDepth]->getDISFlag(0) )
     647    {
     648      xReconDIS( m_ppcCU[uiDepth], 0, uiDepth );
     649    }
     650#else
     651    if(false )
     652    {
     653     // xReconDIS( m_ppcCU[uiDepth], 0, uiDepth );
     654    }
     655#endif
    649656#if NH_3D_SDC_INTRA
    650657    else if( m_ppcCU[uiDepth]->getSDCFlag(0) )
     
    723730}
    724731
    725 #if H_3D
     732#if NH_3D_DIS
    726733Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    727734{
     
    731738  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
    732739
    733   UInt    uiStride    = pcRecoYuv->getStride  ();
    734   Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
     740  UInt    uiStride    = pcRecoYuv->getStride  (COMPONENT_Y);
     741  Pel*    piReco      = pcRecoYuv->getAddr( COMPONENT_Y, uiAbsPartIdx );
    735742
    736743
     
    740747  Bool  bAboveAvail = false;
    741748  Bool  bLeftAvail  = false;
    742   pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
    743   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0,
    744     m_pcPrediction->getPredicBuf       (),
    745     m_pcPrediction->getPredicBufWidth  (),
    746     m_pcPrediction->getPredicBufHeight (),
    747     bAboveAvail, bLeftAvail
    748     );
     749 
     750  TComTURecurse rTu(pcCU, 0);
     751  const ChromaFormat chFmt     = rTu.GetChromaFormat();
    749752
    750753  if ( pcCU->getDISType(uiAbsPartIdx) == 0 )
    751754  {
    752     m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), VER_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     755    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, VER_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag());
     756    m_pcPrediction->initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     757    m_pcPrediction->predIntraAng( COMPONENT_Y,   VER_IDX, 0 /* Decoder does not have an original image */, 0, piReco, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
    753758  }
    754759  else if ( pcCU->getDISType(uiAbsPartIdx) == 1 )
    755760  {
    756     m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     761    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, HOR_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag());
     762    m_pcPrediction->initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     763    m_pcPrediction->predIntraAng( COMPONENT_Y,   HOR_IDX, 0 /* Decoder does not have an original image */, 0, piReco, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
    757764  }
    758765  else if ( pcCU->getDISType(uiAbsPartIdx) == 2 )
    759766  {
    760     Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     767    Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 );
    761768    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 );
    762769    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     
    771778  else if ( pcCU->getDISType(uiAbsPartIdx) == 3 )
    772779  {
    773     Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     780    Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 );
    774781    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 );
    775782    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     
    784791
    785792  // clear UV
    786   UInt  uiStrideC     = pcRecoYuv->getCStride();
    787   Pel   *pRecCb       = pcRecoYuv->getCbAddr();
    788   Pel   *pRecCr       = pcRecoYuv->getCrAddr();
     793  UInt  uiStrideC     = pcRecoYuv->getStride(COMPONENT_Cb);
     794  Pel   *pRecCb       = pcRecoYuv->getAddr(COMPONENT_Cb);
     795  Pel   *pRecCr       = pcRecoYuv->getAddr(COMPONENT_Cr);
    789796
    790797  for (Int y=0; y<uiHeight/2; y++)
     
    792799    for (Int x=0; x<uiWidth/2; x++)
    793800    {
    794       pRecCb[x] = 1<<(g_bitDepthC-1);
    795       pRecCr[x] = 1<<(g_bitDepthC-1);
     801      pRecCb[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1);
     802      pRecCr[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1);
    796803    }
    797804
Note: See TracChangeset for help on using the changeset viewer.