Changeset 189 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecEntropy.cpp


Ignore:
Timestamp:
18 Nov 2012, 22:11:37 (12 years ago)
Author:
tech
Message:

Reintegrated branch 4.1-dev0 Rev. 188.

File:
1 edited

Legend:

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

    r100 r189  
    6767}
    6868
     69#if LGE_ILLUCOMP_B0045
     70Void TDecEntropy::decodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     71{
     72  pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
     73
     74  if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) || pcCU->getSlice()->getSPS()->isDepth())
     75  {
     76    return;
     77  }
     78
     79  if(!pcCU->getSlice()->getApplyIC())
     80    return;
     81
     82  if(pcCU->isICFlagRequired(uiAbsPartIdx))
     83    m_pcEntropyDecoderIf->parseICFlag( pcCU, uiAbsPartIdx, uiDepth );
     84}
     85#endif
    6986/** decode merge index
    7087 * \param pcCU
     
    130147{
    131148  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
    132158}
    133159
    134160Void TDecEntropy::decodePartSize( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    135161{
     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 
    136171  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
    137187}
    138188
    139189Void TDecEntropy::decodePredInfo    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU )
    140190{
     191#if RWTH_SDC_DLT_B0036
     192  if( pcCU->getSDCFlag(uiAbsPartIdx) )
     193  {
     194    decodeSDCPredMode(pcCU, uiAbsPartIdx, uiDepth);
     195    return;
     196  }
     197#endif
     198 
    141199  PartSize eMode = pcCU->getPartitionSize( uiAbsPartIdx );
    142200 
     
    179237    return;
    180238  }
     239 
     240#if RWTH_SDC_DLT_B0036
     241  if( pcCU->getSDCFlag(uiAbsPartIdx) )
     242  {
     243    return;
     244  }
     245#endif
    181246 
    182247  m_pcEntropyDecoderIf->parseIPCMInfo( pcCU, uiAbsPartIdx, uiDepth );
     
    427492#endif
    428493  }
     494#if SHARP_INTERVIEW_DECOUPLE_B0111
     495  pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo, iMVPIdx);
     496#else
    429497  pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo);
     498#endif
    430499  pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth);
    431500  pcSubCU->setMVPIdxSubParts( iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth );
     
    895964#endif
    896965 
     966#if RWTH_SDC_DLT_B0036
     967  if( pcCU->getSDCAvailable(uiAbsPartIdx) && pcCU->getSDCFlag( uiAbsPartIdx ) )
     968  {
     969    assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     970    assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
     971    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
     972    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     973    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
     974   
     975    decodeSDCResidualData(pcCU, uiAbsPartIdx, uiDepth);
     976    return;
     977  }
     978#endif
     979 
    897980  if( pcCU->isIntra(uiAbsPartIdx) )
    898981  {
     
    9301013#endif // !UNIFIED_TRANSFORM_TREE
    9311014  }
     1015
     1016#if FIX_MPI_B0065
     1017  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N &&  pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1  )
     1018  {
     1019    TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() );
     1020    if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx))
     1021    {
     1022      PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx);
     1023      pcCU->setPartSizeSubParts( partSize, uiAbsPartIdx, uiDepth );
     1024    }
     1025    else
     1026    {
     1027      pcCU->setPartSizeSubParts( SIZE_NxN, uiAbsPartIdx, uiDepth );
     1028    }
     1029  }
     1030#endif
     1031
    9321032#if UNIFIED_TRANSFORM_TREE
    9331033  xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, 0, temp, temp1, temp2, bCodeDQP );
     
    9351035  xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, uiLumaTrMode, bCodeDQP );
    9361036#endif // UNIFIED_TRANSFORM_TREE
    937 }
     1037
     1038#if FIX_MPI_B0065
     1039  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N &&  pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 )
     1040  {
     1041    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 
     1042  }
     1043#endif
     1044}
     1045
     1046#if RWTH_SDC_DLT_B0036
     1047Void TDecEntropy::decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1048{
     1049  assert( pcCU->getSlice()->getSPS()->isDepth() );
     1050  assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     1051 
     1052  m_pcEntropyDecoderIf->parseSDCPredMode(pcCU, uiAbsPartIdx, uiDepth );
     1053}
     1054
     1055Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1056{
     1057  assert( pcCU->getSlice()->getSPS()->isDepth() );
     1058 
     1059  m_pcEntropyDecoderIf->parseSDCFlag(pcCU, uiAbsPartIdx, uiDepth );
     1060}
     1061
     1062Void TDecEntropy::decodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1063{
     1064  assert( pcCU->getSlice()->getSPS()->isDepth() );
     1065  assert( pcCU->getSDCFlag(uiAbsPartIdx) );
     1066 
     1067  // number of segments depends on prediction mode for INTRA
     1068  UInt uiNumSegments = 2;
     1069  UInt uiLumaPredMode = pcCU->getLumaIntraDir( uiAbsPartIdx );
     1070  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && (uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX) )
     1071    uiNumSegments = 1;
     1072 
     1073  // decode residual data for each segment
     1074  for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ )
     1075    m_pcEntropyDecoderIf->parseSDCResidualData(pcCU, uiAbsPartIdx, uiDepth, uiSeg);
     1076}
     1077#endif
    9381078
    9391079//! \}
Note: See TracChangeset for help on using the changeset viewer.