Ignore:
Timestamp:
31 Dec 2012, 18:33:14 (12 years ago)
Author:
mitsubishi-htm
Message:

A final release, as planned

  • Migrate to HTM 5.1
  • For VC project files, only VC9 file is updated
  • To be used as an additional anchor for CE1.h for 3rd JCTVC meeting at Geneva
Location:
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/NALread.cpp

    r165 r213  
    132132#endif
    133133
     134#if QC_MVHEVC_B0046
     135  //nalu.m_layerId    = bs.read(6);
     136  nalu.m_layerId    = bs.read(5);
     137  nalu.m_temporalId = bs.read(3) - 1;
     138#else
    134139#if H0388
    135140  nalu.m_temporalId = bs.read(3);
     
    145150  if ( nalu.m_temporalId )
    146151  {
     152#if QC_REM_IDV_B0046
     153    assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR);
     154#else
    147155    assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDV );
     156#endif
    148157  }
    149158#endif
     
    154163  case NAL_UNIT_CODED_SLICE_IDR:
    155164#if H0566_TLA
     165#if !QC_REM_IDV_B0046
    156166  case NAL_UNIT_CODED_SLICE_IDV:
     167#endif
    157168  case NAL_UNIT_CODED_SLICE_CRA:
    158169  case NAL_UNIT_CODED_SLICE_TLA:
     
    175186      if (nalu.m_temporalId == 0)
    176187      {
     188#if QC_REM_IDV_B0046
     189        assert(nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR);
     190#else
    177191        assert(nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDV );
     192#endif
    178193      }
    179194      else
     
    190205  }
    191206#endif
     207#endif
    192208}
    193209//! \}
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r193 r213  
    13381338  }
    13391339}
    1340 
     1340#if QC_MVHEVC_B0046
     1341Void TDecCavlc::parseVPS(TComVPS* pcVPS)
     1342{
     1343  UInt  uiCode;
     1344  READ_CODE( 4, uiCode,  "video_parameter_set_id"   );       pcVPS->setVPSId( uiCode );
     1345  READ_FLAG( uiCode,     "temporal_id_nesting_flag" );       pcVPS->setTemporalNestingFlag( uiCode ? true:false );
     1346  READ_CODE( 2, uiCode,  "vps_reserved_zero_2bits" );         assert( !uiCode );
     1347  READ_CODE( 6, uiCode,  "vps_max_layers_minus1" );               pcVPS->setMaxLayers( uiCode + 1 );
     1348  READ_CODE( 3, uiCode,  "vps_max_sub_layers_minus1" );      pcVPS->setMaxTLayers( uiCode + 1 );
     1349  READ_CODE( 12, uiCode, "vps_extension_offset"      );      assert( !uiCode );
     1350  for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++)
     1351  {
     1352    READ_UVLC( uiCode,  "max_dec_pic_buffering[i]" );     pcVPS->setMaxDecPicBuffering( uiCode, i );
     1353    READ_UVLC( uiCode,  "num_reorder_pics[i]" );          pcVPS->setNumReorderPics( uiCode, i );
     1354    READ_UVLC( uiCode,  "max_latency_increase[i]" );      pcVPS->setMaxLatencyIncrease( uiCode, i );
     1355  }
     1356  READ_UVLC( uiCode,                 "vps_num_hrd_parameters"   ); pcVPS->setNumHRDParameters(uiCode);
     1357  assert(pcVPS->getNumHRDParameters()==0);
     1358  for ( UInt i = 0; i < pcVPS->getNumHRDParameters(); i ++)
     1359  {
     1360   //   if( i > 0 ) 
     1361    //{
     1362    //  READ_UVLC (0, "op_num_layer_id_values_minus1[ opIdx ]");
     1363    //  for( i = 0; i <= op_num_layer_id_values_minus1[ opIdx ]; i++ ) 
     1364    //    READ_UVLC(0, 6, "op_layer_id[ opIdx ][ i ]");
     1365    //} 
     1366    //hrd_parameters( i  = =  0, vps_max_sub_layers_minus1 ); 
     1367  }
     1368 
     1369  READ_CODE( 1, uiCode, "bit_equal_to_one" );             assert( uiCode );
     1370  //vps_extension_byte_alignment_reserved_one_bit
     1371  xReadVPSAlignOne();
     1372  READ_CODE( 8, uiCode, "num_additional_layer_operation_points" );     pcVPS->setNumAddiLayerOperationPoints( uiCode );
     1373  READ_CODE( 8, uiCode, "num_additional_profile_level_sets"     );     pcVPS->setNumAddiProLevelSets( uiCode);
     1374
     1375
     1376  for(UInt i=0; i <= pcVPS->getMaxLayers()-1; i++)
     1377  {
     1378    READ_CODE( 4,  uiCode,             "num_types_zero_4bits[i]" );   assert( !uiCode );
     1379    READ_CODE( 4,  uiCode,             "type_zero_4bits[i]"      );   assert( !uiCode );
     1380    READ_CODE( 8,  uiCode,             "view_id[i]" );                pcVPS->setViewId(uiCode, i);
     1381    // WRITE_SVLC( pcVPS->getViewOrderIdx(i),                  "view_order_idx[i]" );
     1382    if(i)
     1383    {
     1384      READ_CODE( 6, uiCode,  "num_direct_ref_layers[ i ]" );    pcVPS->setNumDirectRefLayer(uiCode, i);
     1385      for (UInt j = 0; j< pcVPS->getNumDirectRefLayer(i); j++)
     1386      {
     1387        READ_CODE( 6, uiCode, "ref_layer_id[i][j]" );         pcVPS->setDirectRefLayerId (uiCode, i, j);
     1388      }
     1389    }
     1390  }
     1391  for( UInt i=1; i<=pcVPS->getNumAddiProLevelSets(); i++)
     1392  {
     1393    //profile_tier_level
     1394  }
     1395  for( UInt i=1; i<= pcVPS->getNumAddiLayerOperationPoints(); i++)
     1396  {   
     1397    if(pcVPS->getMaxLayers() == 3)
     1398    {
     1399      pcVPS->setNumOpLayerIdMinus1((i < pcVPS->getNumAddiLayerOperationPoints() ? 1: 2), (i-1));
     1400    }
     1401    else if( i==1 )
     1402    {
     1403      assert(pcVPS->getNumAddiLayerOperationPoints()==1);
     1404      pcVPS->setNumOpLayerIdMinus1(pcVPS->getMaxLayers()-1, (i-1));
     1405    }
     1406    READ_UVLC( uiCode,           "op_num_layer_id_values_minus1[ opIdx ]" ); pcVPS->setNumOpLayerIdMinus1(uiCode, i-1);
     1407    for(UInt j = 0; j <= pcVPS->getNumOpLayerIdMinus1(i-1); j++ )
     1408    {
     1409      READ_UVLC( uiCode,           "op_layer_id[ opIdx ][ i ]" ); pcVPS->setNumOpLayerId(uiCode, i-1, j);
     1410    }
     1411    if (pcVPS->getNumAddiProLevelSets())
     1412    {
     1413      //profile_level_idx[ i ]
     1414    }
     1415  }
     1416  return;
     1417}
     1418#else
    13411419#if VIDYO_VPS_INTEGRATION
    13421420Void TDecCavlc::parseVPS(TComVPS* pcVPS)
     
    13891467
    13901468#endif
    1391 
     1469#endif
    13921470#if HHI_MPI
    13931471Void TDecCavlc::parseSPS(TComSPS* pcSPS, Bool bIsDepth)
     
    14011479 
    14021480  UInt  uiCode;
     1481#if !QC_MVHEVC_B0046
    14031482  Int   iCode;
    1404 
     1483#endif
    14051484  READ_CODE( 8,  uiCode, "profile_idc" );                        pcSPS->setProfileIdc( uiCode );
    14061485  READ_CODE( 8,  uiCode, "reserved_zero_8bits" );
     
    16451724#endif
    16461725  READ_FLAG( uiCode, "sps_extension_flag");
     1726#if !QC_MVHEVC_B0046
    16471727  if(uiCode)
    16481728  {
     
    16741754    }
    16751755#endif
    1676 
    1677     READ_FLAG( uiCode, "base_view_flag" );
     1756#if OL_QTLIMIT_PREDCODING_B0068
     1757    if( bIsDepth )
     1758    {
     1759      READ_FLAG( uiCode, "use_qtlpc_flag" );
     1760      pcSPS->setUseQTLPC( uiCode );
     1761    }
     1762#endif
     1763   
     1764#if RWTH_SDC_DLT_B0036
     1765    if( bIsDepth )
     1766    {
     1767      READ_FLAG( uiCode, "use_dlt_flag" );
     1768      pcSPS->setUseDLT( uiCode );
     1769      if( pcSPS->getUseDLT() )
     1770      {
     1771        // decode mapping
     1772        UInt uiNumDepthValues;
     1773        // parse number of values in DLT
     1774        xReadUvlc( uiNumDepthValues );
     1775       
     1776        // parse actual DLT values
     1777        UInt* auiIdx2DepthValue = (UInt*) calloc(uiNumDepthValues, sizeof(UInt));
     1778        for(UInt d=0; d<uiNumDepthValues; d++)
     1779        {
     1780          xReadUvlc( uiCode );
     1781          auiIdx2DepthValue[d] = uiCode;
     1782        }
     1783       
     1784        pcSPS->setDepthLUTs(auiIdx2DepthValue, uiNumDepthValues);
     1785       
     1786        // clean memory
     1787        free(auiIdx2DepthValue);
     1788      }
     1789      else
     1790        pcSPS->setDepthLUTs();
     1791    }
     1792#endif
     1793
     1794    READ_FLAG( uiCode, "base_view_flag" );
    16781795    if( uiCode )
    16791796    { // baseview SPS -> set standard values
     
    16851802    pcSPS->setMultiviewResPredMode  ( 0 );
    16861803#endif
     1804#if VSP_N
     1805    pcSPS->setIsFirstInView( true );
     1806#endif
    16871807    }
    16881808    else
     
    16911811      if( uiCode )
    16921812      {
     1813#if VSP_N
     1814        UInt  uiViewId, uiCamParPrecision = 0, uiCamParPresent = 0;
     1815        Int   iVOI;
     1816        Bool  bCamParSlice = false;
     1817        READ_UVLC( uiViewId, "view_id" );
     1818        READ_SVLC(     iVOI, "view_order_idx" );
     1819        if( uiViewId )
     1820        {
     1821          READ_FLAG( uiCamParPresent, "camera_parameter_present_flag" );
     1822          pcSPS->setIsFirstInView( (Bool)uiCamParPresent );
     1823          if( uiCamParPresent )
     1824          {
     1825            READ_UVLC( uiCamParPrecision, "camera_parameter_precision" );
     1826            READ_FLAG( uiCode, "camera_parameter_in_slice_header" );    bCamParSlice = ( uiCode == 1 );
     1827            if( !bCamParSlice )
     1828            {
     1829              for( UInt uiBaseId = 0; uiBaseId < uiViewId; uiBaseId++ )
     1830              {
     1831                READ_SVLC( iCode, "coded_scale" );   m_aaiTempScale [ uiBaseId ][ uiViewId ] = iCode;
     1832                READ_SVLC( iCode, "coded_offset" );   m_aaiTempOffset[ uiBaseId ][ uiViewId ] = iCode;
     1833                READ_SVLC( iCode, "inverse_coded_scale_plus_coded_scale" );   m_aaiTempScale [ uiViewId ][ uiBaseId ] = iCode - m_aaiTempScale [ uiBaseId ][ uiViewId ];
     1834                READ_SVLC( iCode, "inverse_coded_offset_plus_coded_offset" );   m_aaiTempOffset[ uiViewId ][ uiBaseId ] = iCode - m_aaiTempOffset[ uiBaseId ][ uiViewId ];
     1835              }
     1836            }
     1837            pcSPS->initMultiviewSPSFlex( uiViewId, iVOI, true, (Bool)uiCamParPresent, uiCamParPrecision, bCamParSlice, (uiCamParPresent && !bCamParSlice ? m_aaiTempScale : NULL ), (uiCamParPresent && !bCamParSlice ? m_aaiTempOffset : NULL ) );
     1838          }
     1839          else
     1840          {
     1841            pcSPS->initMultiviewSPSDepth( uiViewId, iVOI );
     1842          }
     1843        }
     1844        else
     1845        {
     1846          pcSPS->initMultiviewSPSDepth( uiViewId, iVOI );
     1847        }
     1848#if DEPTH_MAP_GENERATION
     1849        pcSPS->setPredDepthMapGeneration( uiViewId, true );
     1850#endif
     1851#else
    16931852        READ_UVLC( uiCode, "view_id" );
    16941853        READ_SVLC(  iCode, "view_order_idx" );
     
    16971856        pcSPS->setPredDepthMapGeneration( uiCode, true );
    16981857#endif
     1858#endif
    16991859#if HHI_INTER_VIEW_RESIDUAL_PRED
    17001860      pcSPS->setMultiviewResPredMode  ( 0 );
     
    17031863      else
    17041864      {
    1705         UInt  uiViewId, uiCamParPrecision;
     1865        UInt  uiViewId, uiCamParPrecision = 0, uiCamParPresent = 0;
    17061866        Int   iVOI;
    1707         Bool  bCamParSlice;
     1867        Bool  bCamParSlice = false;
    17081868        READ_UVLC( uiViewId, "view_id" );  uiViewId++;
    17091869        READ_SVLC( iVOI, "view_order_idx" );
     1870#if VSP_N
     1871        READ_FLAG( uiCamParPresent, "camera_parameter_present_flag" );
     1872        pcSPS->setIsFirstInView( (Bool)uiCamParPresent );
     1873        if( uiCamParPresent )
     1874        {
     1875#endif
    17101876        READ_UVLC( uiCamParPrecision, "camera_parameter_precision" );
    17111877        READ_FLAG( uiCode, "camera_parameter_in_slice_header" );    bCamParSlice = ( uiCode == 1 );
     
    17201886          }
    17211887        }
     1888#if VSP_N
     1889          pcSPS->initMultiviewSPS( uiViewId, iVOI, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );
     1890        }
     1891        else
     1892        {
     1893          pcSPS->initMultiviewSPSFlex( uiViewId, iVOI, false );
     1894        }
     1895#else
    17221896        pcSPS->initMultiviewSPS( uiViewId, iVOI, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );
     1897#endif
    17231898
    17241899#if DEPTH_MAP_GENERATION
     
    17531928#endif
    17541929#if HHI_INTER_VIEW_RESIDUAL_PRED
    1755       pcSPS->setMultiviewResPredMode  ( uiMultiviewResPredMode );
     1930        pcSPS->setMultiviewResPredMode  ( uiMultiviewResPredMode );
    17561931#endif
    17571932      }
     
    17801955    }
    17811956  }
     1957#endif
    17821958}
    17831959
     
    18201996  UInt address;
    18211997  UInt innerAddress = 0;
     1998
     1999#if LGE_ILLUCOMP_B0045
     2000  // IC flag is on only first_slice_in_pic
     2001  if (uiCode)
     2002  {
     2003    UInt uiCodeTmp = 0;
     2004    if ( rpcSlice->getSPS()->getViewId() && !rpcSlice->getSPS()->isDepth() )
     2005    {
     2006      READ_FLAG (uiCodeTmp, "applying IC flag");
     2007    }
     2008    rpcSlice->setApplyIC(uiCodeTmp);
     2009  }
     2010#endif
     2011
    18222012  if(!uiCode)
    18232013  {
     
    18732063    }
    18742064#endif
     2065#if QC_REM_IDV_B0046
     2066#if !QC_MVHEVC_B0046
     2067  if(rpcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR && rpcSlice->getSPS()->getViewId() == 0)
     2068#else
     2069  if(rpcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR && rpcSlice->getViewId() == 0)
     2070#endif
     2071#else
    18752072    if(rpcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR)
     2073#endif
    18762074    {
    18772075      READ_UVLC( uiCode, "idr_pic_id" );  //ignored
     
    19072105      }
    19082106      rpcSlice->setPOC( iPOCmsb+iPOClsb );
    1909 
     2107#if QC_REM_IDV_B0046
     2108#if !QC_MVHEVC_B0046
     2109      if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR &&  rpcSlice->getSPS()->getViewId() && rpcSlice->getPOC() == 0 )
     2110#else
     2111      if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR &&  rpcSlice->getViewId() && rpcSlice->getPOC() == 0 )
     2112#endif
     2113#else
    19102114      if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV && rpcSlice->getPOC() == 0 )
     2115#endif
    19112116      {
    19122117        TComReferencePictureSet* rps = rpcSlice->getLocalRPS();
     
    20952300    {
    20962301#if H0412_REF_PIC_LIST_RESTRICTION
     2302#if QC_MVHEVC_B0046
     2303    if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2304#else
    20972305      if( !rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2306#endif
    20982307      {
    20992308        refPicListModification->setRefPicListModificationFlagL0( 0 );
     
    21662375    {
    21672376#if H0412_REF_PIC_LIST_RESTRICTION
     2377#if QC_MVHEVC_B0046
     2378    if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2379#else
    21682380      if( !rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2381#endif
    21692382      {
    21702383        refPicListModification->setRefPicListModificationFlagL1( 0 );
     
    22552468     
    22562469#if H0412_REF_PIC_LIST_RESTRICTION
    2257       if(rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2470#if QC_MVHEVC_B0046
     2471    if( rpcSlice->getViewId() && rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2472#else
     2473    if(rpcSlice->getSPS()->getListsModificationPresentFlag() )
     2474#endif
    22582475      {
    22592476#endif
     
    26872904}
    26882905
     2906#if LGE_ILLUCOMP_B0045
     2907Void TDecCavlc::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     2908{
     2909  assert(0);
     2910}
     2911#endif
     2912
    26892913#if FORCE_REF_VSP==1
    26902914Void TDecCavlc::parseVspFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    28993123#endif
    29003124
     3125#if RWTH_SDC_DLT_B0036
     3126Void TDecCavlc::parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     3127{
     3128  assert(0);
     3129}
     3130Void TDecCavlc::parseSDCPredMode    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     3131{
     3132  assert(0);
     3133}
     3134Void TDecCavlc::parseSDCResidualData     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart )
     3135{
     3136  assert(0);
     3137}
     3138#endif
     3139
    29013140// ====================================================================================================================
    29023141// Protected member functions
     
    29643203}
    29653204
     3205#if QC_MVHEVC_B0046
     3206/** Parse VPS alignment one bits.
     3207 * \returns Void
     3208 */
     3209Void TDecCavlc::xReadVPSAlignOne( )
     3210{
     3211  UInt uiNumberOfBits = m_pcBitstream->getNumBitsUntilByteAligned();
     3212
     3213  if(uiNumberOfBits)
     3214  {
     3215    UInt uiBits;
     3216    UInt uiSymbol;
     3217
     3218    for(uiBits = 0; uiBits < uiNumberOfBits; uiBits++)
     3219    {
     3220      xReadFlag( uiSymbol );
     3221
     3222      if(!uiSymbol)
     3223      {
     3224        printf("\nWarning! vps_extension_byte_alignment_reserved_one_bit include a non-zero value.\n");
     3225      }
     3226    }
     3227  }
     3228}
     3229#endif
    29663230/** Parse PCM alignment zero bits.
    29673231 * \returns Void
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCAVLC.h

    r166 r213  
    7575  Void  xReadFlagTr           (              UInt& rValue, const Char *pSymbolName);
    7676#endif
    77  
     77#if QC_MVHEVC_B0046
     78  Void  xReadVPSAlignOne      ();
     79#endif
    7880  Void  xReadPCMAlignZero     ();
    7981
     
    113115  Void  parseQtRootCbf      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt& uiQtRootCbf );
    114116
    115 #if VIDYO_VPS_INTEGRATION
     117#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    116118  Void  parseVPS            ( TComVPS* pcVPS );
    117119#endif
     
    142144 
    143145  Void  parseSkipFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     146#if LGE_ILLUCOMP_B0045
     147  Void  parseICFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     148#endif
    144149#if FORCE_REF_VSP==1
    145150  Void  parseVspFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    178183  Void parseDFFlag         ( UInt& ruiVal, const Char *pSymbolName );
    179184  Void parseDFSvlc         ( Int&  riVal,  const Char *pSymbolName  );
     185#if RWTH_SDC_DLT_B0036
     186  Void parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     187  Void parseSDCPredMode    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     188  Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
     189#endif
    180190protected:
    181191#if DBL_CONTROL
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCu.cpp

    r193 r213  
    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//! \{
     
    424429      }
    425430    }
     431#if LGE_ILLUCOMP_B0045
     432    m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     433#endif
    426434#if HHI_MPI
    427435    }
     
    505513  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
    506514 
     515#if LGE_ILLUCOMP_B0045
     516  m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     517#endif
     518
    507519#if HHI_INTER_VIEW_RESIDUAL_PRED
    508520  if( !pcCU->isIntra( uiAbsPartIdx ) )
     
    670682      break;
    671683    case MODE_INTRA:
     684#if RWTH_SDC_DLT_B0036
     685      if( m_ppcCU[uiDepth]->getSDCFlag(0) )
     686        xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
     687      else
     688#endif
    672689      xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
    673690      break;
     
    694711{
    695712#if HHI_MPI
     713#if FIX_MPI_B0065
     714  if( pcCU->getTextureModeDepth( 0 ) != -1 )
     715  {
     716    TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() );
     717    if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx))
     718    {
     719      PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx);
     720      pcCU->setPartSizeSubParts( partSize, 0, uiDepth );
     721    }
     722    else
     723    {
     724      pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth );
     725    }
     726  }
     727#else
    696728  if( pcCU->getTextureModeDepth( 0 ) != -1 )
    697729    pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth );
    698730#endif
     731#endif
    699732 
    700733  // inter prediction
    701734  m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] );
    702 
     735 
    703736#if HHI_MPI
    704737  if( pcCU->getTextureModeDepth( 0 ) != -1 )
     
    779812                                     m_pcPrediction->getPredicBufHeight (),
    780813                                     bAboveAvail, bLeftAvail );
    781 #if LGE_EDGE_INTRA
     814#if LGE_EDGE_INTRA_A0070
    782815  if( uiLumaPredMode >= EDGE_INTRA_IDX )
    783816  {
     
    10181051
    10191052}
     1053
     1054#if RWTH_SDC_DLT_B0036
     1055Void TDecCu::xReconIntraSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1056{
     1057  UInt uiWidth        = pcCU->getWidth  ( 0 );
     1058  UInt uiHeight       = pcCU->getHeight ( 0 );
     1059 
     1060  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
     1061  TComYuv* pcPredYuv  = m_ppcYuvReco[uiDepth];
     1062  TComYuv* pcResiYuv  = m_ppcYuvResi[uiDepth];
     1063 
     1064  UInt    uiStride    = pcRecoYuv->getStride  ();
     1065  Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
     1066  Pel*    piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
     1067  Pel*    piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
     1068 
     1069  UInt    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
     1070  Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
     1071  UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
     1072 
     1073  UInt    uiLumaPredMode    = pcCU->getLumaIntraDir     ( uiAbsPartIdx );
     1074 
     1075  AOF( uiWidth == uiHeight );
     1076  AOF( uiAbsPartIdx == 0 );
     1077  AOF( pcCU->getSDCAvailable(uiAbsPartIdx) );
     1078  AOF( pcCU->getSDCFlag(uiAbsPartIdx) );
     1079 
     1080  //===== init availability pattern =====
     1081  Bool  bAboveAvail = false;
     1082  Bool  bLeftAvail  = false;
     1083  pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
     1084  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
     1085 
     1086  //===== get prediction signal =====
     1087#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     1088  if( uiLumaPredMode >= NUM_INTRA_MODE )
     1089  {
     1090    m_pcPrediction->predIntraLumaDMM( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail, false );
     1091  }
     1092  else
     1093  {
     1094#endif
     1095    m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail );
     1096#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     1097  }
     1098#endif
     1099 
     1100  // number of segments depends on prediction mode
     1101  UInt uiNumSegments = 1; 
     1102  Bool* pbMask = NULL;
     1103  UInt uiMaskStride = 0;
     1104 
     1105  if( uiLumaPredMode == DMM_WEDGE_FULL_IDX || uiLumaPredMode == DMM_WEDGE_PREDDIR_IDX )
     1106  {
     1107    Int uiTabIdx = (uiLumaPredMode == DMM_WEDGE_FULL_IDX)?pcCU->getWedgeFullTabIdx(uiAbsPartIdx):pcCU->getWedgePredDirTabIdx(uiAbsPartIdx);
     1108   
     1109    WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];
     1110    TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
     1111   
     1112    uiNumSegments = 2;
     1113    pbMask = pcWedgelet->getPattern();
     1114    uiMaskStride = pcWedgelet->getStride();
     1115  }
     1116 
     1117  // get DC prediction for each segment
     1118  Pel apDCPredValues[2];
     1119  xAnalyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride);
     1120 
     1121  // reconstruct residual based on mask + DC residuals
     1122  Pel apDCResiValues[2];
     1123  //Pel apDCRecoValues[2];
     1124  for( UInt ui = 0; ui < uiNumSegments; ui++ )
     1125  {
     1126    Pel   pPredIdx    = GetDepthValue2Idx( apDCPredValues[ui] );
     1127    Pel   pResiIdx    = pcCU->getSDCSegmentDCOffset(ui, uiAbsPartIdx);
     1128    Pel   pRecoValue  = GetIdx2DepthValue( pPredIdx + pResiIdx );
     1129   
     1130    //apDCRecoValues[ui]  = pRecoValue;
     1131    apDCResiValues[ui]  = pRecoValue - apDCPredValues[ui];
     1132  }
     1133 
     1134  //===== reconstruction =====
     1135  Bool*pMask      = pbMask;
     1136  Pel* pPred      = piPred;
     1137  Pel* pResi      = piResi;
     1138  Pel* pReco      = piReco;
     1139  Pel* pRecIPred  = piRecIPred;
     1140 
     1141  for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     1142  {
     1143    for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     1144    {
     1145      UChar ucSegment = pMask?(UChar)pMask[uiX]:0;
     1146      assert( ucSegment < uiNumSegments );
     1147     
     1148      Pel pPredVal= apDCPredValues[ucSegment];
     1149      Pel pResiDC = apDCResiValues[ucSegment];
     1150     
     1151      pReco    [ uiX ] = Clip( pPredVal + pResiDC );
     1152      pRecIPred[ uiX ] = pReco[ uiX ];
     1153    }
     1154    pPred     += uiStride;
     1155    pResi     += uiStride;
     1156    pReco     += uiStride;
     1157    pRecIPred += uiRecIPredStride;
     1158    pMask     += uiMaskStride;
     1159  }
     1160 
     1161  // clear UV
     1162  UInt  uiStrideC     = pcPredYuv->getCStride();
     1163  Pel   *pRecCb       = pcPredYuv->getCbAddr();
     1164  Pel   *pRecCr       = pcPredYuv->getCrAddr();
     1165 
     1166  for (Int y=0; y<uiHeight/2; y++)
     1167  {
     1168    for (Int x=0; x<uiWidth/2; x++)
     1169    {
     1170      pRecCb[x] = (Pel)(128<<g_uiBitIncrement);
     1171      pRecCr[x] = (Pel)(128<<g_uiBitIncrement);
     1172    }
     1173   
     1174    pRecCb += uiStrideC;
     1175    pRecCr += uiStrideC;
     1176  }
     1177}
     1178#endif
    10201179
    10211180/** Function for deriving recontructed PU/CU Luma sample with QTree structure
     
    12831442#endif
    12841443
     1444#if RWTH_SDC_DLT_B0036
     1445Void TDecCu::xAnalyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride )
     1446{
     1447  Int iSumDepth[2];
     1448  memset(iSumDepth, 0, sizeof(Int)*2);
     1449  Int iSumPix[2];
     1450  memset(iSumPix, 0, sizeof(Int)*2);
     1451 
     1452  for (Int y=0; y<uiSize; y++)
     1453  {
     1454    for (Int x=0; x<uiSize; x++)
     1455    {
     1456      UChar ucSegment = pMask?(UChar)pMask[x]:0;
     1457      assert( ucSegment < uiNumSegments );
     1458     
     1459      iSumDepth[ucSegment] += pOrig[x];
     1460      iSumPix[ucSegment]   += 1;
     1461    }
     1462   
     1463    pOrig  += uiStride;
     1464    pMask  += uiMaskStride;
     1465  }
     1466 
     1467  // compute mean for each segment
     1468  for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ )
     1469  {
     1470    if( iSumPix[ucSeg] > 0 )
     1471      rpSegMeans[ucSeg] = iSumDepth[ucSeg] / iSumPix[ucSeg];
     1472    else
     1473      rpSegMeans[ucSeg] = 0;  // this happens for zero-segments
     1474  }
     1475}
     1476#endif
     1477
    12851478//! \}
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCu.h

    r193 r213  
    125125  Void xFillPCMBuffer           (TComDataCU* pCU, UInt absPartIdx, UInt depth);
    126126#endif
     127#if RWTH_SDC_DLT_B0036
     128  Void  xAnalyzeSegmentsSDC       ( Pel* pOrig,
     129                                   UInt uiStride,
     130                                   UInt uiSize,
     131                                   Pel* rpSegMeans,
     132                                   UInt uiNumSegments,
     133                                   Bool* pMask,
     134                                   UInt uiMaskStride );
     135 
     136  Void xReconIntraSDC           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     137#endif
    127138};
    128139
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp

    r193 r213  
    7474}
    7575
     76#if LGE_ILLUCOMP_B0045
     77Void TDecEntropy::decodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     78{
     79  pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
     80
     81  if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) || pcCU->getSlice()->getSPS()->isDepth())
     82  {
     83    return;
     84  }
     85
     86  if(!pcCU->getSlice()->getApplyIC())
     87    return;
     88
     89  if(pcCU->isICFlagRequired(uiAbsPartIdx))
     90    m_pcEntropyDecoderIf->parseICFlag( pcCU, uiAbsPartIdx, uiDepth );
     91}
     92#endif
    7693/** decode merge index
    7794 * \param pcCU
     
    137154{
    138155  m_pcEntropyDecoderIf->parsePredMode( pcCU, uiAbsPartIdx, uiDepth );
     156 
     157#if RWTH_SDC_DLT_B0036
     158  // if B-Slice, code SDC flag later
     159  if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->isDepth() )
     160  {
     161    // decode SDC flag
     162    decodeSDCFlag(pcCU, uiAbsPartIdx, uiDepth);
     163  }
     164#endif
    139165}
    140166
    141167Void TDecEntropy::decodePartSize( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    142168{
     169#if RWTH_SDC_DLT_B0036
     170  if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx)  )
     171  {
     172    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
     173    pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
     174    return;
     175  }
     176#endif
     177 
    143178  m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth );
     179 
     180#if RWTH_SDC_DLT_B0036
     181  if( pcCU->getSlice()->isInterB() && pcCU->getSlice()->getSPS()->isDepth() && pcCU->isIntra(uiAbsPartIdx) )
     182  {
     183    // decode SDC flag
     184    decodeSDCFlag(pcCU, uiAbsPartIdx, uiDepth);
     185   
     186    if( pcCU->getSDCFlag(uiAbsPartIdx) )
     187    {
     188      // part size is also known for SDC intra
     189      pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
     190      pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
     191    }
     192  }
     193#endif
    144194}
    145195
    146196Void TDecEntropy::decodePredInfo    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU )
    147197{
     198#if RWTH_SDC_DLT_B0036
     199  if( pcCU->getSDCFlag(uiAbsPartIdx) )
     200  {
     201    decodeSDCPredMode(pcCU, uiAbsPartIdx, uiDepth);
     202    return;
     203  }
     204#endif
     205 
    148206  PartSize eMode = pcCU->getPartitionSize( uiAbsPartIdx );
    149207 
     
    186244    return;
    187245  }
     246 
     247#if RWTH_SDC_DLT_B0036
     248  if( pcCU->getSDCFlag(uiAbsPartIdx) )
     249  {
     250    return;
     251  }
     252#endif
    188253 
    189254  m_pcEntropyDecoderIf->parseIPCMInfo( pcCU, uiAbsPartIdx, uiDepth );
     
    449514#endif
    450515  }
     516#if SHARP_INTERVIEW_DECOUPLE_B0111
     517  pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo, iMVPIdx);
     518#else
    451519  pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo);
     520#endif
    452521  pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth);
    453522  pcSubCU->setMVPIdxSubParts( iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth );
     
    917986#endif
    918987 
     988#if RWTH_SDC_DLT_B0036
     989  if( pcCU->getSDCAvailable(uiAbsPartIdx) && pcCU->getSDCFlag( uiAbsPartIdx ) )
     990  {
     991    assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     992    assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
     993    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
     994    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     995    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
     996   
     997    decodeSDCResidualData(pcCU, uiAbsPartIdx, uiDepth);
     998    return;
     999  }
     1000#endif
     1001 
    9191002  if( pcCU->isIntra(uiAbsPartIdx) )
    9201003  {
     
    9521035#endif // !UNIFIED_TRANSFORM_TREE
    9531036  }
     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    TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() );
     1042    if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx))
     1043    {
     1044      PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx);
     1045      pcCU->setPartSizeSubParts( partSize, uiAbsPartIdx, uiDepth );
     1046    }
     1047    else
     1048    {
     1049      pcCU->setPartSizeSubParts( SIZE_NxN, uiAbsPartIdx, uiDepth );
     1050    }
     1051  }
     1052#endif
     1053
    9541054#if UNIFIED_TRANSFORM_TREE
    9551055  xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, 0, temp, temp1, temp2, bCodeDQP );
     
    9571057  xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, uiLumaTrMode, bCodeDQP );
    9581058#endif // UNIFIED_TRANSFORM_TREE
    959 }
     1059
     1060#if FIX_MPI_B0065
     1061  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N &&  pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 )
     1062  {
     1063    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 
     1064  }
     1065#endif
     1066}
     1067
     1068#if RWTH_SDC_DLT_B0036
     1069Void TDecEntropy::decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1070{
     1071  assert( pcCU->getSlice()->getSPS()->isDepth() );
     1072  assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     1073 
     1074  m_pcEntropyDecoderIf->parseSDCPredMode(pcCU, uiAbsPartIdx, uiDepth );
     1075}
     1076
     1077Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1078{
     1079  assert( pcCU->getSlice()->getSPS()->isDepth() );
     1080 
     1081  m_pcEntropyDecoderIf->parseSDCFlag(pcCU, uiAbsPartIdx, uiDepth );
     1082}
     1083
     1084Void TDecEntropy::decodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1085{
     1086  assert( pcCU->getSlice()->getSPS()->isDepth() );
     1087  assert( pcCU->getSDCFlag(uiAbsPartIdx) );
     1088 
     1089  // number of segments depends on prediction mode for INTRA
     1090  UInt uiNumSegments = 2;
     1091  UInt uiLumaPredMode = pcCU->getLumaIntraDir( uiAbsPartIdx );
     1092  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && (uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX) )
     1093    uiNumSegments = 1;
     1094 
     1095  // decode residual data for each segment
     1096  for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ )
     1097    m_pcEntropyDecoderIf->parseSDCResidualData(pcCU, uiAbsPartIdx, uiDepth, uiSeg);
     1098}
     1099#endif
    9601100
    9611101//! \}
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecEntropy.h

    r166 r213  
    7171#endif
    7272
    73 #if VIDYO_VPS_INTEGRATION
     73#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    7474  virtual Void  parseVPS                  ( TComVPS* pcVPS )                       = 0;
    7575#endif
     
    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#if FORCE_REF_VSP==1
    106109  virtual Void parseVspFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     
    141144  virtual Void readTileMarker   ( UInt& uiTileIdx, UInt uiBitsUsed ) = 0;
    142145  virtual Void updateContextTables( SliceType eSliceType, Int iQp ) = 0;
     146 
     147#if RWTH_SDC_DLT_B0036
     148  virtual Void parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     149  virtual Void parseSDCPredMode     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     150  virtual Void parseSDCResidualData     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0;
     151#endif
    143152 
    144153  virtual ~TDecEntropyIf() {}
     
    169178  Void    resetEntropy                ( TComSlice* p)           { m_pcEntropyDecoderIf->resetEntropy(p);                    }
    170179
    171 #if VIDYO_VPS_INTEGRATION
     180#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    172181  Void    decodeVPS                   ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); }
    173182#endif
     
    199208  Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    200209  Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     210#if LGE_ILLUCOMP_B0045
     211  Void decodeICFlag            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     212#endif
    201213#if FORCE_REF_VSP==1
    202214  Void decodeVspFlag           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    256268  Void decodeFlush() { m_pcEntropyDecoderIf->decodeFlush(); }
    257269#endif
     270 
     271#if RWTH_SDC_DLT_B0036
     272  Void decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     273  Void decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     274  Void decodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     275#endif
    258276
    259277};// END CLASS DEFINITION TDecEntropy
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecGop.cpp

    r193 r213  
    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 );
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSbac.cpp

    r193 r213  
    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
    580639#if FORCE_REF_VSP==1
    581640Void TDecSbac::parseVspFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    636695  uiNumCand = pcCU->getSlice()->getMaxNumMergeCand();
    637696#if HHI_MPI
    638 #if VSP_N
     697#if VSP_N & !MTK_UNCONSTRAINED_MVI_B0083
    639698  TComDataCU* pcTextCU = pcCU->getSlice()->getSPS()->getUseMVI() ? pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ) : NULL;
    640699  Int aiRefIdxVsp[2] = { pcTextCU ? pcTextCU->getCUMvField( RefPicList(0) )->getRefIdx( uiAbsPartIdx ) : -1,
     
    652711                                                                        : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE;
    653712#endif
     713#else
     714  const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE;
    654715#endif
    655716  const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : uiNumCand;
     
    735796 
    736797  UInt uiSymbol;
    737   m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) );
    738   DTRACE_CABAC_VL( g_nSymbolCounter++ )
    739   DTRACE_CABAC_T( "\tSplitFlag\n" )
     798
     799#if OL_QTLIMIT_PREDCODING_B0068
     800  Bool bParseSplitFlag    = true;
     801
     802  TComSPS *sps            = pcCU->getPic()->getSlice(0)->getSPS();
     803  TComPic *pcTexture      = pcCU->getSlice()->getTexturePic();
     804  Bool bDepthMapDetect    = (pcTexture != NULL);
     805  Bool bIntraSliceDetect  = (pcCU->getSlice()->getSliceType() == I_SLICE);
     806
     807  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
     808  {
     809    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     810    assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth);
     811    bParseSplitFlag         = (pcTextureCU->getDepth(uiAbsPartIdx) > uiDepth);
     812  }
     813
     814  if(bParseSplitFlag)
     815  {
     816#endif
     817    m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) );
     818    DTRACE_CABAC_VL( g_nSymbolCounter++ )
     819    DTRACE_CABAC_T( "\tSplitFlag\n" )
     820#if OL_QTLIMIT_PREDCODING_B0068
     821  }
     822  else
     823    uiSymbol = 0;
     824#endif
     825
    740826  pcCU->setDepthSubParts( uiDepth + uiSymbol, uiAbsPartIdx );
    741827 
     
    753839  UInt uiSymbol, uiMode = 0;
    754840  PartSize eMode;
     841
     842#if OL_QTLIMIT_PREDCODING_B0068
     843  Bool bParsePartSize    = true;
     844  TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
     845  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
     846  Bool bDepthMapDetect   = (pcTexture != NULL);
     847  Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
     848
     849  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
     850  {
     851    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     852    assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth);
     853    if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN)
     854    {
     855      bParsePartSize = false;
     856      eMode          = SIZE_2Nx2N;
     857    }
     858  }
     859#endif
    755860 
    756861  if ( pcCU->isIntra( uiAbsPartIdx ) )
    757862  {
    758     uiSymbol = 1;
    759     if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
    760     {
    761       m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) );
    762     }
    763     eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN;
     863#if OL_QTLIMIT_PREDCODING_B0068
     864    if(bParsePartSize)
     865    {
     866#endif
     867      uiSymbol = 1;
     868      if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
     869      {
     870        m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) );
     871      }
     872      eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN;
     873#if OL_QTLIMIT_PREDCODING_B0068
     874    }
     875#endif
    764876    UInt uiTrLevel = 0;   
    765877    UInt uiWidthInBit  = g_aucConvertToBit[pcCU->getWidth(uiAbsPartIdx)]+2;
     
    777889  else
    778890  {
    779     UInt uiMaxNumBits = 2;
    780     if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) )
    781     {
    782       uiMaxNumBits ++;
    783     }
    784     for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
    785     {
    786       m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
    787       if ( uiSymbol )
    788       {
    789         break;
    790       }
    791       uiMode++;
    792     }
    793     eMode = (PartSize) uiMode;
    794     if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
    795     {
    796       if (eMode == SIZE_2NxN)
    797       {
     891#if OL_QTLIMIT_PREDCODING_B0068
     892    if(bParsePartSize)
     893    {
     894#endif
     895      UInt uiMaxNumBits = 2;
     896      if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) )
     897      {
     898        uiMaxNumBits ++;
     899      }
     900      for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
     901      {
     902        m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
     903        if ( uiSymbol )
     904        {
     905          break;
     906        }
     907        uiMode++;
     908      }
     909      eMode = (PartSize) uiMode;
     910      if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     911      {
     912        if (eMode == SIZE_2NxN)
     913        {
     914#if AMP_CTX
     915            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
     916#else
     917          m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 ));
     918#endif
     919          if (uiSymbol == 0)
     920          {
     921#if AMP_CTX
     922            m_pcTDecBinIf->decodeBinEP(uiSymbol);
     923#else
     924            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 ));
     925#endif
     926            eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
     927          }
     928        }
     929        else if (eMode == SIZE_Nx2N)
     930        {
    798931#if AMP_CTX
    799932          m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
    800933#else
    801         m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 ));
    802 #endif
    803         if (uiSymbol == 0)
    804         {
     934          m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 ));
     935#endif
     936          if (uiSymbol == 0)
     937          {
    805938#if AMP_CTX
    806           m_pcTDecBinIf->decodeBinEP(uiSymbol);
    807 #else
    808           m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 ));
    809 #endif
    810           eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
     939            m_pcTDecBinIf->decodeBinEP(uiSymbol);
     940#else
     941            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 ));
     942#endif
     943            eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
     944          }
    811945        }
    812946      }
    813       else if (eMode == SIZE_Nx2N)
    814       {
    815 #if AMP_CTX
    816         m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
    817 #else
    818         m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 ));
    819 #endif
    820         if (uiSymbol == 0)
    821         {
    822 #if AMP_CTX
    823           m_pcTDecBinIf->decodeBinEP(uiSymbol);
    824 #else
    825           m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 ));
    826 #endif
    827           eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
    828         }
    829       }
    830     }
     947#if OL_QTLIMIT_PREDCODING_B0068
     948    }
     949#endif
    831950  }
    832951  pcCU->setPartSizeSubParts( eMode, uiAbsPartIdx, uiDepth );
     
    9041023#endif
    9051024
    906 #if LGE_EDGE_INTRA
     1025#if LGE_EDGE_INTRA_A0070
    9071026    Bool bCodeEdgeIntra = false;
    9081027    if( pcCU->getSlice()->getSPS()->isDepth() )
     
    9201039#endif
    9211040    Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds); 
    922 #if LGE_EDGE_INTRA
     1041#if LGE_EDGE_INTRA_A0070
    9231042    UInt uiCheckBit = 0;
    9241043#endif
     
    9451064
    9461065      m_pcTDecBinIf->decodeBinsEP( uiSymbol, 5 );
    947 #if LGE_EDGE_INTRA
     1066#if LGE_EDGE_INTRA_A0070
    9481067      if (bCodeEdgeIntra)
    9491068      {
     
    9811100      }
    9821101#endif
    983 #if LGE_EDGE_INTRA
     1102#if LGE_EDGE_INTRA_A0070
    9841103      if ( intraPredMode != EDGE_INTRA_IDX)
    9851104      {
     
    9891108          intraPredMode += ( intraPredMode >= uiPreds[i] );
    9901109        }
    991 #if LGE_EDGE_INTRA
    992       }
    993 #endif
    994     }
    995 
    996 #if LGE_EDGE_INTRA
     1110#if LGE_EDGE_INTRA_A0070
     1111      }
     1112#endif
     1113    }
     1114
     1115#if LGE_EDGE_INTRA_A0070
    9971116    if( intraPredMode == EDGE_INTRA_IDX )
    9981117    {
     
    21382257#endif
    21392258
    2140 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA && LGE_EDGE_INTRA_DELTA_DC)
     2259#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA_A0070 && LGE_EDGE_INTRA_DELTA_DC)
    21412260Void TDecSbac::xReadExGolombLevel( UInt& ruiSymbol, ContextModel& rcSCModel  )
    21422261{
     
    23972516#endif
    23982517
    2399 #if LGE_EDGE_INTRA
     2518#if LGE_EDGE_INTRA_A0070
    24002519Void TDecSbac::xParseEdgeIntraInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    24012520{
     
    24942613}
    24952614#endif
     2615 
     2616#if RWTH_SDC_DLT_B0036
     2617Void TDecSbac::parseSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     2618{
     2619  assert( pcCU->getSlice()->getSPS()->isDepth() );
     2620 
     2621  UInt uiSymbol = 0;
     2622  UInt uiCtxSDCFlag = pcCU->getCtxSDCFlag( uiAbsPartIdx );
     2623  m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) );
     2624 
     2625  if( uiSymbol == 1 )
     2626  {
     2627    pcCU->setPartSizeSubParts(SIZE_2Nx2N, uiAbsPartIdx, uiDepth);
     2628   
     2629    pcCU->setSDCFlagSubParts( true, uiAbsPartIdx, 0, uiDepth);
     2630    pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth);
     2631    pcCU->setCbfSubParts(1, 1, 1, uiAbsPartIdx, uiDepth);
     2632  }
     2633}
     2634
     2635Void TDecSbac::parseSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     2636{
     2637  assert( pcCU->getSlice()->getSPS()->isDepth() );
     2638  assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     2639 
     2640  assert( pcCU->getSDCFlag(uiAbsPartIdx) );
     2641 
     2642  UInt uiCtx            = 0;
     2643 
     2644  UInt uiMPModeIdx      = 0;
     2645 
     2646  for(Int i=0; i<RWTH_SDC_NUM_PRED_MODES-1; i++)
     2647  {
     2648    UInt uiIsMostProb = 0;
     2649    m_pcTDecBinIf->decodeBin( uiIsMostProb, m_cSDCPredModeSCModel.get( 0, i, uiCtx ) );
     2650   
     2651    if ( uiIsMostProb == 1 )
     2652      break;
     2653   
     2654    // else: get next most probable pred mode
     2655    uiMPModeIdx = (uiMPModeIdx+1)%RWTH_SDC_NUM_PRED_MODES;
     2656  }
     2657 
     2658  Int intraPredMode = g_auiSDCPredModes[uiMPModeIdx];
     2659 
     2660#if HHI_DMM_WEDGE_INTRA
     2661  if( intraPredMode == DMM_WEDGE_FULL_IDX )          { xParseWedgeFullInfo          ( pcCU, uiAbsPartIdx, uiDepth ); }
     2662  if( intraPredMode == DMM_WEDGE_PREDDIR_IDX )       { xParseWedgePredDirInfo       ( pcCU, uiAbsPartIdx, uiDepth ); }
     2663#endif
     2664 
     2665  pcCU->setLumaIntraDirSubParts((UChar)intraPredMode, uiAbsPartIdx, uiDepth);
     2666}
     2667
     2668Void TDecSbac::parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment )
     2669{
     2670  assert( pcCU->getSlice()->getSPS()->isDepth() );
     2671  assert( pcCU->getSDCFlag(uiAbsPartIdx) );
     2672  assert( uiSegment < 2 );
     2673 
     2674  UInt uiResidual = 0;
     2675  UInt uiBit      = 0;
     2676  UInt uiAbsIdx   = 0;
     2677  UInt uiSign     = 0;
     2678  Int  iIdx       = 0;
     2679 
     2680  UInt uiMaxResidualBits  = GetBitsPerDepthValue();
     2681  assert( uiMaxResidualBits <= g_uiBitDepth );
     2682 
     2683  m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, uiSegment, 0 ) );
     2684 
     2685  if (uiResidual)
     2686  {
     2687    // decode residual sign bit
     2688    m_pcTDecBinIf->decodeBin(uiSign, m_cSDCResidualSignFlagSCModel.get( 0, uiSegment, 0 ) );
     2689   
     2690    // decode residual magnitude
     2691    for (Int i=0; i<uiMaxResidualBits; i++)
     2692    {
     2693      m_pcTDecBinIf->decodeBin(uiBit, m_cSDCResidualSCModel.get( 0, uiSegment, i ) );
     2694      uiAbsIdx |= uiBit << i;
     2695    }
     2696   
     2697    uiAbsIdx += 1;
     2698    iIdx =(Int)(uiSign ? -1 : 1)*uiAbsIdx;
     2699  }
     2700 
     2701  pcCU->setSDCSegmentDCOffset(iIdx, uiSegment, uiAbsPartIdx);
     2702}
     2703#endif
    24962704
    24972705//! \}
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSbac.h

    r166 r213  
    8787  Void  setBitstream              ( TComInputBitstream* p  ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); }
    8888 
    89 #if VIDYO_VPS_INTEGRATION
     89#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    9090  Void  parseVPS                  ( TComVPS* pcVPS )  {}
    9191#endif
     
    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#if FORCE_REF_VSP==1
    169178  Void parseVspFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    210219  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    211220  ContextModel3DBuffer m_cCUSkipFlagSCModel;
     221#if LGE_ILLUCOMP_B0045
     222  ContextModel3DBuffer m_cCUICFlagSCModel;
     223#endif
    212224  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
    213225  ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
     
    260272  ContextModel3DBuffer m_cDmmDataSCModel;
    261273#endif
    262 #if LGE_EDGE_INTRA
     274#if LGE_EDGE_INTRA_A0070
    263275  ContextModel3DBuffer m_cEdgeIntraSCModel;
    264276#if LGE_EDGE_INTRA_DELTA_DC
     
    266278#endif
    267279#endif
     280 
     281#if RWTH_SDC_DLT_B0036
     282  ContextModel3DBuffer m_cSDCFlagSCModel;
     283 
     284  ContextModel3DBuffer m_cSDCResidualFlagSCModel;
     285  ContextModel3DBuffer m_cSDCResidualSignFlagSCModel;
     286  ContextModel3DBuffer m_cSDCResidualSCModel;
     287 
     288  ContextModel3DBuffer m_cSDCPredModeSCModel;
     289#endif
    268290};
    269291
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSlice.cpp

    r193 r213  
    446446, m_ppsBuffer(16)
    447447, m_apsBuffer(64)
    448 #if VIDYO_VPS_INTEGRATION
     448#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    449449, m_vpsBuffer(16)
    450450#endif
     
    458458}
    459459
    460 #if VIDYO_VPS_INTEGRATION
     460#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    461461TComVPS* ParameterSetManagerDecoder::getPrefetchedVPS  (Int vpsId)
    462462{
     
    513513  m_ppsMap.mergePSList(m_ppsBuffer);
    514514  m_spsMap.mergePSList(m_spsBuffer);
    515 #if VIDYO_VPS_INTEGRATION
     515#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    516516  m_vpsMap.mergePSList(m_vpsBuffer);
    517517#endif
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSlice.h

    r100 r213  
    9696  Void     storePrefetchedAPS(TComAPS *aps)  { m_apsBuffer.storePS( aps->getAPSID(), aps); };
    9797  TComAPS* getPrefetchedAPS  (Int apsId);
    98 #if VIDYO_VPS_INTEGRATION
     98#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    9999  Void     storePrefetchedVPS(TComVPS *vps)  { m_vpsBuffer.storePS( vps->getVPSId(), vps); };
    100100  TComVPS* getPrefetchedVPS  (Int vpsId);
     
    106106  ParameterSetMap<TComPPS> m_ppsBuffer;
    107107  ParameterSetMap<TComAPS> m_apsBuffer;
    108 #if VIDYO_VPS_INTEGRATION
     108#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    109109  ParameterSetMap<TComVPS> m_vpsBuffer;
    110110#endif
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecTop.cpp

    r193 r213  
    5050  m_aaiCodedScale          = new Int* [ MAX_VIEW_NUM ];
    5151  m_aiViewOrderIndex       = new Int  [ MAX_VIEW_NUM ];
     52#if QC_MVHEVC_B0046
     53  m_aiViewId               = new Int  [ MAX_VIEW_NUM ];
     54#endif
    5255  m_aiViewReceived         = new Int  [ MAX_VIEW_NUM ];
    5356  for( UInt uiId = 0; uiId < MAX_VIEW_NUM; uiId++ )
     
    301304
    302305  AOF( pcSlice->getSPS()->getViewId() < MAX_VIEW_NUM );
     306#if VSP_N
     307  if ( !pcSlice->getSPS()->getIsFirstInView() )
     308  {
     309    return;
     310  }
     311#else
    303312  if ( pcSlice->getSPS()->isDepth  () )
    304313  {
    305314    return;
    306315  }
     316#endif
    307317  Bool  bFirstAU          = ( pcSlice->getPOC()               == 0 );
    308318  Bool  bFirstSliceInAU   = ( pcSlice->getPOC()               != Int ( m_iLastPOC ) );
    309319  Bool  bFirstSliceInView = ( pcSlice->getSPS()->getViewId()  != UInt( m_iLastViewId ) || bFirstSliceInAU );
    310320  AOT(  bFirstSliceInAU  &&   pcSlice->getSPS()->getViewId()  != 0 );
     321#if !VSP_N
    311322  AOT( !bFirstSliceInAU  &&   pcSlice->getSPS()->getViewId()   < UInt( m_iLastViewId ) );
     323#endif
    312324  AOT( !bFirstSliceInAU  &&   pcSlice->getSPS()->getViewId()   > UInt( m_iLastViewId + 1 ) );
    313325  AOT( !bFirstAU         &&   pcSlice->getSPS()->getViewId()   > m_uiMaxViewId );
     
    488500  m_bFirstSliceInSequence   = true;
    489501  m_pcCamParsCollector = 0;
     502#if QC_MVHEVC_B0046
     503  m_bFirstNal                  = false;
     504#endif
    490505
    491506#if VSP_N
     
    821836  TComVPS *vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId());
    822837  assert (vps != 0);
     838#if !QC_REM_IDV_B0046
    823839  if( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA )
     840#else
     841  if( (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) && !sps->getViewId() )
     842#endif
    824843    // VPS can only be activated on IDR or CRA...
    825844    getTAppDecTop()->getVPSAccess()->setActiveVPSId( sps->getVPSId() );
     
    827846  m_apcSlicePilot->setPPS(pps);
    828847  m_apcSlicePilot->setSPS(sps);
    829 #if VIDYO_VPS_INTEGRATION
     848#if QC_MVHEVC_B0046
     849  TComVPS *vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId());
     850#endif
     851#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    830852  m_apcSlicePilot->setVPS(vps);
    831853#endif
     
    869891  m_apcSlicePilot->setPPS(m_parameterSetManagerDecoder.getPrefetchedPPS(0));
    870892  m_apcSlicePilot->setSPS(m_parameterSetManagerDecoder.getPrefetchedSPS(0));
    871 #if VIDYO_VPS_INTEGRATION
     893#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
     894#if QC_MVHEVC_B0046
     895  m_apcSlicePilot->setIsDepth(false);
     896#endif
    872897  m_apcSlicePilot->setVPS(m_parameterSetManagerDecoder.getPrefetchedVPS(0));
    873898#endif
    874899  m_apcSlicePilot->initTiles();
    875 
     900#if QC_MVHEVC_B0046
     901  m_apcSlicePilot->setViewId( nalu.m_layerId );
     902  m_apcSlicePilot->setViewId( nalu.m_layerId );
     903  m_apcSlicePilot->setViewOrderIdx(m_apcSlicePilot->getVPS()->getViewId(nalu.m_layerId), nalu.m_layerId);
     904  Int iNumDirectRef = m_apcSlicePilot->getVPS()->getNumDirectRefLayer(nalu.m_layerId);
     905  m_apcSlicePilot->getSPS()->setNumberOfUsableInterViewRefs(iNumDirectRef);
     906  for(Int iNumIvRef = 0; iNumIvRef < iNumDirectRef; iNumIvRef ++)
     907  {
     908    Int iDeltaLayerId = m_apcSlicePilot->getVPS()->getDirectRefLayerId( nalu.m_layerId, iNumIvRef);
     909    m_apcSlicePilot->getSPS()->setUsableInterViewRef(iNumIvRef, (iDeltaLayerId-nalu.m_layerId));
     910  }
     911#endif
    876912  if (m_bFirstSliceInPicture)
    877913  {
     
    888924  if( m_bFirstSliceInPicture )
    889925  {
     926#if QC_MVHEVC_B0046
     927    if( nalu.m_layerId == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; }
     928    else                     { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, 0 )->getNalUnitTypeBaseView(); }
     929#else
    890930#if VIDYO_VPS_INTEGRATION
    891931    if( m_apcSlicePilot->getVPS()->getViewId(nalu.m_layerId) == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; }
     
    895935    else                     { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, nalu.m_isDepth )->getNalUnitTypeBaseView(); }
    896936#endif
    897    
     937#endif
    898938    m_apcSlicePilot->setNalUnitTypeBaseViewMvc( m_nalUnitTypeBaseView );
    899939  }
     
    909949#endif
    910950  m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId);
     951
     952#if VSP_N
     953  if( m_apcSlicePilot->getSPS()->getViewId() )
     954  if( !m_apcSlicePilot->getSPS()->getIsFirstInView() && !m_isDepth )
     955  {
     956    TComSPS* pcSPSDepth = NULL;
     957    TComPic* pcPicDepth = getTAppDecTop()->getPicFromView( m_apcSlicePilot->getSPS()->getViewId(), 0, true );
     958    if( pcPicDepth )
     959    {
     960      pcSPSDepth = getTAppDecTop()->getPicFromView( m_apcSlicePilot->getSPS()->getViewId(), 0, !m_isDepth )->getSPS();
     961      m_apcSlicePilot->getSPS()->copyCameraParameterPre( pcSPSDepth->getCamParPrecision(), pcSPSDepth->hasCamParInSliceHeader() );
     962    }
     963  }
     964#endif
    911965
    912966  // ALF CU parameters should be part of the slice header -> needs to be fixed
     
    9841038        m_pcPicVSP = new TComPic;
    9851039        m_pcPicVSP->create( m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     1040        m_pcPicVSP->setIsVsp( true );
    9861041        m_pcPicVSP->setCurrSliceIdx(0);
    9871042        m_pcPicVSP->getCurrSlice()->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx() );
     
    10101065        m_pcPicAvail = new TComPic;
    10111066        m_pcPicAvail->create( m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     1067        m_pcPicAvail->setIsVsp( true );
    10121068        m_pcPicAvail->setCurrSliceIdx(0);
    10131069        m_pcPicAvail->getCurrSlice()->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx() );
     
    10611117    m_cResidualGenerator.create( true, m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement );
    10621118#endif
    1063 #if !QC_MULTI_DIS_CAN
     1119#if !QC_MULTI_DIS_CAN_A0097
    10641120#if VSP_N
    10651121#if VSP_SLICE_HEADER
     
    12751331
    12761332    // Set reference list
     1333#if !QC_MVHEVC_B0046
    12771334#if VIDYO_VPS_INTEGRATION
    12781335    pcSlice->setViewId( pcSlice->getVPS()->getViewId(nalu.m_layerId) );
     
    12821339    pcSlice->setIsDepth(m_isDepth);
    12831340#endif
     1341#endif
    12841342
    12851343#if SONY_COLPIC_AVAILABILITY
     
    12931351    assert( m_tAppDecTop != NULL );
    12941352    TComPic * const pcTexturePic = m_isDepth ? m_tAppDecTop->getPicFromView(  m_viewId, pcSlice->getPOC(), false ) : NULL;
     1353
     1354#if FLEX_CODING_ORDER_M23723
     1355    if (pcTexturePic != NULL)
     1356    {
     1357      assert( !m_isDepth || pcTexturePic != NULL );
     1358      pcSlice->setTexturePic( pcTexturePic );
     1359    }
     1360#else
    12951361    assert( !m_isDepth || pcTexturePic != NULL );
    12961362    pcSlice->setTexturePic( pcTexturePic );
     1363#endif
    12971364
    12981365    std::vector<TComPic*> apcInterViewRefPics = m_tAppDecTop->getInterViewRefPics( m_viewId, pcSlice->getPOC(), m_isDepth, pcSlice->getSPS() );
     
    13171384
    13181385    pcSlice->setRefPicListMvc( m_cListPic, apcInterViewRefPics, bUseVsp ? m_pcPicVSP : NULL );
    1319 
    13201386#else
    13211387    pcSlice->setRefPicListMvc( m_cListPic, apcInterViewRefPics );
     
    14161482
    14171483#if VSP_N
     1484#if VSP_SLICE_HEADER
     1485  if( pcSlice->getVspFlag() )
     1486#endif
     1487  if( !pcSlice->getSPS()->getIsFirstInView() && !m_isDepth && !pcSlice->getSPS()->hasCamParInSliceHeader() )
     1488  {
     1489    TComSPS* pcSPSDepth = NULL;
     1490    TComPic* pcPicDepth = getTAppDecTop()->getPicFromView( pcSlice->getViewId(), pcSlice->getPOC(), true );
     1491    if( pcPicDepth )
     1492    {
     1493      pcSPSDepth = getTAppDecTop()->getPicFromView( pcSlice->getViewId(), pcSlice->getPOC(), !m_isDepth )->getSPS();
     1494      pcSlice->getSPS()->copyCameraParameterPost( pcSPSDepth->getCodedScale(), pcSPSDepth->getInvCodedScale(), pcSPSDepth->getCodedOffset(), pcSPSDepth->getInvCodedOffset() );
     1495    }
     1496  }
     1497
    14181498  if( m_pcCamParsCollector )
    14191499  {
     
    14441524  m_cGopDecoder.decompressGop(nalu.m_Bitstream, pcPic, false);
    14451525
     1526#if QC_IV_AS_LT_B0046
     1527  std::vector<TComPic*> apcInterViewRefPics = m_tAppDecTop->getInterViewRefPics( m_viewId, pcSlice->getPOC(), m_isDepth, pcSlice->getSPS() );
     1528  for( Int k = 0; k < apcInterViewRefPics.size(); k++ )
     1529  {
     1530    TComPic*  pcPicIv = apcInterViewRefPics[k];
     1531    pcPicIv->setIsLongTerm( 0 );
     1532  }
     1533#endif
    14461534  if( m_pcCamParsCollector )
    14471535  {
     
    14551543}
    14561544
    1457 #if VIDYO_VPS_INTEGRATION
     1545#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    14581546Void TDecTop::xDecodeVPS()
    14591547{
     
    14621550  m_cEntropyDecoder.decodeVPS( vps );
    14631551  m_parameterSetManagerDecoder.storePrefetchedVPS(vps); 
     1552#if !QC_MVHEVC_B0046
    14641553  getTAppDecTop()->getVPSAccess()->addVPS( vps );
     1554#endif
    14651555}
    14661556#endif
     
    15391629  switch (nalu.m_nalUnitType)
    15401630  {
    1541 #if VIDYO_VPS_INTEGRATION
     1631#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    15421632    case NAL_UNIT_VPS:
    15431633      xDecodeVPS();
     
    15621652    case NAL_UNIT_CODED_SLICE_IDR:
    15631653#if H0566_TLA
     1654#if !QC_REM_IDV_B0046
    15641655    case NAL_UNIT_CODED_SLICE_IDV:
     1656#endif
    15651657    case NAL_UNIT_CODED_SLICE_CRA:
    15661658    case NAL_UNIT_CODED_SLICE_TLA:
     
    15771669}
    15781670
     1671#if QC_MVHEVC_B0046
     1672Void TDecTop::xCopyVPS( TComVPS* pVPSV0 )
     1673{
     1674  m_parameterSetManagerDecoder.storePrefetchedVPS(pVPSV0); 
     1675}
     1676
     1677Void TDecTop::xCopySPS( TComSPS* pSPSV0 )
     1678{
     1679  TComSPS* sps = new TComSPS();
     1680  sps = pSPSV0;
     1681  m_parameterSetManagerDecoder.storePrefetchedSPS(sps);
     1682#if LCU_SYNTAX_ALF
     1683  m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     1684#endif
     1685}
     1686
     1687Void TDecTop::xCopyPPS(TComPPS* pPPSV0 )
     1688{
     1689  m_parameterSetManagerDecoder.storePrefetchedPPS( pPPSV0 );
     1690
     1691  //!!!KS: Activate parameter sets for parsing APS (unless dependency is resolved)
     1692  m_apcSlicePilot->setPPSId(pPPSV0->getPPSId());
     1693  xActivateParameterSets();
     1694  m_apcSlicePilot->initTiles();
     1695}
     1696#endif
    15791697/** Function for checking if picture should be skipped because of random access
    15801698 * \param iSkipFrame skip frame counter
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecTop.h

    r166 r213  
    100100  Int**   m_aaiCodedScale;
    101101  Int*    m_aiViewOrderIndex;
     102#if QC_MVHEVC_B0046
     103  Int*    m_aiViewId;
     104#endif
    102105  Int*    m_aiViewReceived;
    103106  UInt    m_uiCamParsCodedPrecision;
     
    264267 
    265268  Void  deletePicBuffer();
    266 
     269#if QC_MVHEVC_B0046
     270  Void      xCopySPS( TComSPS* pSPSV0);
     271  Void      xCopyPPS( TComPPS* pPPSV0);
     272  Void      xCopyVPS( TComVPS* pVPSV0);
     273#endif
    267274#if HHI_INTER_VIEW_RESIDUAL_PRED
    268275  Void      deleteExtraPicBuffers   ( Int iPoc );
     
    275282  Int  getViewId()                { return m_viewId  ;}
    276283  Void setIsDepth( Bool isDepth ) { m_isDepth = isDepth; }
     284  Bool getIsDepth()               { return m_isDepth; }
    277285
    278286#if SONY_COLPIC_AVAILABILITY
     
    291299  TAppDecTop*         getTAppDecTop()                           { return  m_tAppDecTop; }
    292300  NalUnitType         getNalUnitTypeBaseView()                  { return m_nalUnitTypeBaseView; }
     301#if QC_MVHEVC_B0046
     302  bool                m_bFirstNal; //used to copy SPS, PPS, VPS
     303  ParameterSetManagerDecoder* xGetParaSetDec ()        {return  &m_parameterSetManagerDecoder;}
     304#endif
    293305
    294306#if VSP_N
     
    308320  Bool      xDecodeSlice(InputNALUnit &nalu, Int iSkipFrame, Int iPOCLastDisplay);
    309321#endif
    310 #if VIDYO_VPS_INTEGRATION
     322#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    311323  Void      xDecodeVPS();
    312324#endif
Note: See TracChangeset for help on using the changeset viewer.