Ignore:
Timestamp:
3 May 2013, 17:09:57 (12 years ago)
Author:
tech
Message:

Further minor cleanups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r362 r367  
    680680  if (uiCode)
    681681  {
    682 #if H_MV
    683     READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" );    pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);
    684 #else
    685682    while ( xMoreRbspData() )
    686683    {
    687684      READ_FLAG( uiCode, "sps_extension_data_flag");
    688685    }
    689 #endif
    690686  }
    691687}
     
    697693  READ_CODE( 4,  uiCode,  "vps_video_parameter_set_id" );         pcVPS->setVPSId( uiCode );
    698694  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
    699 #if H_MV
    700   READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayers( uiCode + 1 );
    701 #else
    702695  READ_CODE( 6,  uiCode,  "vps_reserved_zero_6bits" );            assert(uiCode == 0);
    703 #endif
    704696  READ_CODE( 3,  uiCode,  "vps_max_sub_layers_minus1" );          pcVPS->setMaxTLayers( uiCode + 1 );
    705697  READ_FLAG(     uiCode,  "vps_temporal_id_nesting_flag" );       pcVPS->setTemporalNestingFlag( uiCode ? true:false );
    706698  assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
    707 #if H_MV
    708   READ_CODE( 16, uiCode,  "vps_extension_offset" );               
    709 #else
    710699  READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
    711 #endif
    712700  parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1);
    713701#if SIGNAL_BITRATE_PICRATE_IN_VPS
     
    739727
    740728  assert( pcVPS->getNumHrdParameters() < MAX_VPS_OP_SETS_PLUS1 );
    741 #if H_MV
    742   assert( pcVPS->getMaxNuhLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 );
    743   READ_CODE( 6, uiCode, "vps_max_nuh_layer_id" );   pcVPS->setMaxNuhLayerId( uiCode );
    744 #else
    745729  assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 );
    746730  READ_CODE( 6, uiCode, "vps_max_nuh_reserved_zero_layer_id" );   pcVPS->setMaxNuhReservedZeroLayerId( uiCode );
    747 #endif
    748731  READ_UVLC(    uiCode, "vps_max_op_sets_minus1" );               pcVPS->setMaxOpSets( uiCode + 1 );
    749732  for( UInt opsIdx = 1; opsIdx <= ( pcVPS->getMaxOpSets() - 1 ); opsIdx ++ )
    750733  {
    751734    // Operation point set
    752 #if H_MV
    753     for( UInt i = 0; i <= pcVPS->getMaxNuhLayerId(); i ++ )
    754 #else
    755735    for( UInt i = 0; i <= pcVPS->getMaxNuhReservedZeroLayerId(); i ++ )
    756 #endif
    757736    {
    758737      READ_FLAG( uiCode, "layer_id_included_flag[opsIdx][i]" );     pcVPS->setLayerIdIncludedFlag( uiCode == 1 ? true : false, opsIdx, i );
     
    793772  if (uiCode)
    794773  {
    795 #if H_MV
    796     m_pcBitstream->readOutTrailingBits();
    797 
    798     READ_FLAG( uiCode, "avc_base_layer_flag" );                     pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );
    799     READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
    800 
    801     // Parse scalability_mask[i]   
    802     for( Int sIdx = 0; sIdx < MAX_NUM_SCALABILITY_TYPES; sIdx++ )
    803     {
    804       READ_FLAG( uiCode,  "scalability_mask[i]" );                  pcVPS->setScalabilityMask( sIdx, uiCode == 1 ? true : false );     
    805     }
    806 
    807     Int numScalabilityTypes = pcVPS->getNumScalabilityTypes();
    808 
    809     // Parse dimension_id_len_minus1[j]   
    810     for( Int sIdx = 0; sIdx < numScalabilityTypes; sIdx++ )
    811     {
    812         READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" );       pcVPS->setDimensionIdLen( sIdx, uiCode + 1 );
    813     }
    814 
    815     // vps_nuh_layer_id_present_flag
    816     READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" );           pcVPS->setVpsNuhLayerIdPresentFlag( uiCode == 1 ? true : false );
    817 
    818     // parse layer_id_in_nuh[i] and derive LayerIdInVps
    819     pcVPS->setLayerIdInNuh( 0, 0 ); pcVPS->setLayerIdInVps( 0, 0 );
    820    
    821     for( Int layer = 1; layer <= pcVPS->getMaxLayers() - 1; layer++ )
    822     {
    823       UInt layerIdInNuh;
    824       if ( pcVPS->getVpsNuhLayerIdPresentFlag() )
    825       {
    826         READ_CODE( 6, uiCode, "layer_id_in_nuh[i]" );                layerIdInNuh = uiCode;
    827       }
    828       else
    829       {
    830         layerIdInNuh = layer;
    831       }     
    832 
    833       pcVPS->setLayerIdInNuh( layer, layerIdInNuh );
    834       pcVPS->setLayerIdInVps( layerIdInNuh, layer );
    835 
    836       // parse dimension_id[i][j]
    837       for( Int sIdx = 0; sIdx < numScalabilityTypes; sIdx++ )
    838       {
    839           READ_CODE( pcVPS->getDimensionIdLen( sIdx ), uiCode, "dimension_id[i][j]" );  pcVPS->setDimensionId( layer, sIdx, uiCode );
    840       }
    841     }
    842 
    843     for( Int layerSet = 1; layerSet <= pcVPS->getMaxOpSets() - 1; layerSet++ )
    844     {
    845       READ_FLAG(  uiCode, "vps_profile_present_flag[lsIdx]" );    pcVPS->setVpsProfilePresentFlag( layerSet, uiCode == 1 ? true : false );
    846       if( pcVPS->getVpsProfilePresentFlag( layerSet ) == false )
    847       {
    848         READ_UVLC( uiCode, "profile_layer_set_ref_minus1[lsIdx]" ); pcVPS->setProfileLayerSetRefMinus1( layerSet, uiCode );
    849       }
    850 
    851       parsePTL ( pcVPS->getPTL( layerSet ), pcVPS->getVpsProfilePresentFlag( layerSet ), pcVPS->getMaxTLayers()-1);
    852       if( pcVPS->getVpsProfilePresentFlag( layerSet ) == false )
    853       {
    854         TComPTL temp = *pcVPS->getPTL( layerSet );
    855         *pcVPS->getPTL( layerSet ) = *pcVPS->getPTL( pcVPS->getProfileLayerSetRefMinus1( layerSet ) + 1 );
    856         pcVPS->getPTL( layerSet )->copyLevelFrom( &temp );
    857       }
    858     }
    859 
    860     READ_UVLC( uiCode, "num_output_layer_sets" );                  pcVPS->setNumOutputLayerSets( uiCode );
    861    
    862     for( Int layerSet = 0; layerSet < pcVPS->getNumOutputLayerSets(); layerSet++ )
    863     {
    864       READ_UVLC( uiCode, "output_layer_set_idx[i]" );              pcVPS->setOutputLayerSetIdx( layerSet, uiCode );
    865       for( Int layer = 0; layer <= pcVPS->getMaxNuhLayerId(); layer++ )
    866       {
    867         if( pcVPS->getLayerIdIncludedFlag( pcVPS->getOutputLayerSetIdx( layerSet ), layer ) == true )
    868         {
    869           READ_FLAG( uiCode, "output_layer_flag" );                 pcVPS->setOutputLayerFlag( layerSet, layer, uiCode == 1 ? true : false );
    870         }
    871       }
    872     }
    873 
    874     for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )
    875     {
    876       for( Int j = 0; j < i; j++ )
    877       {
    878         READ_FLAG( uiCode, "direct_dependency_flag[i][j]" );             pcVPS->setDirectDependencyFlag( i, j, uiCode );
    879       }
    880     }
    881    
    882     READ_FLAG( uiCode,  "vps_extension2_flag" );
    883     if (uiCode)
    884     {
    885       while ( xMoreRbspData() )
    886       {
    887         READ_FLAG( uiCode, "vps_extension2_data_flag");
    888       }
    889     }
    890 
    891     pcVPS->checkVPSExtensionSyntax();
    892 
    893     pcVPS->calcIvRefLayers();
    894 
    895 #else
    896774    while ( xMoreRbspData() )
    897775    {
    898776      READ_FLAG( uiCode, "vps_extension_data_flag");
    899777    }
    900 #endif   
    901778  }
    902779 
     
    914791  TComPPS* pps = NULL;
    915792  TComSPS* sps = NULL;
    916 #if H_MV
    917   TComVPS* vps = NULL;
    918 #endif
    919793
    920794  UInt firstSliceSegmentInPic;
     
    931805  //!KS: need to add error handling code here, if SPS is not available
    932806  assert(sps!=0);
    933 #if H_MV
    934   vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId());
    935   assert(vps!=0);
    936   rpcSlice->setVPS(vps);
    937 #endif
    938807  rpcSlice->setSPS(sps);
    939808  rpcSlice->setPPS(pps);
     
    15231392  for (Int i = 0; i < maxNumSubLayersMinus1; i++)
    15241393  {
    1525 #if !H_MV
    15261394    if(profilePresentFlag)
    15271395    {
    1528 #endif
    15291396      READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode);
    1530 #if H_MV
    1531     rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) );
    1532 #else
    1533     }
    1534 #endif
     1397    }
    15351398    READ_FLAG( uiCode, "sub_layer_level_present_flag[i]"   ); rpcPTL->setSubLayerLevelPresentFlag  (i, uiCode);
    15361399  }
Note: See TracChangeset for help on using the changeset viewer.