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/TLibEncoder/TEncSearch.cpp

    r1248 r1258  
    10071007        }
    10081008        m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true );
    1009 #if H_3D
     1009#if NH_3D_DIS
    10101010        m_pcEntropyCoder->encodeDIS(pcCU, 0, true );
    10111011        if(!pcCU->getDISFlag(uiAbsPartIdx))
     
    10131013        m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    10141014      }
    1015 #if H_3D
     1015#if NH_3D_DIS
    10161016      else
    10171017      {
     
    10191019      }
    10201020#endif
    1021 #if H_3D
     1021#if NH_3D_DIS
    10221022      if(!pcCU->getDISFlag(uiAbsPartIdx))
    10231023      {
     
    10371037        }
    10381038      }
    1039 #if H_3D
    1040     }
    1041 #endif
    1042   }
    1043 #if H_3D
     1039#if NH_3D_DIS
     1040    }
     1041#endif
     1042  }
     1043#if NH_3D_DIS
    10441044    if(!pcCU->getDISFlag(uiAbsPartIdx))
    10451045    {
     
    10801080#endif
    10811081#endif
    1082 #if H_3D
     1082#if NH_3D_DIS
    10831083      }
    10841084#endif
     
    18751875}
    18761876
    1877 #if H_3D
     1877#if NH_3D_DIS
    18781878Void TEncSearch::xIntraCodingDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode )
    18791879{
    18801880  UInt    uiWidth           = pcCU     ->getWidth   ( 0 );
    18811881  UInt    uiHeight          = pcCU     ->getHeight  ( 0 );
    1882   UInt    uiStride          = pcOrgYuv ->getStride  ();
    1883   Pel*    piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
    1884   Pel*    piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
     1882  UInt    uiStride          = pcOrgYuv ->getStride  (COMPONENT_Y);
     1883  Pel*    piOrg             = pcOrgYuv ->getAddr(COMPONENT_Y, uiAbsPartIdx );
     1884  Pel*    piPred            = pcPredYuv->getAddr(COMPONENT_Y, uiAbsPartIdx );
    18851885
    18861886  AOF( uiWidth == uiHeight );
    18871887  AOF( uiAbsPartIdx == 0 );
    1888   pcCU->setDISTypeSubParts(uiPredMode, uiAbsPartIdx, 0, pcCU->getDepth(0)); 
     1888  pcCU->setDISTypeSubParts((UChar)uiPredMode, uiAbsPartIdx, pcCU->getDepth(0)); 
    18891889  //===== reconstruction =====
    18901890
    18911891  Bool bAboveAvail = false;
    18921892  Bool bLeftAvail  = false;
    1893   pcCU->getPattern()->initPattern   ( pcCU, 0, 0 );
    1894   pcCU->getPattern()->initAdiPattern( pcCU, 0, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
     1893
     1894  TComTURecurse rTu(pcCU, 0);
     1895  const ChromaFormat chFmt     = rTu.GetChromaFormat();
    18951896
    18961897  if ( uiPredMode == 0 )
    18971898  {
    1898     predIntraLumaAng( pcCU->getPattern(), VER_IDX, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     1899    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, VER_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag());
     1900    initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     1901    predIntraAng( COMPONENT_Y, VER_IDX, 0, uiStride, piPred, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
    18991902  }
    19001903  else if ( uiPredMode == 1 )
    19011904  {
    1902     predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     1905    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, HOR_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag());
     1906    initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     1907    predIntraAng( COMPONENT_Y, HOR_IDX, 0, uiStride, piPred, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
    19031908  }
    19041909  else if ( uiPredMode == 2 )
    19051910  {
    1906     Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     1911    Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 );
    19071912    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 );
    19081913    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     
    19171922  else if ( uiPredMode == 3 )
    19181923  {
    1919     Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     1924    Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 );
    19201925    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 );
    19211926    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     
    19301935
    19311936  // clear UV
    1932   UInt  uiStrideC     = pcPredYuv->getCStride();
    1933   Pel   *pRecCb       = pcPredYuv->getCbAddr();
    1934   Pel   *pRecCr       = pcPredYuv->getCrAddr();
     1937  UInt  uiStrideC     = pcPredYuv->getStride(COMPONENT_Cb);
     1938  Pel   *pRecCb       = pcPredYuv->getAddr(COMPONENT_Cb);
     1939  Pel   *pRecCr       = pcPredYuv->getAddr(COMPONENT_Cr);
    19351940
    19361941  for (Int y=0; y<uiHeight/2; y++)
     
    19381943    for (Int x=0; x<uiWidth/2; x++)
    19391944    {
    1940       pRecCb[x] = 1<<(g_bitDepthC-1);
    1941       pRecCr[x] = 1<<(g_bitDepthC-1);
     1945      pRecCb[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1);
     1946      pRecCr[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1);
    19421947    }
    19431948
     
    19461951  }
    19471952
    1948   piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
     1953  piPred            = pcPredYuv->getAddr(COMPONENT_Y, uiAbsPartIdx );
    19491954  //===== determine distortion =====
    1950 #if H_3D_VSO
     1955#if NH_3D_VSO
    19511956  if ( m_pcRdCost->getUseVSO() )
    1952     ruiDist = m_pcRdCost->getDistPartVSO  ( pcCU, uiAbsPartIdx, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, false );
     1957    ruiDist = m_pcRdCost->getDistPartVSO  ( pcCU, uiAbsPartIdx, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, false );
    19531958  else
    19541959#endif
    1955     ruiDist = m_pcRdCost->getDistPart(g_bitDepthY, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight );
     1960    ruiDist = m_pcRdCost->getDistPart(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, COMPONENT_Y );
    19561961
    19571962  //===== determine rate and r-d cost =====
     
    19601965  UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits();
    19611966
    1962 #if H_3D_VSO
     1967#if NH_3D_VSO
    19631968  if ( m_pcRdCost->getUseLambdaScaleVSO())
    19641969    dRDCost = m_pcRdCost->calcRdCostVSO( uiBits, ruiDist );
     
    27212726}
    27222727
    2723 #if H_3D
     2728#if NH_3D_DIS
    27242729Void TEncSearch::estIntraPredDIS( TComDataCU* pcCU,
    27252730                                  TComYuv*    pcOrgYuv,
     
    27342739  UInt    uiHeight       = pcCU->getHeight(0);
    27352740
    2736 
    2737   Pel* piOrg         = pcOrgYuv ->getLumaAddr( 0, uiWidth );
    2738   UInt uiStride      = pcPredYuv->getStride();
    2739 
     2741#if NH_3D_VSO // M36
     2742  Pel* piOrg         = pcOrgYuv ->getAddr(COMPONENT_Y, 0, uiWidth );
     2743  UInt uiStride      = pcPredYuv->getStride(COMPONENT_Y);
     2744#endif
    27402745  Dist   uiDist = 0;
    27412746  Double dCost   = 0.0;
     
    27522757    uiDist = 0;
    27532758    dCost   = 0.0;
    2754 #if H_3D_VSO // M36
     2759#if NH_3D_VSO // M36
    27552760    if( m_pcRdCost->getUseRenModel() )
    27562761    {
     
    27712776
    27722777
    2773   pcCU->setDISTypeSubParts(uiBestDISType, 0, 0, uiDepth); 
     2778  pcCU->setDISTypeSubParts((UChar)uiBestDISType, 0, uiDepth); 
    27742779  assert(uiBestDISType >= 0);
    27752780
     
    70917096
    70927097    m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true );
    7093 #if H_3D
     7098#if NH_3D_DIS
    70947099    m_pcEntropyCoder->encodeDIS ( pcCU, 0, true );
    70957100#endif
Note: See TracChangeset for help on using the changeset viewer.