Changeset 762 in SHVCSoftware for branches/SHM-6-dev/source
- Timestamp:
- 30 Apr 2014, 01:10:03 (11 years ago)
- 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 2917 2917 2918 2918 TimingInfo *timingInfo = vui->getTimingInfo(); 2919 #if TIMING_INFO_NONZERO_LAYERID_SPS2920 if( getLayerId()> 0 )2919 #if SVC_EXTENSION 2920 if( m_layerId > 0 ) 2921 2921 { 2922 2922 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 2923 2962 } 2924 2963 else 2925 2964 { 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 } 3020 3017 } 3021 3018 const Int TComSPS::m_winUnitX[]={1,2,2,1}; -
TabularUnified branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h ¶
r759 r762 119 119 #define REPN_FORMAT_CONTROL_FLAG 1 ///< JCTVC-O0179: Add control flag in representation format to control sending of chroma and bitdepth parameters 120 120 #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 SPS122 121 #define RPL_INIT_N0316_N0082 1 ///< JCTVC-N0316, JCTVC-N0082: initial reference picture list construction 123 122 -
TabularUnified branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp ¶
r761 r762 461 461 TimingInfo *timingInfo = pcVUI->getTimingInfo(); 462 462 READ_FLAG( uiCode, "vui_timing_info_present_flag"); timingInfo->setTimingInfoPresentFlag (uiCode ? true : false); 463 #if TIMING_INFO_NONZERO_LAYERID_SPS463 #if SVC_EXTENSION 464 464 if( pcSPS->getLayerId() > 0 ) 465 465 { -
TabularUnified branches/SHM-6-dev/source/Lib/TLibEncoder/TEncTop.cpp ¶
r760 r762 1072 1072 Void TEncTop::xInitPPS() 1073 1073 { 1074 #if SCALINGLIST_INFERRING1075 m_cPPS.setLayerId( m_layerId );1076 #endif1077 1078 1074 m_cPPS.setConstrainedIntraPred( m_bUseConstrainedIntraPred ); 1079 1075 Bool bUseDQP = (getMaxCuDQPDepth() > 0)? true : false; … … 1171 1167 } 1172 1168 #if SVC_EXTENSION 1169 #if SCALINGLIST_INFERRING 1170 m_cPPS.setLayerId( m_layerId ); 1171 #endif 1172 1173 1173 if( m_layerId > 0 ) 1174 1174 {
Note: See TracChangeset for help on using the changeset viewer.