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


Ignore:
Timestamp:
14 Jun 2012, 16:38:29 (13 years ago)
Author:
tech
Message:

Merged with branch/HTM-3.0Samsung REV74 including:

  • restricted residual prediction m24766
  • Inter-view residual prediction m24938
  • VPS concept m24714,m24878, m24945,m24896, m2491
  • reference list modification, restriction on IDR m24876, m24874
  • depth based motion parameter prediction m24829

Fixed bugs:

  • interview prediction
  • VSO

Added:

  • xcode project
Location:
trunk/source/Lib/TLibDecoder
Files:
11 edited

Legend:

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

    r56 r77  
    136136 //  unsigned reserved_one_5bits = bs.read(5);
    137137 //  assert(reserved_one_5bits == 1);
     138#if VIDYO_VPS_INTEGRATION
     139  nalu.m_layerId  = bs.read(5) - 1;
     140#else
    138141  nalu.m_viewId   = bs.read(4)-1;
    139142  nalu.m_isDepth  = bs.read(1);
    140 
     143#endif
    141144#if H0566_TLA
    142145  if ( nalu.m_temporalId )
     
    159162    {
    160163      nalu.m_temporalId = bs.read(3);
     164#if VIDYO_VPS_INTEGRATION
     165      nalu.m_layerId    = bs.read(5) - 1;
     166#else
    161167      nalu.m_OutputFlag = bs.read(1);
    162168  //    unsigned reserved_one_4bits = bs.read(4);
     
    164170      nalu.m_viewId   = bs.read(3)-1;
    165171      nalu.m_isDepth  = bs.read(1);
     172#endif
    166173
    167174#if H0566_TLA
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r56 r77  
    13391339}
    13401340
     1341#if VIDYO_VPS_INTEGRATION
     1342Void TDecCavlc::parseVPS(TComVPS* pcVPS)
     1343{
     1344  UInt  uiCode;
     1345  Int   iCode;
     1346 
     1347  READ_CODE( 3, uiCode, "max_temporal_layers_minus1" );   pcVPS->setMaxTLayers( uiCode + 1 );
     1348  READ_CODE( 5, uiCode, "max_layers_minus1" );            pcVPS->setMaxLayers( uiCode + 1 );
     1349  READ_FLAG( uiCode,  "temporal_id_nesting_flag" );       pcVPS->setTemporalNestingFlag( uiCode ? true:false );
     1350  READ_UVLC( uiCode,  "video_parameter_set_id" );         pcVPS->setVPSId( uiCode );
     1351  for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++)
     1352  {
     1353    READ_UVLC( uiCode,  "max_dec_pic_buffering[i]" );     pcVPS->setMaxDecPicBuffering( uiCode, i );
     1354    READ_UVLC( uiCode,  "num_reorder_pics[i]" );          pcVPS->setNumReorderPics( uiCode, i );
     1355    READ_UVLC( uiCode,  "max_latency_increase[i]" );      pcVPS->setMaxLatencyIncrease( uiCode, i );
     1356  }
     1357 
     1358  READ_CODE( 1, uiCode, "bit_equal_to_one" );             assert( uiCode );
     1359 
     1360  if( pcVPS->getMaxLayers() - 1 > 0 )
     1361  {
     1362    READ_UVLC( uiCode,  "extension_type" );               pcVPS->setExtensionType( uiCode );
     1363   
     1364    pcVPS->setViewOrderIdx( 0, 0 );
     1365    pcVPS->setViewId( 0, 0 );
     1366    pcVPS->setDepthFlag( 0, 0 );
     1367    for(UInt i = 1; i <= pcVPS->getMaxLayers()-1; i++)
     1368    {
     1369      READ_FLAG( uiCode, "dependent_flag[i]" );           pcVPS->setDependentFlag( uiCode ? true:false, i);
     1370      if( pcVPS->getDependentFlag(i) )
     1371      {
     1372        READ_UVLC( uiCode,  "delta_reference_layer_id_minus1[i]" ); pcVPS->setDependentLayer( i - uiCode + 1, i );
     1373        if( pcVPS->getExtensionType() == VPS_EXTENSION_TYPE_MULTI_VIEW )
     1374        {
     1375          READ_UVLC( uiCode,  "view_id[i]" );             pcVPS->setViewId( uiCode, i );
     1376          READ_FLAG( uiCode,  "depth_flag[i]" );          pcVPS->setDepthFlag( uiCode ? true:false, i );
     1377          READ_SVLC( iCode,  "view_order_idx[i]" );       pcVPS->setViewOrderIdx( iCode, i );
     1378        }
     1379       
     1380      }
     1381    }
     1382  }
     1383 
     1384  READ_FLAG( uiCode,  "vps_extension_flag" );          assert(!uiCode);
     1385  //future extensions go here..
     1386 
     1387  return;
     1388}
     1389
     1390#endif
     1391
    13411392#if HHI_MPI
    13421393Void TDecCavlc::parseSPS(TComSPS* pcSPS, Bool bIsDepth)
     
    13561407  READ_CODE( 8,  uiCode, "level_idc" );                          pcSPS->setLevelIdc( uiCode );
    13571408  READ_UVLC(     uiCode, "seq_parameter_set_id" );               pcSPS->setSPSId( uiCode );
     1409#if VIDYO_VPS_INTEGRATION
     1410  READ_UVLC(     uiCode, "video_parameter_set_id" );             pcSPS->setVPSId( uiCode );
     1411#endif
    13581412  READ_UVLC(     uiCode, "chroma_format_idc" );                  pcSPS->setChromaFormatIdc( uiCode );
    13591413  READ_CODE( 3,  uiCode, "max_temporal_layers_minus1" );         pcSPS->setMaxTLayers( uiCode+1 );
     
    18371891      rpcSlice->setPOC( iPOCmsb+iPOClsb );
    18381892
     1893#if HHI_FIX
     1894      if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV && rpcSlice->getPOC() == 0 )
     1895#else
    18391896      if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV )
     1897#endif
    18401898      {
    18411899        TComReferencePictureSet* rps = rpcSlice->getLocalRPS();
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r56 r77  
    113113  Void  parseQtRootCbf      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt& uiQtRootCbf );
    114114
     115#if VIDYO_VPS_INTEGRATION
     116  Void  parseVPS            ( TComVPS* pcVPS );
     117#endif
    115118#if HHI_MPI
    116119  Void  parseSPS            ( TComSPS* pcSPS, Bool bIsDepth );
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r56 r77  
    636636  {
    637637    AOF( pcCU->getResPredAvail( 0 ) );
    638     Bool bOK = pcCU->getResidualSamples( 0, m_ppcYuvResPred[uiDepth] );
     638    Bool bOK = pcCU->getResidualSamples( 0,
     639#if QC_SIMPLIFIEDIVRP_M24938
     640      true,
     641#endif
     642      m_ppcYuvResPred[uiDepth] );
    639643    AOF( bOK );
     644#if LG_RESTRICTEDRESPRED_M24766
     645        Int iPUResiPredShift[4];
     646        pcCU->getPUResiPredShift(iPUResiPredShift, 0);
     647        m_ppcYuvReco[uiDepth]->add(iPUResiPredShift, pcCU->getPartitionSize(0), m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
     648#else
    640649    m_ppcYuvReco[uiDepth]->add( m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
     650#endif
    641651  }
    642652#endif
  • trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r56 r77  
    9898  if( bResPredAllowed )
    9999  {
    100     bResPredAvailable       = pcSubCU->getResidualSamples( uiPUIdx );
     100    bResPredAvailable       = pcSubCU->getResidualSamples( uiPUIdx
     101#if QC_SIMPLIFIEDIVRP_M24938
     102      , false
     103#endif
     104      );
    101105  }
    102106
     
    104108  if( bResPredAvailable )
    105109  {
     110#if LG_RESTRICTEDRESPRED_M24766
     111          Int iPUResiPredShift[4];
     112          pcCU->getPUResiPredShift(iPUResiPredShift, uiAbsPartIdx);
     113          if(iPUResiPredShift[0] >= 0 || iPUResiPredShift[1] >= 0  || iPUResiPredShift[2] >= 0  || iPUResiPredShift[3] >= 0 )
     114#endif
    106115    m_pcEntropyDecoderIf->parseResPredFlag( pcCU, bResPredFlag, uiAbsPartIdx, uiDepth );
    107116  }
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r56 r77  
    7171#endif
    7272
     73#if VIDYO_VPS_INTEGRATION
     74  virtual Void  parseVPS                  ( TComVPS* pcVPS )                       = 0;
     75#endif
    7376#if HHI_MPI
    7477  virtual Void  parseSPS                  ( TComSPS* pcSPS, Bool bIsDepth )                       = 0;
     
    163166  Void    resetEntropy                ( TComSlice* p)           { m_pcEntropyDecoderIf->resetEntropy(p);                    }
    164167
     168#if VIDYO_VPS_INTEGRATION
     169  Void    decodeVPS                   ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); }
     170#endif
     171 
    165172#if HHI_MPI
    166173  Void    decodeSPS                   ( TComSPS* pcSPS, Bool bIsDepth ) { m_pcEntropyDecoderIf->parseSPS(pcSPS, bIsDepth); }
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r56 r77  
    8787  Void  setBitstream              ( TComInputBitstream* p  ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); }
    8888 
     89#if VIDYO_VPS_INTEGRATION
     90  Void  parseVPS                  ( TComVPS* pcVPS )  {}
     91#endif
    8992#if HHI_MPI
    9093  Void  parseSPS                  ( TComSPS* pcSPS, Bool bIsDepth ) {}
  • trunk/source/Lib/TLibDecoder/TDecSlice.cpp

    r56 r77  
    446446, m_ppsBuffer(16)
    447447, m_apsBuffer(64)
     448#if VIDYO_VPS_INTEGRATION
     449, m_vpsBuffer(16)
     450#endif
    448451{
    449452
     
    454457
    455458}
     459
     460#if VIDYO_VPS_INTEGRATION
     461TComVPS* ParameterSetManagerDecoder::getPrefetchedVPS  (Int vpsId)
     462{
     463  if (m_vpsBuffer.getPS(vpsId) != NULL )
     464  {
     465    return m_vpsBuffer.getPS(vpsId);
     466  }
     467  else
     468  {
     469    return getVPS(vpsId);
     470  }
     471}
     472#endif
    456473
    457474TComSPS* ParameterSetManagerDecoder::getPrefetchedSPS  (Int spsId)
     
    496513  m_ppsMap.mergePSList(m_ppsBuffer);
    497514  m_spsMap.mergePSList(m_spsBuffer);
     515#if VIDYO_VPS_INTEGRATION
     516  m_vpsMap.mergePSList(m_vpsBuffer);
     517#endif
    498518}
    499519
  • trunk/source/Lib/TLibDecoder/TDecSlice.h

    r56 r77  
    9696  Void     storePrefetchedAPS(TComAPS *aps)  { m_apsBuffer.storePS( aps->getAPSID(), aps); };
    9797  TComAPS* getPrefetchedAPS  (Int apsId);
    98 
     98#if VIDYO_VPS_INTEGRATION
     99  Void     storePrefetchedVPS(TComVPS *vps)  { m_vpsBuffer.storePS( vps->getVPSId(), vps); };
     100  TComVPS* getPrefetchedVPS  (Int vpsId);
     101#endif
    99102  Void     applyPrefetchedPS();
    100103
     
    103106  ParameterSetMap<TComPPS> m_ppsBuffer;
    104107  ParameterSetMap<TComAPS> m_apsBuffer;
     108#if VIDYO_VPS_INTEGRATION
     109        ParameterSetMap<TComVPS> m_vpsBuffer;
     110#endif
    105111};
    106112
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r57 r77  
    319319  m_tAppDecTop = pcTAppDecTop;
    320320#if DEPTH_MAP_GENERATION
     321#if VIDYO_VPS_INTEGRATION
     322  m_cDepthMapGenerator.init( &m_cPrediction, m_tAppDecTop->getVPSAccess(), m_tAppDecTop->getSPSAccess(), m_tAppDecTop->getAUPicAccess() );
     323#else
    321324  m_cDepthMapGenerator.init( &m_cPrediction, m_tAppDecTop->getSPSAccess(), m_tAppDecTop->getAUPicAccess() );
     325#endif
    322326#endif
    323327#if HHI_INTER_VIEW_RESIDUAL_PRED
     
    571575  TComSPS *sps = m_parameterSetManagerDecoder.getSPS(pps->getSPSId());
    572576  assert (sps != 0);
    573 
     577#if VIDYO_VPS_INTEGRATION
     578  TComVPS *vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId());
     579  assert (vps != 0);
     580  if( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA )
     581    // VPS can only be activated on IDR or CRA...
     582    getTAppDecTop()->getVPSAccess()->setActiveVPSId( sps->getVPSId() );
     583#endif
    574584  m_apcSlicePilot->setPPS(pps);
    575585  m_apcSlicePilot->setSPS(sps);
     586#if VIDYO_VPS_INTEGRATION
     587  m_apcSlicePilot->setVPS(vps);
     588#endif
    576589  pps->setSPS(sps);
    577590
     
    613626  m_apcSlicePilot->setPPS(m_parameterSetManagerDecoder.getPrefetchedPPS(0));
    614627  m_apcSlicePilot->setSPS(m_parameterSetManagerDecoder.getPrefetchedSPS(0));
     628#if VIDYO_VPS_INTEGRATION
     629  m_apcSlicePilot->setVPS(m_parameterSetManagerDecoder.getPrefetchedVPS(0));
     630#endif
    615631  m_apcSlicePilot->initTiles();
    616632
     
    629645  if( m_bFirstSliceInPicture )
    630646  {
     647#if VIDYO_VPS_INTEGRATION
     648    if( m_apcSlicePilot->getVPS()->getViewId(nalu.m_layerId) == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; }
     649    else { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, m_apcSlicePilot->getVPS()->getDepthFlag(nalu.m_layerId) )->getNalUnitTypeBaseView(); }
     650#else
    631651    if( nalu.m_viewId == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; }
    632652    else                     { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, nalu.m_isDepth )->getNalUnitTypeBaseView(); }
     653#endif
     654   
    633655    m_apcSlicePilot->setNalUnitTypeBaseViewMvc( m_nalUnitTypeBaseView );
    634656  }
     
    929951
    930952    // Set reference list
     953#if VIDYO_VPS_INTEGRATION
     954    pcSlice->setViewId( pcSlice->getVPS()->getViewId(nalu.m_layerId) );
     955    pcSlice->setIsDepth( pcSlice->getVPS()->getDepthFlag(nalu.m_layerId) );
     956#else
    931957    pcSlice->setViewId(m_viewId);
    932958    pcSlice->setIsDepth(m_isDepth);
     959#endif
    933960
    934961#if SONY_COLPIC_AVAILABILITY
     962#if VIDYO_VPS_INTEGRATION
     963    pcSlice->setViewOrderIdx( pcSlice->getVPS()->getViewOrderIdx(nalu.m_layerId) );
     964#else
    935965    pcSlice->setViewOrderIdx( pcPic->getViewOrderIdx() );
     966#endif
    936967#endif
    937968
     
    10511082}
    10521083
     1084#if VIDYO_VPS_INTEGRATION
     1085Void TDecTop::xDecodeVPS()
     1086{
     1087  TComVPS* vps = new TComVPS();
     1088 
     1089  m_cEntropyDecoder.decodeVPS( vps );
     1090  m_parameterSetManagerDecoder.storePrefetchedVPS(vps); 
     1091  getTAppDecTop()->getVPSAccess()->addVPS( vps );
     1092}
     1093#endif
    10531094
    10541095Void TDecTop::xDecodeSPS()
     
    11141155  switch (nalu.m_nalUnitType)
    11151156  {
     1157#if VIDYO_VPS_INTEGRATION
     1158    case NAL_UNIT_VPS:
     1159      xDecodeVPS();
     1160      return false;
     1161#endif
    11161162    case NAL_UNIT_SPS:
    11171163      xDecodeSPS();
  • trunk/source/Lib/TLibDecoder/TDecTop.h

    r57 r77  
    208208  Bool      xDecodeSlice(InputNALUnit &nalu, Int iSkipFrame, Int iPOCLastDisplay);
    209209#endif
     210#if VIDYO_VPS_INTEGRATION
     211        Void      xDecodeVPS();
     212#endif
    210213  Void      xDecodeSPS();
    211214  Void      xDecodePPS();
Note: See TracChangeset for help on using the changeset viewer.