Changeset 1437 in SHVCSoftware
- Timestamp:
- 12 Aug 2015, 19:56:05 (9 years ago)
- Location:
- branches/SHM-dev
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/cfg/encoder_intra_scalable.cfg
r1381 r1437 54 54 55 55 #=========== Coding Tools ================= 56 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON)56 #SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 57 57 AMP : 1 # Asymmetric motion partitions (0: OFF, 1: ON) 58 58 TransformSkip : 1 # Transform skipping (0: OFF, 1: ON) -
branches/SHM-dev/cfg/encoder_intra_scalable10.cfg
r1381 r1437 53 53 54 54 #=========== Coding Tools ================= 55 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON)55 #SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 56 56 AMP : 1 # Asymmetric motion partitions (0: OFF, 1: ON) 57 57 TransformSkip : 1 # Transform skipping (0: OFF, 1: ON) -
branches/SHM-dev/cfg/encoder_lowdelay_P_scalable.cfg
r1381 r1437 61 61 62 62 #=========== Coding Tools ================= 63 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON)63 #SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 64 64 AMP : 1 # Asymmetric motion partitions (0: OFF, 1: ON) 65 65 SAOLcuBoundary : 0 # SAOLcuBoundary using non-deblocked pixels (0: OFF, 1: ON) -
branches/SHM-dev/cfg/encoder_lowdelay_P_scalable10.cfg
r1381 r1437 61 61 62 62 #=========== Coding Tools ================= 63 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON)63 #SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 64 64 AMP : 1 # Asymmetric motion partitions (0: OFF, 1: ON) 65 65 SAOLcuBoundary : 0 # SAOLcuBoundary using non-deblocked pixels (0: OFF, 1: ON) -
branches/SHM-dev/cfg/encoder_lowdelay_scalable.cfg
r1381 r1437 59 59 60 60 #=========== Coding Tools ================= 61 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON)61 #SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 62 62 AMP : 1 # Asymmetric motion partitions (0: OFF, 1: ON) 63 63 TransformSkip : 1 # Transform skipping (0: OFF, 1: ON) -
branches/SHM-dev/cfg/encoder_lowdelay_scalable10.cfg
r1381 r1437 59 59 60 60 #=========== Coding Tools ================= 61 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON)61 #SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 62 62 AMP : 1 # Asymmetric motion partitions (0: OFF, 1: ON) 63 63 TransformSkip : 1 # Transform skipping (0: OFF, 1: ON) -
branches/SHM-dev/cfg/encoder_randomaccess_scalable.cfg
r1381 r1437 63 63 64 64 #=========== Coding Tools ================= 65 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON)65 #SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 66 66 AMP : 1 # Asymmetric motion partitions (0: OFF, 1: ON) 67 67 TransformSkip : 1 # Transform skipping (0: OFF, 1: ON) -
branches/SHM-dev/cfg/encoder_randomaccess_scalable10.cfg
r1381 r1437 63 63 64 64 #=========== Coding Tools ================= 65 SAO : 1 # Sample adaptive offset (0: OFF, 1: ON)65 #SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) 66 66 AMP : 1 # Asymmetric motion partitions (0: OFF, 1: ON) 67 67 TransformSkip : 1 # Transform skipping (0: OFF, 1: ON) -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1436 r1437 763 763 Int* cfg_aiPadY [MAX_LAYERS]; 764 764 Int* cfg_conformanceMode [MAX_LAYERS]; 765 Bool* cfg_useExtendedPrecision [MAX_LAYERS];766 765 767 766 Int* cfg_maxCuDQPDepth[MAX_LAYERS]; … … 858 857 ScalingListMode* cfg_UseScalingListId[MAX_LAYERS]; 859 858 859 Bool* cfg_bUseSAO[MAX_LAYERS]; 860 860 861 for( UInt layer = 0; layer < m_numLayers; layer++ ) 861 862 { … … 872 873 cfg_FrameRate[layer] = &m_apcLayerCfg[layer]->m_iFrameRate; 873 874 cfg_IntraPeriod[layer] = &m_apcLayerCfg[layer]->m_iIntraPeriod; 874 cfg_conformanceMode[layer] = &m_apcLayerCfg[layer]->m_conformance Mode;875 cfg_conformanceMode[layer] = &m_apcLayerCfg[layer]->m_conformanceWindowMode; 875 876 cfg_confWinLeft[layer] = &m_apcLayerCfg[layer]->m_confWinLeft; 876 877 cfg_confWinRight[layer] = &m_apcLayerCfg[layer]->m_confWinRight; … … 879 880 cfg_aiPadX[layer] = &m_apcLayerCfg[layer]->m_aiPad[0]; 880 881 cfg_aiPadY[layer] = &m_apcLayerCfg[layer]->m_aiPad[1]; 881 cfg_useExtendedPrecision[layer] = &m_apcLayerCfg[layer]->m_extendedPrecisionProcessingFlag;882 882 883 883 cfg_maxCuDQPDepth[layer] = &m_apcLayerCfg[layer]->m_iMaxCuDQPDepth; … … 955 955 956 956 cfg_UseScalingListId[layer] = &m_apcLayerCfg[layer]->m_useScalingListId; 957 958 cfg_bUseSAO[layer] = &m_apcLayerCfg[layer]->m_bUseSAO; 957 959 } 958 960 … … 1103 1105 ("AuxId%d", cfg_auxId, 0, m_numLayers, "Auxilary picture ID for layer %d (0: Not aux pic, 1: Alpha plane, 2: Depth picture, 3: Cb enh, 4: Cr enh") 1104 1106 #endif 1105 ("ExtendedPrecision%d", cfg_useExtendedPrecision, false, m_numLayers, "Increased internal accuracies to support high bit depths (not valid in V1 profiles)")1106 1107 ("ConformanceMode%d", cfg_conformanceMode, 0, m_numLayers, "Window conformance mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping") 1107 1108 ("ConfLeft%d", cfg_confWinLeft, 0, m_numLayers, "Deprecated alias of ConfWinLeft") … … 1184 1185 ("MSBExtendedBitDepthC", m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA], 0, "As per MSBExtendedBitDepth but for chroma component. (default:MSBExtendedBitDepth)") 1185 1186 ("InternalBitDepthC", m_internalBitDepth[CHANNEL_TYPE_CHROMA], 0, "As per InternalBitDepth but for chroma component. (default:InternalBitDepth)") 1187 #endif 1186 1188 ("ExtendedPrecision", m_extendedPrecisionProcessingFlag, false, "Increased internal accuracies to support high bit depths (not valid in V1 profiles)") 1187 1189 ("HighPrecisionPredictionWeighting", m_highPrecisionOffsetsEnabledFlag, false, "Use high precision option for weighted prediction (not valid in V1 profiles)") 1190 #if !SVC_EXTENSION 1188 1191 ("InputColourSpaceConvert", inputColourSpaceConvert, string(""), "Colour space conversion to apply to input video. Permitted values are (empty string=UNCHANGED) " + getListOfColourSpaceConverts(true)) 1189 1192 ("SNRInternalColourSpace", m_snrInternalColourSpace, false, "If true, then no colour space conversion is applied prior to SNR, otherwise inverse of input is applied.") … … 1391 1394 ("GolombRiceParameterAdaptation", m_persistentRiceAdaptationEnabledFlag, false, "Enable the adaptation of the Golomb-Rice parameter over the course of each slice") 1392 1395 ("AlignCABACBeforeBypass", m_cabacBypassAlignmentEnabledFlag, false, "Align the CABAC engine to a defined fraction of a bit prior to coding bypass data. Must be 1 in high bit rate profile, 0 otherwise" ) 1396 #if SVC_EXTENSION 1397 ("SAO%d", cfg_bUseSAO, true, m_numLayers, "Enable Sample Adaptive Offset") 1398 #else 1393 1399 ("SAO", m_bUseSAO, true, "Enable Sample Adaptive Offset") 1400 #endif 1394 1401 ("TestSAODisableAtPictureLevel", m_bTestSAODisableAtPictureLevel, false, "Enables the testing of disabling SAO at the picture level after having analysed all blocks") 1395 1402 ("SaoEncodingRate", m_saoEncodingRate, 0.75, "When >0 SAO early picture termination is enabled for luma and chroma") … … 1927 1934 m_apcLayerCfg[layer]->m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_apcLayerCfg[layer]->m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat))); 1928 1935 1929 m_apcLayerCfg[layer]->m_highPrecisionOffsetsEnabledFlag = false;1930 m_apcLayerCfg[layer]->m_extendedPrecisionProcessingFlag = false;1931 1932 1936 if( m_apcLayerCfg[layer]->m_layerSwitchOffBegin < m_apcLayerCfg[layer]->m_layerSwitchOffEnd ) 1933 1937 { … … 1950 1954 for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) 1951 1955 { 1952 m_ apcLayerCfg[layer]->m_log2SaoOffsetScale[channelType] = 0;1956 m_log2SaoOffsetScale[channelType] = 0; 1953 1957 } 1954 1958 … … 2002 2006 m_log2MaxTransformSkipBlockSize!=2; 2003 2007 const Bool bUsingChromaQPAdjustment= m_diffCuChromaQpOffsetDepth >= 0; 2004 const Bool bUsingExtendedPrecision = m_ apcLayerCfg[layer]->m_extendedPrecisionProcessingFlag;2008 const Bool bUsingExtendedPrecision = m_extendedPrecisionProcessingFlag; 2005 2009 m_apcLayerCfg[layer]->m_chromaFormatConstraint = NUM_CHROMA_FORMAT; 2006 2010 automaticallySelectRExtProfile(bUsingGeneralRExtTools, … … 2635 2639 delete [] cfg_listOfOutputLayers; 2636 2640 delete cfg_outputLayerSetIdx; 2637 #else //SVC_EXTENSION 2641 2642 for( Int layer = 0; layer < m_numLayers; layer++ ) 2643 { 2644 Int& m_conformanceWindowMode = m_apcLayerCfg[layer]->m_conformanceWindowMode; 2645 UInt& m_uiMaxCUHeight = m_apcLayerCfg[layer]->m_uiMaxCUHeight; 2646 UInt& m_uiMaxCUDepth = m_apcLayerCfg[layer]->m_uiMaxCUDepth; 2647 ChromaFormat& m_chromaFormatIDC = m_apcLayerCfg[layer]->m_chromaFormatIDC; 2648 2649 Int& m_confWinLeft = m_apcLayerCfg[layer]->m_confWinLeft; 2650 Int& m_confWinRight = m_apcLayerCfg[layer]->m_confWinLeft; 2651 Int& m_confWinTop = m_apcLayerCfg[layer]->m_confWinLeft; 2652 Int& m_confWinBottom = m_apcLayerCfg[layer]->m_confWinLeft; 2653 Int* m_aiPad = m_apcLayerCfg[layer]->m_aiPad; 2654 Int* m_aidQP = m_apcLayerCfg[layer]->m_aidQP; 2655 2656 Int& m_iSourceWidth = m_apcLayerCfg[layer]->m_iSourceWidth; 2657 Int& m_iSourceHeight = m_apcLayerCfg[layer]->m_iSourceHeight; 2658 Int& m_iSourceHeightOrg = m_apcLayerCfg[layer]->m_iSourceHeightOrg; 2659 2660 Int& m_iQP = m_apcLayerCfg[layer]->m_iQP; 2661 Double& m_fQP = m_apcLayerCfg[layer]->m_fQP; 2662 2663 Char* m_pchdQPFile = m_apcLayerCfg[layer]->m_pchdQPFile; 2664 Int* m_internalBitDepth = m_apcLayerCfg[layer]->m_internalBitDepth; 2665 #endif //SVC_EXTENSION 2638 2666 switch (m_conformanceWindowMode) 2639 2667 { … … 2653 2681 m_aiPad[0] = m_confWinRight = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth; 2654 2682 m_iSourceWidth += m_confWinRight; 2683 #if SVC_EXTENSION 2684 m_confWinRight /= TComSPS::getWinUnitX( m_chromaFormatIDC ); 2685 #endif 2655 2686 } 2656 2687 if (m_iSourceHeight % minCuSize) … … 2663 2694 m_aiPad[1] = m_confWinBottom << 1; 2664 2695 } 2696 #if SVC_EXTENSION 2697 m_confWinBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC ); 2698 #endif 2665 2699 } 2666 2700 if (m_aiPad[0] % TComSPS::getWinUnitX(m_chromaFormatIDC) != 0) … … 2683 2717 m_confWinRight = m_aiPad[0]; 2684 2718 m_confWinBottom = m_aiPad[1]; 2719 2720 #if SVC_EXTENSION 2721 m_confWinRight /= TComSPS::getWinUnitX( m_chromaFormatIDC ); 2722 m_confWinBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC ); 2723 #endif 2685 2724 break; 2686 2725 } … … 2757 2796 fclose(fpt); 2758 2797 } 2798 } 2799 #if SVC_EXTENSION 2759 2800 } 2760 2801 #endif … … 3014 3055 Void TAppEncCfg::xCheckParameter(UInt layerIdx) 3015 3056 { 3016 Bool m_extendedPrecisionProcessingFlag = m_apcLayerCfg[layerIdx]->m_extendedPrecisionProcessingFlag; 3017 Bool m_highPrecisionOffsetsEnabledFlag = m_apcLayerCfg[layerIdx]->m_highPrecisionOffsetsEnabledFlag; 3018 ChromaFormat m_chromaFormatIDC = m_apcLayerCfg[layerIdx]->m_chromaFormatIDC; 3019 ChromaFormat m_chromaFormatConstraint = m_apcLayerCfg[layerIdx]->m_chromaFormatConstraint; 3020 ChromaFormat m_InputChromaFormatIDC = m_apcLayerCfg[layerIdx]->m_InputChromaFormatIDC; 3021 3022 Int m_inputBitDepth[] = {m_apcLayerCfg[layerIdx]->m_inputBitDepth[CHANNEL_TYPE_LUMA], m_apcLayerCfg[layerIdx]->m_inputBitDepth[CHANNEL_TYPE_CHROMA]}; 3023 Int m_internalBitDepth[] = {m_apcLayerCfg[layerIdx]->m_internalBitDepth[CHANNEL_TYPE_LUMA], m_apcLayerCfg[layerIdx]->m_internalBitDepth[CHANNEL_TYPE_CHROMA]}; 3024 Int m_MSBExtendedBitDepth[] = {m_apcLayerCfg[layerIdx]->m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_apcLayerCfg[layerIdx]->m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA]}; 3025 3026 m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA] = m_apcLayerCfg[layerIdx]->m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA]; 3027 m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA] = m_apcLayerCfg[layerIdx]->m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA]; 3028 3029 Int layerPTLIdx = m_apcLayerCfg[layerIdx]->m_layerPTLIdx; 3030 Profile::Name m_profile = m_profileList[layerPTLIdx]; 3031 UInt m_bitDepthConstraint = m_apcLayerCfg[layerIdx]->m_bitDepthConstraint; 3032 Bool m_intraConstraintFlag = m_apcLayerCfg[layerIdx]->m_intraConstraintFlag; 3033 Bool m_lowerBitRateConstraintFlag = m_apcLayerCfg[layerIdx]->m_lowerBitRateConstraintFlag; 3034 Bool m_onePictureOnlyConstraintFlag = m_apcLayerCfg[layerIdx]->m_onePictureOnlyConstraintFlag; 3057 ChromaFormat& m_chromaFormatIDC = m_apcLayerCfg[layerIdx]->m_chromaFormatIDC; 3058 ChromaFormat& m_chromaFormatConstraint = m_apcLayerCfg[layerIdx]->m_chromaFormatConstraint; 3059 ChromaFormat& m_InputChromaFormatIDC = m_apcLayerCfg[layerIdx]->m_InputChromaFormatIDC; 3060 3061 Int* m_inputBitDepth = m_apcLayerCfg[layerIdx]->m_inputBitDepth; 3062 Int* m_internalBitDepth = m_apcLayerCfg[layerIdx]->m_internalBitDepth; 3063 Int* m_MSBExtendedBitDepth = m_apcLayerCfg[layerIdx]->m_MSBExtendedBitDepth; 3064 3065 Int& layerPTLIdx = m_apcLayerCfg[layerIdx]->m_layerPTLIdx; 3066 Profile::Name& m_profile = m_profileList[layerPTLIdx]; 3067 UInt& m_bitDepthConstraint = m_apcLayerCfg[layerIdx]->m_bitDepthConstraint; 3068 Bool& m_intraConstraintFlag = m_apcLayerCfg[layerIdx]->m_intraConstraintFlag; 3069 Bool& m_lowerBitRateConstraintFlag = m_apcLayerCfg[layerIdx]->m_lowerBitRateConstraintFlag; 3070 Bool& m_onePictureOnlyConstraintFlag = m_apcLayerCfg[layerIdx]->m_onePictureOnlyConstraintFlag; 3071 3072 #if RC_SHVC_HARMONIZATION 3073 Bool& m_RCEnableRateControl = m_apcLayerCfg[layerIdx]->m_RCEnableRateControl; 3074 Bool& m_RCForceIntraQP = m_apcLayerCfg[layerIdx]->m_RCForceIntraQP; 3075 Int& m_RCInitialQP = m_apcLayerCfg[layerIdx]->m_RCInitialQP; 3076 3077 #if U0132_TARGET_BITS_SATURATION 3078 Bool& m_RCCpbSaturationEnabled = m_apcLayerCfg[layerIdx]->m_RCCpbSaturationEnabled; 3079 UInt& m_RCCpbSize = m_apcLayerCfg[layerIdx]->m_RCCpbSize; 3080 Double& m_RCInitialCpbFullness = m_apcLayerCfg[layerIdx]->m_RCInitialCpbFullness; 3081 Level::Name& m_level = m_levelList[layerPTLIdx]; 3082 Level::Tier& m_levelTier = m_levelTierList[layerPTLIdx]; 3083 #endif 3084 #endif 3085 3086 Int& m_iFrameRate = m_apcLayerCfg[layerIdx]->m_iFrameRate; 3087 Int& m_iQP = m_apcLayerCfg[layerIdx]->m_iQP; 3088 Int& m_iSourceWidth = m_apcLayerCfg[layerIdx]->m_iSourceWidth; 3089 Int& m_iSourceHeight = m_apcLayerCfg[layerIdx]->m_iSourceHeight; 3090 Int* m_aiPad = m_apcLayerCfg[layerIdx]->m_aiPad; 3091 Int& m_iMaxCuDQPDepth = m_apcLayerCfg[layerIdx]->m_iMaxCuDQPDepth; 3092 UInt& m_uiMaxCUDepth = m_apcLayerCfg[layerIdx]->m_uiMaxCUDepth; 3093 UInt& m_uiQuadtreeTULog2MinSize = m_apcLayerCfg[layerIdx]->m_uiQuadtreeTULog2MinSize; 3094 3095 Int& m_iIntraPeriod = m_apcLayerCfg[layerIdx]->m_iIntraPeriod; 3096 UInt& m_uiMaxCUWidth = m_apcLayerCfg[layerIdx]->m_uiMaxCUWidth; 3097 UInt& m_uiMaxCUHeight = m_apcLayerCfg[layerIdx]->m_uiMaxCUHeight; 3098 UInt& m_uiQuadtreeTULog2MaxSize = m_apcLayerCfg[layerIdx]->m_uiQuadtreeTULog2MaxSize; 3099 UInt& m_uiQuadtreeTUMaxDepthInter = m_apcLayerCfg[layerIdx]->m_uiQuadtreeTUMaxDepthInter; 3100 UInt& m_uiQuadtreeTUMaxDepthIntra = m_apcLayerCfg[layerIdx]->m_uiQuadtreeTUMaxDepthIntra; 3101 3102 Int& m_iWaveFrontSynchro = m_apcLayerCfg[layerIdx]->m_waveFrontSynchro; 3035 3103 #else 3036 3104 Void TAppEncCfg::xCheckParameter() … … 3200 3268 xConfirmPara( m_InputChromaFormatIDC >= NUM_CHROMA_FORMAT, "InputChromaFormatIDC must be either 400, 420, 422 or 444" ); 3201 3269 3202 #if !SVC_EXTENSION3203 3270 xConfirmPara( m_iFrameRate <= 0, "Frame rate must be more than 1" ); 3204 #endif3205 3271 xConfirmPara( m_framesToBeEncoded <= 0, "Total Number Of Frames encoded must be more than 0" ); 3206 3272 xConfirmPara( m_iGOPSize < 1 , "GOP Size must be greater or equal to 1" ); 3207 3273 xConfirmPara( m_iGOPSize > 1 && m_iGOPSize % 2, "GOP Size must be a multiple of 2, if GOP Size is greater than 1" ); 3208 #if !SVC_EXTENSION3209 3274 xConfirmPara( (m_iIntraPeriod > 0 && m_iIntraPeriod < m_iGOPSize) || m_iIntraPeriod == 0, "Intra period must be more than GOP size, or -1 , not 0" ); 3210 #endif3211 3275 xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 3, "Decoding Refresh Type must be comprised between 0 and 3 included" ); 3212 3276 if(m_iDecodingRefreshType == 3) … … 3255 3319 } 3256 3320 3257 #if !SVC_EXTENSION3258 3321 xConfirmPara( m_iQP < -6 * (m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 3259 #endif3260 3322 xConfirmPara( m_DeblockingFilterMetric && (m_bLoopFilterDisable || m_loopFilterOffsetInPPS), "If DeblockingFilterMetric is true then both LoopFilterDisable and LoopFilterOffsetInPPS must be 0"); 3261 3323 xConfirmPara( m_loopFilterBetaOffsetDiv2 < -6 || m_loopFilterBetaOffsetDiv2 > 6, "Loop Filter Beta Offset div. 2 exceeds supported range (-6 to 6)"); … … 3265 3327 xConfirmPara( m_minSearchWindow < 0, "Minimum motion search window size for the adaptive window ME must be greater than or equal to 0" ); 3266 3328 xConfirmPara( m_iMaxDeltaQP > 7, "Absolute Delta QP exceeds supported range (0 to 7)" ); 3267 #if !SVC_EXTENSION3268 3329 xConfirmPara( m_iMaxCuDQPDepth > m_uiMaxCUDepth - 1, "Absolute depth for a minimum CuDQP exceeds maximum coding unit depth" ); 3269 #endif3270 3330 3271 3331 xConfirmPara( m_cbQpOffset < -12, "Min. Chroma Cb QP Offset is -12" ); … … 3275 3335 3276 3336 xConfirmPara( m_iQPAdaptationRange <= 0, "QP Adaptation Range must be more than 0" ); 3277 #if !SVC_EXTENSION3278 3337 if (m_iDecodingRefreshType == 2) 3279 3338 { … … 3298 3357 xConfirmPara( m_uiQuadtreeTUMaxDepthIntra < 1, "QuadtreeTUMaxDepthIntra must be greater than or equal to 1" ); 3299 3358 xConfirmPara( m_uiMaxCUWidth < ( 1 << (m_uiQuadtreeTULog2MinSize + m_uiQuadtreeTUMaxDepthIntra - 1) ), "QuadtreeTUMaxDepthInter must be less than or equal to the difference between log2(maxCUSize) and QuadtreeTULog2MinSize plus 1" ); 3300 #endif3301 3359 3302 3360 xConfirmPara( m_maxNumMergeCand < 1, "MaxNumMergeCand must be 1 or greater."); 3303 3361 xConfirmPara( m_maxNumMergeCand > 5, "MaxNumMergeCand must be 5 or smaller."); 3304 3362 3305 #if !SVC_EXTENSION3306 3363 #if ADAPTIVE_QP_SELECTION 3307 3364 xConfirmPara( m_bUseAdaptQpSelect == true && m_iQP < 0, "AdaptiveQpSelection must be disabled when QP < 0."); 3308 3365 xConfirmPara( m_bUseAdaptQpSelect == true && (m_cbQpOffset !=0 || m_crQpOffset != 0 ), "AdaptiveQpSelection must be disabled when ChromaQpOffset is not equal to 0."); 3309 #endif3310 3366 #endif 3311 3367 … … 3333 3389 } 3334 3390 3335 #if !SVC_EXTENSION3336 3391 Bool tileFlag = (m_numTileColumnsMinus1 > 0 || m_numTileRowsMinus1 > 0 ); 3337 3392 if (m_profile!=Profile::HIGHTHROUGHPUTREXT) … … 3346 3401 xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(m_chromaFormatIDC) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling"); 3347 3402 3403 #if !SVC_EXTENSION 3348 3404 xConfirmPara( m_confWinLeft % TComSPS::getWinUnitX(m_chromaFormatIDC) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling"); 3349 3405 xConfirmPara( m_confWinRight % TComSPS::getWinUnitX(m_chromaFormatIDC) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling"); 3350 3406 xConfirmPara( m_confWinTop % TComSPS::getWinUnitY(m_chromaFormatIDC) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling"); 3351 3407 xConfirmPara( m_confWinBottom % TComSPS::getWinUnitY(m_chromaFormatIDC) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling"); 3408 #endif 3352 3409 3353 3410 xConfirmPara( m_defaultDisplayWindowFlag && !m_vuiParametersPresentFlag, "VUI needs to be enabled for default display window"); … … 3380 3437 } 3381 3438 } 3382 #endif3383 3439 3384 3440 /* if this is an intra-only sequence, ie IntraPeriod=1, don't verify the GOP structure … … 3443 3499 } 3444 3500 Int numOK=0; 3445 #if !SVC_EXTENSION3446 3501 xConfirmPara( m_iIntraPeriod >=0&&(m_iIntraPeriod%m_iGOPSize!=0), "Intra period must be a multiple of GOPSize, or -1" ); 3447 #endif3448 3502 3449 3503 for(Int i=0; i<m_iGOPSize; i++) … … 3468 3522 3469 3523 // verify layer configuration parameters 3470 if(m_apcLayerCfg[layerIdx]->xCheckParameter(m_isField))3471 {3472 printf("\nError: invalid configuration parameter found in layer %d \n", layerIdx);3473 check_failed = true;3474 }3475 3476 // verify layer configuration parameters3477 Int m_iIntraPeriod = m_apcLayerCfg[layerIdx]->m_iIntraPeriod;3478 3524 #endif 3479 3525 if ( (m_iIntraPeriod != 1) && !m_loopFilterOffsetInPPS && (!m_bLoopFilterDisable) ) … … 3993 4039 } 3994 4040 xConfirmPara(errorGOP,"Invalid GOP structure given"); 4041 4042 m_EhMaxTempLayer[layerIdx] = 1; 4043 for(Int i=0; i<m_iGOPSize; i++) 4044 { 4045 if(m_EhGOPList[layerIdx][i].m_temporalId >= m_EhMaxTempLayer[layerIdx] ) 4046 { 4047 m_EhMaxTempLayer[layerIdx] = m_EhGOPList[layerIdx][i].m_temporalId; 4048 } 4049 xConfirmPara(m_GOPList[i].m_sliceType!='B'&&m_GOPList[i].m_sliceType!='P'&&m_GOPList[i].m_sliceType!='I', "Slice type must be equal to B or P or I"); 4050 } 3995 4051 } 3996 4052 #endif … … 4006 4062 } 4007 4063 4008 #if SVC_EXTENSION4009 if( layerIdx > 0 )4010 {4011 m_EhMaxTempLayer[layerIdx] = 1;4012 for(Int i=0; i<m_iGOPSize; i++)4013 {4014 if(m_EhGOPList[layerIdx][i].m_temporalId >= m_EhMaxTempLayer[layerIdx] )4015 {4016 m_EhMaxTempLayer[layerIdx] = m_EhGOPList[layerIdx][i].m_temporalId;4017 }4018 xConfirmPara(m_GOPList[i].m_sliceType!='B'&&m_GOPList[i].m_sliceType!='P'&&m_GOPList[i].m_sliceType!='I', "Slice type must be equal to B or P or I");4019 }4020 }4021 #endif4022 4023 4064 for(Int i=0; i<MAX_TLAYER; i++) 4024 4065 { … … 4078 4119 m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1] + 1; 4079 4120 } 4080 4081 #if SVC_EXTENSION // ToDo: it should be checked for the case when parameters are different for the layers4082 Int m_iSourceWidth = m_apcLayerCfg[layerIdx]->m_iSourceWidth;4083 Int m_iSourceHeight = m_apcLayerCfg[layerIdx]->m_iSourceHeight;4084 Int m_uiMaxCUWidth = m_apcLayerCfg[layerIdx]->m_uiMaxCUWidth;4085 Int m_uiMaxCUHeight = m_apcLayerCfg[layerIdx]->m_uiMaxCUHeight;4086 4087 Bool tileFlag = (m_numTileColumnsMinus1 > 0 || m_numTileRowsMinus1 > 0 );4088 Int m_iWaveFrontSynchro = m_apcLayerCfg[layerIdx]->m_waveFrontSynchro;4089 xConfirmPara( tileFlag && m_iWaveFrontSynchro, "Tile and Wavefront can not be applied together");4090 #endif4091 4121 4092 4122 if(m_vuiParametersPresentFlag && m_bitstreamRestrictionFlag) … … 4163 4193 } 4164 4194 } 4165 #if !SVC_EXTENSION4166 4195 xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" ); 4167 #endif4168 4196 4169 4197 xConfirmPara( m_decodedPictureHashSEIEnabled<0 || m_decodedPictureHashSEIEnabled>3, "this hash type is not correct!\n"); … … 4224 4252 #endif 4225 4253 4226 #if RC_SHVC_HARMONIZATION4227 if ( m_apcLayerCfg[layerIdx]->m_RCEnableRateControl )4228 {4229 if ( m_apcLayerCfg[layerIdx]->m_RCForceIntraQP )4230 {4231 if ( m_apcLayerCfg[layerIdx]->m_RCInitialQP == 0 )4232 {4233 printf( "\nInitial QP for rate control is not specified. Reset not to use force intra QP!" );4234 m_apcLayerCfg[layerIdx]->m_RCForceIntraQP = false;4235 }4236 }4237 xConfirmPara( m_uiDeltaQpRD > 0, "Rate control cannot be used together with slice level multiple-QP optimization!\n" );4238 #if U0132_TARGET_BITS_SATURATION4239 if( m_apcLayerCfg[layerIdx]->m_RCCpbSaturationEnabled && m_levelList[layerPTLIdx]!=Level::NONE && m_profileList[layerPTLIdx]!=Profile::NONE )4240 {4241 UInt uiLevelIdx = (m_levelList[layerPTLIdx] / 10) + (UInt)((m_levelList[layerPTLIdx] % 10) / 3); // (m_level / 30)*3 + ((m_level % 10) / 3);4242 xConfirmPara( m_apcLayerCfg[layerIdx]->m_RCCpbSize > g_uiMaxCpbSize[m_levelTierList[layerPTLIdx]][uiLevelIdx], "RCCpbSize should be smaller than or equal to Max CPB size according to tier and level");4243 xConfirmPara( m_apcLayerCfg[layerIdx]->m_RCInitialCpbFullness > 1, "RCInitialCpbFullness should be smaller than or equal to 1");4244 }4245 #endif4246 }4247 #if U0132_TARGET_BITS_SATURATION4248 else4249 {4250 xConfirmPara( m_apcLayerCfg[layerIdx]->m_RCCpbSaturationEnabled != 0, "Target bits saturation cannot be processed without Rate control" );4251 }4252 #endif4253 #else4254 4254 if ( m_RCEnableRateControl ) 4255 4255 { … … 4277 4277 xConfirmPara( m_RCCpbSaturationEnabled != 0, "Target bits saturation cannot be processed without Rate control" ); 4278 4278 } 4279 #endif4280 4279 #endif 4281 4280 … … 4417 4416 { 4418 4417 printf("\n"); 4419 #if SVC_EXTENSION 4418 #if SVC_EXTENSION 4420 4419 printf("Total number of layers : %d\n", m_numLayers ); 4421 4420 printf("Multiview : %d\n", m_scalabilityMask[VIEW_ORDER_INDEX] ); … … 4433 4432 printf("IDR only for IRAP : %d\n", m_crossLayerAlignedIdrOnlyFlag ); 4434 4433 printf("InterLayerWeightedPred : %d\n", m_useInterLayerWeightedPred ); 4435 printf("\n"); 4436 for(UInt layer=0; layer<m_numLayers; layer++) 4437 { 4438 printf("=== Layer %d settings === \n", layer); 4439 m_apcLayerCfg[layer]->xPrintParameter(); 4440 printf("\n"); 4441 } 4442 printf("=== Common configuration settings === \n"); 4443 printf("Bitstream File : %s\n", m_pchBitstreamFile ); 4444 #else //SVC_EXTENSION 4445 printf("\n"); 4434 4435 for( UInt layer = 0; layer < m_numLayers + 1; layer++ ) 4436 { 4437 UInt layerIdx = layer == m_numLayers ? 0 : layer; 4438 Int& layerPTLIdx = m_apcLayerCfg[layerIdx]->m_layerPTLIdx; 4439 Profile::Name& m_profile = m_profileList[layerPTLIdx]; 4440 Bool m_onePictureOnlyConstraintFlag = m_apcLayerCfg[layerIdx]->m_onePictureOnlyConstraintFlag; 4441 UInt& m_bitDepthConstraint = m_apcLayerCfg[layerIdx]->m_bitDepthConstraint; 4442 Bool& m_intraConstraintFlag = m_apcLayerCfg[layerIdx]->m_intraConstraintFlag; 4443 ChromaFormat& m_chromaFormatConstraint = m_apcLayerCfg[layerIdx]->m_chromaFormatConstraint; 4444 4445 UInt& m_uiMaxCUWidth = m_apcLayerCfg[layerIdx]->m_uiMaxCUWidth; 4446 UInt& m_uiMaxCUHeight = m_apcLayerCfg[layerIdx]->m_uiMaxCUHeight; 4447 UInt& m_uiMaxCUDepth = m_apcLayerCfg[layerIdx]->m_uiMaxCUDepth; 4448 ChromaFormat& m_chromaFormatIDC = m_apcLayerCfg[layerIdx]->m_chromaFormatIDC; 4449 4450 Int& m_confWinLeft = m_apcLayerCfg[layerIdx]->m_confWinLeft; 4451 Int& m_confWinRight = m_apcLayerCfg[layerIdx]->m_confWinLeft; 4452 Int& m_confWinTop = m_apcLayerCfg[layerIdx]->m_confWinLeft; 4453 Int& m_confWinBottom = m_apcLayerCfg[layerIdx]->m_confWinLeft; 4454 Int* m_aiPad = m_apcLayerCfg[layerIdx]->m_aiPad; 4455 Int* m_aidQP = m_apcLayerCfg[layerIdx]->m_aidQP; 4456 4457 Int& m_iSourceWidth = m_apcLayerCfg[layerIdx]->m_iSourceWidth; 4458 Int& m_iSourceHeight = m_apcLayerCfg[layerIdx]->m_iSourceHeight; 4459 4460 const Char* m_pchInputFile = m_apcLayerCfg[layerIdx]->m_cInputFile.c_str(); 4461 const Char* m_pchReconFile = m_apcLayerCfg[layerIdx]->m_cReconFile.c_str(); 4462 4463 Int& m_iFrameRate = m_apcLayerCfg[layerIdx]->m_iFrameRate; 4464 Int& m_iIntraPeriod = m_apcLayerCfg[layerIdx]->m_iFrameRate; 4465 4466 UInt& m_uiMaxTotalCUDepth = m_apcLayerCfg[layerIdx]->m_uiMaxTotalCUDepth; 4467 UInt& m_uiQuadtreeTULog2MinSize = m_apcLayerCfg[layerIdx]->m_uiQuadtreeTULog2MinSize; 4468 UInt& m_uiQuadtreeTULog2MaxSize = m_apcLayerCfg[layerIdx]->m_uiQuadtreeTULog2MaxSize; 4469 UInt& m_uiQuadtreeTUMaxDepthInter = m_apcLayerCfg[layerIdx]->m_uiQuadtreeTUMaxDepthInter; 4470 UInt& m_uiQuadtreeTUMaxDepthIntra = m_apcLayerCfg[layerIdx]->m_uiQuadtreeTUMaxDepthIntra; 4471 4472 Double& m_fQP = m_apcLayerCfg[layerIdx]->m_fQP; 4473 Int& m_iMaxCuDQPDepth = m_apcLayerCfg[layerIdx]->m_iMaxCuDQPDepth; 4474 4475 Bool& m_RCEnableRateControl = m_apcLayerCfg[layerIdx]->m_RCEnableRateControl; 4476 Int& m_RCTargetBitrate = m_apcLayerCfg[layerIdx]->m_RCTargetBitrate; 4477 Bool& m_RCKeepHierarchicalBit = m_apcLayerCfg[layerIdx]->m_RCKeepHierarchicalBit; 4478 Bool& m_RCLCULevelRC = m_apcLayerCfg[layerIdx]->m_RCLCULevelRC; 4479 Bool& m_RCUseLCUSeparateModel = m_apcLayerCfg[layerIdx]->m_RCUseLCUSeparateModel; 4480 Int& m_RCInitialQP = m_apcLayerCfg[layerIdx]->m_RCInitialQP; 4481 Bool& m_RCForceIntraQP = m_apcLayerCfg[layerIdx]->m_RCForceIntraQP; 4482 4483 Bool& m_bUseSAO = m_apcLayerCfg[layerIdx]->m_bUseSAO; 4484 4485 Int* m_inputBitDepth = m_apcLayerCfg[layerIdx]->m_inputBitDepth; 4486 Int* m_MSBExtendedBitDepth = m_apcLayerCfg[layerIdx]->m_MSBExtendedBitDepth; 4487 Int* m_internalBitDepth = m_apcLayerCfg[layerIdx]->m_internalBitDepth; 4488 4489 #if U0132_TARGET_BITS_SATURATION 4490 Bool& m_RCCpbSaturationEnabled = m_apcLayerCfg[layerIdx]->m_RCCpbSaturationEnabled; 4491 UInt& m_RCCpbSize = m_apcLayerCfg[layerIdx]->m_RCCpbSize; 4492 Double& m_RCInitialCpbFullness = m_apcLayerCfg[layerIdx]->m_RCInitialCpbFullness; 4493 #endif 4494 4495 if( layer == m_numLayers ) 4496 { 4497 printf("\n=== Common configuration settings === \n"); 4498 } 4499 4500 if( layer < m_numLayers ) 4501 { 4502 printf("\n=== Layer %d settings ===\n", layer); 4503 #endif 4504 4446 4505 printf("Input File : %s\n", m_pchInputFile ); 4506 4507 #if SVC_EXTENSION 4508 } 4509 if( layer == m_numLayers ) 4510 { 4511 #endif 4512 4447 4513 printf("Bitstream File : %s\n", m_pchBitstreamFile ); 4514 4515 #if SVC_EXTENSION 4516 } 4517 if( layer < m_numLayers ) 4518 { 4519 #endif 4520 4448 4521 printf("Reconstruction File : %s\n", m_pchReconFile ); 4449 4522 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate ); 4450 4523 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 4451 #endif //SVC_EXTENSION 4452 4524 4525 #if SVC_EXTENSION 4526 printf("PTL index : %d\n", m_apcLayerCfg[layerIdx]->m_layerPTLIdx ); 4527 } 4528 4529 if( layer == m_numLayers ) 4530 { 4531 #endif 4453 4532 printf("Sequence PSNR output : %s\n", (m_printMSEBasedSequencePSNR ? "Linear average, MSE-based" : "Linear average only") ); 4454 4533 printf("Sequence MSE output : %s\n", (m_printSequenceMSE ? "Enabled" : "Disabled") ); … … 4467 4546 printf("Frame index : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded ); 4468 4547 } 4469 #if !SVC_EXTENSION 4548 #if SVC_EXTENSION 4549 } 4550 4551 if( layer < m_numLayers ) 4552 { 4553 #endif 4554 4470 4555 if (m_profile == Profile::MAINREXT) 4471 4556 { … … 4501 4586 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter); 4502 4587 printf("Max RQT depth intra : %d\n", m_uiQuadtreeTUMaxDepthIntra); 4588 #if SVC_EXTENSION 4589 } 4590 4591 if( layer == m_numLayers ) 4592 { 4503 4593 #endif 4504 4594 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize); 4505 4595 printf("Motion search range : %d\n", m_iSearchRange ); 4506 #if !SVC_EXTENSION 4596 #if SVC_EXTENSION 4597 } 4598 4599 if( layer < m_numLayers ) 4600 { 4601 #endif 4507 4602 printf("Intra period : %d\n", m_iIntraPeriod ); 4603 #if SVC_EXTENSION 4604 } 4605 4606 if( layer == m_numLayers ) 4607 { 4508 4608 #endif 4509 4609 printf("Decoding refresh type : %d\n", m_iDecodingRefreshType ); 4510 #if !SVC_EXTENSION 4610 #if SVC_EXTENSION 4611 } 4612 4613 if( layer < m_numLayers ) 4614 { 4615 #endif 4511 4616 printf("QP : %5.2f\n", m_fQP ); 4512 4617 printf("Max dQP signaling depth : %d\n", m_iMaxCuDQPDepth); 4618 #if SVC_EXTENSION 4619 } 4620 4621 if( layer == m_numLayers ) 4622 { 4513 4623 #endif 4514 4624 … … 4517 4627 printf("QP adaptation : %d (range=%d)\n", m_bUseAdaptiveQP, (m_bUseAdaptiveQP ? m_iQPAdaptationRange : 0) ); 4518 4628 printf("GOP size : %d\n", m_iGOPSize ); 4519 #if !SVC_EXTENSION 4629 4630 #if SVC_EXTENSION 4631 } 4632 4633 if( layer < m_numLayers ) 4634 { 4635 #endif 4636 4520 4637 printf("Input bit depth : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] ); 4521 4638 printf("MSB-extended bit depth : (Y:%d, C:%d)\n", m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] ); … … 4523 4640 printf("PCM sample bit depth : (Y:%d, C:%d)\n", m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA] : m_internalBitDepth[CHANNEL_TYPE_LUMA], 4524 4641 m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] : m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); 4525 #endif 4642 #if SVC_EXTENSION 4643 } 4644 4645 if( layer == m_numLayers ) 4646 { 4647 #endif 4648 4526 4649 printf("Intra reference smoothing : %s\n", (m_enableIntraReferenceSmoothing ? "Enabled" : "Disabled") ); 4527 4650 printf("diff_cu_chroma_qp_offset_depth : %d\n", m_diffCuChromaQpOffsetDepth); 4528 #if !SVC_EXTENSION4529 4651 printf("extended_precision_processing_flag : %s\n", (m_extendedPrecisionProcessingFlag ? "Enabled" : "Disabled") ); 4530 #endif4531 4652 printf("implicit_rdpcm_enabled_flag : %s\n", (m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT] ? "Enabled" : "Disabled") ); 4532 4653 printf("explicit_rdpcm_enabled_flag : %s\n", (m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT] ? "Enabled" : "Disabled") ); … … 4534 4655 printf("transform_skip_context_enabled_flag : %s\n", (m_transformSkipContextEnabledFlag ? "Enabled" : "Disabled") ); 4535 4656 printf("cross_component_prediction_enabled_flag: %s\n", (m_crossComponentPredictionEnabledFlag ? (m_reconBasedCrossCPredictionEstimate ? "Enabled (reconstructed-residual-based estimate)" : "Enabled (encoder-side-residual-based estimate)") : "Disabled") ); 4536 #if !SVC_EXTENSION4537 4657 printf("high_precision_offsets_enabled_flag : %s\n", (m_highPrecisionOffsetsEnabledFlag ? "Enabled" : "Disabled") ); 4538 #endif4539 4658 printf("persistent_rice_adaptation_enabled_flag: %s\n", (m_persistentRiceAdaptationEnabledFlag ? "Enabled" : "Disabled") ); 4540 4659 printf("cabac_bypass_alignment_enabled_flag : %s\n", (m_cabacBypassAlignmentEnabledFlag ? "Enabled" : "Disabled") ); 4660 4541 4661 if (m_bUseSAO) 4542 4662 { … … 4554 4674 } 4555 4675 4556 #if !RC_SHVC_HARMONIZATION 4676 #if SVC_EXTENSION 4677 } 4678 4679 if( layer < m_numLayers ) 4680 { 4681 #endif 4682 4557 4683 printf("RateControl : %d\n", m_RCEnableRateControl ); 4684 4685 #if SVC_EXTENSION 4686 } 4687 4688 if( layer == m_numLayers ) 4689 { 4558 4690 #endif 4559 4691 printf("WPMethod : %d\n", Int(m_weightedPredictionMethod)); 4560 4692 4561 #if !RC_SHVC_HARMONIZATION 4693 #if SVC_EXTENSION 4694 } 4695 4696 if( layer < m_numLayers ) 4697 { 4698 #endif 4699 4562 4700 if(m_RCEnableRateControl) 4563 4701 { … … 4577 4715 #endif 4578 4716 } 4717 4718 #if SVC_EXTENSION 4719 } 4720 4721 if( layer == m_numLayers ) 4722 { 4579 4723 #endif 4580 4724 … … 4582 4726 printf("\n"); 4583 4727 4728 #if SVC_EXTENSION 4729 } 4730 } 4731 4732 for( UInt layer = 0; layer < m_numLayers; layer++ ) 4733 { 4734 Int* m_internalBitDepth = m_apcLayerCfg[layer]->m_internalBitDepth; 4735 Int* m_MSBExtendedBitDepth = m_apcLayerCfg[layer]->m_MSBExtendedBitDepth; 4736 Bool& m_bUseSAO = m_apcLayerCfg[layer]->m_bUseSAO; 4737 UInt& m_uiMaxCUWidth = m_apcLayerCfg[layer]->m_uiMaxCUWidth; 4738 UInt& m_uiMaxCUHeight = m_apcLayerCfg[layer]->m_uiMaxCUHeight; 4739 Int& m_iSourceWidth = m_apcLayerCfg[layer]->m_iSourceWidth; 4740 Int& m_iSourceHeight = m_apcLayerCfg[layer]->m_iSourceHeight; 4741 Int& m_iWaveFrontSynchro = m_apcLayerCfg[layer]->m_waveFrontSynchro; 4742 ScalingListMode& m_useScalingListId = m_apcLayerCfg[layer]->m_useScalingListId; 4743 4744 4745 printf("Layer%d ", layer); 4746 #endif 4747 4584 4748 printf("TOOL CFG: "); 4585 #if !SVC_EXTENSION4586 4749 printf("IBD:%d ", ((m_internalBitDepth[CHANNEL_TYPE_LUMA] > m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA]) || (m_internalBitDepth[CHANNEL_TYPE_CHROMA] > m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA]))); 4587 #endif4588 4750 printf("HAD:%d ", m_bUseHADME ); 4589 4751 printf("RDQ:%d ", m_useRDOQ ); … … 4615 4777 printf("CIP:%d ", m_bUseConstrainedIntraPred); 4616 4778 printf("SAO:%d ", (m_bUseSAO)?(1):(0)); 4617 #if !SVC_EXTENSION4618 4779 printf("PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0); 4619 #endif4620 4780 4621 4781 if (m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagForce) … … 4631 4791 printf("WPB:%d ", (Int)m_useWeightedBiPred); 4632 4792 printf("PME:%d ", m_log2ParallelMergeLevel); 4633 #if !SVC_EXTENSION4634 4793 const Int iWaveFrontSubstreams = m_iWaveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1; 4635 4794 printf(" WaveFrontSynchro:%d WaveFrontSubstreams:%d", 4636 4795 m_iWaveFrontSynchro, iWaveFrontSubstreams); 4637 4796 printf(" ScalingList:%d ", m_useScalingListId ); 4638 #endif4639 4797 printf("TMVPMode:%d ", m_TMVPModeId ); 4640 4798 #if ADAPTIVE_QP_SELECTION … … 4646 4804 4647 4805 #if SVC_EXTENSION 4648 printf("\n\nSHVC TOOL CFG: "); 4806 printf("\n\n"); 4807 } 4808 4809 printf("\nSHVC TOOL CFG: "); 4649 4810 printf("ElRapSliceType: %c-slice ", m_elRapSliceBEnabled ? 'B' : 'P'); 4650 4811 printf("REF_IDX_ME_ZEROMV: %d ", REF_IDX_ME_ZEROMV); -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1434 r1437 246 246 Int m_MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of input samples after MSB extension 247 247 Int m_internalBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth codec operates at (input/output files will be converted) 248 #endif 248 249 Bool m_extendedPrecisionProcessingFlag; 249 250 Bool m_highPrecisionOffsetsEnabledFlag; 250 251 251 252 //coding tools (chroma format) 253 #if !SVC_EXTENSION 252 254 ChromaFormat m_chromaFormatIDC; 253 255 #endif … … 257 259 258 260 // coding tool (SAO) 261 #if !SVC_EXTENSION 259 262 Bool m_bUseSAO; 263 #endif 260 264 Bool m_bTestSAODisableAtPictureLevel; 261 265 Double m_saoEncodingRate; ///< When >0 SAO early picture termination is enabled for luma and chroma -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r1433 r1437 44 44 : m_cInputFile(string("")) 45 45 , m_cReconFile(string("")) 46 , m_conformance Mode( 0)46 , m_conformanceWindowMode(0) 47 47 , m_scalingListFile(NULL) 48 , m_pchdQPFile(NULL) 48 49 , m_aidQP(NULL) 49 50 , m_repFormatIdx(-1) … … 53 54 { 54 55 #if Q0074_COLOUR_REMAPPING_SEI 55 for( Int c=0 ; c<3 ; c++) 56 { 57 m_colourRemapSEIPreLutCodedValue[c] = NULL; 58 m_colourRemapSEIPreLutTargetValue[c] = NULL; 59 m_colourRemapSEIPostLutCodedValue[c] = NULL; 60 m_colourRemapSEIPostLutTargetValue[c] = NULL; 61 } 56 memset( m_colourRemapSEIPreLutCodedValue, 0, sizeof(m_colourRemapSEIPreLutCodedValue) ); 57 memset( m_colourRemapSEIPreLutTargetValue, 0, sizeof(m_colourRemapSEIPreLutTargetValue) ); 58 memset( m_colourRemapSEIPostLutCodedValue, 0, sizeof(m_colourRemapSEIPostLutCodedValue) ); 59 memset( m_colourRemapSEIPostLutTargetValue, 0, sizeof(m_colourRemapSEIPostLutTargetValue) ); 62 60 #endif 63 61 m_confWinLeft = m_confWinRight = m_confWinTop = m_confWinBottom = 0; … … 120 118 } 121 119 122 123 // ====================================================================================================================124 // Public member functions125 // ====================================================================================================================126 127 /** \param argc number of arguments128 \param argv array of arguments129 \retval true when success130 */131 bool TAppEncLayerCfg::parseCfg( const string& cfgFileName )132 {133 string cfg_InputFile;134 string cfg_ReconFile;135 string cfg_dQPFile;136 #if AUXILIARY_PICTURES137 Int tmpInputChromaFormat;138 Int tmpChromaFormat;139 #endif140 #if Q0074_COLOUR_REMAPPING_SEI141 string cfg_colourRemapSEIFileRoot;142 #endif143 144 po::Options opts;145 opts.addOptions()146 ("InputFile,i", cfg_InputFile, string(""), "original YUV input file name")147 #if AVC_BASE148 ("InputBLFile,-ibl", cfg_InputFile, string(""), "original YUV input file name")149 #endif150 ("ReconFile,o", cfg_ReconFile, string(""), "reconstructed YUV output file name")151 ("SourceWidth,-wdt", m_iSourceWidth, 0, "Source picture width")152 ("SourceHeight,-hgt", m_iSourceHeight, 0, "Source picture height")153 ("CroppingMode", m_conformanceMode, 0, "Cropping mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping")154 #if AUXILIARY_PICTURES155 ("InputChromaFormat", tmpInputChromaFormat, 420, "InputChromaFormatIDC")156 ("ChromaFormatIDC", tmpChromaFormat, 420, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat)")157 #endif158 ("ConfLeft", m_confWinLeft, 0, "Deprecated alias of ConfWinLeft")159 ("ConfRight", m_confWinRight, 0, "Deprecated alias of ConfWinRight")160 ("ConfTop", m_confWinTop, 0, "Deprecated alias of ConfWinTop")161 ("ConfBottom", m_confWinBottom, 0, "Deprecated alias of ConfWinBottom")162 ("ConfWinLeft", m_confWinLeft, 0, "Left offset for window conformance mode 3")163 ("ConfWinRight", m_confWinRight, 0, "Right offset for window conformance mode 3")164 ("ConfWinTop", m_confWinTop, 0, "Top offset for window conformance mode 3")165 ("ConfWinBottom", m_confWinBottom, 0, "Bottom offset for window conformance mode 3")166 ("HorizontalPadding,-pdx",m_aiPad[0], 0, "horizontal source padding for cropping mode 2")167 ("VerticalPadding,-pdy", m_aiPad[1], 0, "vertical source padding for cropping mode 2")168 ("IntraPeriod,-ip", m_iIntraPeriod, -1, "intra period in frames, (-1: only first frame)")169 ("FrameRate,-fr", m_iFrameRate, 0, "Frame rate")170 ("dQPFile,m", cfg_dQPFile, string(""), "dQP file name")171 ("QP,q", m_fQP, 30.0, "Qp value, if value is float, QP is switched once during encoding")172 #if Q0074_COLOUR_REMAPPING_SEI173 ("SEIColourRemappingInfoFileRoot", cfg_colourRemapSEIFileRoot, string(""), "Colour Remapping Information SEI parameters file name")174 #endif175 ;176 177 po::setDefaults(opts);178 po::parseConfigFile(opts, cfgFileName);179 180 m_cInputFile = cfg_InputFile;181 m_cReconFile = cfg_ReconFile;182 m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str());183 #if AUXILIARY_PICTURES184 m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat);185 m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat)));186 #endif187 #if Q0074_COLOUR_REMAPPING_SEI188 if( !cfg_colourRemapSEIFileRoot.empty() )189 {190 m_colourRemapSEIFileRoot = strdup(cfg_colourRemapSEIFileRoot.c_str());191 }192 #endif193 194 // reading external dQP description from file195 if ( m_pchdQPFile )196 {197 FILE* fpt=fopen( m_pchdQPFile, "r" );198 if ( fpt )199 {200 Int iValue;201 Int iPOC = 0;202 while ( iPOC < m_cAppEncCfg->getNumFrameToBeEncoded() )203 {204 if ( fscanf(fpt, "%d", &iValue ) == EOF ) break;205 m_aidQP[ iPOC ] = iValue;206 iPOC++;207 }208 fclose(fpt);209 }210 }211 212 return true;213 }214 215 Void TAppEncLayerCfg::xPrintParameter()216 {217 printf("Input File : %s\n", m_cInputFile.c_str() );218 printf("Reconstruction File : %s\n", m_cReconFile.c_str() );219 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - ( m_confWinLeft + m_confWinRight ) * TComSPS::getWinUnitX( m_chromaFormatIDC ), m_iSourceHeight - ( m_confWinTop + m_confWinBottom ) * TComSPS::getWinUnitY( m_chromaFormatIDC ), m_iFrameRate );220 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate );221 printf("PTL index : %d\n", m_layerPTLIdx );222 printf("Input bit depth : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] );223 printf("Internal bit depth : (Y:%d, C:%d)\n", m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA] );224 printf("PCM sample bit depth : (Y:%d, C:%d)\n", m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_internalBitDepth[CHANNEL_TYPE_LUMA], m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_internalBitDepth[CHANNEL_TYPE_CHROMA] );225 std::cout << "Input ChromaFormatIDC :";226 227 switch (m_InputChromaFormatIDC)228 {229 case CHROMA_400: std::cout << " 4:0:0"; break;230 case CHROMA_420: std::cout << " 4:2:0"; break;231 case CHROMA_422: std::cout << " 4:2:2"; break;232 case CHROMA_444: std::cout << " 4:4:4"; break;233 default:234 std::cerr << "Invalid";235 exit(1);236 }237 std::cout << std::endl;238 239 std::cout << "Output (internal) ChromaFormatIDC :";240 switch (m_chromaFormatIDC)241 {242 case CHROMA_400: std::cout << " 4:0:0"; break;243 case CHROMA_420: std::cout << " 4:2:0"; break;244 case CHROMA_422: std::cout << " 4:2:2"; break;245 case CHROMA_444: std::cout << " 4:4:4"; break;246 default:247 std::cerr << "Invalid";248 exit(1);249 }250 printf("\n");251 printf("CU size / depth / total-depth : %d / %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth, m_uiMaxTotalCUDepth );252 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize );253 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter);254 printf("Max RQT depth intra : %d\n", m_uiQuadtreeTUMaxDepthIntra);255 printf("QP : %5.2f\n", m_fQP );256 printf("Max dQP signaling depth : %d\n", m_iMaxCuDQPDepth);257 printf("Intra period : %d\n", m_iIntraPeriod );258 #if RC_SHVC_HARMONIZATION259 printf("RateControl : %d\n", m_RCEnableRateControl );260 if(m_RCEnableRateControl)261 {262 printf("TargetBitrate : %d\n", m_RCTargetBitrate );263 printf("KeepHierarchicalBit : %d\n", m_RCKeepHierarchicalBit );264 printf("LCULevelRC : %d\n", m_RCLCULevelRC );265 printf("UseLCUSeparateModel : %d\n", m_RCUseLCUSeparateModel );266 printf("InitialQP : %d\n", m_RCInitialQP );267 printf("ForceIntraQP : %d\n", m_RCForceIntraQP );268 #if U0132_TARGET_BITS_SATURATION269 printf("CpbSaturation : %d\n", m_RCCpbSaturationEnabled );270 if (m_RCCpbSaturationEnabled)271 {272 printf("CpbSize : %d\n", m_RCCpbSize);273 printf("InitalCpbFullness : %.2f\n", m_RCInitialCpbFullness);274 }275 #endif276 }277 #endif278 printf("WaveFrontSynchro : %d\n", m_waveFrontSynchro);279 280 const Int iWaveFrontSubstreams = m_waveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1;281 printf("WaveFrontSubstreams : %d\n", iWaveFrontSubstreams);282 printf("ScalingList : %d\n", m_useScalingListId );283 printf("PCM : %d\n", (m_cAppEncCfg->getUsePCM() && (1<<m_cAppEncCfg->getPCMLog2MinSize()) <= m_uiMaxCUWidth)? 1 : 0);284 }285 286 Bool confirmPara(Bool bflag, const char* message);287 288 Bool TAppEncLayerCfg::xCheckParameter( Bool isField )289 {290 switch (m_conformanceMode)291 {292 case 0:293 {294 // no cropping or padding295 m_confWinLeft = m_confWinRight = m_confWinTop = m_confWinBottom = 0;296 m_aiPad[1] = m_aiPad[0] = 0;297 break;298 }299 case 1:300 {301 // conformance302 if ((m_confWinLeft != 0) || (m_confWinRight != 0) || (m_confWinTop != 0) || (m_confWinBottom != 0))303 {304 fprintf(stderr, "Warning: Automatic padding enabled, but cropping parameters are set. Undesired size possible.\n");305 }306 if ((m_aiPad[1] != 0) || (m_aiPad[0] != 0))307 {308 fprintf(stderr, "Warning: Automatic padding enabled, but padding parameters are also set\n");309 }310 311 // automatic padding to minimum CU size312 Int minCuSize = m_uiMaxCUHeight >> (m_uiMaxCUDepth - 1);313 314 if (m_iSourceWidth % minCuSize)315 {316 m_aiPad[0] = m_confWinRight = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth;317 m_iSourceWidth += m_confWinRight;318 m_confWinRight /= TComSPS::getWinUnitX( m_chromaFormatIDC );319 }320 if (m_iSourceHeight % minCuSize)321 {322 m_aiPad[1] = m_confWinBottom = ((m_iSourceHeight / minCuSize) + 1) * minCuSize - m_iSourceHeight;323 m_iSourceHeight += m_confWinBottom;324 if ( isField )325 {326 m_iSourceHeightOrg += m_confWinBottom << 1;327 m_aiPad[1] = m_confWinBottom << 1;328 }329 m_confWinBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC );330 }331 break;332 }333 case 2:334 {335 // conformance336 if ((m_confWinLeft != 0) || (m_confWinRight != 0) || (m_confWinTop != 0) || (m_confWinBottom != 0))337 {338 fprintf(stderr, "Warning: Automatic padding enabled, but cropping parameters are set. Undesired size possible.\n");339 }340 341 //padding342 m_iSourceWidth += m_aiPad[0];343 m_iSourceHeight += m_aiPad[1];344 m_confWinRight = m_aiPad[0];345 m_confWinBottom = m_aiPad[1];346 m_confWinRight /= TComSPS::getWinUnitX( m_chromaFormatIDC );347 m_confWinBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC );348 break;349 }350 case 3:351 {352 // conformance353 if ((m_confWinLeft == 0) && (m_confWinRight == 0) && (m_confWinTop == 0) && (m_confWinBottom == 0))354 {355 fprintf(stderr, "Warning: Cropping enabled, but all cropping parameters set to zero\n");356 }357 if ((m_aiPad[1] != 0) || (m_aiPad[0]!=0))358 {359 fprintf(stderr, "Warning: Cropping enabled, padding parameters will be ignored\n");360 }361 m_aiPad[1] = m_aiPad[0] = 0;362 break;363 }364 }365 366 // allocate slice-based dQP values367 Int iFrameToBeEncoded = m_cAppEncCfg->getNumFrameToBeEncoded();368 Int iGOPSize = m_cAppEncCfg->getGOPSize();369 if( m_aidQP == NULL )370 m_aidQP = new Int[iFrameToBeEncoded + iGOPSize + 1 ];371 ::memset( m_aidQP, 0, sizeof(Int)*( iFrameToBeEncoded + iGOPSize + 1 ) );372 373 // handling of floating-point QP values374 // if QP is not integer, sequence is split into two sections having QP and QP+1375 m_iQP = (Int)( m_fQP );376 if ( m_iQP < m_fQP )377 {378 Int iSwitchPOC = (Int)( iFrameToBeEncoded - (m_fQP - m_iQP)*iFrameToBeEncoded + 0.5 );379 380 381 iSwitchPOC = (Int)( (Double)iSwitchPOC / iGOPSize + 0.5 )*iGOPSize;382 for ( Int i=iSwitchPOC; i<iFrameToBeEncoded + iGOPSize + 1; i++ )383 {384 m_aidQP[i] = 1;385 }386 }387 388 UInt maxCUWidth = m_uiMaxCUWidth;389 UInt maxCUHeight = m_uiMaxCUHeight;390 UInt maxCUDepth = m_uiMaxCUDepth;391 bool check_failed = false; /* abort if there is a fatal configuration problem */392 #define xConfirmPara(a,b) check_failed |= confirmPara(a,b)393 // check range of parameters394 xConfirmPara( m_iFrameRate <= 0, "Frame rate must be more than 1" );395 xConfirmPara( (m_iSourceWidth % (maxCUWidth >> (maxCUDepth-1)))!=0, "Resulting coded frame width must be a multiple of the minimum CU size");396 xConfirmPara( (m_iSourceHeight % (maxCUHeight >> (maxCUDepth-1)))!=0, "Resulting coded frame height must be a multiple of the minimum CU size");397 xConfirmPara( (m_iIntraPeriod > 0 && m_iIntraPeriod < iGOPSize) || m_iIntraPeriod == 0, "Intra period must be more than GOP size, or -1 , not 0" );398 if (m_cAppEncCfg->getDecodingRefreshType() == 2)399 {400 xConfirmPara( m_iIntraPeriod > 0 && m_iIntraPeriod <= iGOPSize , "Intra period must be larger than GOP size for periodic IDR pictures");401 }402 403 xConfirmPara( m_iQP < -6 * (m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" );404 405 xConfirmPara( m_waveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" );406 407 //chekc parameters408 xConfirmPara( m_iSourceWidth % TComSPS::getWinUnitX(CHROMA_420) != 0, "Picture width must be an integer multiple of the specified chroma subsampling");409 xConfirmPara( m_iSourceHeight % TComSPS::getWinUnitY(CHROMA_420) != 0, "Picture height must be an integer multiple of the specified chroma subsampling");410 411 xConfirmPara( m_aiPad[0] % TComSPS::getWinUnitX(CHROMA_420) != 0, "Horizontal padding must be an integer multiple of the specified chroma subsampling");412 xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(CHROMA_420) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling");413 414 xConfirmPara( m_iMaxCuDQPDepth > m_uiMaxCUDepth - 1, "Absolute depth for a minimum CuDQP exceeds maximum coding unit depth" );415 416 xConfirmPara( (m_uiMaxCUWidth >> m_uiMaxCUDepth) < 4, "Minimum partition width size should be larger than or equal to 8");417 xConfirmPara( (m_uiMaxCUHeight >> m_uiMaxCUDepth) < 4, "Minimum partition height size should be larger than or equal to 8");418 xConfirmPara( m_uiMaxCUWidth < 16, "Maximum partition width size should be larger than or equal to 16");419 xConfirmPara( m_uiMaxCUHeight < 16, "Maximum partition height size should be larger than or equal to 16");420 xConfirmPara( m_uiQuadtreeTULog2MinSize < 2, "QuadtreeTULog2MinSize must be 2 or greater.");421 xConfirmPara( m_uiQuadtreeTULog2MaxSize > 5, "QuadtreeTULog2MaxSize must be 5 or smaller.");422 xConfirmPara( (1<<m_uiQuadtreeTULog2MaxSize) > m_uiMaxCUWidth, "QuadtreeTULog2MaxSize must be log2(maxCUSize) or smaller.");423 xConfirmPara( m_uiQuadtreeTULog2MaxSize < m_uiQuadtreeTULog2MinSize, "QuadtreeTULog2MaxSize must be greater than or equal to m_uiQuadtreeTULog2MinSize.");424 xConfirmPara( (1<<m_uiQuadtreeTULog2MinSize)>(m_uiMaxCUWidth >>(m_uiMaxCUDepth-1)), "QuadtreeTULog2MinSize must not be greater than minimum CU size" ); // HS425 xConfirmPara( (1<<m_uiQuadtreeTULog2MinSize)>(m_uiMaxCUHeight>>(m_uiMaxCUDepth-1)), "QuadtreeTULog2MinSize must not be greater than minimum CU size" ); // HS426 xConfirmPara( ( 1 << m_uiQuadtreeTULog2MinSize ) > ( m_uiMaxCUWidth >> m_uiMaxCUDepth ), "Minimum CU width must be greater than minimum transform size." );427 xConfirmPara( ( 1 << m_uiQuadtreeTULog2MinSize ) > ( m_uiMaxCUHeight >> m_uiMaxCUDepth ), "Minimum CU height must be greater than minimum transform size." );428 xConfirmPara( m_uiQuadtreeTUMaxDepthInter < 1, "QuadtreeTUMaxDepthInter must be greater than or equal to 1" );429 xConfirmPara( m_uiMaxCUWidth < ( 1 << (m_uiQuadtreeTULog2MinSize + m_uiQuadtreeTUMaxDepthInter - 1) ), "QuadtreeTUMaxDepthInter must be less than or equal to the difference between log2(maxCUSize) and QuadtreeTULog2MinSize plus 1" );430 xConfirmPara( m_uiQuadtreeTUMaxDepthIntra < 1, "QuadtreeTUMaxDepthIntra must be greater than or equal to 1" );431 xConfirmPara( m_uiMaxCUWidth < ( 1 << (m_uiQuadtreeTULog2MinSize + m_uiQuadtreeTUMaxDepthIntra - 1) ), "QuadtreeTUMaxDepthInter must be less than or equal to the difference between log2(maxCUSize) and QuadtreeTULog2MinSize plus 1" );432 433 // max CU width and height should be power of 2434 UInt ui = m_uiMaxCUWidth;435 while(ui)436 {437 ui >>= 1;438 if( (ui & 1) == 1)439 xConfirmPara( ui != 1 , "Width should be 2^n");440 }441 ui = m_uiMaxCUHeight;442 while(ui)443 {444 ui >>= 1;445 if( (ui & 1) == 1)446 xConfirmPara( ui != 1 , "Height should be 2^n");447 }448 449 #undef xConfirmPara450 return check_failed;451 }452 453 120 #endif //SVC_EXTENSION 454 121 -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r1433 r1437 35 35 Int m_iSourceHeight; ///< source height in pixel (when interlaced = field height) 36 36 Int m_iSourceHeightOrg; ///< original source height in pixel (when interlaced = frame height) 37 Int m_conformance Mode;37 Int m_conformanceWindowMode; 38 38 Int m_confWinLeft; 39 39 Int m_confWinRight; … … 91 91 #endif 92 92 #endif 93 94 Bool m_bUseSAO; 93 95 94 96 ScalingListMode m_useScalingListId; ///< using quantization matrix … … 125 127 Int m_MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of input samples after MSB extension 126 128 Int m_internalBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth codec operates at (input/output files will be converted) 127 UInt m_log2SaoOffsetScale[MAX_NUM_CHANNEL_TYPE];128 Bool m_extendedPrecisionProcessingFlag;129 Bool m_highPrecisionOffsetsEnabledFlag;130 129 131 130 Int m_repFormatIdx; … … 166 165 Void create (); ///< create option handling class 167 166 Void destroy (); ///< destroy option handling class 168 bool parseCfg ( const string& cfgFileName ); ///< parse layer configuration file to fill member variables169 170 Void xPrintParameter();171 Bool xCheckParameter( Bool isField );172 167 173 168 Void setAppEncCfg(TAppEncCfg* p) {m_cAppEncCfg = p; } … … 175 170 string getInputFile() {return m_cInputFile; } 176 171 string getReconFile() {return m_cReconFile; } 177 Int getFrameRate() {return m_iFrameRate; }178 Int getSourceWidth() {return m_iSourceWidth; }179 Int getSourceHeight() {return m_iSourceHeight; }180 Int getSourceHeightOrg() {return m_iSourceHeightOrg; }181 Int getConformanceMode() { return m_conformanceMode; }182 Int* getPad() {return m_aiPad; }183 172 Double getFloatQP() {return m_fQP; } 184 173 Int getConfWinLeft() {return m_confWinLeft; } … … 186 175 Int getConfWinTop() {return m_confWinTop; } 187 176 Int getConfWinBottom() {return m_confWinBottom; } 188 #if AUXILIARY_PICTURES189 ChromaFormat getInputChromaFormat() {return m_InputChromaFormatIDC;}190 ChromaFormat getChromaFormatIDC() {return m_chromaFormatIDC; }191 Int getAuxId() {return m_auxId; }192 #endif193 194 Int getIntQP() {return m_iQP; }195 Int* getdQPs() {return m_aidQP; }196 177 197 178 Int getNumSamplePredRefLayers() {return m_numSamplePredRefLayers; } … … 206 187 Int getPredLayerIdx(Int i) {return m_predLayerIds[i]; } 207 188 208 #if RC_SHVC_HARMONIZATION209 Bool getRCEnableRateControl() {return m_RCEnableRateControl; }210 Int getRCTargetBitrate() {return m_RCTargetBitrate; }211 Bool getRCKeepHierarchicalBit() {return m_RCKeepHierarchicalBit; }212 Bool getRCLCULevelRC() {return m_RCLCULevelRC; }213 Bool getRCUseLCUSeparateModel() {return m_RCUseLCUSeparateModel; }214 Int getRCInitialQP() {return m_RCInitialQP; }215 Bool getRCForceIntraQP() {return m_RCForceIntraQP; }216 #endif217 189 Int getRepFormatIdx() { return m_repFormatIdx; } 218 190 Void setRepFormatIdx(Int x) { m_repFormatIdx = x; } -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1434 r1437 111 111 for( UInt idx = 0; idx < layer; idx++ ) 112 112 { 113 if( m_apcLayerCfg[layer]-> getSourceWidth() == m_apcLayerCfg[idx]->getSourceWidth() && m_apcLayerCfg[layer]->getSourceHeight() == m_apcLayerCfg[idx]->getSourceHeight()113 if( m_apcLayerCfg[layer]->m_iSourceWidth == m_apcLayerCfg[idx]->m_iSourceWidth && m_apcLayerCfg[layer]->m_iSourceHeight == m_apcLayerCfg[idx]->m_iSourceHeight 114 114 #if AUXILIARY_PICTURES 115 && m_apcLayerCfg[layer]-> getChromaFormatIDC() == m_apcLayerCfg[idx]->getChromaFormatIDC()115 && m_apcLayerCfg[layer]->m_chromaFormatIDC == m_apcLayerCfg[idx]->m_chromaFormatIDC 116 116 #endif 117 117 && m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_LUMA] == m_apcLayerCfg[idx]->m_internalBitDepth[CHANNEL_TYPE_LUMA] && m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_CHROMA] == m_apcLayerCfg[idx]->m_internalBitDepth[CHANNEL_TYPE_CHROMA] … … 171 171 } 172 172 173 repFormat->setPicWidthVpsInLumaSamples ( m_apcLayerCfg[mapIdxToLayer[idx]]-> getSourceWidth());174 repFormat->setPicHeightVpsInLumaSamples ( m_apcLayerCfg[mapIdxToLayer[idx]]-> getSourceHeight());173 repFormat->setPicWidthVpsInLumaSamples ( m_apcLayerCfg[mapIdxToLayer[idx]]->m_iSourceWidth ); 174 repFormat->setPicHeightVpsInLumaSamples ( m_apcLayerCfg[mapIdxToLayer[idx]]->m_iSourceHeight ); 175 175 #if AUXILIARY_PICTURES 176 repFormat->setChromaFormatVpsIdc ( m_apcLayerCfg[mapIdxToLayer[idx]]-> getChromaFormatIDC());176 repFormat->setChromaFormatVpsIdc ( m_apcLayerCfg[mapIdxToLayer[idx]]->m_chromaFormatIDC ); 177 177 #else 178 178 repFormat->setChromaFormatVpsIdc ( 1 ); // Need modification to change for each layer - corresponds to 420 … … 443 443 #endif 444 444 445 Int layerPTLIdx = m_apcLayerCfg[layer]->m_layerPTLIdx; 446 447 Profile::Name m_profile = m_profileList[layerPTLIdx]; 448 Level::Tier m_levelTier = m_levelTierList[layerPTLIdx]; 449 Level::Name m_level = m_levelList[layerPTLIdx]; 450 UInt m_bitDepthConstraint = m_apcLayerCfg[layer]->m_bitDepthConstraint; 451 ChromaFormat m_chromaFormatConstraint = m_apcLayerCfg[layer]->m_chromaFormatConstraint; 452 Bool m_intraConstraintFlag = m_apcLayerCfg[layer]->m_intraConstraintFlag; 453 Bool m_onePictureOnlyConstraintFlag = m_apcLayerCfg[layer]->m_onePictureOnlyConstraintFlag; 454 Bool m_lowerBitRateConstraintFlag = m_apcLayerCfg[layer]->m_lowerBitRateConstraintFlag; 455 Bool m_progressiveSourceFlag = m_progressiveSourceFlagList[layerPTLIdx]; 456 Bool m_interlacedSourceFlag = m_interlacedSourceFlagList[layerPTLIdx]; 457 Bool m_nonPackedConstraintFlag = m_nonPackedConstraintFlagList[layerPTLIdx]; 458 Bool m_frameOnlyConstraintFlag = m_frameOnlyConstraintFlagList[layerPTLIdx]; 459 460 Int m_iFrameRate = m_apcLayerCfg[layer]->getFrameRate(); 461 Int m_iSourceWidth = m_apcLayerCfg[layer]->getSourceWidth(); 462 Int m_iSourceHeight = m_apcLayerCfg[layer]->getSourceHeight(); 463 Int m_confWinLeft = m_apcLayerCfg[layer]->m_confWinLeft; 464 Int m_confWinRight = m_apcLayerCfg[layer]->m_confWinRight; 465 Int m_confWinTop = m_apcLayerCfg[layer]->m_confWinTop; 466 Int m_confWinBottom = m_apcLayerCfg[layer]->m_confWinBottom; 467 468 Int m_iIntraPeriod = m_apcLayerCfg[layer]->m_iIntraPeriod; 469 Int m_iQP = m_apcLayerCfg[layer]->getIntQP(); 470 Int *m_aiPad = m_apcLayerCfg[layer]->getPad(); 471 472 Int m_iMaxCuDQPDepth = m_apcLayerCfg[layer]->m_iMaxCuDQPDepth; 473 ChromaFormat m_chromaFormatIDC = m_apcLayerCfg[layer]->m_chromaFormatIDC; 474 Bool m_extendedPrecisionProcessingFlag = m_apcLayerCfg[layer]->m_extendedPrecisionProcessingFlag; 475 Bool m_highPrecisionOffsetsEnabledFlag = m_apcLayerCfg[layer]->m_highPrecisionOffsetsEnabledFlag; 476 Int *m_aidQP = m_apcLayerCfg[layer]->getdQPs(); 477 478 UInt m_uiMaxCUWidth = m_apcLayerCfg[layer]->m_uiMaxCUWidth; 479 UInt m_uiMaxCUHeight = m_apcLayerCfg[layer]->m_uiMaxCUHeight; 480 UInt m_uiMaxTotalCUDepth = m_apcLayerCfg[layer]->m_uiMaxTotalCUDepth; 481 UInt m_uiLog2DiffMaxMinCodingBlockSize = m_apcLayerCfg[layer]->m_uiLog2DiffMaxMinCodingBlockSize; 482 UInt m_uiQuadtreeTULog2MaxSize = m_apcLayerCfg[layer]->m_uiQuadtreeTULog2MaxSize; 483 UInt m_uiQuadtreeTULog2MinSize = m_apcLayerCfg[layer]->m_uiQuadtreeTULog2MinSize; 484 UInt m_uiQuadtreeTUMaxDepthInter = m_apcLayerCfg[layer]->m_uiQuadtreeTUMaxDepthInter; 485 UInt m_uiQuadtreeTUMaxDepthIntra = m_apcLayerCfg[layer]->m_uiQuadtreeTUMaxDepthIntra; 486 487 Int m_iWaveFrontSynchro = m_apcLayerCfg[layer]->m_waveFrontSynchro; 488 Bool m_RCEnableRateControl = m_apcLayerCfg[layer]->getRCEnableRateControl(); 489 Int m_RCTargetBitrate = m_apcLayerCfg[layer]->getRCTargetBitrate(); 490 Bool m_RCKeepHierarchicalBit = m_apcLayerCfg[layer]->getRCKeepHierarchicalBit(); 491 Bool m_RCLCULevelRC = m_apcLayerCfg[layer]->getRCLCULevelRC(); 492 Bool m_RCUseLCUSeparateModel = m_apcLayerCfg[layer]->getRCUseLCUSeparateModel(); 493 Int m_RCInitialQP = m_apcLayerCfg[layer]->getRCInitialQP(); 494 Bool m_RCForceIntraQP = m_apcLayerCfg[layer]->getRCForceIntraQP(); 445 Int& layerPTLIdx = m_apcLayerCfg[layer]->m_layerPTLIdx; 446 447 Profile::Name& m_profile = m_profileList[layerPTLIdx]; 448 Level::Tier& m_levelTier = m_levelTierList[layerPTLIdx]; 449 Level::Name& m_level = m_levelList[layerPTLIdx]; 450 UInt& m_bitDepthConstraint = m_apcLayerCfg[layer]->m_bitDepthConstraint; 451 ChromaFormat& m_chromaFormatConstraint = m_apcLayerCfg[layer]->m_chromaFormatConstraint; 452 Bool& m_intraConstraintFlag = m_apcLayerCfg[layer]->m_intraConstraintFlag; 453 Bool& m_onePictureOnlyConstraintFlag = m_apcLayerCfg[layer]->m_onePictureOnlyConstraintFlag; 454 Bool& m_lowerBitRateConstraintFlag = m_apcLayerCfg[layer]->m_lowerBitRateConstraintFlag; 455 Bool& m_progressiveSourceFlag = m_progressiveSourceFlagList[layerPTLIdx]; 456 Bool& m_interlacedSourceFlag = m_interlacedSourceFlagList[layerPTLIdx]; 457 Bool& m_nonPackedConstraintFlag = m_nonPackedConstraintFlagList[layerPTLIdx]; 458 Bool& m_frameOnlyConstraintFlag = m_frameOnlyConstraintFlagList[layerPTLIdx]; 459 460 Int& m_iFrameRate = m_apcLayerCfg[layer]->m_iFrameRate; 461 Int& m_iSourceWidth = m_apcLayerCfg[layer]->m_iSourceWidth; 462 Int& m_iSourceHeight = m_apcLayerCfg[layer]->m_iSourceHeight; 463 Int& m_confWinLeft = m_apcLayerCfg[layer]->m_confWinLeft; 464 Int& m_confWinRight = m_apcLayerCfg[layer]->m_confWinRight; 465 Int& m_confWinTop = m_apcLayerCfg[layer]->m_confWinTop; 466 Int& m_confWinBottom = m_apcLayerCfg[layer]->m_confWinBottom; 467 468 Int& m_iIntraPeriod = m_apcLayerCfg[layer]->m_iIntraPeriod; 469 Int& m_iQP = m_apcLayerCfg[layer]->m_iQP; 470 Int *m_aiPad = m_apcLayerCfg[layer]->m_aiPad; 471 472 Int& m_iMaxCuDQPDepth = m_apcLayerCfg[layer]->m_iMaxCuDQPDepth; 473 ChromaFormat& m_chromaFormatIDC = m_apcLayerCfg[layer]->m_chromaFormatIDC; 474 Int *m_aidQP = m_apcLayerCfg[layer]->m_aidQP; 475 476 UInt& m_uiMaxCUWidth = m_apcLayerCfg[layer]->m_uiMaxCUWidth; 477 UInt& m_uiMaxCUHeight = m_apcLayerCfg[layer]->m_uiMaxCUHeight; 478 UInt& m_uiMaxTotalCUDepth = m_apcLayerCfg[layer]->m_uiMaxTotalCUDepth; 479 UInt& m_uiLog2DiffMaxMinCodingBlockSize = m_apcLayerCfg[layer]->m_uiLog2DiffMaxMinCodingBlockSize; 480 UInt& m_uiQuadtreeTULog2MaxSize = m_apcLayerCfg[layer]->m_uiQuadtreeTULog2MaxSize; 481 UInt& m_uiQuadtreeTULog2MinSize = m_apcLayerCfg[layer]->m_uiQuadtreeTULog2MinSize; 482 UInt& m_uiQuadtreeTUMaxDepthInter = m_apcLayerCfg[layer]->m_uiQuadtreeTUMaxDepthInter; 483 UInt& m_uiQuadtreeTUMaxDepthIntra = m_apcLayerCfg[layer]->m_uiQuadtreeTUMaxDepthIntra; 484 485 Int& m_iWaveFrontSynchro = m_apcLayerCfg[layer]->m_waveFrontSynchro; 486 Bool& m_RCEnableRateControl = m_apcLayerCfg[layer]->m_RCEnableRateControl; 487 Int& m_RCTargetBitrate = m_apcLayerCfg[layer]->m_RCTargetBitrate; 488 Bool& m_RCKeepHierarchicalBit = m_apcLayerCfg[layer]->m_RCKeepHierarchicalBit; 489 Bool& m_RCLCULevelRC = m_apcLayerCfg[layer]->m_RCLCULevelRC; 490 Bool& m_RCUseLCUSeparateModel = m_apcLayerCfg[layer]->m_RCUseLCUSeparateModel; 491 Int& m_RCInitialQP = m_apcLayerCfg[layer]->m_RCInitialQP; 492 Bool& m_RCForceIntraQP = m_apcLayerCfg[layer]->m_RCForceIntraQP; 495 493 496 494 #if U0132_TARGET_BITS_SATURATION 497 Bool m_RCCpbSaturationEnabled = m_apcLayerCfg[layer]->m_RCCpbSaturationEnabled; 498 UInt m_RCCpbSize = m_apcLayerCfg[layer]->m_RCCpbSize; 499 Double m_RCInitialCpbFullness = m_apcLayerCfg[layer]->m_RCInitialCpbFullness; 500 #endif 501 502 ScalingListMode m_useScalingListId = m_apcLayerCfg[layer]->m_useScalingListId; 503 Char* m_scalingListFile = m_apcLayerCfg[layer]->m_scalingListFile; 495 Bool& m_RCCpbSaturationEnabled = m_apcLayerCfg[layer]->m_RCCpbSaturationEnabled; 496 UInt& m_RCCpbSize = m_apcLayerCfg[layer]->m_RCCpbSize; 497 Double& m_RCInitialCpbFullness = m_apcLayerCfg[layer]->m_RCInitialCpbFullness; 498 #endif 499 500 ScalingListMode& m_useScalingListId = m_apcLayerCfg[layer]->m_useScalingListId; 501 Char* m_scalingListFile = m_apcLayerCfg[layer]->m_scalingListFile; 502 Bool& m_bUseSAO = m_apcLayerCfg[layer]->m_bUseSAO; 504 503 #endif 505 504 … … 879 878 // Video I/O 880 879 m_apcTVideoIOYuvInputFile[layer]->open( (Char *)m_apcLayerCfg[layer]->getInputFile().c_str(), false, m_apcLayerCfg[layer]->m_inputBitDepth, m_apcLayerCfg[layer]->m_MSBExtendedBitDepth, m_apcLayerCfg[layer]->m_internalBitDepth ); // read mode 881 m_apcTVideoIOYuvInputFile[layer]->skipFrames(m_FrameSkip, m_apcLayerCfg[layer]-> getSourceWidth() - m_apcLayerCfg[layer]->getPad()[0], m_apcLayerCfg[layer]->getSourceHeight() - m_apcLayerCfg[layer]->getPad()[1], m_apcLayerCfg[layer]->m_InputChromaFormatIDC);880 m_apcTVideoIOYuvInputFile[layer]->skipFrames(m_FrameSkip, m_apcLayerCfg[layer]->m_iSourceWidth - m_apcLayerCfg[layer]->m_aiPad[0], m_apcLayerCfg[layer]->m_iSourceHeight - m_apcLayerCfg[layer]->m_aiPad[1], m_apcLayerCfg[layer]->m_InputChromaFormatIDC); 882 881 883 882 if( !m_apcLayerCfg[layer]->getReconFile().empty() ) … … 1094 1093 for(i = 1; i < vps->getMaxLayers(); i++) 1095 1094 { 1096 if (m_apcLayerCfg[i]-> getAuxId()> maxAuxId)1097 { 1098 maxAuxId = m_apcLayerCfg[i]-> getAuxId();1095 if (m_apcLayerCfg[i]->m_auxId > maxAuxId) 1096 { 1097 maxAuxId = m_apcLayerCfg[i]->m_auxId; 1099 1098 } 1100 1099 } … … 1106 1105 for(i = 1; i < vps->getMaxLayers(); i++) 1107 1106 { 1108 vps->setDimensionId(i, auxId, m_apcLayerCfg[i]-> getAuxId());1107 vps->setDimensionId(i, auxId, m_apcLayerCfg[i]->m_auxId); 1109 1108 } 1110 1109 } … … 1481 1480 if( m_isField ) 1482 1481 { 1483 pcPicYuvOrg[layer]->create( m_apcLayerCfg[layer]-> getSourceWidth(), m_apcLayerCfg[layer]->getSourceHeightOrg(), m_apcLayerCfg[layer]->getChromaFormatIDC(), m_apcLayerCfg[layer]->m_uiMaxCUWidth, m_apcLayerCfg[layer]->m_uiMaxCUHeight, m_apcLayerCfg[layer]->m_uiMaxTotalCUDepth, true, NULL );1484 acPicYuvTrueOrg[layer].create( m_apcLayerCfg[layer]-> getSourceWidth(), m_apcLayerCfg[layer]->getSourceHeightOrg(), m_apcLayerCfg[layer]->getChromaFormatIDC(), m_apcLayerCfg[layer]->m_uiMaxCUWidth, m_apcLayerCfg[layer]->m_uiMaxCUHeight, m_apcLayerCfg[layer]->m_uiMaxTotalCUDepth, true, NULL );1482 pcPicYuvOrg[layer]->create( m_apcLayerCfg[layer]->m_iSourceWidth, m_apcLayerCfg[layer]->m_iSourceHeightOrg, m_apcLayerCfg[layer]->m_chromaFormatIDC, m_apcLayerCfg[layer]->m_uiMaxCUWidth, m_apcLayerCfg[layer]->m_uiMaxCUHeight, m_apcLayerCfg[layer]->m_uiMaxTotalCUDepth, true, NULL ); 1483 acPicYuvTrueOrg[layer].create( m_apcLayerCfg[layer]->m_iSourceWidth, m_apcLayerCfg[layer]->m_iSourceHeightOrg, m_apcLayerCfg[layer]->m_chromaFormatIDC, m_apcLayerCfg[layer]->m_uiMaxCUWidth, m_apcLayerCfg[layer]->m_uiMaxCUHeight, m_apcLayerCfg[layer]->m_uiMaxTotalCUDepth, true, NULL ); 1485 1484 } 1486 1485 else 1487 1486 { 1488 pcPicYuvOrg[layer]->create( m_apcLayerCfg[layer]-> getSourceWidth(), m_apcLayerCfg[layer]->getSourceHeight(), m_apcLayerCfg[layer]->getChromaFormatIDC(), m_apcLayerCfg[layer]->m_uiMaxCUWidth, m_apcLayerCfg[layer]->m_uiMaxCUHeight, m_apcLayerCfg[layer]->m_uiMaxTotalCUDepth, true, NULL );1489 acPicYuvTrueOrg[layer].create( m_apcLayerCfg[layer]-> getSourceWidth(), m_apcLayerCfg[layer]->getSourceHeight(), m_apcLayerCfg[layer]->getChromaFormatIDC(), m_apcLayerCfg[layer]->m_uiMaxCUWidth, m_apcLayerCfg[layer]->m_uiMaxCUHeight, m_apcLayerCfg[layer]->m_uiMaxTotalCUDepth, true, NULL );1487 pcPicYuvOrg[layer]->create( m_apcLayerCfg[layer]->m_iSourceWidth, m_apcLayerCfg[layer]->m_iSourceHeight, m_apcLayerCfg[layer]->m_chromaFormatIDC, m_apcLayerCfg[layer]->m_uiMaxCUWidth, m_apcLayerCfg[layer]->m_uiMaxCUHeight, m_apcLayerCfg[layer]->m_uiMaxTotalCUDepth, true, NULL ); 1488 acPicYuvTrueOrg[layer].create( m_apcLayerCfg[layer]->m_iSourceWidth, m_apcLayerCfg[layer]->m_iSourceHeight, m_apcLayerCfg[layer]->m_chromaFormatIDC, m_apcLayerCfg[layer]->m_uiMaxCUWidth, m_apcLayerCfg[layer]->m_uiMaxCUHeight, m_apcLayerCfg[layer]->m_uiMaxTotalCUDepth, true, NULL ); 1490 1489 } 1491 1490 } … … 1505 1504 1506 1505 // read input YUV file 1507 m_apcTVideoIOYuvInputFile[layer]->read( pcPicYuvOrg[layer], &acPicYuvTrueOrg[layer], ipCSC, m_apcLayerCfg[layer]-> getPad(), m_apcLayerCfg[layer]->getInputChromaFormat(), m_bClipInputVideoToRec709Range );1506 m_apcTVideoIOYuvInputFile[layer]->read( pcPicYuvOrg[layer], &acPicYuvTrueOrg[layer], ipCSC, m_apcLayerCfg[layer]->m_aiPad, m_apcLayerCfg[layer]->m_InputChromaFormatIDC, m_bClipInputVideoToRec709Range ); 1508 1507 1509 1508 #if AUXILIARY_PICTURES 1510 if( m_apcLayerCfg[layer]-> getChromaFormatIDC() == CHROMA_400 || (m_apcTEncTop[0]->getVPS()->getScalabilityMask(AUX_ID) && (m_apcLayerCfg[layer]->getAuxId() == AUX_ALPHA || m_apcLayerCfg[layer]->getAuxId()== AUX_DEPTH)) )1509 if( m_apcLayerCfg[layer]->m_chromaFormatIDC == CHROMA_400 || (m_apcTEncTop[0]->getVPS()->getScalabilityMask(AUX_ID) && (m_apcLayerCfg[layer]->m_auxId == AUX_ALPHA || m_apcLayerCfg[layer]->m_auxId == AUX_DEPTH)) ) 1511 1510 { 1512 1511 pcPicYuvOrg[layer]->convertToMonochrome(m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_CHROMA]); … … 1701 1700 for(layer = 0; layer < m_numLayers; layer++) 1702 1701 { 1703 m_apcTEncTop[layer]->getAnalyzeAll()->setFrmRate( m_apcLayerCfg[layer]-> getFrameRate()* rateMultiplier );1704 m_apcTEncTop[layer]->getAnalyzeI()->setFrmRate( m_apcLayerCfg[layer]-> getFrameRate()* rateMultiplier );1705 m_apcTEncTop[layer]->getAnalyzeP()->setFrmRate( m_apcLayerCfg[layer]-> getFrameRate()* rateMultiplier );1706 m_apcTEncTop[layer]->getAnalyzeB()->setFrmRate( m_apcLayerCfg[layer]-> getFrameRate()* rateMultiplier );1702 m_apcTEncTop[layer]->getAnalyzeAll()->setFrmRate( m_apcLayerCfg[layer]->m_iFrameRate * rateMultiplier ); 1703 m_apcTEncTop[layer]->getAnalyzeI()->setFrmRate( m_apcLayerCfg[layer]->m_iFrameRate * rateMultiplier ); 1704 m_apcTEncTop[layer]->getAnalyzeP()->setFrmRate( m_apcLayerCfg[layer]->m_iFrameRate * rateMultiplier ); 1705 m_apcTEncTop[layer]->getAnalyzeB()->setFrmRate( m_apcLayerCfg[layer]->m_iFrameRate * rateMultiplier ); 1707 1706 } 1708 1707 … … 1712 1711 { 1713 1712 const BitDepths bitDepths(m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_LUMA], m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_CHROMA]); 1714 m_apcTEncTop[layer]->getAnalyzeAll()->printOut('a', m_apcLayerCfg[layer]-> getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);1713 m_apcTEncTop[layer]->getAnalyzeAll()->printOut('a', m_apcLayerCfg[layer]->m_chromaFormatIDC, printMSEBasedSNR, printSequenceMSE, bitDepths, layer); 1715 1714 } 1716 1715 … … 1719 1718 { 1720 1719 const BitDepths bitDepths(m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_LUMA], m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_CHROMA]); 1721 m_apcTEncTop[layer]->getAnalyzeI()->printOut('i', m_apcLayerCfg[layer]-> getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);1720 m_apcTEncTop[layer]->getAnalyzeI()->printOut('i', m_apcLayerCfg[layer]->m_chromaFormatIDC, printMSEBasedSNR, printSequenceMSE, bitDepths, layer); 1722 1721 } 1723 1722 … … 1726 1725 { 1727 1726 const BitDepths bitDepths(m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_LUMA], m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_CHROMA]); 1728 m_apcTEncTop[layer]->getAnalyzeP()->printOut('p', m_apcLayerCfg[layer]-> getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);1727 m_apcTEncTop[layer]->getAnalyzeP()->printOut('p', m_apcLayerCfg[layer]->m_chromaFormatIDC, printMSEBasedSNR, printSequenceMSE, bitDepths, layer); 1729 1728 } 1730 1729 … … 1733 1732 { 1734 1733 const BitDepths bitDepths(m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_LUMA], m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_CHROMA]); 1735 m_apcTEncTop[layer]->getAnalyzeB()->printOut('b', m_apcLayerCfg[layer]-> getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);1734 m_apcTEncTop[layer]->getAnalyzeB()->printOut('b', m_apcLayerCfg[layer]->m_chromaFormatIDC, printMSEBasedSNR, printSequenceMSE, bitDepths, layer); 1736 1735 } 1737 1736 … … 1742 1741 const BitDepths bitDepths(m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_LUMA], m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_CHROMA]); 1743 1742 1744 m_apcTEncTop[layer]->getAnalyzeAll()->printSummary(m_apcLayerCfg[layer]-> getChromaFormatIDC(), printSequenceMSE, bitDepths, m_apcTEncTop[layer]->getSummaryOutFilename());1743 m_apcTEncTop[layer]->getAnalyzeAll()->printSummary(m_apcLayerCfg[layer]->m_chromaFormatIDC, printSequenceMSE, bitDepths, m_apcTEncTop[layer]->getSummaryOutFilename()); 1745 1744 } 1746 1745 } … … 1752 1751 const BitDepths bitDepths(m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_LUMA], m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_CHROMA]); 1753 1752 1754 m_apcTEncTop[layer]->getAnalyzeI()->printSummary(m_apcLayerCfg[layer]-> getChromaFormatIDC(), printSequenceMSE, bitDepths, m_apcTEncTop[layer]->getSummaryPicFilenameBase()+"I.txt");1755 m_apcTEncTop[layer]->getAnalyzeP()->printSummary(m_apcLayerCfg[layer]-> getChromaFormatIDC(), printSequenceMSE, bitDepths, m_apcTEncTop[layer]->getSummaryPicFilenameBase()+"P.txt");1756 m_apcTEncTop[layer]->getAnalyzeB()->printSummary(m_apcLayerCfg[layer]-> getChromaFormatIDC(), printSequenceMSE, bitDepths, m_apcTEncTop[layer]->getSummaryPicFilenameBase()+"B.txt");1753 m_apcTEncTop[layer]->getAnalyzeI()->printSummary(m_apcLayerCfg[layer]->m_chromaFormatIDC, printSequenceMSE, bitDepths, m_apcTEncTop[layer]->getSummaryPicFilenameBase()+"I.txt"); 1754 m_apcTEncTop[layer]->getAnalyzeP()->printSummary(m_apcLayerCfg[layer]->m_chromaFormatIDC, printSequenceMSE, bitDepths, m_apcTEncTop[layer]->getSummaryPicFilenameBase()+"P.txt"); 1755 m_apcTEncTop[layer]->getAnalyzeB()->printSummary(m_apcLayerCfg[layer]->m_chromaFormatIDC, printSequenceMSE, bitDepths, m_apcTEncTop[layer]->getSummaryPicFilenameBase()+"B.txt"); 1757 1756 } 1758 1757 } … … 1766 1765 1767 1766 //-- interlaced summary 1768 analyze->setFrmRate( m_apcLayerCfg[layer]-> getFrameRate());1767 analyze->setFrmRate( m_apcLayerCfg[layer]->m_iFrameRate); 1769 1768 analyze->setBits(m_apcTEncTop[layer]->getAnalyzeB()->getBits()); 1770 1769 // prior to the above statement, the interlace analyser does not contain the correct total number of bits. 1771 1770 1772 1771 printf( "\n\nSUMMARY INTERLACED ---------------------------------------------\n" ); 1773 analyze->printOut('a', m_apcLayerCfg[layer]-> getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);1772 analyze->printOut('a', m_apcLayerCfg[layer]->m_chromaFormatIDC, printMSEBasedSNR, printSequenceMSE, bitDepths, layer); 1774 1773 1775 1774 if (!m_apcTEncTop[layer]->getSummaryOutFilename().empty()) 1776 1775 { 1777 analyze->printSummary(m_apcLayerCfg[layer]-> getChromaFormatIDC(), printSequenceMSE, bitDepths, m_apcTEncTop[layer]->getSummaryOutFilename());1776 analyze->printSummary(m_apcLayerCfg[layer]->m_chromaFormatIDC, printSequenceMSE, bitDepths, m_apcTEncTop[layer]->getSummaryOutFilename()); 1778 1777 } 1779 1778 } … … 1928 1927 rpcPicYuvRec = new TComPicYuv; 1929 1928 1930 rpcPicYuvRec->create( m_apcLayerCfg[layer]-> getSourceWidth(), m_apcLayerCfg[layer]->getSourceHeight(), m_apcLayerCfg[layer]->getChromaFormatIDC(), m_apcLayerCfg[layer]->m_uiMaxCUWidth, m_apcLayerCfg[layer]->m_uiMaxCUHeight, m_apcLayerCfg[layer]->m_uiMaxTotalCUDepth, true, NULL );1929 rpcPicYuvRec->create( m_apcLayerCfg[layer]->m_iSourceWidth, m_apcLayerCfg[layer]->m_iSourceHeight, m_apcLayerCfg[layer]->m_chromaFormatIDC, m_apcLayerCfg[layer]->m_uiMaxCUWidth, m_apcLayerCfg[layer]->m_uiMaxCUHeight, m_apcLayerCfg[layer]->m_uiMaxTotalCUDepth, true, NULL ); 1931 1930 } 1932 1931 m_acListPicYuvRec[layer].pushBack( rpcPicYuvRec ); … … 1952 1951 Void TAppEncTop::xWriteRecon(UInt layer, Int iNumEncoded) 1953 1952 { 1954 ChromaFormat chromaFormatIdc = m_apcLayerCfg[layer]->getChromaFormatIDC();1953 ChromaFormat& chromaFormatIdc = m_apcLayerCfg[layer]->m_chromaFormatIDC; 1955 1954 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ); 1956 1955 Int yScal = TComSPS::getWinUnitY( chromaFormatIdc ); … … 2189 2188 { 2190 2189 #if SVC_EXTENSION 2191 Double time = (Double) m_iFrameRcvd / m_apcLayerCfg[m_numLayers-1]-> getFrameRate();2190 Double time = (Double) m_iFrameRcvd / m_apcLayerCfg[m_numLayers-1]->m_iFrameRate; 2192 2191 #else 2193 2192 Double time = (Double) m_iFrameRcvd / m_iFrameRate; -
branches/SHM-dev/source/Lib/TAppCommon/program_options_lite.h
r1377 r1437 247 247 size_t pos = cNameBuffer.find_first_of('\0'); 248 248 if(pos != std::string::npos) 249 { 249 250 cNameBuffer.resize(pos); 251 } 250 252 251 253 parent.addOption(new Option<T>( cNameBuffer, (storage[uiK]), default_val, cDescriptionBuffer )); -
branches/SHM-dev/source/Lib/TLibEncoder/TEnc3DAsymLUT.cpp
r1432 r1437 132 132 if( m_dTotalFrameBit != 0 ) 133 133 { 134 printf( "\nTotal CGS bit : %d, %.2lf%%" , m_nTotalCGSBit , m_nTotalCGSBit * 100 / m_dTotalFrameBit );134 printf( "\nTotal CGS bits: %d, %.2lf%%\n\n" , m_nTotalCGSBit , m_nTotalCGSBit * 100 / m_dTotalFrameBit ); 135 135 } 136 136
Note: See TracChangeset for help on using the changeset viewer.