Changeset 189 in 3DVCSoftware for trunk/source/Lib/TLibDecoder


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

Reintegrated branch 4.1-dev0 Rev. 188.

Location:
trunk/source/Lib/TLibDecoder
Files:
9 edited

Legend:

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

    r100 r189  
    16741674    }
    16751675#endif
    1676 
    1677     READ_FLAG( uiCode, "base_view_flag" );
     1676#if OL_QTLIMIT_PREDCODING_B0068
     1677    if( bIsDepth )
     1678    {
     1679      READ_FLAG( uiCode, "use_qtlpc_flag" );
     1680      pcSPS->setUseQTLPC( uiCode );
     1681    }
     1682#endif
     1683   
     1684#if RWTH_SDC_DLT_B0036
     1685    if( bIsDepth )
     1686    {
     1687      READ_FLAG( uiCode, "use_dlt_flag" );
     1688      pcSPS->setUseDLT( uiCode );
     1689      if( pcSPS->getUseDLT() )
     1690      {
     1691        // decode mapping
     1692        UInt uiNumDepthValues;
     1693        // parse number of values in DLT
     1694        xReadUvlc( uiNumDepthValues );
     1695       
     1696        // parse actual DLT values
     1697        UInt* auiIdx2DepthValue = (UInt*) calloc(uiNumDepthValues, sizeof(UInt));
     1698        for(UInt d=0; d<uiNumDepthValues; d++)
     1699        {
     1700          xReadUvlc( uiCode );
     1701          auiIdx2DepthValue[d] = uiCode;
     1702        }
     1703       
     1704        pcSPS->setDepthLUTs(auiIdx2DepthValue, uiNumDepthValues);
     1705       
     1706        // clean memory
     1707        free(auiIdx2DepthValue);
     1708      }
     1709      else
     1710        pcSPS->setDepthLUTs();
     1711    }
     1712#endif
     1713
     1714    READ_FLAG( uiCode, "base_view_flag" );
    16781715    if( uiCode )
    16791716    { // baseview SPS -> set standard values
     
    18031840  UInt address;
    18041841  UInt innerAddress = 0;
     1842
     1843#if LGE_ILLUCOMP_B0045
     1844  // IC flag is on only first_slice_in_pic
     1845  if (uiCode)
     1846  {
     1847    UInt uiCodeTmp = 0;
     1848    if ( rpcSlice->getSPS()->getViewId() && !rpcSlice->getSPS()->isDepth() )
     1849    {
     1850      READ_FLAG (uiCodeTmp, "applying IC flag");
     1851    }
     1852    rpcSlice->setApplyIC(uiCodeTmp);
     1853  }
     1854#endif
     1855
    18051856  if(!uiCode)
    18061857  {
     
    26012652}
    26022653
     2654#if LGE_ILLUCOMP_B0045
     2655Void TDecCavlc::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     2656{
     2657  assert(0);
     2658}
     2659#endif
     2660
    26032661#if HHI_INTER_VIEW_MOTION_PRED
    26042662Void TDecCavlc::parseMVPIdx( Int& riMVPIdx, Int iAMVPCands )
     
    28012859Void
    28022860TDecCavlc::parseResPredFlag( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth )
     2861{
     2862  assert(0);
     2863}
     2864#endif
     2865
     2866#if RWTH_SDC_DLT_B0036
     2867Void TDecCavlc::parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     2868{
     2869  assert(0);
     2870}
     2871Void TDecCavlc::parseSDCPredMode    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     2872{
     2873  assert(0);
     2874}
     2875Void TDecCavlc::parseSDCResidualData     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart )
    28032876{
    28042877  assert(0);
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r77 r189  
    142142 
    143143  Void  parseSkipFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     144#if LGE_ILLUCOMP_B0045
     145  Void  parseICFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     146#endif
    144147  Void parseMergeFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    145148  Void parseMergeIndex      ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
     
    175178  Void parseDFFlag         ( UInt& ruiVal, const Char *pSymbolName );
    176179  Void parseDFSvlc         ( Int&  riVal,  const Char *pSymbolName  );
     180#if RWTH_SDC_DLT_B0036
     181  Void parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     182  Void parseSDCPredMode    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     183  Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
     184#endif
    177185protected:
    178186#if DBL_CONTROL
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r100 r189  
    3838#include "TDecCu.h"
    3939
     40#if RWTH_SDC_DLT_B0036
     41#define GetDepthValue2Idx(val)     (pcCU->getSlice()->getSPS()->depthValue2idx(val))
     42#define GetIdx2DepthValue(val)     (pcCU->getSlice()->getSPS()->idx2DepthValue(val))
     43#endif
     44
    4045//! \ingroup TLibDecoder
    4146//! \{
     
    389394      }
    390395    }
     396#if LGE_ILLUCOMP_B0045
     397    m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     398#endif
    391399#if HHI_MPI
    392400    }
     
    440448  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
    441449 
     450#if LGE_ILLUCOMP_B0045
     451  m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     452#endif
     453
    442454#if HHI_INTER_VIEW_RESIDUAL_PRED
    443455  if( !pcCU->isIntra( uiAbsPartIdx ) )
     
    601613      break;
    602614    case MODE_INTRA:
     615#if RWTH_SDC_DLT_B0036
     616      if( m_ppcCU[uiDepth]->getSDCFlag(0) )
     617        xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
     618      else
     619#endif
    603620      xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
    604621      break;
     
    620637{
    621638#if HHI_MPI
     639#if FIX_MPI_B0065
     640  if( pcCU->getTextureModeDepth( 0 ) != -1 )
     641  {
     642    TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() );
     643    if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx))
     644    {
     645      PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx);
     646      pcCU->setPartSizeSubParts( partSize, 0, uiDepth );
     647    }
     648    else
     649    {
     650      pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth );
     651    }
     652  }
     653#else
    622654  if( pcCU->getTextureModeDepth( 0 ) != -1 )
    623655    pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth );
     656#endif
    624657#endif
    625658 
     
    705738                                     m_pcPrediction->getPredicBufHeight (),
    706739                                     bAboveAvail, bLeftAvail );
    707 #if LGE_EDGE_INTRA
     740#if LGE_EDGE_INTRA_A0070
    708741  if( uiLumaPredMode >= EDGE_INTRA_IDX )
    709742  {
     
    944977
    945978}
     979
     980#if RWTH_SDC_DLT_B0036
     981Void TDecCu::xReconIntraSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     982{
     983  UInt uiWidth        = pcCU->getWidth  ( 0 );
     984  UInt uiHeight       = pcCU->getHeight ( 0 );
     985 
     986  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
     987  TComYuv* pcPredYuv  = m_ppcYuvReco[uiDepth];
     988  TComYuv* pcResiYuv  = m_ppcYuvResi[uiDepth];
     989 
     990  UInt    uiStride    = pcRecoYuv->getStride  ();
     991  Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
     992  Pel*    piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
     993  Pel*    piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
     994 
     995  UInt    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
     996  Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
     997  UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
     998 
     999  UInt    uiLumaPredMode    = pcCU->getLumaIntraDir     ( uiAbsPartIdx );
     1000 
     1001  AOF( uiWidth == uiHeight );
     1002  AOF( uiAbsPartIdx == 0 );
     1003  AOF( pcCU->getSDCAvailable(uiAbsPartIdx) );
     1004  AOF( pcCU->getSDCFlag(uiAbsPartIdx) );
     1005 
     1006  //===== init availability pattern =====
     1007  Bool  bAboveAvail = false;
     1008  Bool  bLeftAvail  = false;
     1009  pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
     1010  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
     1011 
     1012  //===== get prediction signal =====
     1013#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     1014  if( uiLumaPredMode >= NUM_INTRA_MODE )
     1015  {
     1016    m_pcPrediction->predIntraLumaDMM( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail, false );
     1017  }
     1018  else
     1019  {
     1020#endif
     1021    m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail );
     1022#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     1023  }
     1024#endif
     1025 
     1026  // number of segments depends on prediction mode
     1027  UInt uiNumSegments = 1; 
     1028  Bool* pbMask = NULL;
     1029  UInt uiMaskStride = 0;
     1030 
     1031  if( uiLumaPredMode == DMM_WEDGE_FULL_IDX || uiLumaPredMode == DMM_WEDGE_PREDDIR_IDX )
     1032  {
     1033    Int uiTabIdx = (uiLumaPredMode == DMM_WEDGE_FULL_IDX)?pcCU->getWedgeFullTabIdx(uiAbsPartIdx):pcCU->getWedgePredDirTabIdx(uiAbsPartIdx);
     1034   
     1035    WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];
     1036    TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
     1037   
     1038    uiNumSegments = 2;
     1039    pbMask = pcWedgelet->getPattern();
     1040    uiMaskStride = pcWedgelet->getStride();
     1041  }
     1042 
     1043  // get DC prediction for each segment
     1044  Pel apDCPredValues[2];
     1045  xAnalyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride);
     1046 
     1047  // reconstruct residual based on mask + DC residuals
     1048  Pel apDCResiValues[2];
     1049  Pel apDCRecoValues[2];
     1050  for( UInt ui = 0; ui < uiNumSegments; ui++ )
     1051  {
     1052    Pel   pPredIdx    = GetDepthValue2Idx( apDCPredValues[ui] );
     1053    Pel   pResiIdx    = pcCU->getSDCSegmentDCOffset(ui, uiAbsPartIdx);
     1054    Pel   pRecoValue  = GetIdx2DepthValue( pPredIdx + pResiIdx );
     1055   
     1056    apDCRecoValues[ui]  = pRecoValue;
     1057    apDCResiValues[ui]  = pRecoValue - apDCPredValues[ui];
     1058  }
     1059 
     1060  //===== reconstruction =====
     1061  Bool*pMask      = pbMask;
     1062  Pel* pPred      = piPred;
     1063  Pel* pResi      = piResi;
     1064  Pel* pReco      = piReco;
     1065  Pel* pRecIPred  = piRecIPred;
     1066 
     1067  for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     1068  {
     1069    for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     1070    {
     1071      UChar ucSegment = pMask?(UChar)pMask[uiX]:0;
     1072      assert( ucSegment < uiNumSegments );
     1073     
     1074      Pel pPredVal= apDCPredValues[ucSegment];
     1075      Pel pResiDC = apDCResiValues[ucSegment];
     1076     
     1077      pReco    [ uiX ] = Clip( pPredVal + pResiDC );
     1078      pRecIPred[ uiX ] = pReco[ uiX ];
     1079    }
     1080    pPred     += uiStride;
     1081    pResi     += uiStride;
     1082    pReco     += uiStride;
     1083    pRecIPred += uiRecIPredStride;
     1084    pMask     += uiMaskStride;
     1085  }
     1086 
     1087  // clear UV
     1088  UInt  uiStrideC     = pcPredYuv->getCStride();
     1089  Pel   *pRecCb       = pcPredYuv->getCbAddr();
     1090  Pel   *pRecCr       = pcPredYuv->getCrAddr();
     1091 
     1092  for (Int y=0; y<uiHeight/2; y++)
     1093  {
     1094    for (Int x=0; x<uiWidth/2; x++)
     1095    {
     1096      pRecCb[x] = (Pel)(128<<g_uiBitIncrement);
     1097      pRecCr[x] = (Pel)(128<<g_uiBitIncrement);
     1098    }
     1099   
     1100    pRecCb += uiStrideC;
     1101    pRecCr += uiStrideC;
     1102  }
     1103}
     1104#endif
    9461105
    9471106/** Function for deriving recontructed PU/CU Luma sample with QTree structure
     
    12091368#endif
    12101369
     1370#if RWTH_SDC_DLT_B0036
     1371Void TDecCu::xAnalyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride )
     1372{
     1373  Int iSumDepth[2];
     1374  memset(iSumDepth, 0, sizeof(Int)*2);
     1375  Int iSumPix[2];
     1376  memset(iSumPix, 0, sizeof(Int)*2);
     1377 
     1378  for (Int y=0; y<uiSize; y++)
     1379  {
     1380    for (Int x=0; x<uiSize; x++)
     1381    {
     1382      UChar ucSegment = pMask?(UChar)pMask[x]:0;
     1383      assert( ucSegment < uiNumSegments );
     1384     
     1385      iSumDepth[ucSegment] += pOrig[x];
     1386      iSumPix[ucSegment]   += 1;
     1387    }
     1388   
     1389    pOrig  += uiStride;
     1390    pMask  += uiMaskStride;
     1391  }
     1392 
     1393  // compute mean for each segment
     1394  for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ )
     1395  {
     1396    if( iSumPix[ucSeg] > 0 )
     1397      rpSegMeans[ucSeg] = iSumDepth[ucSeg] / iSumPix[ucSeg];
     1398    else
     1399      rpSegMeans[ucSeg] = 0;  // this happens for zero-segments
     1400  }
     1401}
     1402#endif
     1403
    12111404//! \}
  • trunk/source/Lib/TLibDecoder/TDecCu.h

    r56 r189  
    121121  Void xFillPCMBuffer           (TComDataCU* pCU, UInt absPartIdx, UInt depth);
    122122#endif
     123#if RWTH_SDC_DLT_B0036
     124  Void  xAnalyzeSegmentsSDC       ( Pel* pOrig,
     125                                   UInt uiStride,
     126                                   UInt uiSize,
     127                                   Pel* rpSegMeans,
     128                                   UInt uiNumSegments,
     129                                   Bool* pMask,
     130                                   UInt uiMaskStride );
     131 
     132  Void xReconIntraSDC           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     133#endif
    123134};
    124135
  • 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//! \}
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r77 r189  
    103103public:
    104104  virtual Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     105#if LGE_ILLUCOMP_B0045
     106  virtual Void parseICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     107#endif
    105108  virtual Void parseSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    106109  virtual Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ) = 0;
     
    138141  virtual Void readTileMarker   ( UInt& uiTileIdx, UInt uiBitsUsed ) = 0;
    139142  virtual Void updateContextTables( SliceType eSliceType, Int iQp ) = 0;
     143 
     144#if RWTH_SDC_DLT_B0036
     145  virtual Void parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     146  virtual Void parseSDCPredMode     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     147  virtual Void parseSDCResidualData     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0;
     148#endif
    140149 
    141150  virtual ~TDecEntropyIf() {}
     
    196205  Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    197206  Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     207#if LGE_ILLUCOMP_B0045
     208  Void decodeICFlag            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     209#endif
    198210  Void decodeMergeFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    199211  Void decodeMergeIndex        ( TComDataCU* pcSubCU, UInt uiPartIdx, UInt uiPartAddr, PartSize eCUMode, UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, UInt uiDepth );
     
    250262  Void decodeFlush() { m_pcEntropyDecoderIf->decodeFlush(); }
    251263#endif
     264 
     265#if RWTH_SDC_DLT_B0036
     266  Void decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     267  Void decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     268  Void decodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     269#endif
    252270
    253271};// END CLASS DEFINITION TDecEntropy
  • trunk/source/Lib/TLibDecoder/TDecGop.cpp

    r100 r189  
    303303    {
    304304      m_pcDepthMapGenerator->initViewComponent( rpcPic );
    305 #if !QC_MULTI_DIS_CAN
     305#if !QC_MULTI_DIS_CAN_A0097
    306306      m_pcDepthMapGenerator->predictDepthMap  ( rpcPic );
    307307#endif
     
    312312#endif
    313313
     314#if QC_SIMPLE_NBDV_B0047
     315    if(pcSlice->getViewId() && pcSlice->getSPS()->getMultiviewMvPredMode())
     316    {
     317      Int iColPoc = pcSlice->getRefPOC(RefPicList(pcSlice->getColDir()), pcSlice->getColRefIdx());
     318      rpcPic->setRapbCheck(rpcPic->getDisCandRefPictures(iColPoc));
     319    }
     320#endif
    314321
    315322    m_pcSbacDecoders[0].load(m_pcSbacDecoder);
     
    341348#endif
    342349#if DEPTH_MAP_GENERATION
    343 #if !QC_MULTI_DIS_CAN
     350#if !QC_MULTI_DIS_CAN_A0097
    344351    // update virtual depth map
    345352    m_pcDepthMapGenerator->updateDepthMap( rpcPic );
  • trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r100 r189  
    3838#include "TDecSbac.h"
    3939
     40#if RWTH_SDC_DLT_B0036
     41#define GetNumDepthValues()     (pcCU->getSlice()->getSPS()->getNumDepthValues())
     42#define GetBitsPerDepthValue()  (pcCU->getSlice()->getSPS()->getBitsPerDepthValue())
     43#endif
     44
    4045//! \ingroup TLibDecoder
    4146//! \{
     
    5257, m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels )
    5358, m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     59#if LGE_ILLUCOMP_B0045
     60, m_cCUICFlagSCModel          ( 1,             1,               NUM_IC_FLAG_CTX               , m_contextModels + m_numContextModels, m_numContextModels)
     61#endif
    5462, m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        , m_contextModels + m_numContextModels, m_numContextModels)
    5563, m_cCUMergeIdxExtSCModel     ( 1,             1,               NUM_MERGE_IDX_EXT_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
     
    98106, m_cDmmDataSCModel           ( 1,             1,               NUM_DMM_DATA_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    99107#endif
    100 #if LGE_EDGE_INTRA
     108#if LGE_EDGE_INTRA_A0070
    101109, m_cEdgeIntraSCModel         ( 1,             1,               NUM_EDGE_INTRA_CTX            , m_contextModels + m_numContextModels, m_numContextModels)
    102110#if LGE_EDGE_INTRA_DELTA_DC
    103111, m_cEdgeIntraDeltaDCSCModel  ( 1,             1,               NUM_EDGE_INTRA_DELTA_DC_CTX   , m_contextModels + m_numContextModels, m_numContextModels)
    104112#endif
     113#endif
     114#if RWTH_SDC_DLT_B0036
     115, m_cSDCFlagSCModel             ( 1,             1,                 SDC_NUM_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
     116, m_cSDCResidualFlagSCModel     ( 1,             2,  SDC_NUM_RESIDUAL_FLAG_CTX  , m_contextModels + m_numContextModels, m_numContextModels)
     117, m_cSDCResidualSignFlagSCModel ( 1,             2,  SDC_NUM_SIGN_FLAG_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
     118, m_cSDCResidualSCModel         ( 1,             2,  SDC_NUM_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
     119, m_cSDCPredModeSCModel             ( 1,             3,                 SDC_NUM_PRED_MODE_CTX     , m_contextModels + m_numContextModels, m_numContextModels)
    105120#endif
    106121{
     
    146161  m_cCUSplitFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    147162  m_cCUSkipFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SKIP_FLAG );
     163#if LGE_ILLUCOMP_B0045
     164  m_cCUICFlagSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_IC_FLAG );
     165#endif
    148166  m_cCUMergeFlagExtSCModel.initBuffer    ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT );
    149167  m_cCUMergeIdxExtSCModel.initBuffer     ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT );
     
    188206
    189207  m_cCUTransSubdivFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
    190 #if LGE_EDGE_INTRA
     208#if LGE_EDGE_INTRA_A0070
    191209  m_cEdgeIntraSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_EDGE_INTRA );
    192210#if LGE_EDGE_INTRA_DELTA_DC
     
    199217  m_cDmmModeSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_DMM_MODE );
    200218  m_cDmmDataSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_DMM_DATA );
     219#endif
     220#if RWTH_SDC_DLT_B0036
     221  m_cSDCFlagSCModel.initBuffer              ( sliceType, qp, (UChar*)INIT_SDC_FLAG );
     222  m_cSDCResidualFlagSCModel.initBuffer      ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
     223  m_cSDCResidualSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL );
     224  m_cSDCResidualSignFlagSCModel.initBuffer  ( sliceType, qp, (UChar*)INIT_SDC_SIGN_FLAG );
     225  m_cSDCPredModeSCModel.initBuffer              ( sliceType, qp, (UChar*)INIT_SDC_PRED_MODE );
    201226#endif
    202227 
     
    230255  m_cCUSplitFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG );
    231256  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
     257#if LGE_ILLUCOMP_B0045
     258  m_cCUICFlagSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_IC_FLAG );
     259#endif
    232260  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT );
    233261  m_cCUMergeIdxExtSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT );
     
    276304  m_cDmmDataSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMM_DATA );
    277305#endif
     306#if RWTH_SDC_DLT_B0036
     307  m_cSDCFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
     308  m_cSDCResidualFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
     309  m_cSDCResidualSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL );
     310  m_cSDCResidualSignFlagSCModel.initBuffer  ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG );
     311  m_cSDCPredModeSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE );
     312#endif
    278313
    279314  m_pcTDecBinIf->start();
     
    578613}
    579614
     615#if LGE_ILLUCOMP_B0045
     616/** parse illumination compensation flag
     617 * \param pcCU
     618 * \param uiAbsPartIdx
     619 * \param uiDepth
     620 * \returns Void
     621 */
     622Void TDecSbac::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     623{
     624  UInt uiSymbol = 0;
     625  UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx );
     626  m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) );
     627  DTRACE_CABAC_VL( g_nSymbolCounter++ );
     628  DTRACE_CABAC_T( "\tICFlag" );
     629  DTRACE_CABAC_T( "\tuiCtxIC: ");
     630  DTRACE_CABAC_V( uiCtxIC );
     631  DTRACE_CABAC_T( "\tuiSymbol: ");
     632  DTRACE_CABAC_V( uiSymbol );
     633  DTRACE_CABAC_T( "\n");
     634 
     635  pcCU->setICFlagSubParts( uiSymbol ? true : false , uiAbsPartIdx, 0, uiDepth );
     636}
     637#endif
     638
     639
    580640/** parse merge flag
    581641 * \param pcCU
     
    693753 
    694754  UInt uiSymbol;
    695   m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) );
    696   DTRACE_CABAC_VL( g_nSymbolCounter++ )
    697   DTRACE_CABAC_T( "\tSplitFlag\n" )
     755
     756#if OL_QTLIMIT_PREDCODING_B0068
     757  Bool bParseSplitFlag    = true;
     758
     759  TComSPS *sps            = pcCU->getPic()->getSlice(0)->getSPS();
     760  TComPic *pcTexture      = pcCU->getSlice()->getTexturePic();
     761  Bool bDepthMapDetect    = (pcTexture != NULL);
     762  Bool bIntraSliceDetect  = (pcCU->getSlice()->getSliceType() == I_SLICE);
     763
     764  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
     765  {
     766    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     767    assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth);
     768    bParseSplitFlag         = (pcTextureCU->getDepth(uiAbsPartIdx) > uiDepth);
     769  }
     770
     771  if(bParseSplitFlag)
     772  {
     773#endif
     774    m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) );
     775    DTRACE_CABAC_VL( g_nSymbolCounter++ )
     776    DTRACE_CABAC_T( "\tSplitFlag\n" )
     777#if OL_QTLIMIT_PREDCODING_B0068
     778  }
     779  else
     780    uiSymbol = 0;
     781#endif
     782
    698783  pcCU->setDepthSubParts( uiDepth + uiSymbol, uiAbsPartIdx );
    699784 
     
    711796  UInt uiSymbol, uiMode = 0;
    712797  PartSize eMode;
     798
     799#if OL_QTLIMIT_PREDCODING_B0068
     800  Bool bParsePartSize    = true;
     801  TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
     802  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
     803  Bool bDepthMapDetect   = (pcTexture != NULL);
     804  Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
     805
     806  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
     807  {
     808    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     809    assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth);
     810    if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN)
     811    {
     812      bParsePartSize = false;
     813      eMode          = SIZE_2Nx2N;
     814    }
     815  }
     816#endif
    713817 
    714818  if ( pcCU->isIntra( uiAbsPartIdx ) )
    715819  {
    716     uiSymbol = 1;
    717     if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
    718     {
    719       m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) );
    720     }
    721     eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN;
     820#if OL_QTLIMIT_PREDCODING_B0068
     821    if(bParsePartSize)
     822    {
     823#endif
     824      uiSymbol = 1;
     825      if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
     826      {
     827        m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) );
     828      }
     829      eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN;
     830#if OL_QTLIMIT_PREDCODING_B0068
     831    }
     832#endif
    722833    UInt uiTrLevel = 0;   
    723834    UInt uiWidthInBit  = g_aucConvertToBit[pcCU->getWidth(uiAbsPartIdx)]+2;
     
    735846  else
    736847  {
    737     UInt uiMaxNumBits = 2;
    738     if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) )
    739     {
    740       uiMaxNumBits ++;
    741     }
    742     for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
    743     {
    744       m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
    745       if ( uiSymbol )
    746       {
    747         break;
    748       }
    749       uiMode++;
    750     }
    751     eMode = (PartSize) uiMode;
    752     if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
    753     {
    754       if (eMode == SIZE_2NxN)
    755       {
     848#if OL_QTLIMIT_PREDCODING_B0068
     849    if(bParsePartSize)
     850    {
     851#endif
     852      UInt uiMaxNumBits = 2;
     853      if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) )
     854      {
     855        uiMaxNumBits ++;
     856      }
     857      for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
     858      {
     859        m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
     860        if ( uiSymbol )
     861        {
     862          break;
     863        }
     864        uiMode++;
     865      }
     866      eMode = (PartSize) uiMode;
     867      if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     868      {
     869        if (eMode == SIZE_2NxN)
     870        {
     871#if AMP_CTX
     872            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
     873#else
     874          m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 ));
     875#endif
     876          if (uiSymbol == 0)
     877          {
     878#if AMP_CTX
     879            m_pcTDecBinIf->decodeBinEP(uiSymbol);
     880#else
     881            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 ));
     882#endif
     883            eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
     884          }
     885        }
     886        else if (eMode == SIZE_Nx2N)
     887        {
    756888#if AMP_CTX
    757889          m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
    758890#else
    759         m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 ));
    760 #endif
    761         if (uiSymbol == 0)
    762         {
     891          m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 ));
     892#endif
     893          if (uiSymbol == 0)
     894          {
    763895#if AMP_CTX
    764           m_pcTDecBinIf->decodeBinEP(uiSymbol);
    765 #else
    766           m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 ));
    767 #endif
    768           eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
     896            m_pcTDecBinIf->decodeBinEP(uiSymbol);
     897#else
     898            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 ));
     899#endif
     900            eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
     901          }
    769902        }
    770903      }
    771       else if (eMode == SIZE_Nx2N)
    772       {
    773 #if AMP_CTX
    774         m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
    775 #else
    776         m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 ));
    777 #endif
    778         if (uiSymbol == 0)
    779         {
    780 #if AMP_CTX
    781           m_pcTDecBinIf->decodeBinEP(uiSymbol);
    782 #else
    783           m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 ));
    784 #endif
    785           eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
    786         }
    787       }
    788     }
     904#if OL_QTLIMIT_PREDCODING_B0068
     905    }
     906#endif
    789907  }
    790908  pcCU->setPartSizeSubParts( eMode, uiAbsPartIdx, uiDepth );
     
    862980#endif
    863981
    864 #if LGE_EDGE_INTRA
     982#if LGE_EDGE_INTRA_A0070
    865983    Bool bCodeEdgeIntra = false;
    866984    if( pcCU->getSlice()->getSPS()->isDepth() )
     
    878996#endif
    879997    Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds); 
    880 #if LGE_EDGE_INTRA
     998#if LGE_EDGE_INTRA_A0070
    881999    UInt uiCheckBit = 0;
    8821000#endif
     
    9031021
    9041022      m_pcTDecBinIf->decodeBinsEP( uiSymbol, 5 );
    905 #if LGE_EDGE_INTRA
     1023#if LGE_EDGE_INTRA_A0070
    9061024      if (bCodeEdgeIntra)
    9071025      {
     
    9391057      }
    9401058#endif
    941 #if LGE_EDGE_INTRA
     1059#if LGE_EDGE_INTRA_A0070
    9421060      if ( intraPredMode != EDGE_INTRA_IDX)
    9431061      {
     
    9471065          intraPredMode += ( intraPredMode >= uiPreds[i] );
    9481066        }
    949 #if LGE_EDGE_INTRA
    950       }
    951 #endif
    952     }
    953 
    954 #if LGE_EDGE_INTRA
     1067#if LGE_EDGE_INTRA_A0070
     1068      }
     1069#endif
     1070    }
     1071
     1072#if LGE_EDGE_INTRA_A0070
    9551073    if( intraPredMode == EDGE_INTRA_IDX )
    9561074    {
     
    20962214#endif
    20972215
    2098 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA && LGE_EDGE_INTRA_DELTA_DC)
     2216#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA_A0070 && LGE_EDGE_INTRA_DELTA_DC)
    20992217Void TDecSbac::xReadExGolombLevel( UInt& ruiSymbol, ContextModel& rcSCModel  )
    21002218{
     
    23552473#endif
    23562474
    2357 #if LGE_EDGE_INTRA
     2475#if LGE_EDGE_INTRA_A0070
    23582476Void TDecSbac::xParseEdgeIntraInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    23592477{
     
    24522570}
    24532571#endif
     2572 
     2573#if RWTH_SDC_DLT_B0036
     2574Void TDecSbac::parseSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     2575{
     2576  assert( pcCU->getSlice()->getSPS()->isDepth() );
     2577 
     2578  UInt uiSymbol = 0;
     2579  UInt uiCtxSDCFlag = pcCU->getCtxSDCFlag( uiAbsPartIdx );
     2580  m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) );
     2581 
     2582  if( uiSymbol == 1 )
     2583  {
     2584    pcCU->setPartSizeSubParts(SIZE_2Nx2N, uiAbsPartIdx, uiDepth);
     2585   
     2586    pcCU->setSDCFlagSubParts( true, uiAbsPartIdx, 0, uiDepth);
     2587    pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth);
     2588    pcCU->setCbfSubParts(1, 1, 1, uiAbsPartIdx, uiDepth);
     2589  }
     2590}
     2591
     2592Void TDecSbac::parseSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     2593{
     2594  assert( pcCU->getSlice()->getSPS()->isDepth() );
     2595  assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     2596 
     2597  assert( pcCU->getSDCFlag(uiAbsPartIdx) );
     2598 
     2599  UInt uiCtx            = 0;
     2600 
     2601  UInt uiMPModeIdx      = 0;
     2602 
     2603  for(Int i=0; i<RWTH_SDC_NUM_PRED_MODES-1; i++)
     2604  {
     2605    UInt uiIsMostProb = 0;
     2606    m_pcTDecBinIf->decodeBin( uiIsMostProb, m_cSDCPredModeSCModel.get( 0, i, uiCtx ) );
     2607   
     2608    if ( uiIsMostProb == 1 )
     2609      break;
     2610   
     2611    // else: get next most probable pred mode
     2612    uiMPModeIdx = (uiMPModeIdx+1)%RWTH_SDC_NUM_PRED_MODES;
     2613  }
     2614 
     2615  Int intraPredMode = g_auiSDCPredModes[uiMPModeIdx];
     2616 
     2617#if HHI_DMM_WEDGE_INTRA
     2618  if( intraPredMode == DMM_WEDGE_FULL_IDX )          { xParseWedgeFullInfo          ( pcCU, uiAbsPartIdx, uiDepth ); }
     2619  if( intraPredMode == DMM_WEDGE_PREDDIR_IDX )       { xParseWedgePredDirInfo       ( pcCU, uiAbsPartIdx, uiDepth ); }
     2620#endif
     2621 
     2622  pcCU->setLumaIntraDirSubParts((UChar)intraPredMode, uiAbsPartIdx, uiDepth);
     2623}
     2624
     2625Void TDecSbac::parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment )
     2626{
     2627  assert( pcCU->getSlice()->getSPS()->isDepth() );
     2628  assert( pcCU->getSDCFlag(uiAbsPartIdx) );
     2629  assert( uiSegment < 2 );
     2630 
     2631  UInt uiResidual = 0;
     2632  UInt uiBit      = 0;
     2633  UInt uiAbsIdx   = 0;
     2634  UInt uiSign     = 0;
     2635  Int  iIdx       = 0;
     2636 
     2637  UInt uiMaxResidualBits  = GetBitsPerDepthValue();
     2638  assert( uiMaxResidualBits <= g_uiBitDepth );
     2639 
     2640  m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, uiSegment, 0 ) );
     2641 
     2642  if (uiResidual)
     2643  {
     2644    // decode residual sign bit
     2645    m_pcTDecBinIf->decodeBin(uiSign, m_cSDCResidualSignFlagSCModel.get( 0, uiSegment, 0 ) );
     2646   
     2647    // decode residual magnitude
     2648    for (Int i=0; i<uiMaxResidualBits; i++)
     2649    {
     2650      m_pcTDecBinIf->decodeBin(uiBit, m_cSDCResidualSCModel.get( 0, uiSegment, i ) );
     2651      uiAbsIdx |= uiBit << i;
     2652    }
     2653   
     2654    uiAbsIdx += 1;
     2655    iIdx =(Int)(uiSign ? -1 : 1)*uiAbsIdx;
     2656  }
     2657 
     2658  pcCU->setSDCSegmentDCOffset(iIdx, uiSegment, uiAbsPartIdx);
     2659}
     2660#endif
    24542661
    24552662//! \}
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r100 r189  
    126126  Void  parseSaoOffset            (SaoLcuParam* psSaoLcuParam);
    127127#endif
     128 
     129#if RWTH_SDC_DLT_B0036
     130  Void parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     131  Void parseSDCPredMode    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     132  Void parseSDCResidualData     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
     133#endif
    128134private:
    129135  Void  xReadUnarySymbol    ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset );
     
    146152#endif
    147153 
    148 #if LGE_EDGE_INTRA
     154#if LGE_EDGE_INTRA_A0070
    149155  Void xParseEdgeIntraInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    150156#endif
     
    166172
    167173  Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     174#if LGE_ILLUCOMP_B0045
     175  Void parseICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     176#endif
    168177  Void parseSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    169178  Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
     
    207216  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    208217  ContextModel3DBuffer m_cCUSkipFlagSCModel;
     218#if LGE_ILLUCOMP_B0045
     219  ContextModel3DBuffer m_cCUICFlagSCModel;
     220#endif
    209221  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
    210222  ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
     
    257269  ContextModel3DBuffer m_cDmmDataSCModel;
    258270#endif
    259 #if LGE_EDGE_INTRA
     271#if LGE_EDGE_INTRA_A0070
    260272  ContextModel3DBuffer m_cEdgeIntraSCModel;
    261273#if LGE_EDGE_INTRA_DELTA_DC
     
    263275#endif
    264276#endif
     277 
     278#if RWTH_SDC_DLT_B0036
     279  ContextModel3DBuffer m_cSDCFlagSCModel;
     280 
     281  ContextModel3DBuffer m_cSDCResidualFlagSCModel;
     282  ContextModel3DBuffer m_cSDCResidualSignFlagSCModel;
     283  ContextModel3DBuffer m_cSDCResidualSCModel;
     284 
     285  ContextModel3DBuffer m_cSDCPredModeSCModel;
     286#endif
    265287};
    266288
Note: See TracChangeset for help on using the changeset viewer.