Ignore:
Timestamp:
11 Jul 2014, 03:49:39 (10 years ago)
Author:
mediatek-htm
Message:

Integration of Single Depth Mode proposed in JCT3V-I0095.
The MACRO is "MTK_SINGLE_DEPTH_MODE_I0095".

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-11.2-dev3-MediaTek/source/Lib/TLibDecoder/TDecCu.cpp

    r976 r983  
    542542    return;
    543543  }
    544 
     544#if MTK_SINGLE_DEPTH_MODE_I0095
     545  m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
     546  if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
     547  {
     548#endif
    545549  m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
    546550  m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );
     
    572576  m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP );
    573577  setdQPFlag( bCodeDQP );
     578#if MTK_SINGLE_DEPTH_MODE_I0095
     579  }
     580#endif
    574581  xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    575582#if H_3D_IV_MERGE
     
    671678      break;
    672679    case MODE_INTRA:
     680#if MTK_SINGLE_DEPTH_MODE_I0095
     681      if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) )
     682        xReconIntraSingleDepth( m_ppcCU[uiDepth], 0, uiDepth );
     683#if H_3D_DIM_SDC
     684      else if( m_ppcCU[uiDepth]->getSDCFlag(0) )
     685        xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
     686#endif
     687      else
     688#else
    673689#if H_3D_DIM_SDC
    674690      if( m_ppcCU[uiDepth]->getSDCFlag(0) )
    675691        xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
    676692      else
     693#endif
    677694#endif
    678695      xReconIntraQT( m_ppcCU[uiDepth], uiDepth );
     
    709726  }
    710727}
    711 
     728#if MTK_SINGLE_DEPTH_MODE_I0095
     729Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     730{
     731  UInt uiWidth        = pcCU->getWidth  ( 0 );
     732  UInt uiHeight       = pcCU->getHeight ( 0 );
     733
     734  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
     735
     736  UInt    uiStride    = pcRecoYuv->getStride  ();
     737  Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
     738
     739
     740  AOF( uiWidth == uiHeight );
     741  AOF( uiAbsPartIdx == 0 );
     742
     743  //construction of depth candidates
     744  Pel testDepth;
     745  Pel DepthNeighbours[5];
     746  Int index =0;
     747  for( Int i = 0; (i < 5) && (index<MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE) ; i++ )
     748  {
     749    if(!pcCU->getNeighDepth (0, uiAbsPartIdx, &testDepth, i))
     750    {
     751      continue;
     752    }
     753    DepthNeighbours[index]=testDepth;
     754    index++;
     755    for(Int j=0;j<index-1;j++)
     756    {
     757     if( (DepthNeighbours[index-1]==DepthNeighbours[j]) )
     758     {
     759       index--;
     760       break;
     761     }
     762    }
     763  }
     764
     765  if(index==0)
     766  {
     767    DepthNeighbours[index]=1<<(g_bitDepthY-1);
     768    index++;
     769  }
     770
     771  if(index==1)
     772  {
     773    DepthNeighbours[index]=ClipY(DepthNeighbours[0] + 1 );
     774    index++;
     775  }
     776
     777  for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     778  {
     779    for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     780    {
     781      piReco[ uiX ] =DepthNeighbours[(Int)pcCU->getSingleDepthValue(uiAbsPartIdx)];
     782    }
     783    piReco     += uiStride;
     784  }
     785
     786  // clear UV
     787  UInt  uiStrideC     = pcRecoYuv->getCStride();
     788  Pel   *pRecCb       = pcRecoYuv->getCbAddr();
     789  Pel   *pRecCr       = pcRecoYuv->getCrAddr();
     790
     791  for (Int y=0; y<uiHeight/2; y++)
     792  {
     793    for (Int x=0; x<uiWidth/2; x++)
     794    {
     795      pRecCb[x] = 1<<(g_bitDepthC-1);
     796      pRecCr[x] = 1<<(g_bitDepthC-1);
     797    }
     798
     799    pRecCb += uiStrideC;
     800    pRecCr += uiStrideC;
     801  }
     802}
     803#endif
    712804#if H_3D_INTER_SDC
    713805Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
Note: See TracChangeset for help on using the changeset viewer.