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


Ignore:
Timestamp:
4 Aug 2014, 11:36:05 (11 years ago)
Author:
tech
Message:

Merged 11.2-dev0@1038.

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

Legend:

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

    r976 r1039  
    10511051Void TDecCavlc::parseSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )
    10521052{
     1053#if !MTK_I0099_VPS_EX2
    10531054  UInt uiCode;
    10541055#if H_3D_QTLPC
     
    10611062    pcSPS->setUsePC( uiCode );
    10621063  }
     1064#endif
    10631065#endif
    10641066}
     
    17561758{
    17571759  UInt uiCode;
     1760#if SEC_VPS_CLEANUP_I0090
     1761  for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
     1762#else
    17581763  for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ )
     1764#endif
    17591765  {
    17601766#if H_3D_ARP
     
    17651771    pcVPS->setSubPULog2Size(i, 0);
    17661772#endif
     1773#if !SEC_VPS_CLEANUP_I0090
    17671774    if ( i != 0 )
    1768     {
     1775#endif
     1776    {
     1777#if MTK_I0099_VPS_EX2
     1778      READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
     1779#if SEC_HLS_CLEANUP_I0100
     1780      READ_FLAG( uiCode, "iv_mv_scaling_flag[i]");       pcVPS->setIvMvScalingFlag         ( i, uiCode == 1 ? true : false );
     1781#endif
     1782#endif
    17691783      if( !( pcVPS->getDepthId( i ) == 1 ) )
    17701784      {
    17711785#if H_3D_IV_MERGE
     1786#if !MTK_I0099_VPS_EX2
    17721787        READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
     1788#endif
    17731789        if( !pcVPS->getNumDirectRefLayers(i) )
    17741790        {
     
    18021818      else
    18031819      {
     1820#if !MTK_I0099_VPS_EX2
    18041821#if H_3D_IV_MERGE
    18051822        if(i!=1)
     
    18181835        }
    18191836#endif
     1837#endif
    18201838#if H_3D_IV_MERGE
    18211839        READ_FLAG( uiCode, "mpi_flag[i]" );             pcVPS->setMPIFlag( i, uiCode == 1 ? true : false );
    18221840#endif
     1841#if MTK_I0099_VPS_EX2
     1842        READ_UVLC (uiCode, "log2_mpi_sub_PU_size_minus3[i]");     pcVPS->setSubPUMPILog2Size(i, uiCode+3);
     1843#endif
    18231844        READ_FLAG( uiCode, "vps_depth_modes_flag[i]" );             pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false );
    1824         //          READ_FLAG( uiCode, "lim_qt_pred_flag[i]");                  pcVPS->setLimQtPreFlag     ( i, uiCode == 1 ? true : false );
     1845#if SEPARATE_FLAG_I0085
     1846        READ_FLAG( uiCode, "ivp_flag[i]" );                   pcVPS->setIVPFlag( i, uiCode == 1 ? true : false );
     1847#endif
     1848#if MTK_I0099_VPS_EX2
     1849        READ_FLAG( uiCode, "lim_qt_pred_flag[i]");                  pcVPS->setLimQtPredFlag     ( i, uiCode == 1 ? true : false );
     1850#endif
    18251851#if H_3D_INTER_SDC
    18261852            READ_FLAG( uiCode, "depth_inter_SDC_flag" );              pcVPS->setInterSDCFlag( i, uiCode ? true : false );
     
    18351861
    18361862  READ_UVLC( uiCamParPrecision, "cp_precision" );
     1863#if SEC_VPS_CLEANUP_I0090
     1864  for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++)
     1865#else
    18371866  for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
     1867#endif
    18381868  {
    18391869    pcVPS->setCamParPresent         ( viewIndex, false );
     
    18571887    }
    18581888  }
     1889#if !MTK_I0099_VPS_EX2
    18591890  READ_UVLC (uiCode, "log2_sub_PU_MPI_size_minus3");              pcVPS->setSubPUMPILog2Size( uiCode + 3 );
     1891#endif
     1892#if !SEC_HLS_CLEANUP_I0100
    18601893  READ_FLAG( uiCode, "iv_mv_scaling_flag");                       pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );
     1894#endif
    18611895}
    18621896#endif
     
    24592493    }
    24602494#if H_3D_IC
     2495#if SEC_HLS_CLEANUP_I0100
     2496    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 )
     2497#else
    24612498    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth())
     2499#endif
    24622500    {
    24632501      UInt uiCodeTmp = 0;
     
    24712509        rpcSlice->setIcSkipParseFlag( uiCodeTmp );
    24722510      }
     2511    }
     2512#endif
     2513#if MTK_SINGLE_DEPTH_MODE_I0095
     2514    if(rpcSlice->getIsDepth())
     2515    {
     2516      UInt uiCodeTmp = 0;
     2517      READ_FLAG( uiCodeTmp, "slice_enable_single_depth_mode" );
     2518      rpcSlice->setApplySingleDepthMode(uiCodeTmp);
    24732519    }
    24742520#endif
     
    28432889  assert(0);
    28442890}
    2845 
     2891#if MTK_SINGLE_DEPTH_MODE_I0095
     2892Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
     2893{
     2894  assert(0);
     2895}
     2896#endif
    28462897Void TDecCavlc::parseCUTransquantBypassFlag( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
    28472898{
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r976 r1039  
    119119 
    120120  Void  parseSkipFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     121#if MTK_SINGLE_DEPTH_MODE_I0095
     122  Void  parseSingleDepthMode        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     123#endif 
    121124  Void  parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    122125  Void parseMergeFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r976 r1039  
    420420    Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    421421    memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     422#if !FIX_TICKET_79
    422423    InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
     424#endif
    423425#if H_3D_SPIVMP
    424426    Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
     
    432434    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    433435    m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
     436#if !FIX_TICKET_79
    434437      , inheritedVSPDisInfo
     438#endif
    435439#if H_3D_SPIVMP
    436440      , pcMvFieldSP, puhInterDirSP
     
    453457#endif
    454458#endif
    455 #if H_3D_VSP
     459#if H_3D_VSP && !FIX_TICKET_79
    456460    if(vspFlag[uiMergeIndex])
    457461    {
     
    542546    return;
    543547  }
    544 
     548#if MTK_SINGLE_DEPTH_MODE_I0095
     549  m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
     550  if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
     551  {
     552#endif
    545553  m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
    546554  m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );
     
    572580  m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP );
    573581  setdQPFlag( bCodeDQP );
     582#if MTK_SINGLE_DEPTH_MODE_I0095
     583  }
     584#endif
    574585  xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    575586#if H_3D_IV_MERGE
     
    671682      break;
    672683    case MODE_INTRA:
     684#if MTK_SINGLE_DEPTH_MODE_I0095
     685      if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) )
     686        xReconIntraSingleDepth( m_ppcCU[uiDepth], 0, uiDepth );
     687#if H_3D_DIM_SDC
     688      else if( m_ppcCU[uiDepth]->getSDCFlag(0) )
     689        xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
     690#endif
     691      else
     692#else
    673693#if H_3D_DIM_SDC
    674694      if( m_ppcCU[uiDepth]->getSDCFlag(0) )
    675695        xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
    676696      else
     697#endif
    677698#endif
    678699      xReconIntraQT( m_ppcCU[uiDepth], uiDepth );
     
    709730  }
    710731}
    711 
     732#if MTK_SINGLE_DEPTH_MODE_I0095
     733Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     734{
     735  UInt uiWidth        = pcCU->getWidth  ( 0 );
     736  UInt uiHeight       = pcCU->getHeight ( 0 );
     737
     738  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
     739
     740  UInt    uiStride    = pcRecoYuv->getStride  ();
     741  Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
     742
     743
     744  AOF( uiWidth == uiHeight );
     745  AOF( uiAbsPartIdx == 0 );
     746
     747  //construction of depth candidates
     748  Pel testDepth;
     749  Pel DepthNeighbours[5];
     750  Int index =0;
     751  for( Int i = 0; (i < 5) && (index<MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE) ; i++ )
     752  {
     753    if(!pcCU->getNeighDepth (0, uiAbsPartIdx, &testDepth, i))
     754    {
     755      continue;
     756    }
     757    DepthNeighbours[index]=testDepth;
     758    index++;
     759    for(Int j=0;j<index-1;j++)
     760    {
     761     if( (DepthNeighbours[index-1]==DepthNeighbours[j]) )
     762     {
     763       index--;
     764       break;
     765     }
     766    }
     767  }
     768
     769  if(index==0)
     770  {
     771    DepthNeighbours[index]=1<<(g_bitDepthY-1);
     772    index++;
     773  }
     774
     775  if(index==1)
     776  {
     777    DepthNeighbours[index]=ClipY(DepthNeighbours[0] + 1 );
     778    index++;
     779  }
     780
     781  for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     782  {
     783    for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     784    {
     785      piReco[ uiX ] =DepthNeighbours[(Int)pcCU->getSingleDepthValue(uiAbsPartIdx)];
     786    }
     787    piReco     += uiStride;
     788  }
     789
     790  // clear UV
     791  UInt  uiStrideC     = pcRecoYuv->getCStride();
     792  Pel   *pRecCb       = pcRecoYuv->getCbAddr();
     793  Pel   *pRecCr       = pcRecoYuv->getCrAddr();
     794
     795  for (Int y=0; y<uiHeight/2; y++)
     796  {
     797    for (Int x=0; x<uiWidth/2; x++)
     798    {
     799      pRecCb[x] = 1<<(g_bitDepthC-1);
     800      pRecCr[x] = 1<<(g_bitDepthC-1);
     801    }
     802
     803    pRecCb += uiStrideC;
     804    pRecCr += uiStrideC;
     805  }
     806}
     807#endif
    712808#if H_3D_INTER_SDC
    713809Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    832928 
    833929  // reconstruct final prediction signal by combining both segments
     930#if SHARP_DBBP_SIMPLE_FLTER_I0109
     931  m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0), 0, ePartSize);
     932#else
    834933  m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0));
     934#endif
    835935 
    836936  // inter recon
     
    12061306  {
    12071307    Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
    1208    
     1308
     1309#if SHARP_DMM1_I0110
     1310    WedgeList* pacWedgeList  = pcCU->isDMM1UpscaleMode(uiWidth) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] :  &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
     1311#else
    12091312    WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
     1313#endif
    12101314    TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
    1211    
     1315
    12121316    uiNumSegments = 2;
     1317
     1318#if SHARP_DMM1_I0110
     1319    pbMask       = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern();
     1320    uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride();
     1321#else
    12131322    pbMask = pcWedgelet->getPattern();
    12141323    uiMaskStride = pcWedgelet->getStride();
     1324#endif
    12151325  }
    12161326  if( getDimType( uiLumaPredMode ) == DMM4_IDX )
  • trunk/source/Lib/TLibDecoder/TDecCu.h

    r872 r1039  
    123123  Void setdQPFlag               ( Bool b )                { m_bDecodeDQP = b;           }
    124124  Void xFillPCMBuffer           (TComDataCU* pCU, UInt depth);
     125#if MTK_SINGLE_DEPTH_MODE_I0095
     126  Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     127#endif
    125128#if H_3D_DIM_SDC
    126129  Void xReconIntraSDC           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r976 r1039  
    5252  m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
    5353}
    54 
     54#if MTK_SINGLE_DEPTH_MODE_I0095
     55Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     56{
     57  if ( !pcCU->getSlice()->getIsDepth() )
     58  {
     59    return;
     60  }
     61  if(!pcCU->getSlice()->getApplySingleDepthMode())
     62  {
     63     return;
     64  }
     65  m_pcEntropyDecoderIf->parseSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
     66}
     67#endif
    5568Void TDecEntropy::decodeCUTransquantBypassFlag(TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    5669{
     
    140153#if H_3D_DBBP
    141154
     155#if SEC_DBBP_EXPLICIT_SIG_I0077
     156#if SEC_DBBP_DISALLOW_8x8_I0078
     157  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 )
     158#else
     159  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) )
     160#endif
     161#else
     162#if SEC_DBBP_DISALLOW_8x8_I0078
     163  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getWidth(uiAbsPartIdx) > 8 )
     164#else
    142165  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) )
     166#endif
     167#endif
    143168  {
    144169    decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);
    145    
     170#if !SEC_DBBP_EXPLICIT_SIG_I0077   
    146171    if( pcCU->getDBBPFlag(uiAbsPartIdx) )
    147172    {
     
    167192      pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx+uiPUOffset, 1, uiDepth);
    168193    }
     194#endif
    169195  }
    170196#endif
     
    285311          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    286312          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     313#if !FIX_TICKET_79
    287314          InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
     315#endif
    288316#if H_3D_SPIVMP
    289317          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
     
    292320          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    293321          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
     322#if !FIX_TICKET_79
    294323            , inheritedVSPDisInfo
     324#endif
    295325#if H_3D_SPIVMP
    296326            , pcMvFieldSP, puhInterDirSP
     
    304334          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    305335
     336#if !FIX_TICKET_79
    306337          if(vspFlag[uiMergeIndex])
    307338          {
    308339            pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth);
    309340          }
     341#endif
    310342#else
    311343#if H_3D
     
    328360        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    329361        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     362#if !FIX_TICKET_79
    330363        InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
     364#endif
    331365#if H_3D_SPIVMP
    332366        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
     
    335369        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    336370        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
     371#if !FIX_TICKET_79
    337372          , inheritedVSPDisInfo
     373#endif
    338374#if H_3D_SPIVMP
    339375          , pcMvFieldSP, puhInterDirSP
     
    346382          ,numValidMergeCand );
    347383        pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
     384#if !FIX_TICKET_79
    348385        if(vspFlag[uiMergeIndex])
    349386        {
    350387          pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth);
    351388        }
     389#endif
    352390#else
    353391#if H_3D
     
    447485#endif
    448486    }
    449 #if H_3D_VSP
     487#if H_3D_VSP && !FIX_TICKET_75
    450488    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == 0))
    451489#else
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r976 r1039  
    8989public:
    9090  virtual Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     91#if MTK_SINGLE_DEPTH_MODE_I0095
     92  virtual Void parseSingleDepthMode       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     93#endif
    9194  virtual Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    9295  virtual Void parseSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     
    176179  Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    177180  Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     181#if MTK_SINGLE_DEPTH_MODE_I0095
     182  Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;
     183#endif
    178184  Void decodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    179185  Void decodeMergeFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
  • trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r976 r1039  
    5252, m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels )
    5353, m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     54#if MTK_SINGLE_DEPTH_MODE_I0095
     55, m_cCUSingleDepthFlagSCModel        ( 1,             1,               NUM_SINGLEDEPTH_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     56, m_cSingleDepthValueSCModel         ( 1,             1,               NUM_SINGLE_DEPTH_VALUE_DATA_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
     57#endif
    5458, m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        , m_contextModels + m_numContextModels, m_numContextModels)
    5559, m_cCUMergeIdxExtSCModel     ( 1,             1,               NUM_MERGE_IDX_EXT_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
     
    132136  m_cCUSplitFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    133137  m_cCUSkipFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SKIP_FLAG );
     138#if MTK_SINGLE_DEPTH_MODE_I0095
     139  m_cCUSingleDepthFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG );
     140  m_cSingleDepthValueSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     141#endif
    134142  m_cCUMergeFlagExtSCModel.initBuffer    ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT );
    135143  m_cCUMergeIdxExtSCModel.initBuffer     ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT );
     
    199207  m_cCUSplitFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG );
    200208  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
     209#if MTK_SINGLE_DEPTH_MODE_I0095
     210  m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
     211  m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     212#endif
    201213  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT );
    202214  m_cCUMergeIdxExtSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT );
     
    420432#endif
    421433
     434#if !FIX_TICKET_76
    422435#if H_3D_DIM_SDC
    423436Void TDecSbac::xParseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment )
     
    499512#endif
    500513#endif
    501 
     514#endif
    502515/** Parse I_PCM information.
    503516 * \param pcCU
     
    636649#endif
    637650}
    638 
     651#if MTK_SINGLE_DEPTH_MODE_I0095
     652Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     653{
     654  pcCU->setSingleDepthFlagSubParts( false,        uiAbsPartIdx, uiDepth );
     655  UInt uiSymbol = 0;
     656  m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSingleDepthFlagSCModel.get( 0, 0, 0 ) );
     657  if( uiSymbol )
     658  {
     659    pcCU->setSingleDepthFlagSubParts( true,        uiAbsPartIdx, uiDepth );
     660    pcCU->setSkipFlagSubParts( false,        uiAbsPartIdx, uiDepth );
     661    pcCU->setSDCFlagSubParts( false,        uiAbsPartIdx, uiDepth );
     662    pcCU->setPredModeSubParts( MODE_INTRA,  uiAbsPartIdx, uiDepth );
     663    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
     664    pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth );
     665    pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
     666    pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
     667    pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth);
     668    pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth);
     669
     670    UInt absValDeltaDC = 0;
     671
     672    UInt uiUnaryIdx = 0;
     673    UInt uiNumCand = MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE;
     674    if ( uiNumCand > 1 )
     675    {
     676      for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx )
     677      {
     678        UInt uiSymbol2 = 0;
     679        if ( uiUnaryIdx==0 )
     680        {
     681          m_pcTDecBinIf->decodeBin( uiSymbol2, m_cSingleDepthValueSCModel.get( 0, 0, 0 ) );
     682        }
     683        else
     684        {
     685          m_pcTDecBinIf->decodeBinEP( uiSymbol2);
     686        }
     687        if( uiSymbol2 == 0 )
     688        {
     689          break;
     690        }
     691      }
     692    }
     693    absValDeltaDC = uiUnaryIdx;
     694    pcCU->setSingleDepthValueSubParts((Pel)absValDeltaDC,uiAbsPartIdx, 0, uiDepth);
     695  }
     696}
     697
     698#endif
    639699/** parse merge flag
    640700 * \param pcCU
     
    721781  Bool bParseSplitFlag    = true;
    722782
     783#if MTK_I0099_VPS_EX2
     784  TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
     785  Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
     786#else
    723787  TComSPS *sps            = pcCU->getPic()->getSlice(0)->getSPS();
     788#endif
    724789  TComPic *pcTexture      = pcCU->getSlice()->getTexturePic();
    725790  Bool bDepthMapDetect    = (pcTexture != NULL);
     
    728793  Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
    729794
     795#if MTK_I0099_VPS_EX2
     796  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag)
     797#else
    730798  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC())
     799#endif
    731800  {
    732801    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     
    770839#if H_3D_QTLPC
    771840  Bool bParsePartSize    = true;
     841#if MTK_I0099_VPS_EX2
     842  TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
     843  Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
     844#else
    772845  TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
     846#endif
    773847  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
    774848  Bool bDepthMapDetect   = (pcTexture != NULL);
     
    779853  Bool depthDependent = false;
    780854  UInt uiTexturePart = uiMode;
     855#if MTK_I0099_VPS_EX2
     856  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag )
     857#else
    781858  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC())
     859#endif
    782860  {
    783861    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     
    9901068  {
    9911069#if H_3D_DIM
     1070#if SEPARATE_FLAG_I0085
     1071    if( pcCU->getSlice()->getVpsDepthModesFlag() || pcCU->getSlice()->getIVPFlag() )
     1072#else
    9921073    if( pcCU->getSlice()->getVpsDepthModesFlag() )
     1074#endif
    9931075    {
    9941076      parseIntraDepth( pcCU, absPartIdx+partOffset*j, depth );
     
    11321214  if( uiIsDimMode )
    11331215  {
     1216#if SEPARATE_FLAG_I0085
     1217    if( pcCU->getSlice()->getVpsDepthModesFlag() && pcCU->getSlice()->getIVPFlag() )
     1218    {
     1219      m_pcTDecBinIf->decodeBin( uiSymbol, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) );
     1220      if( !uiSymbol )
     1221      {
     1222#if HS_DMM_SIGNALLING_I0120
     1223        pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth );
     1224#else
     1225        pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth );
     1226#endif
     1227      }
     1228      else
     1229      {
     1230#if HS_DMM_SIGNALLING_I0120
     1231        pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth );
     1232#else
     1233        pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth );
     1234#endif
     1235      }
     1236    }
     1237    else if ( pcCU->getSlice()->getVpsDepthModesFlag() )
     1238    {
     1239#if HS_DMM_SIGNALLING_I0120
     1240      pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth );
     1241#else
     1242      pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth );
     1243#endif
     1244    }
     1245    else if( pcCU->getSlice()->getIVPFlag() )
     1246    {
     1247#if HS_DMM_SIGNALLING_I0120
     1248      pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth );
     1249#else
     1250      pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth );
     1251#endif
     1252    }
     1253#else
    11341254    m_pcTDecBinIf->decodeBin( uiSymbol, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) );
    11351255    if( !uiSymbol )
    11361256    {
     1257#if HS_DMM_SIGNALLING_I0120
     1258      pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth );
     1259#else
    11371260      pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth );
     1261#endif
    11381262    }
    11391263    else
    11401264    {
     1265#if HS_DMM_SIGNALLING_I0120
     1266      pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth );
     1267#else
    11411268      pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth );
    1142     }
     1269#endif
     1270    }
     1271#endif
    11431272  }
    11441273}
     
    20532182  }
    20542183
     2184#if HS_DMM_SIGNALLING_I0120
     2185  UInt symbol = 1;
     2186  UInt uiNumSegments = isDimMode( pcCU->getLumaIntraDir( absPartIdx ) ) ? 2 : 1;
     2187#else
    20552188  UInt symbol = 0;
    20562189  UInt uiNumSegments = 0;
    2057 
     2190#endif
     2191
     2192#if HS_DMM_SIGNALLING_I0120
     2193  if( pcCU->isIntra( absPartIdx ) && pcCU->getSDCFlag( absPartIdx ))
     2194  {
     2195#else
    20582196  if( pcCU->isIntra( absPartIdx ) )
    20592197  {
    20602198    UInt dir     = pcCU->getLumaIntraDir( absPartIdx );
    20612199    uiNumSegments = isDimMode( dir ) ? 2 : 1;
     2200#endif
    20622201    m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get( 0, 0, 0 ) );
     2202#if !HS_DMM_SIGNALLING_I0120
    20632203    if( pcCU->getSDCFlag( absPartIdx ) )
    20642204    {
     2205#endif
    20652206      assert( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N );
    20662207      pcCU->setTrIdxSubParts( 0, absPartIdx, depth );
    20672208      pcCU->setCbfSubParts( 1, 1, 1, absPartIdx, depth );
    20682209    }
     2210#if !HS_DMM_SIGNALLING_I0120
    20692211    else
    20702212    {
     
    20772219    symbol = 1;
    20782220  }
     2221#endif
    20792222
    20802223
     
    21382281  m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) );
    21392282 
     2283#if SEC_DBBP_EXPLICIT_SIG_I0077
     2284  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
     2285  AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
     2286  UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
     2287  pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx, 0, uiDepth);
     2288  pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx+uiPUOffset, 1, uiDepth);
     2289#else
    21402290  if( uiSymbol )
    21412291  {
     
    21442294    pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx + 2*uiCurrPartNumQ, 1, uiDepth);
    21452295  }
     2296#endif
    21462297}
    21472298#endif
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r976 r1039  
    129129 
    130130  Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     131#if MTK_SINGLE_DEPTH_MODE_I0095 
     132  Void parseSingleDepthMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     133#endif 
    131134  Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    132135  Void parseSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    179182  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    180183  ContextModel3DBuffer m_cCUSkipFlagSCModel;
     184#if MTK_SINGLE_DEPTH_MODE_I0095
     185  ContextModel3DBuffer m_cCUSingleDepthFlagSCModel;
     186  ContextModel3DBuffer m_cSingleDepthValueSCModel;
     187#endif
    181188  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
    182189  ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
Note: See TracChangeset for help on using the changeset viewer.