Changeset 1437 in SHVCSoftware


Ignore:
Timestamp:
12 Aug 2015, 19:56:05 (9 years ago)
Author:
seregin
Message:

formatting of printing output

Location:
branches/SHM-dev
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/cfg/encoder_intra_scalable.cfg

    r1381 r1437  
    5454
    5555#=========== Coding Tools =================
    56 SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
     56#SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
    5757AMP                           : 1           # Asymmetric motion partitions (0: OFF, 1: ON)
    5858TransformSkip                 : 1           # Transform skipping (0: OFF, 1: ON)
  • branches/SHM-dev/cfg/encoder_intra_scalable10.cfg

    r1381 r1437  
    5353
    5454#=========== Coding Tools =================
    55 SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
     55#SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
    5656AMP                           : 1           # Asymmetric motion partitions (0: OFF, 1: ON)
    5757TransformSkip                 : 1           # Transform skipping (0: OFF, 1: ON)
  • branches/SHM-dev/cfg/encoder_lowdelay_P_scalable.cfg

    r1381 r1437  
    6161
    6262#=========== Coding Tools =================
    63 SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
     63#SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
    6464AMP                           : 1           # Asymmetric motion partitions (0: OFF, 1: ON)
    6565SAOLcuBoundary                : 0           # SAOLcuBoundary using non-deblocked pixels (0: OFF, 1: ON)
  • branches/SHM-dev/cfg/encoder_lowdelay_P_scalable10.cfg

    r1381 r1437  
    6161
    6262#=========== Coding Tools =================
    63 SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
     63#SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
    6464AMP                           : 1           # Asymmetric motion partitions (0: OFF, 1: ON)
    6565SAOLcuBoundary                : 0           # SAOLcuBoundary using non-deblocked pixels (0: OFF, 1: ON)
  • branches/SHM-dev/cfg/encoder_lowdelay_scalable.cfg

    r1381 r1437  
    5959
    6060#=========== Coding Tools =================
    61 SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
     61#SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
    6262AMP                           : 1           # Asymmetric motion partitions (0: OFF, 1: ON)
    6363TransformSkip                 : 1           # Transform skipping (0: OFF, 1: ON)
  • branches/SHM-dev/cfg/encoder_lowdelay_scalable10.cfg

    r1381 r1437  
    5959
    6060#=========== Coding Tools =================
    61 SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
     61#SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
    6262AMP                           : 1           # Asymmetric motion partitions (0: OFF, 1: ON)
    6363TransformSkip                 : 1           # Transform skipping (0: OFF, 1: ON)
  • branches/SHM-dev/cfg/encoder_randomaccess_scalable.cfg

    r1381 r1437  
    6363
    6464#=========== Coding Tools =================
    65 SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
     65#SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
    6666AMP                           : 1           # Asymmetric motion partitions (0: OFF, 1: ON)
    6767TransformSkip                 : 1           # Transform skipping (0: OFF, 1: ON)
  • branches/SHM-dev/cfg/encoder_randomaccess_scalable10.cfg

    r1381 r1437  
    6363
    6464#=========== Coding Tools =================
    65 SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
     65#SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)
    6666AMP                           : 1           # Asymmetric motion partitions (0: OFF, 1: ON)
    6767TransformSkip                 : 1           # Transform skipping (0: OFF, 1: ON)
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1436 r1437  
    763763  Int*    cfg_aiPadY        [MAX_LAYERS];
    764764  Int*    cfg_conformanceMode  [MAX_LAYERS];
    765   Bool*   cfg_useExtendedPrecision [MAX_LAYERS];
    766765
    767766  Int*    cfg_maxCuDQPDepth[MAX_LAYERS];
     
    858857  ScalingListMode*   cfg_UseScalingListId[MAX_LAYERS];
    859858
     859  Bool*   cfg_bUseSAO[MAX_LAYERS];
     860
    860861  for( UInt layer = 0; layer < m_numLayers; layer++ )
    861862  {
     
    872873    cfg_FrameRate[layer]            = &m_apcLayerCfg[layer]->m_iFrameRate;
    873874    cfg_IntraPeriod[layer]          = &m_apcLayerCfg[layer]->m_iIntraPeriod;
    874     cfg_conformanceMode[layer]      = &m_apcLayerCfg[layer]->m_conformanceMode;
     875    cfg_conformanceMode[layer]      = &m_apcLayerCfg[layer]->m_conformanceWindowMode;
    875876    cfg_confWinLeft[layer]          = &m_apcLayerCfg[layer]->m_confWinLeft;
    876877    cfg_confWinRight[layer]         = &m_apcLayerCfg[layer]->m_confWinRight;
     
    879880    cfg_aiPadX[layer]               = &m_apcLayerCfg[layer]->m_aiPad[0];
    880881    cfg_aiPadY[layer]               = &m_apcLayerCfg[layer]->m_aiPad[1];
    881     cfg_useExtendedPrecision[layer] = &m_apcLayerCfg[layer]->m_extendedPrecisionProcessingFlag;
    882882
    883883    cfg_maxCuDQPDepth[layer]        = &m_apcLayerCfg[layer]->m_iMaxCuDQPDepth;
     
    955955
    956956    cfg_UseScalingListId[layer]     = &m_apcLayerCfg[layer]->m_useScalingListId;
     957
     958    cfg_bUseSAO[layer]              = &m_apcLayerCfg[layer]->m_bUseSAO;
    957959  }
    958960
     
    11031105  ("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")
    11041106#endif
    1105   ("ExtendedPrecision%d",                           cfg_useExtendedPrecision,              false, m_numLayers, "Increased internal accuracies to support high bit depths (not valid in V1 profiles)")
    11061107  ("ConformanceMode%d",                             cfg_conformanceMode,                       0, m_numLayers, "Window conformance mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping")
    11071108  ("ConfLeft%d",                                    cfg_confWinLeft,                           0, m_numLayers, "Deprecated alias of ConfWinLeft")
     
    11841185  ("MSBExtendedBitDepthC",                            m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA],           0, "As per MSBExtendedBitDepth but for chroma component. (default:MSBExtendedBitDepth)")
    11851186  ("InternalBitDepthC",                               m_internalBitDepth[CHANNEL_TYPE_CHROMA],              0, "As per InternalBitDepth but for chroma component. (default:InternalBitDepth)")
     1187#endif
    11861188  ("ExtendedPrecision",                               m_extendedPrecisionProcessingFlag,                false, "Increased internal accuracies to support high bit depths (not valid in V1 profiles)")
    11871189  ("HighPrecisionPredictionWeighting",                m_highPrecisionOffsetsEnabledFlag,                false, "Use high precision option for weighted prediction (not valid in V1 profiles)")
     1190#if !SVC_EXTENSION
    11881191  ("InputColourSpaceConvert",                         inputColourSpaceConvert,                     string(""), "Colour space conversion to apply to input video. Permitted values are (empty string=UNCHANGED) " + getListOfColourSpaceConverts(true))
    11891192  ("SNRInternalColourSpace",                          m_snrInternalColourSpace,                         false, "If true, then no colour space conversion is applied prior to SNR, otherwise inverse of input is applied.")
     
    13911394  ("GolombRiceParameterAdaptation",                   m_persistentRiceAdaptationEnabledFlag,            false, "Enable the adaptation of the Golomb-Rice parameter over the course of each slice")
    13921395  ("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
    13931399  ("SAO",                                             m_bUseSAO,                                         true, "Enable Sample Adaptive Offset")
     1400#endif
    13941401  ("TestSAODisableAtPictureLevel",                    m_bTestSAODisableAtPictureLevel,                  false, "Enables the testing of disabling SAO at the picture level after having analysed all blocks")
    13951402  ("SaoEncodingRate",                                 m_saoEncodingRate,                                 0.75, "When >0 SAO early picture termination is enabled for luma and chroma")
     
    19271934    m_apcLayerCfg[layer]->m_chromaFormatIDC      = ((tmpChromaFormat == 0) ? (m_apcLayerCfg[layer]->m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat)));
    19281935
    1929     m_apcLayerCfg[layer]->m_highPrecisionOffsetsEnabledFlag = false;
    1930     m_apcLayerCfg[layer]->m_extendedPrecisionProcessingFlag = false;
    1931 
    19321936    if( m_apcLayerCfg[layer]->m_layerSwitchOffBegin < m_apcLayerCfg[layer]->m_layerSwitchOffEnd )
    19331937    {
     
    19501954    for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++)
    19511955    {
    1952       m_apcLayerCfg[layer]->m_log2SaoOffsetScale[channelType] = 0;
     1956      m_log2SaoOffsetScale[channelType] = 0;
    19531957    }
    19541958       
     
    20022006          m_log2MaxTransformSkipBlockSize!=2;
    20032007        const Bool bUsingChromaQPAdjustment= m_diffCuChromaQpOffsetDepth >= 0;
    2004         const Bool bUsingExtendedPrecision = m_apcLayerCfg[layer]->m_extendedPrecisionProcessingFlag;
     2008        const Bool bUsingExtendedPrecision = m_extendedPrecisionProcessingFlag;
    20052009        m_apcLayerCfg[layer]->m_chromaFormatConstraint = NUM_CHROMA_FORMAT;
    20062010        automaticallySelectRExtProfile(bUsingGeneralRExtTools,
     
    26352639  delete [] cfg_listOfOutputLayers;
    26362640  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
    26382666  switch (m_conformanceWindowMode)
    26392667  {
     
    26532681        m_aiPad[0] = m_confWinRight  = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth;
    26542682        m_iSourceWidth  += m_confWinRight;
     2683#if SVC_EXTENSION
     2684        m_confWinRight /= TComSPS::getWinUnitX( m_chromaFormatIDC );
     2685#endif
    26552686      }
    26562687      if (m_iSourceHeight % minCuSize)
     
    26632694          m_aiPad[1] = m_confWinBottom << 1;
    26642695        }
     2696#if SVC_EXTENSION
     2697        m_confWinBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC );
     2698#endif
    26652699      }
    26662700      if (m_aiPad[0] % TComSPS::getWinUnitX(m_chromaFormatIDC) != 0)
     
    26832717      m_confWinRight  = m_aiPad[0];
    26842718      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
    26852724      break;
    26862725    }
     
    27572796      fclose(fpt);
    27582797    }
     2798  }
     2799#if SVC_EXTENSION
    27592800  }
    27602801#endif
     
    30143055Void TAppEncCfg::xCheckParameter(UInt layerIdx)
    30153056{
    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;
    30353103#else
    30363104Void TAppEncCfg::xCheckParameter()
     
    32003268  xConfirmPara( m_InputChromaFormatIDC >= NUM_CHROMA_FORMAT,                                "InputChromaFormatIDC must be either 400, 420, 422 or 444" );
    32013269
    3202 #if !SVC_EXTENSION 
    32033270  xConfirmPara( m_iFrameRate <= 0,                                                          "Frame rate must be more than 1" );
    3204 #endif
    32053271  xConfirmPara( m_framesToBeEncoded <= 0,                                                   "Total Number Of Frames encoded must be more than 0" );
    32063272  xConfirmPara( m_iGOPSize < 1 ,                                                            "GOP Size must be greater or equal to 1" );
    32073273  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_EXTENSION
    32093274  xConfirmPara( (m_iIntraPeriod > 0 && m_iIntraPeriod < m_iGOPSize) || m_iIntraPeriod == 0, "Intra period must be more than GOP size, or -1 , not 0" );
    3210 #endif
    32113275  xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 3,                   "Decoding Refresh Type must be comprised between 0 and 3 included" );
    32123276  if(m_iDecodingRefreshType == 3)
     
    32553319  }
    32563320
    3257 #if !SVC_EXTENSION
    32583321  xConfirmPara( m_iQP <  -6 * (m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8) || m_iQP > 51,    "QP exceeds supported range (-QpBDOffsety to 51)" );
    3259 #endif
    32603322  xConfirmPara( m_DeblockingFilterMetric && (m_bLoopFilterDisable || m_loopFilterOffsetInPPS), "If DeblockingFilterMetric is true then both LoopFilterDisable and LoopFilterOffsetInPPS must be 0");
    32613323  xConfirmPara( m_loopFilterBetaOffsetDiv2 < -6 || m_loopFilterBetaOffsetDiv2 > 6,        "Loop Filter Beta Offset div. 2 exceeds supported range (-6 to 6)");
     
    32653327  xConfirmPara( m_minSearchWindow < 0,                                                      "Minimum motion search window size for the adaptive window ME must be greater than or equal to 0" );
    32663328  xConfirmPara( m_iMaxDeltaQP > 7,                                                          "Absolute Delta QP exceeds supported range (0 to 7)" );
    3267 #if !SVC_EXTENSION 
    32683329  xConfirmPara( m_iMaxCuDQPDepth > m_uiMaxCUDepth - 1,                                          "Absolute depth for a minimum CuDQP exceeds maximum coding unit depth" );
    3269 #endif
    32703330
    32713331  xConfirmPara( m_cbQpOffset < -12,   "Min. Chroma Cb QP Offset is -12" );
     
    32753335
    32763336  xConfirmPara( m_iQPAdaptationRange <= 0,                                                  "QP Adaptation Range must be more than 0" );
    3277 #if !SVC_EXTENSION
    32783337  if (m_iDecodingRefreshType == 2)
    32793338  {
     
    32983357  xConfirmPara( m_uiQuadtreeTUMaxDepthIntra < 1,                                                         "QuadtreeTUMaxDepthIntra must be greater than or equal to 1" );
    32993358  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 #endif
    33013359 
    33023360  xConfirmPara(  m_maxNumMergeCand < 1,  "MaxNumMergeCand must be 1 or greater.");
    33033361  xConfirmPara(  m_maxNumMergeCand > 5,  "MaxNumMergeCand must be 5 or smaller.");
    33043362
    3305 #if !SVC_EXTENSION
    33063363#if ADAPTIVE_QP_SELECTION
    33073364  xConfirmPara( m_bUseAdaptQpSelect == true && m_iQP < 0,                                              "AdaptiveQpSelection must be disabled when QP < 0.");
    33083365  xConfirmPara( m_bUseAdaptQpSelect == true && (m_cbQpOffset !=0 || m_crQpOffset != 0 ),               "AdaptiveQpSelection must be disabled when ChromaQpOffset is not equal to 0.");
    3309 #endif
    33103366#endif
    33113367
     
    33333389  }
    33343390 
    3335 #if !SVC_EXTENSION
    33363391  Bool tileFlag = (m_numTileColumnsMinus1 > 0 || m_numTileRowsMinus1 > 0 );
    33373392  if (m_profile!=Profile::HIGHTHROUGHPUTREXT)
     
    33463401  xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(m_chromaFormatIDC) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling");
    33473402
     3403#if !SVC_EXTENSION
    33483404  xConfirmPara( m_confWinLeft   % TComSPS::getWinUnitX(m_chromaFormatIDC) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling");
    33493405  xConfirmPara( m_confWinRight  % TComSPS::getWinUnitX(m_chromaFormatIDC) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling");
    33503406  xConfirmPara( m_confWinTop    % TComSPS::getWinUnitY(m_chromaFormatIDC) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling");
    33513407  xConfirmPara( m_confWinBottom % TComSPS::getWinUnitY(m_chromaFormatIDC) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling");
     3408#endif
    33523409
    33533410  xConfirmPara( m_defaultDisplayWindowFlag && !m_vuiParametersPresentFlag, "VUI needs to be enabled for default display window");
     
    33803437    }
    33813438  }
    3382 #endif
    33833439
    33843440  /* if this is an intra-only sequence, ie IntraPeriod=1, don't verify the GOP structure
     
    34433499  }
    34443500  Int numOK=0;
    3445 #if !SVC_EXTENSION
    34463501  xConfirmPara( m_iIntraPeriod >=0&&(m_iIntraPeriod%m_iGOPSize!=0), "Intra period must be a multiple of GOPSize, or -1" );
    3447 #endif
    34483502
    34493503  for(Int i=0; i<m_iGOPSize; i++)
     
    34683522
    34693523  // 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 parameters
    3477   Int m_iIntraPeriod = m_apcLayerCfg[layerIdx]->m_iIntraPeriod;
    34783524#endif
    34793525  if ( (m_iIntraPeriod != 1) && !m_loopFilterOffsetInPPS && (!m_bLoopFilterDisable) )
     
    39934039    }
    39944040    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    }
    39954051  }
    39964052#endif
     
    40064062  }
    40074063
    4008 #if SVC_EXTENSION
    4009   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 #endif
    4022 
    40234064  for(Int i=0; i<MAX_TLAYER; i++)
    40244065  {
     
    40784119    m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1] + 1;
    40794120  }
    4080 
    4081 #if SVC_EXTENSION // ToDo: it should be checked for the case when parameters are different for the layers
    4082   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 #endif
    40914121
    40924122  if(m_vuiParametersPresentFlag && m_bitstreamRestrictionFlag)
     
    41634193    }
    41644194  }
    4165 #if !SVC_EXTENSION
    41664195  xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" );
    4167 #endif
    41684196
    41694197  xConfirmPara( m_decodedPictureHashSEIEnabled<0 || m_decodedPictureHashSEIEnabled>3, "this hash type is not correct!\n");
     
    42244252#endif
    42254253
    4226 #if RC_SHVC_HARMONIZATION
    4227   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_SATURATION
    4239     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 #endif
    4246   }
    4247 #if U0132_TARGET_BITS_SATURATION
    4248   else
    4249   {
    4250     xConfirmPara( m_apcLayerCfg[layerIdx]->m_RCCpbSaturationEnabled != 0, "Target bits saturation cannot be processed without Rate control" );
    4251   }
    4252 #endif
    4253 #else
    42544254  if ( m_RCEnableRateControl )
    42554255  {
     
    42774277    xConfirmPara( m_RCCpbSaturationEnabled != 0, "Target bits saturation cannot be processed without Rate control" );
    42784278  }
    4279 #endif
    42804279#endif
    42814280
     
    44174416{
    44184417  printf("\n");
    4419 #if SVC_EXTENSION 
     4418#if SVC_EXTENSION
    44204419  printf("Total number of layers            : %d\n", m_numLayers       );
    44214420  printf("Multiview                         : %d\n", m_scalabilityMask[VIEW_ORDER_INDEX] );
     
    44334432  printf("IDR only for IRAP                 : %d\n", m_crossLayerAlignedIdrOnlyFlag );
    44344433  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
    44464505  printf("Input          File                    : %s\n", m_pchInputFile          );
     4506
     4507#if SVC_EXTENSION
     4508    }
     4509    if( layer == m_numLayers )
     4510    {
     4511#endif
     4512
    44474513  printf("Bitstream      File                    : %s\n", m_pchBitstreamFile      );
     4514
     4515#if SVC_EXTENSION
     4516    }
     4517    if( layer < m_numLayers )
     4518    {
     4519#endif
     4520
    44484521  printf("Reconstruction File                    : %s\n", m_pchReconFile          );
    44494522  printf("Real     Format                        : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate );
    44504523  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
    44534532  printf("Sequence PSNR output                   : %s\n", (m_printMSEBasedSequencePSNR ? "Linear average, MSE-based" : "Linear average only") );
    44544533  printf("Sequence MSE output                    : %s\n", (m_printSequenceMSE ? "Enabled" : "Disabled") );
     
    44674546    printf("Frame index                            : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded );
    44684547  }
    4469 #if !SVC_EXTENSION
     4548#if SVC_EXTENSION
     4549    }
     4550
     4551    if( layer < m_numLayers )
     4552    {
     4553#endif
     4554
    44704555  if (m_profile == Profile::MAINREXT)
    44714556  {
     
    45014586  printf("Max RQT depth inter                    : %d\n", m_uiQuadtreeTUMaxDepthInter);
    45024587  printf("Max RQT depth intra                    : %d\n", m_uiQuadtreeTUMaxDepthIntra);
     4588#if SVC_EXTENSION
     4589    }
     4590
     4591    if( layer == m_numLayers )
     4592    {
    45034593#endif
    45044594  printf("Min PCM size                           : %d\n", 1 << m_uiPCMLog2MinSize);
    45054595  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
    45074602  printf("Intra period                           : %d\n", m_iIntraPeriod );
     4603#if SVC_EXTENSION
     4604    }
     4605
     4606    if( layer == m_numLayers )
     4607    {
    45084608#endif
    45094609  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
    45114616  printf("QP                                     : %5.2f\n", m_fQP );
    45124617  printf("Max dQP signaling depth                : %d\n", m_iMaxCuDQPDepth);
     4618#if SVC_EXTENSION
     4619    }
     4620
     4621    if( layer == m_numLayers )
     4622    {
    45134623#endif
    45144624
     
    45174627  printf("QP adaptation                          : %d (range=%d)\n", m_bUseAdaptiveQP, (m_bUseAdaptiveQP ? m_iQPAdaptationRange : 0) );
    45184628  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
    45204637  printf("Input bit depth                        : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] );
    45214638  printf("MSB-extended bit depth                 : (Y:%d, C:%d)\n", m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] );
     
    45234640  printf("PCM sample bit depth                   : (Y:%d, C:%d)\n", m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA] : m_internalBitDepth[CHANNEL_TYPE_LUMA],
    45244641                                                                    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
    45264649  printf("Intra reference smoothing              : %s\n", (m_enableIntraReferenceSmoothing           ? "Enabled" : "Disabled") );
    45274650  printf("diff_cu_chroma_qp_offset_depth         : %d\n", m_diffCuChromaQpOffsetDepth);
    4528 #if !SVC_EXTENSION
    45294651  printf("extended_precision_processing_flag     : %s\n", (m_extendedPrecisionProcessingFlag         ? "Enabled" : "Disabled") );
    4530 #endif
    45314652  printf("implicit_rdpcm_enabled_flag            : %s\n", (m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT] ? "Enabled" : "Disabled") );
    45324653  printf("explicit_rdpcm_enabled_flag            : %s\n", (m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT] ? "Enabled" : "Disabled") );
     
    45344655  printf("transform_skip_context_enabled_flag    : %s\n", (m_transformSkipContextEnabledFlag         ? "Enabled" : "Disabled") );
    45354656  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_EXTENSION
    45374657  printf("high_precision_offsets_enabled_flag    : %s\n", (m_highPrecisionOffsetsEnabledFlag         ? "Enabled" : "Disabled") );
    4538 #endif
    45394658  printf("persistent_rice_adaptation_enabled_flag: %s\n", (m_persistentRiceAdaptationEnabledFlag     ? "Enabled" : "Disabled") );
    45404659  printf("cabac_bypass_alignment_enabled_flag    : %s\n", (m_cabacBypassAlignmentEnabledFlag         ? "Enabled" : "Disabled") );
     4660
    45414661  if (m_bUseSAO)
    45424662  {
     
    45544674  }
    45554675
    4556 #if !RC_SHVC_HARMONIZATION
     4676#if SVC_EXTENSION
     4677    }
     4678
     4679    if( layer < m_numLayers )
     4680    {
     4681#endif
     4682
    45574683  printf("RateControl                            : %d\n", m_RCEnableRateControl );
     4684
     4685#if SVC_EXTENSION
     4686    }
     4687
     4688    if( layer == m_numLayers )
     4689    {
    45584690#endif
    45594691  printf("WPMethod                               : %d\n", Int(m_weightedPredictionMethod));
    45604692
    4561 #if !RC_SHVC_HARMONIZATION
     4693#if SVC_EXTENSION
     4694    }
     4695
     4696    if( layer < m_numLayers )
     4697    {
     4698#endif
     4699
    45624700  if(m_RCEnableRateControl)
    45634701  {
     
    45774715#endif
    45784716  }
     4717
     4718#if SVC_EXTENSION
     4719    }
     4720
     4721    if( layer == m_numLayers )
     4722    {
    45794723#endif
    45804724
     
    45824726  printf("\n");
    45834727
     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
    45844748  printf("TOOL CFG: ");
    4585 #if !SVC_EXTENSION
    45864749  printf("IBD:%d ", ((m_internalBitDepth[CHANNEL_TYPE_LUMA] > m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA]) || (m_internalBitDepth[CHANNEL_TYPE_CHROMA] > m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA])));
    4587 #endif
    45884750  printf("HAD:%d ", m_bUseHADME                          );
    45894751  printf("RDQ:%d ", m_useRDOQ                            );
     
    46154777  printf("CIP:%d ", m_bUseConstrainedIntraPred);
    46164778  printf("SAO:%d ", (m_bUseSAO)?(1):(0));
    4617 #if !SVC_EXTENSION
    46184779  printf("PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0);
    4619 #endif
    46204780
    46214781  if (m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagForce)
     
    46314791  printf("WPB:%d ", (Int)m_useWeightedBiPred);
    46324792  printf("PME:%d ", m_log2ParallelMergeLevel);
    4633 #if !SVC_EXTENSION
    46344793  const Int iWaveFrontSubstreams = m_iWaveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1;
    46354794  printf(" WaveFrontSynchro:%d WaveFrontSubstreams:%d",
    46364795          m_iWaveFrontSynchro, iWaveFrontSubstreams);
    46374796  printf(" ScalingList:%d ", m_useScalingListId );
    4638 #endif
    46394797  printf("TMVPMode:%d ", m_TMVPModeId     );
    46404798#if ADAPTIVE_QP_SELECTION
     
    46464804
    46474805#if SVC_EXTENSION
    4648   printf("\n\nSHVC TOOL CFG: ");
     4806    printf("\n\n");
     4807  }
     4808
     4809  printf("\nSHVC TOOL CFG: ");
    46494810  printf("ElRapSliceType: %c-slice ", m_elRapSliceBEnabled ? 'B' : 'P');
    46504811  printf("REF_IDX_ME_ZEROMV: %d ", REF_IDX_ME_ZEROMV);
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1434 r1437  
    246246  Int       m_MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE];      ///< bit-depth of input samples after MSB extension
    247247  Int       m_internalBitDepth[MAX_NUM_CHANNEL_TYPE];         ///< bit-depth codec operates at (input/output files will be converted)
     248#endif
    248249  Bool      m_extendedPrecisionProcessingFlag;
    249250  Bool      m_highPrecisionOffsetsEnabledFlag;
    250251
    251252  //coding tools (chroma format)
     253#if !SVC_EXTENSION
    252254  ChromaFormat m_chromaFormatIDC;
    253255#endif
     
    257259
    258260  // coding tool (SAO)
     261#if !SVC_EXTENSION
    259262  Bool      m_bUseSAO;
     263#endif
    260264  Bool      m_bTestSAODisableAtPictureLevel;
    261265  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  
    4444: m_cInputFile(string(""))
    4545, m_cReconFile(string(""))
    46 , m_conformanceMode( 0 )
     46, m_conformanceWindowMode(0)
    4747, m_scalingListFile(NULL)
     48, m_pchdQPFile(NULL)
    4849, m_aidQP(NULL)
    4950, m_repFormatIdx(-1)
     
    5354{
    5455#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) );
    6260#endif
    6361  m_confWinLeft = m_confWinRight = m_confWinTop = m_confWinBottom = 0;
     
    120118}
    121119
    122 
    123 // ====================================================================================================================
    124 // Public member functions
    125 // ====================================================================================================================
    126 
    127 /** \param  argc        number of arguments
    128 \param  argv        array of arguments
    129 \retval             true when success
    130 */
    131 bool TAppEncLayerCfg::parseCfg( const string& cfgFileName  )
    132 {
    133   string cfg_InputFile;
    134   string cfg_ReconFile;
    135   string cfg_dQPFile;
    136 #if AUXILIARY_PICTURES
    137   Int tmpInputChromaFormat;
    138   Int tmpChromaFormat;
    139 #endif
    140 #if Q0074_COLOUR_REMAPPING_SEI
    141   string cfg_colourRemapSEIFileRoot;
    142 #endif
    143 
    144   po::Options opts;
    145   opts.addOptions()
    146     ("InputFile,i",           cfg_InputFile,  string(""), "original YUV input file name")
    147 #if AVC_BASE
    148     ("InputBLFile,-ibl",      cfg_InputFile,  string(""), "original YUV input file name")
    149 #endif
    150     ("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_PICTURES
    155     ("InputChromaFormat",     tmpInputChromaFormat,  420, "InputChromaFormatIDC")
    156     ("ChromaFormatIDC",       tmpChromaFormat,    420, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat)")
    157 #endif
    158     ("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_SEI
    173     ("SEIColourRemappingInfoFileRoot", cfg_colourRemapSEIFileRoot, string(""), "Colour Remapping Information SEI parameters file name")
    174 #endif
    175   ;
    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_PICTURES
    184   m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat);
    185   m_chromaFormatIDC   = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat)));
    186 #endif
    187 #if Q0074_COLOUR_REMAPPING_SEI
    188   if( !cfg_colourRemapSEIFileRoot.empty() )
    189   {
    190     m_colourRemapSEIFileRoot = strdup(cfg_colourRemapSEIFileRoot.c_str());
    191   }
    192 #endif
    193 
    194   // reading external dQP description from file
    195   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_HARMONIZATION                   
    259   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_SATURATION
    269     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 #endif
    276   }
    277 #endif
    278   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 padding
    295       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       // conformance
    302       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 size
    312       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       // conformance
    336       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       //padding
    342       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       // conformance
    353       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 values
    367   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 values
    374   // if QP is not integer, sequence is split into two sections having QP and QP+1
    375   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 parameters
    394   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 parameters
    408   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" ); // HS
    425   xConfirmPara( (1<<m_uiQuadtreeTULog2MinSize)>(m_uiMaxCUHeight>>(m_uiMaxCUDepth-1)), "QuadtreeTULog2MinSize must not be greater than minimum CU size" ); // HS
    426   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 2
    434   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 xConfirmPara
    450   return check_failed;
    451 }
    452 
    453120#endif //SVC_EXTENSION
    454121
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h

    r1433 r1437  
    3535  Int       m_iSourceHeight;                                  ///< source height in pixel (when interlaced = field height)
    3636  Int       m_iSourceHeightOrg;                               ///< original source height in pixel (when interlaced = frame height)
    37   Int       m_conformanceMode;
     37  Int       m_conformanceWindowMode;
    3838  Int       m_confWinLeft;
    3939  Int       m_confWinRight;
     
    9191#endif
    9292#endif
     93
     94  Bool      m_bUseSAO;
    9395
    9496  ScalingListMode m_useScalingListId;                         ///< using quantization matrix
     
    125127  Int       m_MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE];      ///< bit-depth of input samples after MSB extension
    126128  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;
    130129
    131130  Int       m_repFormatIdx;
     
    166165  Void  create    ();                                         ///< create option handling class
    167166  Void  destroy   ();                                         ///< destroy option handling class
    168   bool  parseCfg  ( const string& cfgFileName );              ///< parse layer configuration file to fill member variables
    169 
    170   Void  xPrintParameter();
    171   Bool  xCheckParameter( Bool isField );
    172167
    173168  Void    setAppEncCfg(TAppEncCfg* p) {m_cAppEncCfg = p;          }
     
    175170  string  getInputFile()              {return m_cInputFile;       }
    176171  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;            }
    183172  Double  getFloatQP()                {return m_fQP;              }
    184173  Int     getConfWinLeft()            {return m_confWinLeft;         }
     
    186175  Int     getConfWinTop()             {return m_confWinTop;          }
    187176  Int     getConfWinBottom()          {return m_confWinBottom;       }
    188 #if AUXILIARY_PICTURES
    189   ChromaFormat getInputChromaFormat()   {return m_InputChromaFormatIDC;}
    190   ChromaFormat getChromaFormatIDC()     {return m_chromaFormatIDC;  }
    191   Int          getAuxId()               {return m_auxId;            }
    192 #endif
    193 
    194   Int     getIntQP()                  {return m_iQP;              }
    195   Int*    getdQPs()                   {return m_aidQP;            }
    196177
    197178  Int     getNumSamplePredRefLayers()    {return m_numSamplePredRefLayers;   }
     
    206187  Int     getPredLayerIdx(Int i)      {return m_predLayerIds[i];  }
    207188
    208 #if RC_SHVC_HARMONIZATION
    209   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 #endif
    217189  Int     getRepFormatIdx()           { return m_repFormatIdx;  }
    218190  Void    setRepFormatIdx(Int x)      { m_repFormatIdx = x;     }
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1434 r1437  
    111111      for( UInt idx = 0; idx < layer; idx++ )
    112112      {
    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
    114114#if AUXILIARY_PICTURES
    115           && m_apcLayerCfg[layer]->getChromaFormatIDC() == m_apcLayerCfg[idx]->getChromaFormatIDC()
     115          && m_apcLayerCfg[layer]->m_chromaFormatIDC == m_apcLayerCfg[idx]->m_chromaFormatIDC
    116116#endif
    117117          && 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]
     
    171171    }
    172172
    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  );
    175175#if AUXILIARY_PICTURES
    176     repFormat->setChromaFormatVpsIdc                                      ( m_apcLayerCfg[mapIdxToLayer[idx]]->getChromaFormatIDC() );
     176    repFormat->setChromaFormatVpsIdc                                      ( m_apcLayerCfg[mapIdxToLayer[idx]]->m_chromaFormatIDC );
    177177#else
    178178    repFormat->setChromaFormatVpsIdc                                      ( 1 );  // Need modification to change for each layer - corresponds to 420
     
    443443#endif
    444444
    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;
    495493
    496494#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;
    504503#endif
    505504
     
    879878    // Video I/O
    880879    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);
    882881
    883882    if( !m_apcLayerCfg[layer]->getReconFile().empty() )
     
    10941093    for(i = 1; i < vps->getMaxLayers(); i++)
    10951094    {
    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;
    10991098      }
    11001099    }
     
    11061105    for(i = 1; i < vps->getMaxLayers(); i++)
    11071106    {
    1108       vps->setDimensionId(i, auxId, m_apcLayerCfg[i]->getAuxId());
     1107      vps->setDimensionId(i, auxId, m_apcLayerCfg[i]->m_auxId);
    11091108    }
    11101109  }
     
    14811480    if( m_isField )
    14821481    {
    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 );
    14851484    }
    14861485    else
    14871486    {
    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 );
    14901489    }
    14911490  }
     
    15051504
    15061505        // 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 );
    15081507
    15091508#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)) )
    15111510        {
    15121511          pcPicYuvOrg[layer]->convertToMonochrome(m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_CHROMA]);
     
    17011700  for(layer = 0; layer < m_numLayers; layer++)
    17021701  {
    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 );
    17071706  }
    17081707
     
    17121711  {
    17131712    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);
    17151714  }
    17161715
     
    17191718  {
    17201719    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);
    17221721  }
    17231722
     
    17261725  {
    17271726    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);
    17291728  }
    17301729
     
    17331732  {
    17341733    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);
    17361735  }
    17371736
     
    17421741      const BitDepths bitDepths(m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_LUMA], m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_CHROMA]);
    17431742
    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());
    17451744    }
    17461745  }
     
    17521751      const BitDepths bitDepths(m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_LUMA], m_apcLayerCfg[layer]->m_internalBitDepth[CHANNEL_TYPE_CHROMA]);
    17531752
    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");
    17571756    }
    17581757  }
     
    17661765
    17671766      //-- interlaced summary
    1768       analyze->setFrmRate( m_apcLayerCfg[layer]->getFrameRate());
     1767      analyze->setFrmRate( m_apcLayerCfg[layer]->m_iFrameRate);
    17691768      analyze->setBits(m_apcTEncTop[layer]->getAnalyzeB()->getBits());
    17701769      // prior to the above statement, the interlace analyser does not contain the correct total number of bits.
    17711770
    17721771      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);
    17741773
    17751774      if (!m_apcTEncTop[layer]->getSummaryOutFilename().empty())
    17761775      {
    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());
    17781777      }
    17791778    }
     
    19281927    rpcPicYuvRec = new TComPicYuv;
    19291928
    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 );
    19311930  }
    19321931  m_acListPicYuvRec[layer].pushBack( rpcPicYuvRec );
     
    19521951Void TAppEncTop::xWriteRecon(UInt layer, Int iNumEncoded)
    19531952{
    1954   ChromaFormat chromaFormatIdc = m_apcLayerCfg[layer]->getChromaFormatIDC();
     1953  ChromaFormat& chromaFormatIdc = m_apcLayerCfg[layer]->m_chromaFormatIDC;
    19551954  Int xScal = TComSPS::getWinUnitX( chromaFormatIdc );
    19561955  Int yScal = TComSPS::getWinUnitY( chromaFormatIdc );
     
    21892188{
    21902189#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;
    21922191#else
    21932192  Double time = (Double) m_iFrameRcvd / m_iFrameRate;
  • branches/SHM-dev/source/Lib/TAppCommon/program_options_lite.h

    r1377 r1437  
    247247          size_t pos = cNameBuffer.find_first_of('\0');
    248248          if(pos != std::string::npos)
     249          {
    249250            cNameBuffer.resize(pos);
     251          }
    250252     
    251253          parent.addOption(new Option<T>( cNameBuffer, (storage[uiK]), default_val, cDescriptionBuffer ));
  • branches/SHM-dev/source/Lib/TLibEncoder/TEnc3DAsymLUT.cpp

    r1432 r1437  
    132132  if( m_dTotalFrameBit != 0 )
    133133  {
    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 );
    135135  }
    136136
Note: See TracChangeset for help on using the changeset viewer.