Index: trunk/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncCfg.h	(revision 1405)
+++ trunk/source/Lib/TLibEncoder/TEncCfg.h	(revision 1413)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2016, ITU/ISO/IEC
+ * Copyright (c) 2010-2017, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -62,8 +62,10 @@
   Int m_POC;
   Int m_QPOffset;
-#if W0038_CQP_ADJ
+#if X0038_LAMBDA_FROM_QP_CAPABILITY
+  Double m_QPOffsetModelOffset;
+  Double m_QPOffsetModelScale;
+#endif
   Int m_CbQPoffset;
   Int m_CrQPoffset;
-#endif
   Double m_QPFactor;
   Int m_tcOffsetDiv2;
@@ -93,8 +95,10 @@
   : m_POC(-1)
   , m_QPOffset(0)
-#if W0038_CQP_ADJ
+#if X0038_LAMBDA_FROM_QP_CAPABILITY
+  , m_QPOffsetModelOffset(0)
+  , m_QPOffsetModelScale(0)
+#endif
   , m_CbQPoffset(0)
   , m_CrQPoffset(0)
-#endif
   , m_QPFactor(0)
   , m_tcOffsetDiv2(0)
@@ -155,4 +159,7 @@
   Bool      m_printFrameMSE;
   Bool      m_printSequenceMSE;
+#if JVET_F0064_MSSSIM
+  Bool      m_printMSSSIM;
+#endif
   Bool      m_cabacZeroWordPaddingEnabled;
 
@@ -174,4 +181,8 @@
   UInt      m_uiIntraPeriod;                    // TODO: make this an Int - it can be -1!
   UInt      m_uiDecodingRefreshType;            ///< the type of decoding refresh employed for the random access.
+#if JCTVC_Y0038_PARAMS
+  Bool      m_bReWriteParamSetsFlag;
+#endif
+
   Int       m_iGOPSize;
 #if NH_MV
@@ -186,4 +197,8 @@
   Int       m_iQP;                              //  if (AdaptiveQP == OFF)
 
+#if X0038_LAMBDA_FROM_QP_CAPABILITY
+  Int       m_intraQPOffset;                    ///< QP offset for intra slice (integer)
+  Int       m_lambdaFromQPEnable;               ///< enable lambda derivation from QP
+#endif
   Int       m_aiPad[2];
 
@@ -211,9 +226,5 @@
   Int       m_loopFilterBetaOffsetDiv2;
   Int       m_loopFilterTcOffsetDiv2;
-#if W0038_DB_OPT
   Int       m_deblockingFilterMetric;
-#else
-  Bool      m_DeblockingFilterMetric;
-#endif
   Bool      m_bUseSAO;
   Bool      m_bTestSAODisableAtPictureLevel;
@@ -222,7 +233,5 @@
   Int       m_maxNumOffsetsPerPic;
   Bool      m_saoCtuBoundary;
-#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
   Bool      m_saoResetEncoderStateAfterIRAP;
-#endif
 
   //====== Motion search ========
@@ -247,8 +256,7 @@
   Int       m_chromaCbQpOffset;                 //  Chroma Cb QP Offset (0:default)
   Int       m_chromaCrQpOffset;                 //  Chroma Cr Qp Offset (0:default)
-#if W0038_CQP_ADJ
+  WCGChromaQPControl m_wcgChromaQpControl;                    ///< Wide-colour-gamut chroma QP control.
   UInt      m_sliceChromaQpOffsetPeriodicity;                 ///< Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
   Int       m_sliceChromaQpOffsetIntraOrPeriodic[2/*Cb,Cr*/]; ///< Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
-#endif
 
   ChromaFormat m_chromaFormatIDC;
@@ -268,7 +276,5 @@
   Bool      m_useRDOQ;
   Bool      m_useRDOQTS;
-#if T0196_SELECTIVE_RDOQ
   Bool      m_useSelectiveRDOQ;
-#endif
   UInt      m_rdPenalty;
   FastInterSearchMode m_fastInterSearchMode;
@@ -288,4 +294,5 @@
   Bool      m_cabacBypassAlignmentEnabledFlag;
   Bool      m_rdpcmEnabledFlag[NUMBER_OF_RDPCM_SIGNALLING_MODES];
+  LumaLevelToDeltaQPMapping m_lumaLevelToDeltaQPMapping; ///< mapping from luma level to delta QP.
   Int*      m_aidQP;
   UInt      m_uiDeltaQpRD;
@@ -368,4 +375,7 @@
   Bool      m_scalableNestingSEIEnabled;
   Bool      m_tmctsSEIEnabled;
+#if MCTS_ENC_CHECK
+  Bool      m_tmctsSEITileConstraint;
+#endif
   Bool      m_timeCodeSEIEnabled;
   Int       m_timeCodeSEINumTs;
@@ -384,11 +394,14 @@
   std::string m_colourRemapSEIFileRoot;          ///< SEI Colour Remapping File (initialized from external file)
   TComSEIMasteringDisplay m_masteringDisplay;
-#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
   Bool      m_alternativeTransferCharacteristicsSEIEnabled;
   UChar     m_preferredTransferCharacteristics;
-#endif
+  Bool      m_greenMetadataInfoSEIEnabled;
+  UChar     m_greenMetadataType;
+  UChar     m_xsdMetricType;
 
 #if NH_MV
   SEIMessages* m_seiMessages; 
+  Bool         m_sendParameterSets;
+  Int          m_parameterSetId; 
 #endif
   //====== Weighted Prediction ========
@@ -401,5 +414,5 @@
   std::string m_scalingListFileName;              ///< quantization matrix file name
   Int       m_TMVPModeId;
-  Bool      m_signHideFlag;
+  Bool      m_SignDataHidingEnabledFlag;
   Bool      m_RCEnableRateControl;
   Int       m_RCTargetBitrate;
@@ -409,10 +422,7 @@
   Int       m_RCInitialQP;
   Bool      m_RCForceIntraQP;
-#if U0132_TARGET_BITS_SATURATION
   Bool      m_RCCpbSaturationEnabled;                   
   UInt      m_RCCpbSize;
   Double    m_RCInitialCpbFullness;
-#endif
-
 #if KWU_RC_MADPRED_E0227
   UInt       m_depthMADPred;
@@ -421,16 +431,17 @@
   Bool      m_bViewWiseRateCtrl;
 #endif
-  Bool      m_TransquantBypassEnableFlag;                     ///< transquant_bypass_enable_flag setting in PPS.
-  Bool      m_CUTransquantBypassFlagForce;                    ///< if transquant_bypass_enable_flag, then, if true, all CU transquant bypass flags will be set to true.
+  Bool      m_TransquantBypassEnabledFlag;                     ///< transquant_bypass_enabled_flag setting in PPS.
+  Bool      m_CUTransquantBypassFlagForce;                    ///< if transquant_bypass_enabled_flag, then, if true, all CU transquant bypass flags will be set to true.
 
   CostMode  m_costMode;                                       ///< The cost function to use, primarily when considering lossless coding.
 #if NH_MV
   TComVPS*  m_cVPS;                                           ///< pointer to VPS, same for all layers
+  TComSPS   m_activeSps;                                      /// Keep local copy; since syntax elements can be changed by layer specific inference. 
+  TComPPS   m_activePps;                                      /// Keep local copy; since syntax elements can be changed by layer specific inference. 
 #else
-
   TComVPS   m_cVPS;
 #endif
 
-#if NH_3D_DLT
+#if NH_3D
   TComDLT   m_cDLT;
 #endif
@@ -519,9 +530,5 @@
   Bool      m_useSDC;
   Bool      m_useDLT;
-#endif
-#if NH_3D_QTL
   Bool      m_bUseQTL;
-#endif
-#if NH_3D
   Int       m_profileIdc;
 #endif
@@ -578,18 +585,32 @@
   Void      setPrintSequenceMSE             (Bool value)     { m_printSequenceMSE = value;          }
 
+#if JVET_F0064_MSSSIM
+  Bool      getPrintMSSSIM                  ()         const { return m_printMSSSIM;               }
+  Void      setPrintMSSSIM                  (Bool value)     { m_printMSSSIM = value;              }
+#endif
+
   Bool      getCabacZeroWordPaddingEnabled()           const { return m_cabacZeroWordPaddingEnabled;  }
   Void      setCabacZeroWordPaddingEnabled(Bool value)       { m_cabacZeroWordPaddingEnabled = value; }
 #if NH_MV
   Void      setLayerId                       ( Int layerId )      { m_layerId = layerId; }
-  Int       getLayerId                       ()                   { return m_layerId;    }
-  Int       getLayerIdInVps                  ()                   { return m_layerIdInVps; }
+  Int       getLayerId                       ()         const     { return m_layerId;    }
+  Int       getLayerIdInVps                  ()         const     { return m_layerIdInVps; }
   Void      setLayerIdInVps                  ( Int layerIdInVps)  { m_layerIdInVps = layerIdInVps; }
   Void      setViewId                        ( Int viewId  )      { m_viewId  = viewId;  }
-  Int       getViewId                        ()                   { return m_viewId;    }
+  Int       getViewId                        ()         const     { return m_viewId;    }
   Void      setViewIndex                     ( Int viewIndex  )   { m_viewIndex  = viewIndex;  }
-  Int       getViewIndex                     ()                   { return m_viewIndex;    }
+  Int       getViewIndex                     ()         const     { return m_viewIndex;    }
+#if NH_MV
+  Void      setSendParameterSets            ( Bool value )       { m_sendParameterSets = value; }; 
+  Bool      getSendParameterSets            (  )                 { return m_sendParameterSets; }; 
+
+  Void      setParameterSetId               ( Int  value )       { m_parameterSetId = value; }; 
+  Int       getParameterSetId               (  )                 { return m_parameterSetId;  }; 
+
+
+#endif
 #if NH_3D_VSO || NH_3D
-  Void      setIsDepth                       ( Bool isDepth )   { m_isDepth = isDepth; }
-  Bool      getIsDepth                       ()                 { return m_isDepth; }
+  Void      setIsDepth                       ( Bool isDepth )    { m_isDepth = isDepth; }
+  Bool      getIsDepth                       ()         const    { return m_isDepth; }
   Void      setIsAuxDepth                    ( Bool isAuxDepth ) { m_isAuxDepth = isAuxDepth; }
   Bool      getIsAuxDepth                       ()               { return m_isAuxDepth; }
@@ -601,12 +622,16 @@
   Void      setIntraPeriod                  ( Int   i )      { m_uiIntraPeriod = (UInt)i; }
   Void      setDecodingRefreshType          ( Int   i )      { m_uiDecodingRefreshType = (UInt)i; }
+#if JCTVC_Y0038_PARAMS
+  Void      setReWriteParamSetsFlag         ( Bool  b )      { m_bReWriteParamSetsFlag = b; }
+#endif
+
   Void      setGOPSize                      ( Int   i )      { m_iGOPSize = i; }
 #if NH_MV
   Void      setGopList                      ( GOPEntry*  GOPList ) {  for ( Int i = 0; i < MAX_GOP+1; i++ ) m_GOPList[i] = GOPList[i]; }
 #else
-  Void      setGopList                      ( GOPEntry*  GOPList ) {  for ( Int i = 0; i < MAX_GOP; i++ ) m_GOPList[i] = GOPList[i]; }
+  Void      setGopList                      ( const GOPEntry GOPList[MAX_GOP] ) {  for ( Int i = 0; i < MAX_GOP; i++ ) m_GOPList[i] = GOPList[i]; }
 #endif
   Void      setExtraRPSs                    ( Int   i )      { m_extraRPSs = i; }
-  GOPEntry  getGOPEntry                     ( Int   i )      { return m_GOPList[i]; }
+  const GOPEntry &getGOPEntry               ( Int   i ) const { return m_GOPList[i]; }
   Void      setEncodedFlag                  ( Int  i, Bool value )  { m_GOPList[i].m_isEncoded = value; }
   Void      setMaxDecPicBuffering           ( UInt u, UInt tlayer ) { m_maxDecPicBuffering[tlayer] = u;    }
@@ -615,4 +640,8 @@
   Void      setQP                           ( Int   i )      { m_iQP = i; }
 
+#if X0038_LAMBDA_FROM_QP_CAPABILITY
+  Void      setIntraQPOffset                ( Int   i )         { m_intraQPOffset = i; }
+  Void      setLambdaFromQPEnable           ( Bool  b )         { m_lambdaFromQPEnable = b; }
+#endif
   Void      setPad                          ( Int*  iPad                   )      { for ( Int i = 0; i < 2; i++ ) m_aiPad[i] = iPad[i]; }
 
@@ -626,5 +655,5 @@
   Void      setMaxTotalCUDepth              ( UInt  u )      { m_maxTotalCUDepth = u; }
   Void      setLog2DiffMaxMinCodingBlockSize( UInt  u )      { m_log2DiffMaxMinCodingBlockSize = u; }
-#if NH_3D_IC
+#if NH_3D
   Void       setUseIC                       ( Bool bVal )    { m_bUseIC = bVal; }
   Bool       getUseIC                       ()               { return m_bUseIC; }
@@ -646,9 +675,6 @@
   Void      setLoopFilterBetaOffset         ( Int   i )      { m_loopFilterBetaOffsetDiv2  = i; }
   Void      setLoopFilterTcOffset           ( Int   i )      { m_loopFilterTcOffsetDiv2    = i; }
-#if W0038_DB_OPT
   Void      setDeblockingFilterMetric       ( Int   i )      { m_deblockingFilterMetric = i; }
-#else
-  Void      setDeblockingFilterMetric       ( Bool  b )      { m_DeblockingFilterMetric = b; }
-#endif
+
   //====== Motion search ========
   Void      setDisableIntraPUsInInterSlices ( Bool  b )      { m_bDisableIntraPUsInInterSlices = b; }
@@ -675,12 +701,15 @@
   Void      setChromaCbQpOffset             ( Int   i )      { m_chromaCbQpOffset = i; }
   Void      setChromaCrQpOffset             ( Int   i )      { m_chromaCrQpOffset = i; }
-#if W0038_CQP_ADJ
+  Void      setWCGChromaQpControl           ( const WCGChromaQPControl &ctrl )     { m_wcgChromaQpControl = ctrl; }
+  const WCGChromaQPControl &getWCGChromaQPControl () const { return m_wcgChromaQpControl; }
   Void      setSliceChromaOffsetQpIntraOrPeriodic( UInt periodicity, Int sliceChromaQpOffsetIntraOrPeriodic[2]) { m_sliceChromaQpOffsetPeriodicity = periodicity; memcpy(m_sliceChromaQpOffsetIntraOrPeriodic, sliceChromaQpOffsetIntraOrPeriodic, sizeof(m_sliceChromaQpOffsetIntraOrPeriodic)); }
   Int       getSliceChromaOffsetQpIntraOrPeriodic( Bool bIsCr) const                                            { return m_sliceChromaQpOffsetIntraOrPeriodic[bIsCr?1:0]; }
   UInt      getSliceChromaOffsetQpPeriodicity() const                                                           { return m_sliceChromaQpOffsetPeriodicity; }
-#endif
 
   Void      setChromaFormatIdc              ( ChromaFormat cf ) { m_chromaFormatIDC = cf; }
   ChromaFormat  getChromaFormatIdc          ( )              { return m_chromaFormatIDC; }
+
+  Void      setLumaLevelToDeltaQPControls( const LumaLevelToDeltaQPMapping &lumaLevelToDeltaQPMapping ) { m_lumaLevelToDeltaQPMapping=lumaLevelToDeltaQPMapping; }
+  const LumaLevelToDeltaQPMapping& getLumaLevelToDeltaQPMapping() const { return m_lumaLevelToDeltaQPMapping; }
 
 #if ADAPTIVE_QP_SELECTION
@@ -717,9 +746,24 @@
   UInt      getIntraPeriod                  ()      { return  m_uiIntraPeriod; }
   UInt      getDecodingRefreshType          ()      { return  m_uiDecodingRefreshType; }
-  Int       getGOPSize                      ()      { return  m_iGOPSize; }
+#if JCTVC_Y0038_PARAMS
+  Bool      getReWriteParamSetsFlag         ()      { return m_bReWriteParamSetsFlag; }
+#endif
+  #if NH_MV
+Int       getGOPSize                      ()    const  { return  m_iGOPSize; }
+#else
+Int       getGOPSize                      ()      { return  m_iGOPSize; }
+#endif
   Int       getMaxDecPicBuffering           (UInt tlayer) { return m_maxDecPicBuffering[tlayer]; }
   Int       getNumReorderPics               (UInt tlayer) { return m_numReorderPics[tlayer]; }
+#if X0038_LAMBDA_FROM_QP_CAPABILITY
+  Int       getIntraQPOffset                () const    { return  m_intraQPOffset; }
+  Int       getLambdaFromQPEnable           () const    { return  m_lambdaFromQPEnable; }
+protected:
+  Int       getBaseQP                       () const { return  m_iQP; } // public should use getQPForPicture.
+public:
+  Int       getQPForPicture                 (const UInt gopIndex, const TComSlice *pSlice) const; // Function actually defined in TEncTop.cpp
+#else
   Int       getQP                           ()      { return  m_iQP; }
-
+#endif
   Int       getPad                          ( Int i )      { assert (i < 2 );                      return  m_aiPad[i]; }
 
@@ -734,12 +778,16 @@
 
   //==== Loop/Deblock Filter ========
+#if NH_MV
+  Bool      getLoopFilterDisable            ()      const { return  m_bLoopFilterDisable;       }
+  Bool      getLoopFilterOffsetInPPS        ()      const { return m_loopFilterOffsetInPPS; }
+  Int       getLoopFilterBetaOffset         ()      const { return m_loopFilterBetaOffsetDiv2; }
+  Int       getLoopFilterTcOffset           ()      const { return m_loopFilterTcOffsetDiv2; }
+  Int       getDeblockingFilterMetric       ()      const { return m_deblockingFilterMetric; }
+#else
   Bool      getLoopFilterDisable            ()      { return  m_bLoopFilterDisable;       }
   Bool      getLoopFilterOffsetInPPS        ()      { return m_loopFilterOffsetInPPS; }
   Int       getLoopFilterBetaOffset         ()      { return m_loopFilterBetaOffsetDiv2; }
   Int       getLoopFilterTcOffset           ()      { return m_loopFilterTcOffsetDiv2; }
-#if W0038_DB_OPT
   Int       getDeblockingFilterMetric       ()      { return m_deblockingFilterMetric; }
-#else
-  Bool      getDeblockingFilterMetric       ()      { return m_DeblockingFilterMetric; }
 #endif
 
@@ -759,8 +807,8 @@
 
   //==== Quality control ========
-  Int       getMaxDeltaQP                   ()      { return  m_iMaxDeltaQP; }
-  Int       getMaxCuDQPDepth                ()      { return  m_iMaxCuDQPDepth; }
-  Bool      getUseAdaptiveQP                ()      { return  m_bUseAdaptiveQP; }
-  Int       getQPAdaptationRange            ()      { return  m_iQPAdaptationRange; }
+  Int       getMaxDeltaQP                   () const { return  m_iMaxDeltaQP; }
+  Int       getMaxCuDQPDepth                () const { return  m_iMaxCuDQPDepth; }
+  Bool      getUseAdaptiveQP                () const { return  m_bUseAdaptiveQP; }
+  Int       getQPAdaptationRange            () const { return  m_iQPAdaptationRange; }
 
   //==== Tool list ========
@@ -770,7 +818,5 @@
   Void      setUseRDOQ                      ( Bool  b )     { m_useRDOQ    = b; }
   Void      setUseRDOQTS                    ( Bool  b )     { m_useRDOQTS  = b; }
-#if T0196_SELECTIVE_RDOQ
   Void      setUseSelectiveRDOQ             ( Bool b )      { m_useSelectiveRDOQ = b; }
-#endif
   Void      setRDpenalty                    ( UInt  u )     { m_rdPenalty  = u; }
   Void      setFastInterSearchMode          ( FastInterSearchMode m ) { m_fastInterSearchMode = m; }
@@ -797,7 +843,5 @@
   Bool      getUseRDOQ                      ()      { return m_useRDOQ;    }
   Bool      getUseRDOQTS                    ()      { return m_useRDOQTS;  }
-#if T0196_SELECTIVE_RDOQ
   Bool      getUseSelectiveRDOQ             ()      { return m_useSelectiveRDOQ; }
-#endif
   Int       getRDpenalty                    ()      { return m_rdPenalty;  }
   FastInterSearchMode getFastInterSearchMode() const{ return m_fastInterSearchMode;  }
@@ -841,5 +885,5 @@
   Void setIntraSmoothingDisabledFlag               (Bool bValue) { m_intraSmoothingDisabledFlag=bValue; }
 
-  Int*      getdQPs                         ()       { return m_aidQP;       }
+  const Int* getdQPs                        () const { return m_aidQP;       }
   UInt      getDeltaQpRD                    () const { return m_uiDeltaQpRD; }
   Bool      getFastDeltaQp                  () const { return m_bFastDeltaQP; }
@@ -871,8 +915,6 @@
   Void  setSaoCtuBoundary              (Bool val)                    { m_saoCtuBoundary = val; }
   Bool  getSaoCtuBoundary              ()                            { return m_saoCtuBoundary; }
-#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
   Void  setSaoResetEncoderStateAfterIRAP(Bool b)                     { m_saoResetEncoderStateAfterIRAP = b; }
   Bool  getSaoResetEncoderStateAfterIRAP() const                     { return m_saoResetEncoderStateAfterIRAP; }
-#endif
   Void  setLFCrossTileBoundaryFlag               ( Bool   val  )     { m_loopFilterAcrossTilesEnabledFlag = val; }
   Bool  getLFCrossTileBoundaryFlag               ()                  { return m_loopFilterAcrossTilesEnabledFlag;   }
@@ -986,4 +1028,8 @@
   Void  setTMCTSSEIEnabled(Bool b)                                   { m_tmctsSEIEnabled = b; }
   Bool  getTMCTSSEIEnabled()                                         { return m_tmctsSEIEnabled; }
+#if MCTS_ENC_CHECK
+  Void  setTMCTSSEITileConstraint(Bool b)                            { m_tmctsSEITileConstraint = b; }
+  Bool  getTMCTSSEITileConstraint()                                  { return m_tmctsSEITileConstraint; }
+#endif
   Void  setTimeCodeSEIEnabled(Bool b)                                { m_timeCodeSEIEnabled = b; }
   Bool  getTimeCodeSEIEnabled()                                      { return m_timeCodeSEIEnabled; }
@@ -1019,10 +1065,15 @@
 
   Void  setMasteringDisplaySEI(const TComSEIMasteringDisplay &src)   { m_masteringDisplay = src; }
-#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
   Void  setSEIAlternativeTransferCharacteristicsSEIEnable( Bool b)   { m_alternativeTransferCharacteristicsSEIEnabled = b;    }
   Bool  getSEIAlternativeTransferCharacteristicsSEIEnable( ) const   { return m_alternativeTransferCharacteristicsSEIEnabled; }
   Void  setSEIPreferredTransferCharacteristics(UChar v)              { m_preferredTransferCharacteristics = v;    }
   UChar getSEIPreferredTransferCharacteristics() const               { return m_preferredTransferCharacteristics; }
-#endif
+  Void  setSEIGreenMetadataInfoSEIEnable( Bool b)                    { m_greenMetadataInfoSEIEnabled = b;    }
+  Bool  getSEIGreenMetadataInfoSEIEnable( ) const                    { return m_greenMetadataInfoSEIEnabled; }
+  Void  setSEIGreenMetadataType(UChar v)                             { m_greenMetadataType = v;    }
+  UChar getSEIGreenMetadataType() const                              { return m_greenMetadataType; }
+  Void  setSEIXSDMetricType(UChar v)                                 { m_xsdMetricType = v;    }
+  UChar getSEIXSDMetricType() const                                  { return m_xsdMetricType; }
+
   const TComSEIMasteringDisplay &getMasteringDisplaySEI() const      { return m_masteringDisplay; }
 #if NH_MV
@@ -1046,6 +1097,10 @@
   WeightedPredictionMethod getWeightedPredictionMethod() const       { return m_weightedPredictionMethod; }
   Void         setWeightedPredictionMethod( WeightedPredictionMethod m ) { m_weightedPredictionMethod = m; }
-  Void         setSignHideFlag( Bool signHideFlag )                  { m_signHideFlag = signHideFlag; }
-  Bool         getSignHideFlag()                                     { return m_signHideFlag; }
+  Void         setSignDataHidingEnabledFlag( Bool b )                { m_SignDataHidingEnabledFlag = b;    }
+#if NH_MV
+  Bool         getSignDataHidingEnabledFlag()       const            { return m_SignDataHidingEnabledFlag; }
+#else
+  Bool         getSignDataHidingEnabledFlag()                        { return m_SignDataHidingEnabledFlag; }
+#endif
   Bool         getUseRateCtrl         ()                             { return m_RCEnableRateControl;   }
   Void         setUseRateCtrl         ( Bool b )                     { m_RCEnableRateControl = b;      }
@@ -1062,6 +1117,4 @@
   Bool         getForceIntraQP        ()                             { return m_RCForceIntraQP;        }
   Void         setForceIntraQP        ( Bool b )                     { m_RCForceIntraQP = b;           }
-
-#if U0132_TARGET_BITS_SATURATION
   Bool         getCpbSaturationEnabled()                             { return m_RCCpbSaturationEnabled;}
   Void         setCpbSaturationEnabled( Bool b )                     { m_RCCpbSaturationEnabled = b;   }
@@ -1070,5 +1123,4 @@
   Double       getInitialCpbFullness  ()                             { return m_RCInitialCpbFullness;  }
   Void         setInitialCpbFullness  (Double f)                     { m_RCInitialCpbFullness = f;     }
-#endif
 
 #if KWU_RC_MADPRED_E0227
@@ -1080,13 +1132,19 @@
   Void         setUseViewWiseRateCtrl (Bool b)                       { m_bViewWiseRateCtrl    = b;        }
 #endif
-  Bool         getTransquantBypassEnableFlag()                       { return m_TransquantBypassEnableFlag; }
-  Void         setTransquantBypassEnableFlag(Bool flag)              { m_TransquantBypassEnableFlag = flag; }
+#if NH_MV
+  Bool         getTransquantBypassEnabledFlag()               const   { return m_TransquantBypassEnabledFlag; }
+#else
+  Bool         getTransquantBypassEnabledFlag()                       { return m_TransquantBypassEnabledFlag; }
+#endif
+  Void         setTransquantBypassEnabledFlag(Bool flag)             { m_TransquantBypassEnabledFlag = flag; }
   Bool         getCUTransquantBypassFlagForceValue()                 { return m_CUTransquantBypassFlagForce; }
   Void         setCUTransquantBypassFlagForceValue(Bool flag)        { m_CUTransquantBypassFlagForce = flag; }
-  CostMode     getCostMode( )                                        { return m_costMode; }
+  CostMode     getCostMode( ) const                                  { return m_costMode; }
   Void         setCostMode(CostMode m )                              { m_costMode = m; }
 #if NH_MV
   Void         setVPS( TComVPS *p )                                  { m_cVPS = p;    }
   TComVPS*     getVPS()                                              { return m_cVPS; }
+  TComVPS*     getVPS() const                                        { return m_cVPS; } 
+  
 #else
   Void         setVPS(TComVPS *p)                                    { m_cVPS = *p; }
@@ -1094,5 +1152,5 @@
 #endif
 
-#if NH_3D_DLT
+#if NH_3D
   Void         setDLT( TComDLT p )                                   { m_cDLT = p; }
   TComDLT*     getDLT()                                              { return &m_cDLT; }
@@ -1261,12 +1319,16 @@
 #endif
 
-#if NH_3D_QTL
+#if NH_3D
   Void      setUseQTL                       ( Bool b ) { m_bUseQTL = b;    }
   Bool      getUseQTL                       ()         { return m_bUseQTL; }
-#endif
-#if NH_3D
-
-  Void      setProfileIdc( Int a )    { assert( a == 1 || a == 6 || a == 8 ); m_profileIdc = a;  }
+#if NH_MV_ALLOW_NON_CONFORMING
+  Void      setProfileIdc( Int a )    { assert( a == Profile::MAIN || a == Profile::MULTIVIEWMAIN|| a == Profile::MAIN3D  ||  a == Profile::NONE || a == Profile::MAIN3D_NONCONFORMING || a == Profile::MULTIVIEWMAIN_NONCONFORMING|| a == Profile::MAIN3D_NONCONFORMING  ); m_profileIdc = a;  }
+  Bool      decProcAnnexI()           { assert( m_profileIdc != -1 ); return ( m_profileIdc == Profile::MAIN3D  || m_profileIdc == Profile::MAIN3D_NONCONFORMING ); }    
+#else
+  Void      setProfileIdc( Int a )    { assert( a == Profile::MAIN || a == Profile::MULTIVIEWMAIN|| a == Profile::MAIN3D ); m_profileIdc = a;  }
   Bool      decProcAnnexI()           { assert( m_profileIdc != -1 ); return ( m_profileIdc == Profile::MAIN3D ); }    
+#endif
+
+  
 #endif // NH_3D
 };
