Changeset 762 in SHVCSoftware for branches/SHM-6-dev/source


Ignore:
Timestamp:
30 Apr 2014, 01:10:03 (11 years ago)
Author:
seregin
Message:

remove macro TIMING_INFO_NONZERO_LAYERID_SPS

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

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.cpp

    r760 r762  
    29172917
    29182918  TimingInfo *timingInfo = vui->getTimingInfo();
    2919 #if TIMING_INFO_NONZERO_LAYERID_SPS
    2920   if( getLayerId() > 0 )
     2919#if SVC_EXTENSION
     2920  if( m_layerId > 0 )
    29212921  {
    29222922    timingInfo->setTimingInfoPresentFlag( false );
     2923    return;
     2924  }
     2925#endif
     2926
     2927  timingInfo->setTimingInfoPresentFlag( true );
     2928  switch( frameRate )
     2929  {
     2930  case 24:
     2931    timingInfo->setNumUnitsInTick( 1125000 );    timingInfo->setTimeScale    ( 27000000 );
     2932    break;
     2933  case 25:
     2934    timingInfo->setNumUnitsInTick( 1080000 );    timingInfo->setTimeScale    ( 27000000 );
     2935    break;
     2936  case 30:
     2937    timingInfo->setNumUnitsInTick( 900900 );     timingInfo->setTimeScale    ( 27000000 );
     2938    break;
     2939  case 50:
     2940    timingInfo->setNumUnitsInTick( 540000 );     timingInfo->setTimeScale    ( 27000000 );
     2941    break;
     2942  case 60:
     2943    timingInfo->setNumUnitsInTick( 450450 );     timingInfo->setTimeScale    ( 27000000 );
     2944    break;
     2945  default:
     2946    timingInfo->setNumUnitsInTick( 1001 );       timingInfo->setTimeScale    ( 60000 );
     2947    break;
     2948  }
     2949
     2950  Bool rateCnt = ( bitRate > 0 );
     2951  hrd->setNalHrdParametersPresentFlag( rateCnt );
     2952  hrd->setVclHrdParametersPresentFlag( rateCnt );
     2953
     2954  hrd->setSubPicCpbParamsPresentFlag( ( numDU > 1 ) );
     2955
     2956  if( hrd->getSubPicCpbParamsPresentFlag() )
     2957  {
     2958    hrd->setTickDivisorMinus2( 100 - 2 );                          //
     2959    hrd->setDuCpbRemovalDelayLengthMinus1( 7 );                    // 8-bit precision ( plus 1 for last DU in AU )
     2960    hrd->setSubPicCpbParamsInPicTimingSEIFlag( true );
     2961    hrd->setDpbOutputDelayDuLengthMinus1( 5 + 7 );                 // With sub-clock tick factor of 100, at least 7 bits to have the same value as AU dpb delay
    29232962  }
    29242963  else
    29252964  {
    2926 #endif
    2927     timingInfo->setTimingInfoPresentFlag( true );
    2928     switch( frameRate )
    2929     {
    2930     case 24:
    2931       timingInfo->setNumUnitsInTick( 1125000 );    timingInfo->setTimeScale    ( 27000000 );
    2932       break;
    2933     case 25:
    2934       timingInfo->setNumUnitsInTick( 1080000 );    timingInfo->setTimeScale    ( 27000000 );
    2935       break;
    2936     case 30:
    2937       timingInfo->setNumUnitsInTick( 900900 );     timingInfo->setTimeScale    ( 27000000 );
    2938       break;
    2939     case 50:
    2940       timingInfo->setNumUnitsInTick( 540000 );     timingInfo->setTimeScale    ( 27000000 );
    2941       break;
    2942     case 60:
    2943       timingInfo->setNumUnitsInTick( 450450 );     timingInfo->setTimeScale    ( 27000000 );
    2944       break;
    2945     default:
    2946       timingInfo->setNumUnitsInTick( 1001 );       timingInfo->setTimeScale    ( 60000 );
    2947       break;
    2948     }
    2949 
    2950     Bool rateCnt = ( bitRate > 0 );
    2951     hrd->setNalHrdParametersPresentFlag( rateCnt );
    2952     hrd->setVclHrdParametersPresentFlag( rateCnt );
    2953 
    2954     hrd->setSubPicCpbParamsPresentFlag( ( numDU > 1 ) );
    2955 
    2956     if( hrd->getSubPicCpbParamsPresentFlag() )
    2957     {
    2958       hrd->setTickDivisorMinus2( 100 - 2 );                          //
    2959       hrd->setDuCpbRemovalDelayLengthMinus1( 7 );                    // 8-bit precision ( plus 1 for last DU in AU )
    2960       hrd->setSubPicCpbParamsInPicTimingSEIFlag( true );
    2961       hrd->setDpbOutputDelayDuLengthMinus1( 5 + 7 );                 // With sub-clock tick factor of 100, at least 7 bits to have the same value as AU dpb delay
    2962     }
    2963     else
    2964     {
    2965       hrd->setSubPicCpbParamsInPicTimingSEIFlag( false ); 
    2966     }
    2967 
    2968     hrd->setBitRateScale( 4 );                                       // in units of 2~( 6 + 4 ) = 1,024 bps
    2969     hrd->setCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
    2970     hrd->setDuCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
    2971  
    2972     hrd->setInitialCpbRemovalDelayLengthMinus1(15);                  // assuming 0.5 sec, log2( 90,000 * 0.5 ) = 16-bit
    2973     if( randomAccess )
    2974     {
    2975       hrd->setCpbRemovalDelayLengthMinus1(5);                        // 32 = 2^5 (plus 1)
    2976       hrd->setDpbOutputDelayLengthMinus1 (5);                        // 32 + 3 = 2^6
    2977     }
    2978     else
    2979     {
    2980       hrd->setCpbRemovalDelayLengthMinus1(9);                        // max. 2^10
    2981       hrd->setDpbOutputDelayLengthMinus1 (9);                        // max. 2^10
    2982     }
    2983 
    2984 /*
    2985      Note: only the case of "vps_max_temporal_layers_minus1 = 0" is supported.
    2986 */
    2987     Int i, j;
    2988     UInt birateValue, cpbSizeValue;
    2989     UInt ducpbSizeValue;
    2990     UInt duBitRateValue = 0;
    2991 
    2992     for( i = 0; i < MAX_TLAYER; i ++ )
    2993     {
    2994       hrd->setFixedPicRateFlag( i, 1 );
    2995       hrd->setPicDurationInTcMinus1( i, 0 );
    2996       hrd->setLowDelayHrdFlag( i, 0 );
    2997       hrd->setCpbCntMinus1( i, 0 );
    2998 
    2999       birateValue  = bitRate;
    3000       cpbSizeValue = bitRate;                                     // 1 second
    3001       ducpbSizeValue = bitRate/numDU;
    3002       duBitRateValue = bitRate;
    3003       for( j = 0; j < ( hrd->getCpbCntMinus1( i ) + 1 ); j ++ )
    3004       {
    3005         hrd->setBitRateValueMinus1( i, j, 0, ( birateValue  - 1 ) );
    3006         hrd->setCpbSizeValueMinus1( i, j, 0, ( cpbSizeValue - 1 ) );
    3007         hrd->setDuCpbSizeValueMinus1( i, j, 0, ( ducpbSizeValue - 1 ) );
    3008         hrd->setCbrFlag( i, j, 0, ( j == 0 ) );
    3009 
    3010         hrd->setBitRateValueMinus1( i, j, 1, ( birateValue  - 1) );
    3011         hrd->setCpbSizeValueMinus1( i, j, 1, ( cpbSizeValue - 1 ) );
    3012         hrd->setDuCpbSizeValueMinus1( i, j, 1, ( ducpbSizeValue - 1 ) );
    3013         hrd->setDuBitRateValueMinus1( i, j, 1, ( duBitRateValue - 1 ) );
    3014         hrd->setCbrFlag( i, j, 1, ( j == 0 ) );
    3015       }
    3016     }
    3017 #if TIMING_INFO_NONZERO_LAYERID_SPS
    3018   }
    3019 #endif
     2965    hrd->setSubPicCpbParamsInPicTimingSEIFlag( false ); 
     2966  }
     2967
     2968  hrd->setBitRateScale( 4 );                                       // in units of 2~( 6 + 4 ) = 1,024 bps
     2969  hrd->setCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
     2970  hrd->setDuCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
     2971
     2972  hrd->setInitialCpbRemovalDelayLengthMinus1(15);                  // assuming 0.5 sec, log2( 90,000 * 0.5 ) = 16-bit
     2973  if( randomAccess )
     2974  {
     2975    hrd->setCpbRemovalDelayLengthMinus1(5);                        // 32 = 2^5 (plus 1)
     2976    hrd->setDpbOutputDelayLengthMinus1 (5);                        // 32 + 3 = 2^6
     2977  }
     2978  else
     2979  {
     2980    hrd->setCpbRemovalDelayLengthMinus1(9);                        // max. 2^10
     2981    hrd->setDpbOutputDelayLengthMinus1 (9);                        // max. 2^10
     2982  }
     2983
     2984  /*
     2985  Note: only the case of "vps_max_temporal_layers_minus1 = 0" is supported.
     2986  */
     2987  Int i, j;
     2988  UInt birateValue, cpbSizeValue;
     2989  UInt ducpbSizeValue;
     2990  UInt duBitRateValue = 0;
     2991
     2992  for( i = 0; i < MAX_TLAYER; i ++ )
     2993  {
     2994    hrd->setFixedPicRateFlag( i, 1 );
     2995    hrd->setPicDurationInTcMinus1( i, 0 );
     2996    hrd->setLowDelayHrdFlag( i, 0 );
     2997    hrd->setCpbCntMinus1( i, 0 );
     2998
     2999    birateValue  = bitRate;
     3000    cpbSizeValue = bitRate;                                     // 1 second
     3001    ducpbSizeValue = bitRate/numDU;
     3002    duBitRateValue = bitRate;
     3003    for( j = 0; j < ( hrd->getCpbCntMinus1( i ) + 1 ); j ++ )
     3004    {
     3005      hrd->setBitRateValueMinus1( i, j, 0, ( birateValue  - 1 ) );
     3006      hrd->setCpbSizeValueMinus1( i, j, 0, ( cpbSizeValue - 1 ) );
     3007      hrd->setDuCpbSizeValueMinus1( i, j, 0, ( ducpbSizeValue - 1 ) );
     3008      hrd->setCbrFlag( i, j, 0, ( j == 0 ) );
     3009
     3010      hrd->setBitRateValueMinus1( i, j, 1, ( birateValue  - 1) );
     3011      hrd->setCpbSizeValueMinus1( i, j, 1, ( cpbSizeValue - 1 ) );
     3012      hrd->setDuCpbSizeValueMinus1( i, j, 1, ( ducpbSizeValue - 1 ) );
     3013      hrd->setDuBitRateValueMinus1( i, j, 1, ( duBitRateValue - 1 ) );
     3014      hrd->setCbrFlag( i, j, 1, ( j == 0 ) );
     3015    }
     3016  }
    30203017}
    30213018const Int TComSPS::m_winUnitX[]={1,2,2,1};
  • TabularUnified branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h

    r759 r762  
    119119#define REPN_FORMAT_CONTROL_FLAG         1      ///< JCTVC-O0179: Add control flag in representation format to control sending of chroma and bitdepth parameters
    120120#endif
    121 #define TIMING_INFO_NONZERO_LAYERID_SPS  1      ///< JCTVC-N0085: Semantics of vui_timing_info_present_flag to always set that flag to zero for non-zero layer ID SPS
    122121#define RPL_INIT_N0316_N0082             1      ///< JCTVC-N0316, JCTVC-N0082: initial reference picture list construction
    123122
  • TabularUnified branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r761 r762  
    461461  TimingInfo *timingInfo = pcVUI->getTimingInfo();
    462462  READ_FLAG(       uiCode, "vui_timing_info_present_flag");         timingInfo->setTimingInfoPresentFlag      (uiCode ? true : false);
    463 #if TIMING_INFO_NONZERO_LAYERID_SPS
     463#if SVC_EXTENSION
    464464  if( pcSPS->getLayerId() > 0 )
    465465  {
  • TabularUnified branches/SHM-6-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r760 r762  
    10721072Void TEncTop::xInitPPS()
    10731073{
    1074 #if SCALINGLIST_INFERRING
    1075   m_cPPS.setLayerId( m_layerId );
    1076 #endif
    1077 
    10781074  m_cPPS.setConstrainedIntraPred( m_bUseConstrainedIntraPred );
    10791075  Bool bUseDQP = (getMaxCuDQPDepth() > 0)? true : false;
     
    11711167  }
    11721168#if SVC_EXTENSION
     1169#if SCALINGLIST_INFERRING
     1170  m_cPPS.setLayerId( m_layerId );
     1171#endif
     1172
    11731173  if( m_layerId > 0 )
    11741174  {
Note: See TracChangeset for help on using the changeset viewer.