Changeset 972 in 3DVCSoftware


Ignore:
Timestamp:
6 Jul 2014, 03:22:54 (10 years ago)
Author:
tech
Message:

Cleanup part 6.

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

Legend:

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

    r971 r972  
    10711071 
    10721072  READ_CODE( 4,  uiCode,  "vps_video_parameter_set_id" );         pcVPS->setVPSId( uiCode );
    1073 #if H_MV_HLS_8_SYN_Q0041_03
     1073#if H_MV
    10741074  READ_FLAG( uiCode, "vps_base_layer_internal_flag" );            pcVPS->setVpsBaseLayerInternalFlag( uiCode == 1 );
    10751075  READ_FLAG( uiCode, "vps_reserved_one_bit" );                    assert( uiCode == 1 );
     
    11601160    }
    11611161  }
    1162 #if H_MV_HLS_8_RPS_Q0100_36
     1162#if H_MV
    11631163  READ_FLAG( uiCode,  "vps_extension_flag" );                      pcVPS->setVpsExtensionFlag( uiCode == 1 ? true : false );
    11641164  if ( pcVPS->getVpsExtensionFlag() )
     
    12011201{
    12021202  UInt uiCode;
    1203 #if !H_MV_HLS_8_SYN_Q0041_03
    1204   READ_FLAG( uiCode, "avc_base_layer_flag" );                     pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );
    1205 #endif
    12061203
    12071204  READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
     
    13231320  }
    13241321
    1325 #if H_MV_HLS_8_SYN_39_19
    13261322  if ( pcVPS->getNumIndependentLayers() > 1 )
    13271323  {
     
    13431339  pcVPS->initTargetLayerIdLists( );
    13441340
    1345 #else
    1346   READ_UVLC( uiCode, "num_add_layer_sets"      ); pcVPS->setNumAddLayerSets( uiCode );
    1347   pcVPS->initTargetLayerIdLists( );
    1348   if( pcVPS->getNumOutputLayerSets() > 1)
    1349   {
    1350     READ_CODE( 2, uiCode, "default_output_layer_idc" ); pcVPS->setDefaultOutputLayerIdc( std::min( uiCode, (UInt) 2 ) );   
    1351   } 
    1352 #endif
    13531341
    13541342  pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 ));
     
    13591347  for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
    13601348  {
    1361 #if H_MV_HLS_8_SYN_39_19
    13621349    if( i >= pcVPS->getNumLayerSets( ) )   
    1363 #else
    1364     if( i > pcVPS->getVpsNumLayerSetsMinus1( ) )   
    1365 #endif
    13661350    {       
    13671351      READ_UVLC( uiCode,      "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode );
     
    13941378  }
    13951379
    1396 #if !H_MV_HLS_8_PMS_Q0195_20
    1397   READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 );
    1398   if ( pcVPS->getRepFormatIdxPresentFlag() )
    1399   {
    1400     READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );
    1401   }
    1402 #else
    14031380  READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );
    1404 #endif
    14051381
    14061382  for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ )
     
    14131389  }
    14141390
    1415 #if H_MV_HLS_8_PMS_Q0195_20
    14161391  if ( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
    14171392  {
    14181393    READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 );
    14191394  }
    1420 #endif
    14211395  if( pcVPS->getRepFormatIdxPresentFlag() )
    14221396  {
    1423 #if H_MV_HLS_8_SYN_Q0041_03
    14241397    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1425 #else
    1426     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1427 #endif
    1428     {
    1429 #if !H_MV_HLS_8_PMS_Q0195_20
    1430       if( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
    1431       {
    1432 #endif
     1398    {
    14331399        READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
    1434 #if !H_MV_HLS_8_PMS_Q0195_20
    1435       }
    1436 #endif
    1437     }
    1438   }
    1439 #if H_MV_HLS_8_PMS_Q0195_20
     1400    }
     1401  }
    14401402  else
    14411403  {
    1442 #if H_MV_HLS_8_SYN_Q0041_03
    14431404    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1444 #else
    1445     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1446 #endif
    14471405    {
    14481406      pcVPS->setVpsRepFormatIdx( i, pcVPS->inferVpsRepFormatIdx( i ) );
     
    14741432  }
    14751433
    1476 #if H_MV_HLS_8_SYN_Q0041_03
    14771434  for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ?  1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ )
    14781435  {
    14791436    for( Int j = pcVPS->getVpsBaseLayerInternalFlag() ?  0 : 1; j < i; j++ )
    1480 #else
    1481   for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
    1482   {
    1483     for( Int j = 0; j < i; j++ )
    1484 #endif
    14851437    {
    14861438      if (pcVPS->getDirectDependencyFlag( i, j) )
     
    15681520  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    15691521  {
    1570 #if H_MV_HLS_8_SYN_Q0041_03
    15711522    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
    1572 #else
    1573     for( Int i = 0; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
    1574 #endif
    1575     {
    1576 #if H_MV_HLS_8_MIS_Q0102_30
     1523    {
    15771524      for( Int j = 0; j  <=  pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ )
    1578 #else       
    1579       for( Int j = 0; j  <=  pcVPS->getMaxTLayers(); j++ )
    1580 #endif
    15811525      {
    15821526        if( pcVPSVUI->getBitRatePresentVpsFlag( ) )
     
    16381582  if( !pcVPSVUI->getTilesNotInUseFlag() )
    16391583  {     
    1640 #if H_MV_HLS_8_SYN_Q0041_03
    16411584    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
    1642 #else
    1643     for( Int i = 0; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
    1644 #endif
    16451585    {
    16461586      READ_FLAG( uiCode, "tiles_in_use_flag[i]" ); pcVPSVUI->setTilesInUseFlag( i, uiCode == 1 );
     
    16501590      }
    16511591    } 
    1652 #if H_MV_HLS_8_SYN_Q0041_03
    16531592    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i  <=  pcVPS->getMaxLayersMinus1(); i++ ) 
    1654 #else
    1655     for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )     
    1656 #endif
    16571593    {
    16581594      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ )
     
    16851621      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ )
    16861622      {
    1687 #if H_MV_HLS_8_SYN_Q0041_03
    16881623        if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 )
    16891624        {       
    1690 #endif
    16911625          READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, uiCode );
    16921626          if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 )
     
    16981632            }
    16991633          }
    1700 #if H_MV_HLS_8_SYN_Q0041_03
    1701         }
    1702 #endif
     1634        }
    17031635      }
    17041636    }
     
    17471679    for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ ) 
    17481680    {
    1749 #if H_MV_HLS_8_HRD_Q0101_04
    17501681      for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ ) 
    17511682      {
    17521683        READ_FLAG( uiCode, "layer_in_bsp_flag" ); vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, uiCode == 1 );
    1753 #else
    1754       for( Int j = 0; j <= pcVPS->getMaxLayersMinus1(); j++ ) 
    1755       {
    1756         if( pcVPS->getLayerIdIncludedFlag( h ,j ) )
    1757         {
    1758           READ_FLAG( uiCode, "layer_in_bsp_flag" ); vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, uiCode == 1 );
    1759         }
    1760         else
    1761         {
    1762           vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, false ); // This inference seems to be missing in spec
    1763         }
    1764 #endif
    17651684      }
    17661685    }
     
    17701689    { 
    17711690      READ_UVLC( uiCode, "num_bsp_sched_combinations_minus1" ); vpsVuiBspHrdP->setNumBspSchedCombinationsMinus1( h, uiCode );
    1772 #if H_MV_HLS_8_HRD_Q0182_05
    17731691      for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )
    1774 #else
    1775       for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )
    1776 #endif
    17771692      {
    17781693        for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ )
    17791694        { 
    1780 #if H_MV_HLS_8_HRD_Q0101_04
    17811695          READ_CODE( vpsVuiBspHrdP->getBspCombHrdIdxLen(), uiCode, "bsp_comb_hrd_idx" ); vpsVuiBspHrdP->setBspCombHrdIdx( h, i, j, uiCode );
    1782 #else
    1783           READ_UVLC( uiCode, "bsp_comb_hrd_idx" ); vpsVuiBspHrdP->setBspCombHrdIdx( h, i, j, uiCode );
    1784 #endif
    17851696          READ_UVLC( uiCode, "bsp_comb_sched_idx" ); vpsVuiBspHrdP->setBspCombSchedIdx( h, i, j, uiCode );
    1786 #if H_MV_HLS_8_HRD_Q0101_04
    17871697          vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j );
    1788 #endif
    17891698        } 
    17901699      }
     
    18111720  for( Int i = 1; i < vps->getNumOutputLayerSets(); i++ )
    18121721  { 
    1813 #if H_MV_HLS_8_MIS_Q0102_30
    18141722    Int currLsIdx = vps->olsIdxToLsIdx( i );
    1815 #endif
    18161723    READ_FLAG( uiCode, "sub_layer_flag_info_present_flag" ); dpbSize->setSubLayerFlagInfoPresentFlag( i, uiCode == 1 );
    1817 #if H_MV_HLS_8_MIS_Q0102_30
    18181724    for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ )
    1819 #else
    1820     for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( i ); j++ )
    1821 #endif
    18221725    { 
    18231726      if( j > 0  &&  dpbSize->getSubLayerDpbInfoPresentFlag( i, j )  ) 
     
    18271730      if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) )
    18281731      { 
    1829 #if H_MV_HLS_8_MIS_Q0102_30
    18301732        for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ )   
    1831 #else
    1832         for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i )); k++ )   
    1833 #endif
    18341733        {
    18351734          READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode );
     
    18421741        if ( j > 0 )
    18431742        {
    1844 #if H_MV_HLS_8_DBP_NODOC_42
    18451743          for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ )   
    1846 #else
    1847           for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i ) ); k++ )   
    1848 #endif
    18491744          {
    18501745            dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) );
     
    18571752  } 
    18581753}
    1859 #endif
    18601754
    18611755#if H_3D
  • branches/HTM-11.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp

    r967 r972  
    277277        pcPPS->getLayerId() != 1  )
    278278    {
    279 #if H_MV_HLS_8_SPS_NODOC_48
    280279      pcPPS->setPps3dExtensionFlag( false );
    281 #else
    282       pcPPS->setPpsExtensionTypeFlag( PPS_EX_T_3D, false );
    283 #endif
    284280    }
    285281  #endif
     
    290286  WRITE_FLAG( 1, "pps_extension_present_flag" );
    291287
    292 #if H_MV_HLS_8_SPS_NODOC_48
    293288    WRITE_FLAG( pcPPS->getPpsRangeExtensionsFlag( ) ? 1 : 0 , "pps_range_extensions_flag" );
    294289    WRITE_FLAG( pcPPS->getPpsMultilayerExtensionFlag( ) ? 1 : 0 , "pps_multilayer_extension_flag" );
     
    307302    {
    308303      WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" );
    309 #if H_MV_HLS_8_PPS_NODOC_NN
    310304      WRITE_FLAG( 0, "pps_extension_reserved_zero_flag" );
    311 #endif
    312305    }
    313306
     
    318311    }
    319312#endif
    320 #else
    321   for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ )
    322   {
    323     WRITE_FLAG( pcPPS->getPpsExtensionTypeFlag( i ) ? 1 : 0 , "pps_extension_type_flag" );
    324 #if H_3D
    325     assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_3D || i == PPS_EX_T_ESC );
    326 #else
    327     assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_ESC );
    328 #endif
    329   }
    330 
    331   if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) )
    332   {
    333     WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" );
    334   }
    335 
    336 #if H_3D
    337   if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_3D ) ) // This probably needs to be aligned with Rext and SHVC
    338   {
    339     codePPSExtension( pcPPS );
    340   }
    341 #endif
    342 #endif
    343 
    344313#endif
    345314
     
    861830  if ( pcSPS->getSpsExtensionPresentFlag() )
    862831  {
    863 #if H_MV_HLS_8_SPS_NODOC_48
    864832    WRITE_FLAG( pcSPS->getSpsRangeExtensionsFlag( ) ? 1 : 0 , "sps_range_extensions_flag" );
    865833    WRITE_FLAG( pcSPS->getSpsMultilayerExtensionFlag( ) ? 1 : 0 , "sps_multilayer_extension_flag" );
     
    869837    WRITE_FLAG( pcSPS->getSps3dExtensionFlag( ) ? 1 : 0 , "sps_3d_extension_flag" );
    870838    WRITE_CODE( pcSPS->getSpsExtension5bits( ), 5, "sps_extension_5bits" );
    871 #endif
    872839 }
    873840
     
    889856
    890857#endif
    891 #else
    892     for (Int i = 0; i < PS_EX_T_MAX_NUM; i++)
    893     {
    894       WRITE_FLAG( pcSPS->getSpsExtensionTypeFlag( i ) ? 1 : 0 , "sps_extension_type_flag" );
    895 #if H_3D
    896       assert( !pcSPS->getSpsExtensionTypeFlag( i ) || i == PS_EX_T_MV || i == PS_EX_T_3D );
    897 #else
    898       assert( !pcSPS->getSpsExtensionTypeFlag( i ) || i == PS_EX_T_MV );
    899 #endif
    900     } 
    901 
    902     if( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_MV ))
    903     {
    904       codeSPSExtension( pcSPS );
    905     }
    906 
    907 #if H_3D
    908     if( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_3D ))
    909     {
    910       codeSPSExtension2( pcSPS, viewIndex, depthFlag );
    911     }
    912 #endif
    913   }
    914858#endif
    915859#endif
     
    955899{
    956900  WRITE_CODE( pcVPS->getVPSId(),                    4,        "vps_video_parameter_set_id" );
    957 #if H_MV_HLS_8_SYN_Q0041_03
     901#if H_MV
    958902  WRITE_FLAG( pcVPS->getVpsBaseLayerInternalFlag( ) ? 1 : 0 , "vps_base_layer_internal_flag" );
    959903  WRITE_FLAG( 1                                             , "vps_reserved_one_bit" );
     
    1042986  }
    1043987#if H_MV
    1044 #if H_MV_HLS_8_RPS_Q0100_36
    1045988  WRITE_FLAG( pcVPS->getVpsExtensionFlag(),                     "vps_extension_flag" );
    1046 #else
    1047   WRITE_FLAG( 1,                     "vps_extension_flag" );
    1048 #endif
    1049989  m_pcBitIf->writeAlignOne();
    1050990  codeVPSExtension( pcVPS );                           
     
    10691009#if H_MV
    10701010Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS )
    1071 {
    1072  
    1073 #if !H_MV_HLS_8_SYN_Q0041_03
    1074   WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0,          "avc_base_layer_flag" );
    1075 #endif
    1076 
     1011
    10771012  WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0,             "splitting_flag" );
    10781013
     
    11871122  }
    11881123
    1189 #if H_MV_HLS_8_SYN_39_19
    11901124  if ( pcVPS->getNumIndependentLayers() > 1 )
    11911125  {
     
    12041138    WRITE_CODE( pcVPS->getDefaultOutputLayerIdc( ), 2, "default_output_layer_idc" );
    12051139  }
    1206 #else
    1207   WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" );
    1208 
    1209   if( pcVPS->getNumOutputLayerSets() > 1)
    1210   {
    1211     WRITE_CODE( pcVPS->getDefaultOutputLayerIdc( ), 2, "default_output_layer_idc" );
    1212   } 
    1213 #endif
    12141140
    12151141  assert( pcVPS->getOutputLayerFlag(0, 0) == pcVPS->inferOutputLayerFlag( 0, 0 ));
     
    12211147  for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
    12221148  {
    1223 #if H_MV_HLS_8_SYN_39_19
    12241149    if( i >= pcVPS->getNumLayerSets( ) )   
    1225 #else
    1226     if( i > pcVPS->getVpsNumLayerSetsMinus1( ) )   
    1227 #endif
    12281150    {     
    12291151      WRITE_UVLC( pcVPS->getLayerSetIdxForOlsMinus1( i ),      "layer_set_idx_for_ols_minus1[i]" );
     
    12561178  }
    12571179
    1258 #if !H_MV_HLS_8_PMS_Q0195_20
    1259   WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" );
    1260   if ( pcVPS->getRepFormatIdxPresentFlag() )
    1261   {
    1262     WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" );
    1263   }
    1264 #else
    12651180  WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" );
    1266 #endif
    12671181
    12681182  for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ )
     
    12751189  }
    12761190
    1277 #if H_MV_HLS_8_PMS_Q0195_20
    12781191  if ( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
    12791192  {
    12801193    WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" );
    12811194  }
    1282 #endif
     1195
    12831196  if( pcVPS->getRepFormatIdxPresentFlag() )
    12841197  {
    1285 #if H_MV_HLS_8_SYN_Q0041_03
    12861198    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1287 #else
    1288     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1289 #endif
    1290     {
    1291 #if !H_MV_HLS_8_PMS_Q0195_20
    1292       if( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
    1293       {
    1294 #endif
     1199    {
    12951200        WRITE_CODE( pcVPS->getVpsRepFormatIdx(i), pcVPS->getVpsRepFormatIdxLen(), "vps_rep_format_idx[i]" );
    1296 #if !H_MV_HLS_8_PMS_Q0195_20
    1297       }
    1298 #endif
    1299     }
    1300   }
    1301 #if H_MV_HLS_8_PMS_Q0195_20
     1201    }
     1202  }
    13021203  else
    13031204  {
    1304 #if H_MV_HLS_8_SYN_Q0041_03
    13051205    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1306 #else
    1307     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1308 #endif
    13091206    {
    13101207      assert( pcVPS->getVpsRepFormatIdx( i ) ==  pcVPS->inferVpsRepFormatIdx( i ) );
    13111208    }
    13121209  }
    1313 #endif
    1314 
    13151210
    13161211  WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" );
     
    13371232  }
    13381233
    1339 #if H_MV_HLS_8_SYN_Q0041_03
    13401234  for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ?  1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ )
    13411235  {
    13421236    for( Int j = pcVPS->getVpsBaseLayerInternalFlag() ?  0 : 1; j < i; j++ )
    1343 #else
    1344   for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
    1345   {
    1346     for( Int j = 0; j < i; j++ )
    1347 #endif
    13481237    {
    13491238      if (pcVPS->getDirectDependencyFlag( i, j) )
     
    13661255
    13671256
    1368 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" );
     1257  WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" );
    13691258  if( pcVPS->getVpsVuiPresentFlag() )
    13701259  {
     
    13971286  for( Int i = 1; i < vps->getNumOutputLayerSets(); i++ )
    13981287  { 
    1399 #if H_MV_HLS_8_MIS_Q0102_30
    14001288    Int currLsIdx = vps->olsIdxToLsIdx( i );
    1401 #endif
    14021289    WRITE_FLAG( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ? 1 : 0 , "sub_layer_flag_info_present_flag" );
    1403 #if H_MV_HLS_8_MIS_Q0102_30
    14041290    for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ )
    1405 #else
    1406     for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( i ); j++ )
    1407 #endif
    14081291    { 
    14091292      if( j > 0  &&  dpbSize->getSubLayerDpbInfoPresentFlag( i, j )  ) 
     
    14131296      if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) )
    14141297      { 
    1415 #if H_MV_HLS_8_MIS_Q0102_30
    14161298        for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ )   
    1417 #else
    1418         for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i )); k++ )   
    1419 #endif
    14201299        {
    14211300          WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" );
     
    14281307        if ( j > 0 )
    14291308        {
    1430 #if H_MV_HLS_8_DBP_NODOC_42
    14311309          for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ )   
    1432 #else
    1433           for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i ) ); k++ )   
    1434 #endif
    14351310          {
    14361311            assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) );
     
    14931368  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    14941369  {
    1495 #if H_MV_HLS_8_SYN_Q0041_03
    14961370    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
    1497 #else
    1498     for( Int i = 0; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
    1499 #endif
    1500     {
    1501 #if H_MV_HLS_8_MIS_Q0102_30
     1371    {
    15021372      for( Int j = 0; j  <=  pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ )
    1503 #else         
    1504       for( Int j = 0; j  <=  pcVPS->getMaxTLayers(); j++ )
    1505 #endif
    15061373      {
    15071374        if( pcVPSVUI->getBitRatePresentVpsFlag( ) )
     
    15631430  if( !pcVPSVUI->getTilesNotInUseFlag() )
    15641431  {     
    1565 #if H_MV_HLS_8_SYN_Q0041_03
    15661432    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
    1567 #else
    1568     for( Int i = 0; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
    1569 #endif
    15701433    {
    15711434      WRITE_FLAG( pcVPSVUI->getTilesInUseFlag( i ) ? 1 : 0 , "tiles_in_use_flag[i]" );
     
    15751438      }
    15761439    } 
    1577 #if H_MV_HLS_8_SYN_Q0041_03
    15781440    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i  <=  pcVPS->getMaxLayersMinus1(); i++ ) 
    1579 #else
    1580     for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ ) 
    1581 #endif
    15821441    {
    15831442      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ )
     
    16101469      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ )
    16111470      {
    1612 #if H_MV_HLS_8_SYN_Q0041_03
    16131471        if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 )
    16141472        {       
    1615 #endif
    1616         WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" );
    1617         if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 )
    1618         {
    1619           WRITE_FLAG( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ? 1 : 0 , "ctu_based_offset_enabled_flag" );
    1620           if( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) )
     1473          WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" );
     1474          if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 )
    16211475          {
    1622             WRITE_UVLC( pcVPSVUI->getMinHorizontalCtuOffsetPlus1( i, j ), "min_horizontal_ctu_offset_plus1" );
     1476            WRITE_FLAG( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ? 1 : 0 , "ctu_based_offset_enabled_flag" );
     1477            if( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) )
     1478            {
     1479              WRITE_UVLC( pcVPSVUI->getMinHorizontalCtuOffsetPlus1( i, j ), "min_horizontal_ctu_offset_plus1" );
     1480            }
    16231481          }
    16241482        }
    1625 #if H_MV_HLS_8_SYN_Q0041_03
    1626         }
    1627 #endif
    16281483      }
    16291484    }
     
    16731528    for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ ) 
    16741529    {
    1675 #if H_MV_HLS_8_HRD_Q0101_04
    16761530      for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ ) 
    16771531      {
    16781532        WRITE_FLAG( vpsVuiBspHrdP->getLayerInBspFlag( h, i, j ) ? 1 : 0 , "layer_in_bsp_flag" );
    1679 #else
    1680       for( Int j = 0; j <= pcVPS->getMaxLayersMinus1(); j++ ) 
    1681       {
    1682         if( pcVPS->getLayerIdIncludedFlag( h ,j ) )
    1683         {
    1684           WRITE_FLAG( vpsVuiBspHrdP->getLayerInBspFlag( h, i, j ) ? 1 : 0 , "layer_in_bsp_flag" );
    1685         }
    1686         else
    1687         {
    1688           vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, false ); // This inference seems to be missing in spec
    1689         }
    1690 #endif
    16911533      }
    16921534    }
     
    16961538    {
    16971539      WRITE_UVLC( vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ), "num_bsp_sched_combinations_minus1" );
    1698 #if H_MV_HLS_8_HRD_Q0182_05
    16991540      for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )
    1700 #else
    1701       for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )
    1702 #endif
    17031541      {
    17041542        for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ )
    17051543        { 
    1706 #if H_MV_HLS_8_HRD_Q0101_04
    17071544          WRITE_CODE( vpsVuiBspHrdP->getBspCombHrdIdx( h, i, j ),  vpsVuiBspHrdP->getBspCombHrdIdxLen(), "bsp_comb_hrd_idx" );
    1708 #else
    1709           WRITE_UVLC( vpsVuiBspHrdP->getBspCombHrdIdx( h, i, j ), "bsp_comb_hrd_idx" );
    1710 #endif
    17111545          WRITE_UVLC( vpsVuiBspHrdP->getBspCombSchedIdx( h, i, j ), "bsp_comb_sched_idx" );
    17121546
    1713 #if H_MV_HLS_8_HRD_Q0101_04
    17141547          vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j );
    1715 #endif
    17161548        } 
    17171549      }
     
    19071739      Int picOrderCntLSB = (pcSlice->getPOC()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC())) & ((1<<pcSlice->getSPS()->getBitsForPOC())-1);
    19081740      WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "slice_pic_order_cnt_lsb");
    1909 #if H_MV_HLS_8_POC_Q0142_32
    19101741      pcSlice->setSlicePicOrderCntLsb( picOrderCntLSB );
    1911 #endif
    19121742    }
    19131743
     
    23412171    }
    23422172
    2343 #if H_MV_HLS_8_POC_Q0142_32
    23442173    pcSlice->checkPocResetIdc();
    2345 #endif
    23462174
    23472175    if( pcSlice->getPocResetIdc() !=  0 )
     
    23552183      WRITE_CODE( pcSlice->getPocLsbVal( ), pcSlice->getPocLsbValLen() , "poc_lsb_val" );
    23562184    }             
    2357 #if H_MV_HLS_8_POC_Q0142_32
    23582185    pcSlice->checkPocLsbVal();
    2359 #endif
    23602186
    23612187    if( !pcSlice->getPocMsbValRequiredFlag() /* TODO &&  pcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ )
     
    23632189      WRITE_FLAG( pcSlice->getPocMsbValPresentFlag( ) ? 1 : 0 , "poc_msb_val_present_flag" );
    23642190    }
    2365 #if H_MV_HLS_8_POC_Q0146_15
    23662191    else
    23672192    {
    23682193      assert( pcSlice->getPocMsbValPresentFlag() ==  pcSlice->inferPocMsbValPresentFlag( ) );
    23692194    }
    2370 #endif
    23712195   
    23722196    if( pcSlice->getPocMsbValPresentFlag() )
Note: See TracChangeset for help on using the changeset viewer.