Ignore:
Timestamp:
28 Mar 2014, 01:17:13 (11 years ago)
Author:
tech
Message:

Cleanups part 7.

File:
1 edited

Legend:

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

    r877 r882  
    366366
    367367  READ_FLAG( uiCode, "pps_extension_flag");
    368 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
    369368  if (uiCode)
    370369  {
     
    383382    if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) )
    384383    {
    385 #if H_MV_HLS_7_POC_P0041
    386384      READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
    387 #endif
    388385    }
    389386
     
    406403#endif
    407404  }
    408 #else
    409   if (uiCode)
    410   {
    411 #if H_3D
    412     parsePPSExtension( pcPPS, pcVPS );
    413     READ_FLAG( uiCode, "pps_extension2_flag");
    414     if ( uiCode )
    415     {
    416 #endif
    417       while ( xMoreRbspData() )
    418       {
    419         READ_FLAG( uiCode, "pps_extension_data_flag");
    420       }
    421 #if H_3D
    422     }
    423 #endif
    424   }
    425 #endif
    426405}
    427406
     
    849828  assert(uiCode <= 12);
    850829
    851 #if H_MV_HLS_7_SPS_P0155_16_32
     830#if H_MV
    852831  if ( pcSPS->getLayerId() == 0 )
    853832  { 
     
    888867    }
    889868  }
    890 #if H_MV_HLS_7_SPS_P0155_16_32
     869#if H_MV
    891870  }
    892871#endif
     
    10531032    READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); pcSPS->setScaledRefLayerRightOffset( j, iCode );
    10541033    READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode );
    1055 #if H_MV_HLS_7_RESERVED_FLAGS
    10561034    READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" );
    1057 #endif
    10581035  }
    10591036}
     
    10921069  assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
    10931070
    1094 #if H_MV_HLS_7_VPS_P0125_24
    10951071  READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
    1096 #else
    1097 #if H_MV && !H_MV_HLS7_GEN
    1098   READ_CODE( 16, uiCode,  "vps_extension_offset" );               
    1099 #else
    1100   READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
    1101 #endif
    1102 #endif
    11031072  parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1);
    11041073  UInt subLayerOrderingInfoPresentFlag;
     
    12121181  READ_FLAG( uiCode, "avc_base_layer_flag" );                     pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );
    12131182
    1214 #if !H_MV_HLS_7_VPS_P0307_23
    1215   READ_FLAG( uiCode, "vps_vui_present_flag" );                    pcVPS->setVpsVuiPresentFlag( uiCode == 1 );
    1216   if ( pcVPS->getVpsVuiPresentFlag() )
    1217   { 
    1218   READ_CODE( 16, uiCode, "vps_vui_offset" );                      pcVPS->setVpsVuiOffset( uiCode );
    1219   }
    1220 #endif
    1221 
    12221183  READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
    12231184
     
    13251286
    13261287  READ_FLAG( uiCode, "all_ref_layers_active_flag" );             pcVPS->setAllRefLayersActiveFlag( uiCode == 1 );
    1327 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1328   READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1"      );  pcVPS->setVpsNumberLayerSetsMinus1    ( uiCode );
    1329 #endif
    1330 
    1331 #if !H_MV_HLS_7_VPS_P0306_22
    1332   READ_CODE( 6,  uiCode, "vps_num_profile_tier_level_minus1" );  pcVPS->setVpsNumProfileTierLevelMinus1( uiCode );
    1333 #else
     1288
    13341289  READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" );  pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 
    1335 #endif
     1290
    13361291  for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
    13371292  {
    13381293    READ_FLAG(  uiCode, "vps_profile_present_flag[i]" );    pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );
    1339 #if !H_MV_HLS_7_VPS_P0048_14
    1340     if( !pcVPS->getVpsProfilePresentFlag( i ) )
    1341     {
    1342       READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode );
    1343       pcVPS->checkProfileRefMinus1( i );     
    1344     }
    1345 #endif
    13461294    parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
    13471295    if( !pcVPS->getVpsProfilePresentFlag( i ) )
    13481296    {
    13491297      TComPTL temp = *pcVPS->getPTL( i );
    1350 #if H_MV_HLS_7_VPS_P0048_14
    13511298      *pcVPS->getPTL( i ) = *pcVPS->getPTL( i - 1 );
    1352 #else
    1353       *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 );
    1354 #endif
    13551299      pcVPS->getPTL( i )->copyLevelFrom( &temp );
    13561300    }
    13571301  }
    13581302
    1359 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    13601303  READ_UVLC( uiCode, "num_add_output_layer_sets"      ); pcVPS->setNumAddOutputLayerSets( uiCode );
    13611304  pcVPS->initTargetLayerIdLists( );
     
    13651308  } 
    13661309
    1367 #else
    1368   Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;
    1369 
    1370   READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); pcVPS->setMoreOutputLayerSetsThanDefaultFlag( uiCode == 1 );
    1371 
    1372   if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )
    1373   {
    1374     READ_CODE( 10, uiCode, "num_add_output_layer_sets_minus1"      ); pcVPS->setNumAddOutputLayerSetsMinus1( uiCode );
    1375     numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1);
    1376   }
    1377 
    1378   if( numOutputLayerSets > 1)
    1379   {
    1380     READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" ); pcVPS->setDefaultOneTargetOutputLayerIdc( uiCode );
    1381     pcVPS->checkDefaultOneTargetOutputLayerIdc();
    1382   } 
    1383 #endif
    1384 
    13851310  pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 ));
    13861311  pcVPS->setOutputLayerSetIdxMinus1(0, -1);
    13871312
    1388 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    13891313  pcVPS->deriveTargetLayerIdList( 0 );
    13901314  for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
    13911315  {
    13921316    if( i > pcVPS->getVpsNumLayerSetsMinus1( ) )   
    1393 #else
    1394   for( Int i = 1; i < numOutputLayerSets; i++ )
    1395   {
    1396     if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )
    1397 #endif
    13981317    {       
    13991318      READ_UVLC( uiCode,      "output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode );
    1400 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    14011319    }
    14021320
     
    14161334    }
    14171335    pcVPS->deriveTargetLayerIdList( i );
    1418 #else
    1419       for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )
    1420       {
    1421         READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 );
    1422       }       
    1423     }
    1424     else
    1425     { // These inference rules would also be helpful in spec text
    1426       pcVPS->setOutputLayerSetIdxMinus1(i, i - 1 );
    1427       for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )
    1428       {             
    1429         pcVPS->setOutputLayerFlag(i,j, pcVPS->inferOutputLayerFlag( i, j ));
    1430       }
    1431     }
    1432 #endif
     1336
    14331337    if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
    14341338    {     
     
    14361340    }
    14371341
    1438 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    14391342    if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 )
    14401343    {
     
    14421345    }
    14431346  }
    1444 #else
    1445   }
    1446   if( pcVPS->getMaxLayersMinus1() > 0 )
    1447   {
    1448     READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 );
    1449   }
    1450 #endif
    1451 
    1452 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1453   pcVPS->deriveTargetLayerIdLists();
    1454 #endif
    14551347
    14561348  READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 );
    14571349  if ( pcVPS->getRepFormatIdxPresentFlag() )
    14581350  {
    1459 #if H_MV_HLS_7_VPS_P0306_22
    14601351    READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );
    1461 #else
    1462     READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );
    1463 #endif
    14641352  }
    14651353
     
    14791367      if( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
    14801368      {
    1481 #if H_MV_HLS_7_VPS_P0306_22
    14821369        READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
    1483 #else
    1484         READ_CODE( 8, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
    1485 #endif
    14861370      }
    14871371    }
     
    15001384  }
    15011385
    1502 #if H_MV_HLS_7_RESERVED_FLAGS
    15031386  READ_FLAG( uiCode, "vps_reserved_zero_flag" );
    1504 #endif
    15051387  parseDpbSize( pcVPS );
    15061388
     
    15311413  } 
    15321414
    1533 #if H_MV_HLS_7_VPS_P0307_23
    15341415  READ_UVLC( uiCode, "vps_non_vui_extension_length" ); pcVPS->setVpsNonVuiExtensionLength( uiCode );
    15351416  for ( Int i = 1; i <= pcVPS->getVpsNonVuiExtensionLength(); i++ )
     
    15381419  }
    15391420  READ_FLAG( uiCode, "vps_vui_present_flag" );  pcVPS->setVpsVuiPresentFlag( uiCode == 1 );
    1540 #endif
    1541 #if !H_MV_HLS_7_RESERVED_FLAGS
    1542   READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" );
    1543 #endif
    15441421  if( pcVPS->getVpsVuiPresentFlag() )
    15451422  {
     
    15471424    parseVPSVUI( pcVPS );
    15481425  }     
    1549 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    15501426  {
    15511427    TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( );
     
    15531429    pcVPSVUI->inferVpsVui( false );
    15541430  }
    1555 #endif
    15561431
    15571432  pcVPS->checkVPSExtensionSyntax();
     
    16011476    READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 );
    16021477  }
    1603 #if H_MV_HLS_7_MISC_P0068_21
    16041478  if( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) )
    16051479  {
    16061480    READ_FLAG( uiCode, "all_layers_idr_aligned_flag" ); pcVPSVUI->setAllLayersIdrAlignedFlag( uiCode == 1 );
    16071481  }
    1608 #endif
    16091482  READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 );
    16101483  READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 );
    16111484  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    16121485  {
    1613 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    16141486    for( Int i = 0; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
    1615 #else
    1616     for( Int i = 0; i  <=  pcVPS->getVpsNumberLayerSetsMinus1(); i++ )
    1617 #endif
    16181487    {
    16191488      for( Int j = 0; j  <=  pcVPS->getMaxTLayers(); j++ )
     
    16411510  }
    16421511
    1643 #if H_MV_HLS_7_VPS_P0076_15
    16441512  READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );
    16451513  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
     
    16751543    }
    16761544  }
    1677 #endif
    16781545
    16791546  READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 );
     
    17121579  }
    17131580
    1714 #if H_MV_HLS_7_RESERVED_FLAGS
    17151581  READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" );
    1716 #endif
    1717 
    17181582  READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 );
    17191583
     
    17371601  }
    17381602
    1739 #if !H_MV_HLS_7_VPS_P0076_15
    1740   READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );
    1741   if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
    1742   {
    1743     READ_CODE( 4, uiCode, "vps_num_video_signal_info_minus1" ); pcVPSVUI->setVpsNumVideoSignalInfoMinus1( uiCode );
    1744   }
    1745   else
    1746   {
    1747     pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );
    1748   }
    1749 
    1750   for( Int i = 0; i <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1(); i++ )
    1751   {
    1752     assert( pcVPSVUI->getVideoSignalInfo( i ) == NULL );
    1753     TComVideoSignalInfo* curVideoSignalInfo = new TComVideoSignalInfo();     
    1754     parseVideoSignalInfo( curVideoSignalInfo );
    1755     pcVPSVUI->setVideoSignalInfo(i, curVideoSignalInfo );
    1756   }
    1757  
    1758   if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
    1759   {
    1760     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1761     {
    1762       READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode );
    1763       assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() );
    1764     }
    1765   }
    1766   else
    1767   {
    1768     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1769     {
    1770       pcVPSVUI->setVpsVideoSignalInfoIdx( i, pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i );
    1771     }
    1772   }
    1773 #endif
    17741603  READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 );
    17751604  if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
     
    17771606    parseVpsVuiBspHrdParameters( pcVPS );
    17781607}
    1779 #if H_MV_HLS_7_MISC_P0182_13
    17801608  for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
    17811609  {
     
    17851613    }
    17861614  }
    1787 #endif
    17881615}
    17891616
     
    18641691  { 
    18651692    READ_FLAG( uiCode, "sub_layer_flag_info_present_flag" ); dpbSize->setSubLayerFlagInfoPresentFlag( i, uiCode == 1 );
    1866 #if H_MV_HLS_7_HRD_P0156_7
    18671693    for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( i ); j++ )
    1868 #else
    1869     for( Int j = 0; j  <=  vps->getMaxTLayers() - 1 ; j++ )
    1870 #endif
    18711694    { 
    18721695      if( j > 0  &&  dpbSize->getSubLayerDpbInfoPresentFlag( i, j )  ) 
     
    18761699      if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) )
    18771700      { 
    1878 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    18791701        for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ )   
    1880 #else
    1881         for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
    1882 #endif
    18831702        {
    18841703          READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode );
     
    19831802  for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
    19841803  {
    1985 #if FIX_CAM_PARS_COLLECTOR
    19861804    pcVPS->setCamParPresent         ( viewIndex, false );
    19871805    pcVPS->setHasCamParInSliceHeader( viewIndex, false );
    1988 #endif
    19891806    READ_FLAG( uiCode, "cp_present_flag[i]" );                  bCamParPresentFlag = ( uiCode == 1);
    19901807    if ( bCamParPresentFlag )
     
    27182535  if(pps->getSliceHeaderExtensionPresentFlag())
    27192536  {
    2720 #if !H_MV_HLS_7_POC_P0041   
    2721     READ_UVLC(uiCode,"slice_header_extension_length");
    2722     for(Int i=0; i<uiCode; i++)
    2723     {
    2724       UInt ignore;
    2725       READ_CODE(8,ignore,"slice_header_extension_data_byte");
    2726     }
    2727   }
    2728 #else
    27292537#if H_MV
    27302538    READ_UVLC( uiCode, "slice_segment_header_extension_length" ); rpcSlice->setSliceSegmentHeaderExtensionLength( uiCode );
     
    27962604    }
    27972605  }
    2798 #endif
    27992606#endif
    28002607  }
Note: See TracChangeset for help on using the changeset viewer.