Changeset 467 in SHVCSoftware for branches/SHM-4.0-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
14 Nov 2013, 00:54:41 (11 years ago)
Author:
seregin
Message:

undelete the code from the previous revision

Location:
branches/SHM-4.0-dev/source/Lib/TLibDecoder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r466 r467  
    450450  {
    451451    READ_FLAG(   uiCode, "tiles_fixed_structure_flag");               pcVUI->setTilesFixedStructureFlag(uiCode);
    452 #if M0464_TILE_BOUNDARY_ALIGNED_FLAG
    453     if ( pcSPS->getLayerId() > 0 )
    454     {
    455       READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVUI->setTileBoundariesAlignedFlag( uiCode == 1 );
    456     }
    457 #endif
    458452    READ_FLAG(   uiCode, "motion_vectors_over_pic_boundaries_flag");  pcVUI->setMotionVectorsOverPicBoundariesFlag(uiCode);
    459453    READ_FLAG(   uiCode, "restricted_ref_pic_lists_flag");            pcVUI->setRestrictedRefPicListsFlag(uiCode);
     
    542536}
    543537
    544 #if SPS_SUB_LAYER_INFO
     538#if SVC_EXTENSION
    545539Void TDecCavlc::parseSPS(TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager)
    546540#else
     
    554548  UInt  uiCode;
    555549  READ_CODE( 4,  uiCode, "sps_video_parameter_set_id");          pcSPS->setVPSId        ( uiCode );
    556 #if SPS_SUB_LAYER_INFO
     550#if SVC_EXTENSION
    557551  if(pcSPS->getLayerId() == 0)
    558552  {
     
    562556
    563557    READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" );               pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false );
    564 #if SPS_SUB_LAYER_INFO
     558#if SVC_EXTENSION
    565559  }
    566560  else
     
    569563    pcSPS->setTemporalIdNestingFlag( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId())->getTemporalNestingFlag() );
    570564  }
    571 #endif
    572565#if IL_SL_SIGNALLING_N0371
    573566  pcSPS->setVPS( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId()) );
    574567  pcSPS->setSPS( pcSPS->getLayerId(), pcSPS );
    575568#endif
     569#endif
    576570  if ( pcSPS->getMaxTLayers() == 1 )
    577571  {
    578572    // sps_temporal_id_nesting_flag must be 1 when sps_max_sub_layers_minus1 is 0
    579 #if SPS_SUB_LAYER_INFO
     573#if SVC_EXTENSION
    580574    assert( pcSPS->getTemporalIdNestingFlag() == true );
    581575#else
     
    841835  assert( uiCode == 0 );
    842836#endif
    843 #if SCALED_REF_LAYER_OFFSETS
    844837  if( pcSPS->getLayerId() > 0 )
    845838  {
     
    855848    }
    856849  }
    857 #endif
    858850#if M0463_VUI_EXT_ILP_REF
    859851  ////   sps_extension_vui_parameters( )
     
    1000992}
    1001993
     994#if SVC_EXTENSION
    1002995#if VPS_EXTNS
    1003996Void TDecCavlc::parseVPSExtension(TComVPS *vps)
     
    10181011  vps->setNumScalabilityTypes(numScalabilityTypes);
    10191012
    1020 #if VPS_SPLIT_FLAG
    10211013  for(j = 0; j < numScalabilityTypes - vps->getSplittingFlag(); j++)
    1022 #else
    1023   for(j = 0; j < numScalabilityTypes; j++)
    1024 #endif
    10251014  {
    10261015    READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" ); vps->setDimensionIdLen(j, uiCode + 1);
    10271016  }
    1028 #if VPS_SPLIT_FLAG
     1017
    10291018  if(vps->getSplittingFlag())
    10301019  {
     
    10381027    numBits = 6;
    10391028  }
    1040 #else
    1041   if(vps->getSplittingFlag())
    1042   {
    1043     UInt numBits = 0;
    1044     for(j = 0; j < numScalabilityTypes; j++)
    1045     {
    1046       numBits += vps->getDimensionIdLen(j);
    1047     }
    1048     assert( numBits <= 6 );
    1049   }
    1050 #endif
    10511029
    10521030  READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" ); vps->setNuhLayerIdPresentFlag(uiCode ? true : false);
     
    10661044    vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i);
    10671045
    1068 #if VPS_SPLIT_FLAG
    1069     if(!vps->getSplittingFlag())
    1070 #endif
     1046    if( !vps->getSplittingFlag() )
     1047    {
    10711048    for(j = 0; j < numScalabilityTypes; j++)
    10721049    {
     
    10741051      assert( uiCode <= vps->getMaxLayerId() );
    10751052    }
     1053  }
    10761054  }
    10771055#endif
     
    10881066  }
    10891067#endif
    1090 #if VPS_MOVE_DIR_DEPENDENCY_FLAG
    10911068#if VPS_EXTN_DIRECT_REF_LAYERS
    10921069  // For layer 0
     
    11081085  }
    11091086#endif
    1110 #endif
    11111087#if JCTVC_M0203_INTERLAYER_PRED_IDC
    11121088#if N0120_MAX_TID_REF_PRESENT_FLAG
     
    11441120#if VPS_EXTN_PROFILE_INFO
    11451121  // Profile-tier-level signalling
    1146 #if VPS_PROFILE_OUTPUT_LAYERS
    11471122  READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1" );     assert( uiCode == (vps->getNumLayerSets() - 1) );
    11481123  READ_CODE(  6, uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 );
    11491124  vps->getPTLForExtnPtr()->resize(vps->getNumProfileTierLevel());
    11501125  for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
    1151 #else
    1152   vps->getPTLForExtnPtr()->resize(vps->getNumLayerSets());
    1153   for(Int idx = 1; idx <= vps->getNumLayerSets() - 1; idx++)
    1154 #endif
    11551126  {
    11561127    READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); vps->setProfilePresentFlag(idx, uiCode ? true : false);
    11571128    if( !vps->getProfilePresentFlag(idx) )
    11581129    {
    1159 #if VPS_PROFILE_OUTPUT_LAYERS
    11601130      READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1);
    1161 #else
    1162       READ_UVLC( uiCode, "vps_profile_layer_set_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1);
    1163 #endif
    11641131      assert( vps->getProfileLayerSetRef(idx) < idx );
     1132
    11651133      // Copy profile information as indicated
    11661134      vps->getPTLForExtn(idx)->copyProfileInfo( vps->getPTLForExtn( vps->getProfileLayerSetRef(idx) ) );
     
    11701138#endif
    11711139
    1172 #if VPS_PROFILE_OUTPUT_LAYERS
    11731140  READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); vps->setMoreOutputLayerSetsThanDefaultFlag( uiCode ? true : false );
    11741141  Int numOutputLayerSets = 0;
     
    12311198    READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" );     vps->setProfileLevelTierIdx(i, uiCode);
    12321199  }
    1233 #else
    1234 #if VPS_EXTN_OP_LAYER_SETS
    1235   // Target output layer signalling
    1236   READ_UVLC( uiCode,            "vps_num_output_layer_sets"); vps->setNumOutputLayerSets(uiCode);
    1237   for(i = 0; i < vps->getNumOutputLayerSets(); i++)
    1238   {
    1239 #if VPS_OUTPUT_LAYER_SET_IDX
    1240     READ_UVLC( uiCode,           "vps_output_layer_set_idx_minus1[i]"); vps->setOutputLayerSetIdx(i, uiCode + 1);
    1241 #else
    1242     READ_UVLC( uiCode,           "vps_output_layer_set_idx[i]"); vps->setOutputLayerSetIdx(i, uiCode);
    1243 #endif
    1244     Int lsIdx = vps->getOutputLayerSetIdx(i);
    1245     for(j = 0; j <= vps->getMaxLayerId(); j++)
    1246     {
    1247       if(vps->getLayerIdIncludedFlag(lsIdx, j))
    1248       {
    1249         READ_FLAG( uiCode, "vps_output_layer_flag[lsIdx][j]"); vps->setOutputLayerFlag(lsIdx, j, uiCode);
    1250       }
    1251     }
    1252   }
    1253 #endif
    1254 #endif
     1200
    12551201#if REPN_FORMAT_IN_VPS
    12561202  READ_FLAG( uiCode, "rep_format_idx_present_flag");
     
    13141260#endif
    13151261
    1316 #if !VPS_MOVE_DIR_DEPENDENCY_FLAG
    1317 #if VPS_EXTN_DIRECT_REF_LAYERS
    1318   // For layer 0
    1319   vps->setNumDirectRefLayers(0, 0);
    1320   // For other layers
    1321   for( Int layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++)
    1322   {
    1323     UInt numDirectRefLayers = 0;
    1324     for( Int refLayerCtr = 0; refLayerCtr < layerCtr; refLayerCtr++)
    1325     {
    1326       READ_FLAG(uiCode, "direct_dependency_flag[i][j]" ); vps->setDirectDependencyFlag(layerCtr, refLayerCtr, uiCode? true : false);
    1327       if(uiCode)
    1328       {
    1329         vps->setRefLayerId(layerCtr, numDirectRefLayers, refLayerCtr);
    1330         numDirectRefLayers++;
    1331       }
    1332     }
    1333     vps->setNumDirectRefLayers(layerCtr, numDirectRefLayers);
    1334   }
    1335 #endif
    1336 #endif
    13371262#if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS
    13381263  READ_UVLC( uiCode,           "direct_dep_type_len_minus2"); vps->setDirectDepTypeLen(uiCode+2);
     
    14831408}
    14841409#endif
     1410#endif //SVC_EXTENSION
     1411
    14851412Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager)
    14861413{
     
    15551482  if(!rpcSlice->getDependentSliceSegmentFlag())
    15561483  {
     1484#if SVC_EXTENSION
    15571485#if POC_RESET_FLAG
    15581486    Int iBits = 0;
     
    15721500    }
    15731501#else
    1574 #if SH_DISCARDABLE_FLAG
    15751502    if(rpcSlice->getPPS()->getNumExtraSliceHeaderBits()>0)
    15761503    {
     
    15811508      READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
    15821509    }
    1583 #else
     1510#endif
     1511#else //SVC_EXTENSION
    15841512    for (Int i = 0; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
    15851513    {
    15861514      READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
    15871515    }
    1588 #endif
    1589 #endif
     1516#endif //SVC_EXTENSION
    15901517
    15911518    READ_UVLC (    uiCode, "slice_type" );            rpcSlice->setSliceType((SliceType)uiCode);
  • branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCAVLC.h

    r466 r467  
    7272  Void  parseQtRootCbf      ( UInt uiAbsPartIdx, UInt& uiQtRootCbf );
    7373  Void  parseVPS            ( TComVPS* pcVPS );
     74#if SPS_EXTENSION
    7475#if VPS_EXTNS
    7576  Void  parseVPSExtension   ( TComVPS* pcVPS );
     
    8283  Void  parseRepFormat      ( RepFormat *repFormat );
    8384#endif
    84 #if SPS_SUB_LAYER_INFO
    8585  Void  parseSPS            ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager );
    86 #else
     86  Void  parseSPSExtension    ( TComSPS* pcSPS );
     87#else //SVC_EXTENSION
    8788  Void  parseSPS            ( TComSPS* pcSPS );
    88 #endif
    89 #if SPS_EXTENSION
    90   Void parseSPSExtension    ( TComSPS* pcSPS );
    91 #endif
     89#endif //SVC_EXTENSION
    9290  Void  parsePPS            ( TComPPS* pcPPS);
    9391  Void  parseVUI            ( TComVUI* pcVUI, TComSPS* pcSPS );
  • branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecEntropy.h

    r466 r467  
    6666
    6767  virtual Void  parseVPS                  ( TComVPS* pcVPS )                       = 0;
    68 #if SPS_SUB_LAYER_INFO
     68#if SVC_EXTENSION
    6969  virtual Void  parseSPS                  ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager )           = 0;
    7070#else
     
    134134  Void    resetEntropy                ( TComSlice* p)           { m_pcEntropyDecoderIf->resetEntropy(p);                    }
    135135  Void    decodeVPS                   ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); }
    136 #if SPS_SUB_LAYER_INFO
     136#if SVC_EXTENSION
    137137  Void    decodeSPS                   ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager )    { m_pcEntropyDecoderIf->parseSPS(pcSPS, parameterSetManager);                    }
    138138#else
  • branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecSbac.h

    r466 r467  
    7676  Void  setBitstream              ( TComInputBitstream* p  ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); }
    7777  Void  parseVPS                  ( TComVPS* /*pcVPS*/ ) {}
    78 #if SPS_SUB_LAYER_INFO
     78#if SVC_EXTENSION
    7979  Void  parseSPS                  ( TComSPS* /*pcSPS*/, ParameterSetManagerDecoder * /*parameterSetManager*/ ) {}
    8080#else
Note: See TracChangeset for help on using the changeset viewer.