Ignore:
Timestamp:
10 Nov 2012, 19:05:41 (12 years ago)
Author:
rwth
Message:
  • added RWTH_B0036 (SDC+DLT)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-4.1-dev2-RWTH/source/Lib/TLibDecoder/TDecEntropy.cpp

    r152 r177  
    147147{
    148148  m_pcEntropyDecoderIf->parsePredMode( pcCU, uiAbsPartIdx, uiDepth );
     149 
     150#if RWTH_SDC_DLT_B0036
     151  // if B-Slice, code SDC flag later
     152  if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->isDepth() )
     153  {
     154    // decode SDC flag
     155    decodeSDCFlag(pcCU, uiAbsPartIdx, uiDepth);
     156  }
     157#endif
    149158}
    150159
    151160Void TDecEntropy::decodePartSize( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    152161{
     162#if RWTH_SDC_DLT_B0036
     163  if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx)  )
     164  {
     165    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
     166    pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
     167    return;
     168  }
     169#endif
     170 
    153171  m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth );
     172 
     173#if RWTH_SDC_DLT_B0036
     174  if( pcCU->getSlice()->isInterB() && pcCU->getSlice()->getSPS()->isDepth() && pcCU->isIntra(uiAbsPartIdx) )
     175  {
     176    // decode SDC flag
     177    decodeSDCFlag(pcCU, uiAbsPartIdx, uiDepth);
     178   
     179    if( pcCU->getSDCFlag(uiAbsPartIdx) )
     180    {
     181      // part size is also known for SDC intra
     182      pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
     183      pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
     184    }
     185  }
     186#endif
    154187}
    155188
    156189Void TDecEntropy::decodePredInfo    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU )
    157190{
     191#if RWTH_SDC_DLT_B0036
     192  if( pcCU->getSDCFlag(uiAbsPartIdx) )
     193  {
     194    decodeSDCPredMode(pcCU, uiAbsPartIdx, uiDepth);
     195    return;
     196  }
     197#endif
     198 
    158199  PartSize eMode = pcCU->getPartitionSize( uiAbsPartIdx );
    159200 
     
    196237    return;
    197238  }
     239 
     240#if RWTH_SDC_DLT_B0036
     241  if( pcCU->getSDCFlag(uiAbsPartIdx) )
     242  {
     243    return;
     244  }
     245#endif
    198246 
    199247  m_pcEntropyDecoderIf->parseIPCMInfo( pcCU, uiAbsPartIdx, uiDepth );
     
    912960#endif
    913961 
     962#if RWTH_SDC_DLT_B0036
     963  if( pcCU->getSDCAvailable(uiAbsPartIdx) && pcCU->getSDCFlag( uiAbsPartIdx ) )
     964  {
     965    assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     966    assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
     967    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
     968    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     969    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
     970   
     971    decodeSDCResidualData(pcCU, uiAbsPartIdx, uiDepth);
     972    return;
     973  }
     974#endif
     975 
    914976  if( pcCU->isIntra(uiAbsPartIdx) )
    915977  {
     
    9541016}
    9551017
     1018#if RWTH_SDC_DLT_B0036
     1019Void TDecEntropy::decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1020{
     1021  assert( pcCU->getSlice()->getSPS()->isDepth() );
     1022  assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     1023 
     1024  m_pcEntropyDecoderIf->parseSDCPredMode(pcCU, uiAbsPartIdx, uiDepth );
     1025}
     1026
     1027Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1028{
     1029  assert( pcCU->getSlice()->getSPS()->isDepth() );
     1030 
     1031  m_pcEntropyDecoderIf->parseSDCFlag(pcCU, uiAbsPartIdx, uiDepth );
     1032}
     1033
     1034Void TDecEntropy::decodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1035{
     1036  assert( pcCU->getSlice()->getSPS()->isDepth() );
     1037  assert( pcCU->getSDCFlag(uiAbsPartIdx) );
     1038 
     1039  // number of segments depends on prediction mode for INTRA
     1040  UInt uiNumSegments = 2;
     1041  UInt uiLumaPredMode = pcCU->getLumaIntraDir( uiAbsPartIdx );
     1042  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && (uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX) )
     1043    uiNumSegments = 1;
     1044 
     1045  // decode residual data for each segment
     1046  for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ )
     1047    m_pcEntropyDecoderIf->parseSDCResidualData(pcCU, uiAbsPartIdx, uiDepth, uiSeg);
     1048}
     1049#endif
     1050
    9561051//! \}
Note: See TracChangeset for help on using the changeset viewer.