Changeset 1053 in 3DVCSoftware for branches/HTM-12.0-dev0/source/Lib/TLibDecoder


Ignore:
Timestamp:
25 Sep 2014, 02:15:29 (11 years ago)
Author:
qualcomm
Message:

Implementation of adoptions in:
G0131, G0031, H0042, I0044, I0045

submitted by Hendry (fhendry@…)

Location:
branches/HTM-12.0-dev0/source/Lib/TLibDecoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-12.0-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1039 r1053  
    392392      READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" );
    393393    }
     394#if INFERENCE_POC_RESET_INFO_PRESENT
     395    pcPPS->setPocResetInfoPresentFlag( false );
     396#endif
    394397#if !H_3D
    395398    if ( pcPPS->getPpsExtension6bits() )
     
    414417#endif
    415418  }
     419#if INFERENCE_POC_RESET_INFO_PRESENT
     420  else
     421  {
     422    pcPPS->setPpsRangeExtensionsFlag( false );
     423    pcPPS->setPpsMultilayerExtensionFlag( false );
     424    pcPPS->setPps3dExtensionFlag( false );
     425    pcPPS->setPocResetInfoPresentFlag( false );
     426  }
     427#endif
    416428}
    417429
     
    12741286    }
    12751287  }
     1288
     1289#if VPS_MISC_UPDATES   //These codes are moved from below
     1290  if ( pcVPS->getNumIndependentLayers() > 1 )
     1291  {
     1292   READ_UVLC( uiCode, "num_add_layer_sets"      ); pcVPS->setNumAddLayerSets( uiCode );
     1293  }
     1294  for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++)
     1295  {
     1296    for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++)
     1297    {
     1298      READ_CODE( pcVPS->getHighestLayerIdxPlus1Len( j ) , uiCode, "highest_layer_idx_plus1" ); pcVPS->setHighestLayerIdxPlus1( i, j, uiCode );
     1299    }
     1300  }
     1301#endif
     1302
    12761303  pcVPS->setRefLayers();
    12771304  READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 );
     
    13221349  }
    13231350
     1351#if !VPS_MISC_UPDATES   //These codes are moved to earlier position.
    13241352  if ( pcVPS->getNumIndependentLayers() > 1 )
    13251353  {
     
    13331361    }
    13341362  }
     1363#endif
     1364
    13351365  if (pcVPS->getNumLayerSets() > 1)
    13361366  {
     
    13511381    if( i >= pcVPS->getNumLayerSets( ) )   
    13521382    {       
     1383#if !VPS_MISC_UPDATES
    13531384      READ_UVLC( uiCode,      "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode );
    1354     }
    1355 
     1385#else
     1386      READ_CODE( pcVPS->getLayerSetIdxForOlsMinus1Len( i ), uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode );
     1387#endif
     1388    }
     1389
     1390#if !VPS_MISC_UPDATES
    13561391    if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultOutputLayerIdc() == 2 )
     1392#else
     1393    if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultOutputLayerIdc() >= 2 )  //According to the spec, value 3 shall be treated as 2
     1394#endif
    13571395    {       
    13581396      for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ); j++ )
     
    15211559  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    15221560  {
     1561#if I0045_BR_PR_ADD_LAYER_SET
     1562    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <  pcVPS->getNumLayerSets(); i++ )
     1563#else
    15231564    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
     1565#endif
    15241566    {
    15251567      for( Int j = 0; j  <=  pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ )
     
    15541596  else
    15551597  {
     1598#if I0045_VPS_VUI_VST_PARAMS
     1599    pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() - pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1);
     1600#else
    15561601    pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );
     1602#endif
    15571603  }
    15581604
     
    15651611  }
    15661612
     1613#if I0045_VPS_VUI_VST_PARAMS
     1614  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
     1615  {
     1616    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1617    {
     1618      READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode );
     1619    }
     1620  }
     1621  else if ( !pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
     1622  {
     1623    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1624    {
     1625      pcVPSVUI->setVpsVideoSignalInfoIdx( i, i );
     1626    }
     1627  }
     1628  else
     1629  {
     1630    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1631    {
     1632      pcVPSVUI->setVpsVideoSignalInfoIdx( i, 0 );
     1633    }
     1634  }
     1635#else
    15671636  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
    15681637  {
     
    15801649    }
    15811650  }
     1651#endif
    15821652  READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 );
    15831653  if( !pcVPSVUI->getTilesNotInUseFlag() )
     
    16411711  if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
    16421712  {
     1713#if VPS_MISC_UPDATES
     1714    assert(pcVPS->getTimingInfo()->getTimingInfoPresentFlag() == 1);
     1715#endif
    16431716    parseVpsVuiBspHrdParameters( pcVPS );
    16441717  }
     
    20082081      esb++;
    20092082      READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );
     2083#if NON_REF_NAL_TYPE_DISCARDABLE
     2084      if ( uiCode == 1 )
     2085      {
     2086        assert(rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TRAIL_R &&
     2087          rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TSA_R &&
     2088          rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_STSA_R &&
     2089          rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL_R &&
     2090          rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R);
     2091      }
     2092#endif
    20102093    }
    20112094
     
    22872370      if (rpcSlice->getSPS()->getTMVPFlagsPresent())
    22882371      {
     2372#if I0044_SLICE_TMVP
     2373        READ_FLAG( uiCode, "slice_temporal_mvp_enabled_flag" );
     2374#else
    22892375        READ_FLAG( uiCode, "slice_temporal_mvp_enable_flag" );
     2376#endif
    22902377        rpcSlice->setEnableTMVPFlag( uiCode == 1 ? true : false );
    22912378      }
     
    27232810#endif
    27242811  }
     2812#if INFERENCE_POC_MSB_VAL_PRESENT
     2813  else
     2814  {
     2815    rpcSlice->setSliceSegmentHeaderExtensionLength( 0 );
     2816    rpcSlice->setPocMsbValPresentFlag( false );
     2817  }
     2818#endif
    27252819
    27262820
  • branches/HTM-12.0-dev0/source/Lib/TLibDecoder/TDecTop.cpp

    r976 r1053  
    909909   }
    910910#endif
     911   
     912#if I0044_SLICE_TMVP
     913  if ( m_apcSlicePilot->getTLayer() == 0 && m_apcSlicePilot->getEnableTMVPFlag() == 0 )
     914  {
     915    //update all pics in the DPB such that they cannot be used for TMPV ref
     916    TComList<TComPic*>::iterator  iterRefPic = m_cListPic.begin(); 
     917    while( iterRefPic != m_cListPic.end() )
     918    {
     919      TComPic *refPic = *iterRefPic;
     920      if( ( refPic->getLayerId() == m_apcSlicePilot->getLayerId() ) && refPic->getReconMark() )
     921      {
     922        for(Int i = refPic->getNumAllocatedSlice()-1; i >= 0; i--)
     923        {
     924
     925          TComSlice *refSlice = refPic->getSlice(i);
     926          refSlice->setAvailableForTMVPRefFlag( false );
     927        }
     928      }
     929      iterRefPic++;
     930    }
     931  }
     932  m_apcSlicePilot->setAvailableForTMVPRefFlag( true );
     933#endif
     934
    911935  xActivateParameterSets();
    912936
     
    11321156#endif   
    11331157#endif
     1158
     1159#if I0044_SLICE_TMVP
     1160    if( m_layerId > 0 && !pcSlice->isIntra() && pcSlice->getEnableTMVPFlag() )
     1161    {
     1162      TComPic* refPic = pcSlice->getRefPic(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());
     1163
     1164      assert ( refPic );
     1165      assert ( refPic->getPicSym()->getSlice(0)->getAvailableForTMVPRefFlag() == true );
     1166    }
     1167#endif
     1168
    11341169    // For generalized B
    11351170    // note: maybe not existed case (always L0 is copied to L1 if L1 is empty)
Note: See TracChangeset for help on using the changeset viewer.