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

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

submitted by Hendry (fhendry@…)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-12.0-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1039 r1053  
    10121012#if H_MV
    10131013Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS )
    1014 
     1014{
     1015  //TODO: ADD implementation for PTL. Need to add level info in each layer.
    10151016  WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0,             "splitting_flag" );
    10161017
     
    10841085  }
    10851086
     1087#if VPS_MISC_UPDATES   //These codes are moved from below.
     1088  if ( pcVPS->getNumIndependentLayers() > 1 )
     1089  {
     1090   WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" );
     1091  }
     1092  for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++)
     1093  {
     1094    for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++)
     1095    {
     1096      WRITE_CODE( pcVPS->getHighestLayerIdxPlus1( i, j ), pcVPS->getHighestLayerIdxPlus1Len( j )  , "highest_layer_idx_plus1" );
     1097    }
     1098  }
     1099#endif
     1100
    10861101  WRITE_FLAG( pcVPS->getVpsSubLayersMaxMinus1PresentFlag( ) ? 1 : 0 , "vps_sub_layers_max_minus1_present_flag" );
    10871102  if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() )
     
    11251140  }
    11261141
     1142#if !VPS_MISC_UPDATES
    11271143  if ( pcVPS->getNumIndependentLayers() > 1 )
    11281144  {
     
    11361152    }
    11371153  }
     1154#endif
     1155
    11381156  if (pcVPS->getNumLayerSets() > 1)
    11391157  {
     
    11521170    if( i >= pcVPS->getNumLayerSets( ) )   
    11531171    {     
     1172#if !VPS_MISC_UPDATES
    11541173      WRITE_UVLC( pcVPS->getLayerSetIdxForOlsMinus1( i ),      "layer_set_idx_for_ols_minus1[i]" );
    1155     }
    1156 
     1174#else
     1175      WRITE_CODE( pcVPS->getLayerSetIdxForOlsMinus1( i ), pcVPS->getLayerSetIdxForOlsMinus1Len( i ) ,      "layer_set_idx_for_ols_minus1[i]" );
     1176#endif
     1177    }
     1178
     1179#if !VPS_MISC_UPDATES
    11571180    if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultOutputLayerIdc() == 2 )
     1181#else
     1182    if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultOutputLayerIdc() >= 2 ) //according to the flag value 3 shall be treated as 2.
     1183#endif
    11581184    {       
    11591185      for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ); j++ )
     
    13711397  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    13721398  {
     1399#if I0045_BR_PR_ADD_LAYER_SET
     1400    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <  pcVPS->getNumLayerSets(); i++ )
     1401#else
    13731402    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
     1403#endif
    13741404    {
    13751405      for( Int j = 0; j  <=  pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ )
     
    14041434  else
    14051435  {
     1436#if I0045_VPS_VUI_VST_PARAMS
     1437    pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() - pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1 );
     1438#else
    14061439    pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );
     1440#endif
    14071441  }
    14081442
     
    14171451  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
    14181452  {
     1453#if I0045_VPS_VUI_VST_PARAMS
     1454    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1455    {
     1456      WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" );
     1457    }
     1458#else
    14191459    for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    14201460    {
     
    14291469      assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i  ) == ( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ) );
    14301470    }
     1471#endif
    14311472  }
    14321473  WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" );
     
    17331774      esb++;
    17341775      WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" );
     1776#if NON_REF_NAL_TYPE_DISCARDABLE
     1777      if (pcSlice->getDiscardableFlag( ))
     1778      {
     1779        assert(pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TRAIL_R &&
     1780          pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TSA_R &&
     1781          pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_STSA_R &&
     1782          pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL_R &&
     1783          pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R);
     1784      }
     1785#endif
    17351786    }
    17361787
     
    18931944      if (pcSlice->getSPS()->getTMVPFlagsPresent())
    18941945      {
     1946#if I0044_SLICE_TMVP
     1947        WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enabled_flag" );
     1948#else
    18951949        WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enable_flag" );
     1950#endif
    18961951      }
    18971952    }
Note: See TracChangeset for help on using the changeset viewer.