Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1311)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1316)
@@ -876,5 +876,5 @@
     cfg_aiPadX[layer]               = &m_acLayerCfg[layer].m_aiPad[0];
     cfg_aiPadY[layer]               = &m_acLayerCfg[layer].m_aiPad[1];
-    cfg_useExtendedPrecision[layer] = &m_acLayerCfg[layer].m_useExtendedPrecision;
+    cfg_useExtendedPrecision[layer] = &m_acLayerCfg[layer].m_extendedPrecisionProcessingFlag;
 
     cfg_maxCuDQPDepth[layer]        = &m_acLayerCfg[layer].m_iMaxCuDQPDepth;
@@ -1165,6 +1165,6 @@
   ("MSBExtendedBitDepthC",                            m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA],           0, "As per MSBExtendedBitDepth but for chroma component. (default:MSBExtendedBitDepth)")
   ("InternalBitDepthC",                               m_internalBitDepth[CHANNEL_TYPE_CHROMA],              0, "As per InternalBitDepth but for chroma component. (default:InternalBitDepth)")
-  ("ExtendedPrecision",                               m_useExtendedPrecision,                           false, "Increased internal accuracies to support high bit depths (not valid in V1 profiles)")
-  ("HighPrecisionPredictionWeighting",                m_useHighPrecisionPredictionWeighting,            false, "Use high precision option for weighted prediction (not valid in V1 profiles)")
+  ("ExtendedPrecision",                               m_extendedPrecisionProcessingFlag,                false, "Increased internal accuracies to support high bit depths (not valid in V1 profiles)")
+  ("HighPrecisionPredictionWeighting",                m_highPrecisionOffsetsEnabledFlag,                false, "Use high precision option for weighted prediction (not valid in V1 profiles)")
   ("InputColourSpaceConvert",                         inputColourSpaceConvert,                     string(""), "Colour space conversion to apply to input video. Permitted values are (empty string=UNCHANGED) " + getListOfColourSpaceConverts(true))
   ("SNRInternalColourSpace",                          m_snrInternalColourSpace,                         false, "If true, then no colour space conversion is applied prior to SNR, otherwise inverse of input is applied.")
@@ -1312,5 +1312,5 @@
   ("MaxCuDQPDepth,-dqd",                              m_iMaxCuDQPDepth,                                     0, "max depth for a minimum CuDQP")
 #endif
-  ("MaxCUChromaQpAdjustmentDepth",                    m_maxCUChromaQpAdjustmentDepth,                      -1, "Maximum depth for CU chroma Qp adjustment - set less than 0 to disable")
+  ("MaxCUChromaQpAdjustmentDepth",                    m_diffCuChromaQpOffsetDepth,                         -1, "Maximum depth for CU chroma Qp adjustment - set less than 0 to disable")
 
   ("CbQpOffset,-cbqpofs",                             m_cbQpOffset,                                         0, "Chroma Cb QP Offset")
@@ -1343,5 +1343,5 @@
   // Coding tools
   ("AMP",                                             m_enableAMP,                                       true, "Enable asymmetric motion partitions")
-  ("CrossComponentPrediction",                        m_useCrossComponentPrediction,                    false, "Enable the use of cross-component prediction (not valid in V1 profiles)")
+  ("CrossComponentPrediction",                        m_crossComponentPredictionEnabledFlag,            false, "Enable the use of cross-component prediction (not valid in V1 profiles)")
   ("ReconBasedCrossCPredictionEstimate",              m_reconBasedCrossCPredictionEstimate,             false, "When determining the alpha value for cross-component prediction, use the decoded residual rather than the pre-transform encoder-side residual")
   ("SaoLumaOffsetBitShift",                           saoOffsetBitShift[CHANNEL_TYPE_LUMA],                 0, "Specify the luma SAO bit-shift. If negative, automatically calculate a suitable value based upon bit depth and initial QP")
@@ -1349,11 +1349,11 @@
   ("TransformSkip",                                   m_useTransformSkip,                               false, "Intra transform skipping")
   ("TransformSkipFast",                               m_useTransformSkipFast,                           false, "Fast intra transform skipping")
-  ("TransformSkipLog2MaxSize",                        m_transformSkipLog2MaxSize,                          2U, "Specify transform-skip maximum size. Minimum 2. (not valid in V1 profiles)")
-  ("ImplicitResidualDPCM",                            m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT],         false, "Enable implicitly signalled residual DPCM for intra (also known as sample-adaptive intra predict) (not valid in V1 profiles)")
-  ("ExplicitResidualDPCM",                            m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT],         false, "Enable explicitly signalled residual DPCM for inter (not valid in V1 profiles)")
-  ("ResidualRotation",                                m_useResidualRotation,                            false, "Enable rotation of transform-skipped and transquant-bypassed TUs through 180 degrees prior to entropy coding (not valid in V1 profiles)")
-  ("SingleSignificanceMapContext",                    m_useSingleSignificanceMapContext,                false, "Enable, for transform-skipped and transquant-bypassed TUs, the selection of a single significance map context variable for all coefficients (not valid in V1 profiles)")
-  ("GolombRiceParameterAdaptation",                   m_useGolombRiceParameterAdaptation,               false, "Enable the adaptation of the Golomb-Rice parameter over the course of each slice")
-  ("AlignCABACBeforeBypass",                          m_alignCABACBeforeBypass,                         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" )
+  ("TransformSkipLog2MaxSize",                        m_log2MaxTransformSkipBlockSize,                     2U, "Specify transform-skip maximum size. Minimum 2. (not valid in V1 profiles)")
+  ("ImplicitResidualDPCM",                            m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT],        false, "Enable implicitly signalled residual DPCM for intra (also known as sample-adaptive intra predict) (not valid in V1 profiles)")
+  ("ExplicitResidualDPCM",                            m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT],        false, "Enable explicitly signalled residual DPCM for inter (not valid in V1 profiles)")
+  ("ResidualRotation",                                m_transformSkipRotationEnabledFlag,               false, "Enable rotation of transform-skipped and transquant-bypassed TUs through 180 degrees prior to entropy coding (not valid in V1 profiles)")
+  ("SingleSignificanceMapContext",                    m_transformSkipContextEnabledFlag,                false, "Enable, for transform-skipped and transquant-bypassed TUs, the selection of a single significance map context variable for all coefficients (not valid in V1 profiles)")
+  ("GolombRiceParameterAdaptation",                   m_persistentRiceAdaptationEnabledFlag,            false, "Enable the adaptation of the Golomb-Rice parameter over the course of each slice")
+  ("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" )
   ("SAO",                                             m_bUseSAO,                                         true, "Enable Sample Adaptive Offset")
   ("MaxNumOffsetsPerPic",                             m_maxNumOffsetsPerPic,                             2048, "Max number of SAO offset per picture (Default: 2048)")
@@ -1858,6 +1858,6 @@
     m_acLayerCfg[layer].m_chromaFormatIDC      = ((tmpChromaFormat == 0) ? (m_acLayerCfg[layer].m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat)));
 
-    m_acLayerCfg[layer].m_useHighPrecisionPredictionWeighting = false;
-    m_acLayerCfg[layer].m_useExtendedPrecision = false;
+    m_acLayerCfg[layer].m_highPrecisionOffsetsEnabledFlag = false;
+    m_acLayerCfg[layer].m_extendedPrecisionProcessingFlag = false;
 
     if( m_acLayerCfg[layer].m_layerSwitchOffBegin < m_acLayerCfg[layer].m_layerSwitchOffEnd )
@@ -1881,5 +1881,5 @@
     for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++)
     {
-      m_acLayerCfg[layer].m_saoOffsetBitShift[channelType] = 0;
+      m_acLayerCfg[layer].m_log2SaoOffsetScale[channelType] = 0;
     }
         
@@ -1925,13 +1925,13 @@
       {
         // produce a valid combination, if possible.
-        const Bool bUsingGeneralRExtTools  = m_useResidualRotation                    ||
-          m_useSingleSignificanceMapContext        ||
-          m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] ||
-          m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] ||
-          !m_enableIntraReferenceSmoothing         ||
-          m_useGolombRiceParameterAdaptation       ||
-          m_transformSkipLog2MaxSize!=2;
-        const Bool bUsingChromaQPAdjustment= m_maxCUChromaQpAdjustmentDepth >= 0;
-        const Bool bUsingExtendedPrecision = m_acLayerCfg[layer].m_useExtendedPrecision;
+        const Bool bUsingGeneralRExtTools  = m_transformSkipRotationEnabledFlag  ||
+          m_transformSkipContextEnabledFlag         ||
+          m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT] ||
+          m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT] ||
+          !m_enableIntraReferenceSmoothing          ||
+          m_persistentRiceAdaptationEnabledFlag     ||
+          m_log2MaxTransformSkipBlockSize!=2;
+        const Bool bUsingChromaQPAdjustment= m_diffCuChromaQpOffsetDepth >= 0;
+        const Bool bUsingExtendedPrecision = m_acLayerCfg[layer].m_extendedPrecisionProcessingFlag;
         m_acLayerCfg[layer].m_chromaFormatConstraint = NUM_CHROMA_FORMAT;
         automaticallySelectRExtProfile(bUsingGeneralRExtTools,
@@ -2030,13 +2030,13 @@
     {
       // produce a valid combination, if possible.
-      const Bool bUsingGeneralRExtTools  = m_useResidualRotation                    ||
-                                           m_useSingleSignificanceMapContext        ||
-                                           m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] ||
-                                           m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] ||
-                                           !m_enableIntraReferenceSmoothing         ||
-                                           m_useGolombRiceParameterAdaptation       ||
-                                           m_transformSkipLog2MaxSize!=2;
-      const Bool bUsingChromaQPAdjustment= m_maxCUChromaQpAdjustmentDepth >= 0;
-      const Bool bUsingExtendedPrecision = m_useExtendedPrecision;
+      const Bool bUsingGeneralRExtTools  = m_transformSkipRotationEnabledFlag        ||
+                                           m_transformSkipContextEnabledFlag         ||
+                                           m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT] ||
+                                           m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT] ||
+                                           !m_enableIntraReferenceSmoothing          ||
+                                           m_persistentRiceAdaptationEnabledFlag     ||
+                                           m_log2MaxTransformSkipBlockSize!=2;
+      const Bool bUsingChromaQPAdjustment= m_diffCuChromaQpOffsetDepth >= 0;
+      const Bool bUsingExtendedPrecision = m_extendedPrecisionProcessingFlag;
       m_chromaFormatConstraint = NUM_CHROMA_FORMAT;
       automaticallySelectRExtProfile(bUsingGeneralRExtTools,
@@ -2617,14 +2617,14 @@
       if (m_internalBitDepth[ch]>10)
       {
-        m_saoOffsetBitShift[ch]=UInt(Clip3<Int>(0, m_internalBitDepth[ch]-10, Int(m_internalBitDepth[ch]-10 + 0.165*m_iQP - 3.22 + 0.5) ) );
+        m_log2SaoOffsetScale[ch]=UInt(Clip3<Int>(0, m_internalBitDepth[ch]-10, Int(m_internalBitDepth[ch]-10 + 0.165*m_iQP - 3.22 + 0.5) ) );
       }
       else
       {
-        m_saoOffsetBitShift[ch]=0;
+        m_log2SaoOffsetScale[ch]=0;
       }
     }
     else
     {
-      m_saoOffsetBitShift[ch]=UInt(saoOffsetBitShift[ch]);
+      m_log2SaoOffsetScale[ch]=UInt(saoOffsetBitShift[ch]);
     }
   }
@@ -2908,6 +2908,6 @@
 Void TAppEncCfg::xCheckParameter(UInt layerIdx)
 {
-  Bool m_useExtendedPrecision                = m_acLayerCfg[layerIdx].m_useExtendedPrecision;
-  Bool m_useHighPrecisionPredictionWeighting = m_acLayerCfg[layerIdx].m_useHighPrecisionPredictionWeighting;
+  Bool m_extendedPrecisionProcessingFlag     = m_acLayerCfg[layerIdx].m_extendedPrecisionProcessingFlag;
+  Bool m_highPrecisionOffsetsEnabledFlag     = m_acLayerCfg[layerIdx].m_highPrecisionOffsetsEnabledFlag;
   ChromaFormat m_chromaFormatIDC             = m_acLayerCfg[layerIdx].m_chromaFormatIDC;
   ChromaFormat m_chromaFormatConstraint      = m_acLayerCfg[layerIdx].m_chromaFormatConstraint;
@@ -2918,6 +2918,6 @@
   Int m_MSBExtendedBitDepth[] = {m_acLayerCfg[layerIdx].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layerIdx].m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA]};  
 
-  m_saoOffsetBitShift[CHANNEL_TYPE_LUMA]   = m_acLayerCfg[layerIdx].m_saoOffsetBitShift[CHANNEL_TYPE_LUMA];
-  m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerIdx].m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA];
+  m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA]   = m_acLayerCfg[layerIdx].m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA];
+  m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerIdx].m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA];
 
   Int layerPTLIdx = m_acLayerCfg[layerIdx].m_layerPTLIdx;
@@ -2993,5 +2993,5 @@
   {
     xConfirmPara(m_lowerBitRateConstraintFlag==false && m_intraConstraintFlag==false, "The lowerBitRateConstraint flag cannot be false when intraConstraintFlag is false");
-    xConfirmPara(m_alignCABACBeforeBypass && m_profile!=Profile::HIGHTHROUGHPUTREXT, "AlignCABACBeforeBypass must not be enabled unless the high throughput profile is being used.");
+    xConfirmPara(m_cabacBypassAlignmentEnabledFlag && m_profile!=Profile::HIGHTHROUGHPUTREXT, "AlignCABACBeforeBypass must not be enabled unless the high throughput profile is being used.");
     if (m_profile == Profile::MAINREXT)
     {
@@ -3001,13 +3001,13 @@
       const Bool bValidProfile = (bitDepthIdx > 3 || chromaFormatIdx>3) ? false : (validRExtProfileNames[intraIdx][bitDepthIdx][chromaFormatIdx] != NONE);
       xConfirmPara(!bValidProfile, "Invalid intra constraint flag, bit depth constraint flag and chroma format constraint flag combination for a RExt profile");
-      const Bool bUsingGeneralRExtTools  = m_useResidualRotation                    ||
-                                           m_useSingleSignificanceMapContext        ||
-                                           m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] ||
-                                           m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] ||
-                                           !m_enableIntraReferenceSmoothing         ||
-                                           m_useGolombRiceParameterAdaptation       ||
-                                           m_transformSkipLog2MaxSize!=2;
-      const Bool bUsingChromaQPTool      = m_maxCUChromaQpAdjustmentDepth >= 0;
-      const Bool bUsingExtendedPrecision = m_useExtendedPrecision;
+      const Bool bUsingGeneralRExtTools  = m_transformSkipRotationEnabledFlag        ||
+                                           m_transformSkipContextEnabledFlag         ||
+                                           m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT] ||
+                                           m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT] ||
+                                           !m_enableIntraReferenceSmoothing          ||
+                                           m_persistentRiceAdaptationEnabledFlag     ||
+                                           m_log2MaxTransformSkipBlockSize!=2;
+      const Bool bUsingChromaQPTool      = m_diffCuChromaQpOffsetDepth >= 0;
+      const Bool bUsingExtendedPrecision = m_extendedPrecisionProcessingFlag;
 
       xConfirmPara((m_chromaFormatConstraint==CHROMA_420 || m_chromaFormatConstraint==CHROMA_400) && bUsingChromaQPTool, "CU Chroma QP adjustment cannot be used for 4:0:0 or 4:2:0 RExt profiles");
@@ -3042,15 +3042,15 @@
     xConfirmPara(m_lowerBitRateConstraintFlag==false, "LowerBitrateConstraintFlag must be true for non main-RExt profiles.");
 
-    xConfirmPara(m_useCrossComponentPrediction==true, "CrossComponentPrediction must not be used for non main-RExt profiles.");
-    xConfirmPara(m_transformSkipLog2MaxSize!=2, "Transform Skip Log2 Max Size must be 2 for V1 profiles.");
-    xConfirmPara(m_useResidualRotation==true, "UseResidualRotation must not be enabled for non main-RExt profiles.");
-    xConfirmPara(m_useSingleSignificanceMapContext==true, "UseSingleSignificanceMapContext must not be enabled for non main-RExt profiles.");
-    xConfirmPara(m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT]==true, "ImplicitResidualDPCM must not be enabled for non main-RExt profiles.");
-    xConfirmPara(m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT]==true, "ExplicitResidualDPCM must not be enabled for non main-RExt profiles.");
-    xConfirmPara(m_useGolombRiceParameterAdaptation==true, "GolombRiceParameterAdaption must not be enabled for non main-RExt profiles.");
-    xConfirmPara(m_useExtendedPrecision==true, "UseExtendedPrecision must not be enabled for non main-RExt profiles.");
-    xConfirmPara(m_useHighPrecisionPredictionWeighting==true, "UseHighPrecisionPredictionWeighting must not be enabled for non main-RExt profiles.");
+    xConfirmPara(m_crossComponentPredictionEnabledFlag==true, "CrossComponentPrediction must not be used for non main-RExt profiles.");
+    xConfirmPara(m_log2MaxTransformSkipBlockSize!=2, "Transform Skip Log2 Max Size must be 2 for V1 profiles.");
+    xConfirmPara(m_transformSkipRotationEnabledFlag==true, "UseResidualRotation must not be enabled for non main-RExt profiles.");
+    xConfirmPara(m_transformSkipContextEnabledFlag==true, "UseSingleSignificanceMapContext must not be enabled for non main-RExt profiles.");
+    xConfirmPara(m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT]==true, "ImplicitResidualDPCM must not be enabled for non main-RExt profiles.");
+    xConfirmPara(m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT]==true, "ExplicitResidualDPCM must not be enabled for non main-RExt profiles.");
+    xConfirmPara(m_persistentRiceAdaptationEnabledFlag==true, "GolombRiceParameterAdaption must not be enabled for non main-RExt profiles.");
+    xConfirmPara(m_extendedPrecisionProcessingFlag==true, "UseExtendedPrecision must not be enabled for non main-RExt profiles.");
+    xConfirmPara(m_highPrecisionOffsetsEnabledFlag==true, "UseHighPrecisionPredictionWeighting must not be enabled for non main-RExt profiles.");
     xConfirmPara(m_enableIntraReferenceSmoothing==false, "EnableIntraReferenceSmoothing must be enabled for non main-RExt profiles.");
-    xConfirmPara(m_alignCABACBeforeBypass, "AlignCABACBeforeBypass cannot be enabled for non main-RExt profiles.");
+    xConfirmPara(m_cabacBypassAlignmentEnabledFlag, "AlignCABACBeforeBypass cannot be enabled for non main-RExt profiles.");
   }
 
@@ -3060,5 +3060,5 @@
 
 #if !RExt__HIGH_BIT_DEPTH_SUPPORT
-  if (m_useExtendedPrecision)
+  if (m_extendedPrecisionProcessingFlag)
   {
     for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++)
@@ -3079,6 +3079,6 @@
   xConfirmPara( (m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] < m_inputBitDepth[CHANNEL_TYPE_CHROMA]), "MSB-extended bit depth for chroma channel (--MSBExtendedBitDepthC) must be greater than or equal to input bit depth for chroma channel (--InputBitDepthC)" );
 
-  xConfirmPara( m_saoOffsetBitShift[CHANNEL_TYPE_LUMA]   > (m_internalBitDepth[CHANNEL_TYPE_LUMA  ]<10?0:(m_internalBitDepth[CHANNEL_TYPE_LUMA  ]-10)), "SaoLumaOffsetBitShift must be in the range of 0 to InternalBitDepth-10, inclusive");
-  xConfirmPara( m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] > (m_internalBitDepth[CHANNEL_TYPE_CHROMA]<10?0:(m_internalBitDepth[CHANNEL_TYPE_CHROMA]-10)), "SaoChromaOffsetBitShift must be in the range of 0 to InternalBitDepthC-10, inclusive");
+  xConfirmPara( m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA]   > (m_internalBitDepth[CHANNEL_TYPE_LUMA  ]<10?0:(m_internalBitDepth[CHANNEL_TYPE_LUMA  ]-10)), "SaoLumaOffsetBitShift must be in the range of 0 to InternalBitDepth-10, inclusive");
+  xConfirmPara( m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA] > (m_internalBitDepth[CHANNEL_TYPE_CHROMA]<10?0:(m_internalBitDepth[CHANNEL_TYPE_CHROMA]-10)), "SaoChromaOffsetBitShift must be in the range of 0 to InternalBitDepthC-10, inclusive");
 
   xConfirmPara( m_chromaFormatIDC >= NUM_CHROMA_FORMAT,                                     "ChromaFormatIDC must be either 400, 420, 422 or 444" );
@@ -3132,5 +3132,5 @@
   }
 
-  if(m_useCrossComponentPrediction && (m_chromaFormatIDC != CHROMA_444))
+  if(m_crossComponentPredictionEnabledFlag && (m_chromaFormatIDC != CHROMA_444))
   {
     fprintf(stderr, "****************************************************************************\n");
@@ -3138,5 +3138,5 @@
     fprintf(stderr, "****************************************************************************\n");
 
-    m_useCrossComponentPrediction = false;
+    m_crossComponentPredictionEnabledFlag = false;
   }
 
@@ -3151,7 +3151,7 @@
   }
 
-  xConfirmPara (m_transformSkipLog2MaxSize < 2, "Transform Skip Log2 Max Size must be at least 2 (4x4)");
-
-  if (m_transformSkipLog2MaxSize!=2 && m_useTransformSkipFast)
+  xConfirmPara (m_log2MaxTransformSkipBlockSize < 2, "Transform Skip Log2 Max Size must be at least 2 (4x4)");
+
+  if (m_log2MaxTransformSkipBlockSize!=2 && m_useTransformSkipFast)
   {
     fprintf(stderr, "***************************************************************************\n");
@@ -4314,26 +4314,27 @@
   printf("Bitstream      File               : %s\n", m_pBitstreamFile      );
 #else //SVC_EXTENSION
-  printf("Input          File               : %s\n", m_pchInputFile          );
-  printf("Bitstream      File               : %s\n", m_pchBitstreamFile      );
-  printf("Reconstruction File               : %s\n", m_pchReconFile          );
-  printf("Real     Format                   : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate );
-  printf("Internal Format                   : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate );
+  printf("\n");
+  printf("Input          File                    : %s\n", m_pchInputFile          );
+  printf("Bitstream      File                    : %s\n", m_pchBitstreamFile      );
+  printf("Reconstruction File                    : %s\n", m_pchReconFile          );
+  printf("Real     Format                        : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate );
+  printf("Internal Format                        : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate );
 #endif //SVC_EXTENSION
 
-  printf("Sequence PSNR output              : %s\n", (m_printMSEBasedSequencePSNR ? "Linear average, MSE-based" : "Linear average only") );
-  printf("Sequence MSE output               : %s\n", (m_printSequenceMSE ? "Enabled" : "Disabled") );
-  printf("Frame MSE output                  : %s\n", (m_printFrameMSE    ? "Enabled" : "Disabled") );
-  printf("Cabac-zero-word-padding           : %s\n", (m_cabacZeroWordPaddingEnabled? "Enabled" : "Disabled") );
+  printf("Sequence PSNR output                   : %s\n", (m_printMSEBasedSequencePSNR ? "Linear average, MSE-based" : "Linear average only") );
+  printf("Sequence MSE output                    : %s\n", (m_printSequenceMSE ? "Enabled" : "Disabled") );
+  printf("Frame MSE output                       : %s\n", (m_printFrameMSE    ? "Enabled" : "Disabled") );
+  printf("Cabac-zero-word-padding                : %s\n", (m_cabacZeroWordPaddingEnabled? "Enabled" : "Disabled") );
   if (m_isField)
   {
-    printf("Frame/Field                       : Field based coding\n");
-    printf("Field index                       : %u - %d (%d fields)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded );
-    printf("Field Order                       : %s field first\n", m_isTopFieldFirst?"Top":"Bottom");
+    printf("Frame/Field                            : Field based coding\n");
+    printf("Field index                            : %u - %d (%d fields)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded );
+    printf("Field Order                            : %s field first\n", m_isTopFieldFirst?"Top":"Bottom");
 
   }
   else
   {
-    printf("Frame/Field                       : Frame based coding\n");
-    printf("Frame index                       : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded );
+    printf("Frame/Field                            : Frame based coding\n");
+    printf("Frame index                            : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded );
   }
 #if !SVC_EXTENSION
@@ -4353,80 +4354,82 @@
       rextSubProfile="main_444_16 [NON STANDARD]";
     }
-    printf("Profile                           : %s (%s)\n", profileToString(m_profile), (rextSubProfile.empty())?"INVALID REXT PROFILE":rextSubProfile.c_str() );
+    printf("Profile                                : %s (%s)\n", profileToString(m_profile), (rextSubProfile.empty())?"INVALID REXT PROFILE":rextSubProfile.c_str() );
   }
   else
   {
-    printf("Profile                           : %s\n", profileToString(m_profile) );
-  }
-  printf("CU size / depth / total-depth     : %d / %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth, m_uiMaxTotalCUDepth );
-  printf("RQT trans. size (min / max)       : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize );
-  printf("Max RQT depth inter               : %d\n", m_uiQuadtreeTUMaxDepthInter);
-  printf("Max RQT depth intra               : %d\n", m_uiQuadtreeTUMaxDepthIntra);
-#endif
-  printf("Min PCM size                      : %d\n", 1 << m_uiPCMLog2MinSize);
-  printf("Motion search range               : %d\n", m_iSearchRange );
+    printf("Profile                                : %s\n", profileToString(m_profile) );
+  }
+  printf("CU size / depth / total-depth          : %d / %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth, m_uiMaxTotalCUDepth );
+  printf("RQT trans. size (min / max)            : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize );
+  printf("Max RQT depth inter                    : %d\n", m_uiQuadtreeTUMaxDepthInter);
+  printf("Max RQT depth intra                    : %d\n", m_uiQuadtreeTUMaxDepthIntra);
+#endif
+  printf("Min PCM size                           : %d\n", 1 << m_uiPCMLog2MinSize);
+  printf("Motion search range                    : %d\n", m_iSearchRange );
 #if !SVC_EXTENSION
-  printf("Intra period                      : %d\n", m_iIntraPeriod );
-#endif
-  printf("Decoding refresh type             : %d\n", m_iDecodingRefreshType );
+  printf("Intra period                           : %d\n", m_iIntraPeriod );
+#endif
+  printf("Decoding refresh type                  : %d\n", m_iDecodingRefreshType );
 #if !SVC_EXTENSION
-  printf("QP                                : %5.2f\n", m_fQP );
-  printf("Max dQP signaling depth           : %d\n", m_iMaxCuDQPDepth);
-#endif
-
-  printf("Cb QP Offset                      : %d\n", m_cbQpOffset   );
-  printf("Cr QP Offset                      : %d\n", m_crQpOffset);
-  printf("Max CU chroma QP adjustment depth : %d\n", m_maxCUChromaQpAdjustmentDepth);
-  printf("QP adaptation                     : %d (range=%d)\n", m_bUseAdaptiveQP, (m_bUseAdaptiveQP ? m_iQPAdaptationRange : 0) );
-  printf("GOP size                          : %d\n", m_iGOPSize );
+  printf("QP                                     : %5.2f\n", m_fQP );
+  printf("Max dQP signaling depth                : %d\n", m_iMaxCuDQPDepth);
+#endif
+
+  printf("Cb QP Offset                           : %d\n", m_cbQpOffset   );
+  printf("Cr QP Offset                           : %d\n", m_crQpOffset);
+  printf("QP adaptation                          : %d (range=%d)\n", m_bUseAdaptiveQP, (m_bUseAdaptiveQP ? m_iQPAdaptationRange : 0) );
+  printf("GOP size                               : %d\n", m_iGOPSize );
 #if !SVC_EXTENSION
-  printf("Input bit depth                   : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] );
-  printf("MSB-extended bit depth            : (Y:%d, C:%d)\n", m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] );
-  printf("Internal bit depth                : (Y:%d, C:%d)\n", m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA] );
-  printf("PCM sample bit depth              : (Y:%d, C:%d)\n", m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA] : m_internalBitDepth[CHANNEL_TYPE_LUMA],
-                                                               m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] : m_internalBitDepth[CHANNEL_TYPE_CHROMA] );
-  printf("Extended precision processing     : %s\n", (m_useExtendedPrecision                   ? "Enabled" : "Disabled") );
-#endif
-  printf("Intra reference smoothing         : %s\n", (m_enableIntraReferenceSmoothing          ? "Enabled" : "Disabled") );
-  printf("Implicit residual DPCM            : %s\n", (m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] ? "Enabled" : "Disabled") );
-  printf("Explicit residual DPCM            : %s\n", (m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] ? "Enabled" : "Disabled") );
-  printf("Residual rotation                 : %s\n", (m_useResidualRotation                    ? "Enabled" : "Disabled") );
-  printf("Single significance map context   : %s\n", (m_useSingleSignificanceMapContext        ? "Enabled" : "Disabled") );
-  printf("Cross-component prediction        : %s\n", (m_useCrossComponentPrediction            ? (m_reconBasedCrossCPredictionEstimate ? "Enabled (reconstructed-residual-based estimate)" : "Enabled (encoder-side-residual-based estimate)") : "Disabled") );
+  printf("Input bit depth                        : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] );
+  printf("MSB-extended bit depth                 : (Y:%d, C:%d)\n", m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] );
+  printf("Internal bit depth                     : (Y:%d, C:%d)\n", m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA] );
+  printf("PCM sample bit depth                   : (Y:%d, C:%d)\n", m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA] : m_internalBitDepth[CHANNEL_TYPE_LUMA],
+                                                                    m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] : m_internalBitDepth[CHANNEL_TYPE_CHROMA] );
+#endif
+  printf("Intra reference smoothing              : %s\n", (m_enableIntraReferenceSmoothing           ? "Enabled" : "Disabled") );
+  printf("diff_cu_chroma_qp_offset_depth         : %d\n", m_diffCuChromaQpOffsetDepth);
 #if !SVC_EXTENSION
-  printf("High-precision prediction weight  : %s\n", (m_useHighPrecisionPredictionWeighting    ? "Enabled" : "Disabled") );
-#endif
-  printf("Golomb-Rice parameter adaptation  : %s\n", (m_useGolombRiceParameterAdaptation       ? "Enabled" : "Disabled") );
-  printf("CABAC bypass bit alignment        : %s\n", (m_alignCABACBeforeBypass                 ? "Enabled" : "Disabled") );
+  printf("extended_precision_processing_flag     : %s\n", (m_extendedPrecisionProcessingFlag         ? "Enabled" : "Disabled") );
+#endif
+  printf("implicit_rdpcm_enabled_flag            : %s\n", (m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT] ? "Enabled" : "Disabled") );
+  printf("explicit_rdpcm_enabled_flag            : %s\n", (m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT] ? "Enabled" : "Disabled") );
+  printf("transform_skip_rotation_enabled_flag   : %s\n", (m_transformSkipRotationEnabledFlag        ? "Enabled" : "Disabled") );
+  printf("transform_skip_context_enabled_flag    : %s\n", (m_transformSkipContextEnabledFlag         ? "Enabled" : "Disabled") );
+  printf("cross_component_prediction_enabled_flag: %s\n", (m_crossComponentPredictionEnabledFlag     ? (m_reconBasedCrossCPredictionEstimate ? "Enabled (reconstructed-residual-based estimate)" : "Enabled (encoder-side-residual-based estimate)") : "Disabled") );
+#if !SVC_EXTENSION
+  printf("high_precision_offsets_enabled_flag    : %s\n", (m_highPrecisionOffsetsEnabledFlag         ? "Enabled" : "Disabled") );
+#endif
+  printf("persistent_rice_adaptation_enabled_flag: %s\n", (m_persistentRiceAdaptationEnabledFlag     ? "Enabled" : "Disabled") );
+  printf("cabac_bypass_alignment_enabled_flag    : %s\n", (m_cabacBypassAlignmentEnabledFlag         ? "Enabled" : "Disabled") );
   if (m_bUseSAO)
   {
-    printf("Sao Luma Offset bit shifts        : %d\n", m_saoOffsetBitShift[CHANNEL_TYPE_LUMA]);
-    printf("Sao Chroma Offset bit shifts      : %d\n", m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA]);
+    printf("log2_sao_offset_scale_luma             : %d\n", m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA]);
+    printf("log2_sao_offset_scale_chroma           : %d\n", m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA]);
   }
 
   switch (m_costMode)
   {
-    case COST_STANDARD_LOSSY:               printf("Cost function:                    : Lossy coding (default)\n"); break;
-    case COST_SEQUENCE_LEVEL_LOSSLESS:      printf("Cost function:                    : Sequence_level_lossless coding\n"); break;
-    case COST_LOSSLESS_CODING:              printf("Cost function:                    : Lossless coding with fixed QP of %d\n", LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP); break;
-    case COST_MIXED_LOSSLESS_LOSSY_CODING:  printf("Cost function:                    : Mixed_lossless_lossy coding with QP'=%d for lossless evaluation\n", LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP_PRIME); break;
-    default:                                printf("Cost function:                    : Unknown\n"); break;
+    case COST_STANDARD_LOSSY:               printf("Cost function:                         : Lossy coding (default)\n"); break;
+    case COST_SEQUENCE_LEVEL_LOSSLESS:      printf("Cost function:                         : Sequence_level_lossless coding\n"); break;
+    case COST_LOSSLESS_CODING:              printf("Cost function:                         : Lossless coding with fixed QP of %d\n", LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP); break;
+    case COST_MIXED_LOSSLESS_LOSSY_CODING:  printf("Cost function:                         : Mixed_lossless_lossy coding with QP'=%d for lossless evaluation\n", LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP_PRIME); break;
+    default:                                printf("Cost function:                         : Unknown\n"); break;
   }
 
 #if !RC_SHVC_HARMONIZATION
-  printf("RateControl                       : %d\n", m_RCEnableRateControl );
+  printf("RateControl                            : %d\n", m_RCEnableRateControl );
 
   if(m_RCEnableRateControl)
   {
-    printf("TargetBitrate                     : %d\n", m_RCTargetBitrate );
-    printf("KeepHierarchicalBit               : %d\n", m_RCKeepHierarchicalBit );
-    printf("LCULevelRC                        : %d\n", m_RCLCULevelRC );
-    printf("UseLCUSeparateModel               : %d\n", m_RCUseLCUSeparateModel );
-    printf("InitialQP                         : %d\n", m_RCInitialQP );
-    printf("ForceIntraQP                      : %d\n", m_RCForceIntraQP );
-  }
-#endif
-
-  printf("Max Num Merge Candidates          : %d\n", m_maxNumMergeCand);
+    printf("TargetBitrate                          : %d\n", m_RCTargetBitrate );
+    printf("KeepHierarchicalBit                    : %d\n", m_RCKeepHierarchicalBit );
+    printf("LCULevelRC                             : %d\n", m_RCLCULevelRC );
+    printf("UseLCUSeparateModel                    : %d\n", m_RCUseLCUSeparateModel );
+    printf("InitialQP                              : %d\n", m_RCInitialQP );
+    printf("ForceIntraQP                           : %d\n", m_RCForceIntraQP );
+  }
+#endif
+
+  printf("Max Num Merge Candidates               : %d\n", m_maxNumMergeCand);
   printf("\n");
 
@@ -4452,5 +4455,5 @@
   printf("TransformSkip:%d ",     m_useTransformSkip              );
   printf("TransformSkipFast:%d ", m_useTransformSkipFast       );
-  printf("TransformSkipLog2MaxSize:%d ", m_transformSkipLog2MaxSize);
+  printf("TransformSkipLog2MaxSize:%d ", m_log2MaxTransformSkipBlockSize);
   printf("Slice: M=%d ", m_sliceMode);
   if (m_sliceMode!=NO_SLICES)
Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1311)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1316)
@@ -168,19 +168,18 @@
 
   GOPEntry  m_GOPList[MAX_GOP];                               ///< the coding structure entries from the config file
-
   Int       m_numReorderPics[MAX_TLAYER];                     ///< total number of reorder pictures
   Int       m_maxDecPicBuffering[MAX_TLAYER];                 ///< total number of pictures in the decoded picture buffer
-  Bool      m_useCrossComponentPrediction;                    ///< flag enabling the use of cross-component prediction
+  Bool      m_crossComponentPredictionEnabledFlag;            ///< flag enabling the use of cross-component prediction
   Bool      m_reconBasedCrossCPredictionEstimate;             ///< causes the alpha calculation in encoder search to be based on the decoded residual rather than the pre-transform encoder-side residual
-  UInt      m_saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE];        ///< number of bits for the upward bit shift operation on the decoded SAO offsets
+  UInt      m_log2SaoOffsetScale[MAX_NUM_CHANNEL_TYPE];       ///< number of bits for the upward bit shift operation on the decoded SAO offsets
   Bool      m_useTransformSkip;                               ///< flag for enabling intra transform skipping
   Bool      m_useTransformSkipFast;                           ///< flag for enabling fast intra transform skipping
-  UInt      m_transformSkipLog2MaxSize;                       ///< transform-skip maximum size (minimum of 2)
-  Bool      m_useResidualRotation;                            ///< control flag for transform-skip/transquant-bypass residual rotation
-  Bool      m_useSingleSignificanceMapContext;                ///< control flag for transform-skip/transquant-bypass single significance map context
-  Bool      m_useResidualDPCM[NUMBER_OF_RDPCM_SIGNALLING_MODES];///< control flags for residual DPCM
+  UInt      m_log2MaxTransformSkipBlockSize;                  ///< transform-skip maximum size (minimum of 2)
+  Bool      m_transformSkipRotationEnabledFlag;               ///< control flag for transform-skip/transquant-bypass residual rotation
+  Bool      m_transformSkipContextEnabledFlag;                ///< control flag for transform-skip/transquant-bypass single significance map context
+  Bool      m_rdpcmEnabledFlag[NUMBER_OF_RDPCM_SIGNALLING_MODES];///< control flags for residual DPCM
   Bool      m_enableAMP;
-  Bool      m_useGolombRiceParameterAdaptation;               ///< control flag for Golomb-Rice parameter adaptation over each slice
-  Bool      m_alignCABACBeforeBypass;
+  Bool      m_persistentRiceAdaptationEnabledFlag;            ///< control flag for Golomb-Rice parameter adaptation over each slice
+  Bool      m_cabacBypassAlignmentEnabledFlag;
 
   // coding quality
@@ -196,5 +195,5 @@
   Int       m_iMaxCuDQPDepth;                                 ///< Max. depth for a minimum CuDQPSize (0:default)
 #endif
-  Int       m_maxCUChromaQpAdjustmentDepth;
+  Int       m_diffCuChromaQpOffsetDepth;                      ///< If negative, then do not apply chroma qp offsets.
 
   Int       m_cbQpOffset;                                     ///< Chroma Cb QP Offset (0:default)
@@ -234,6 +233,6 @@
   Int       m_MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE];      ///< bit-depth of input samples after MSB extension
   Int       m_internalBitDepth[MAX_NUM_CHANNEL_TYPE];         ///< bit-depth codec operates at (input/output files will be converted)
-  Bool      m_useExtendedPrecision;
-  Bool      m_useHighPrecisionPredictionWeighting;
+  Bool      m_extendedPrecisionProcessingFlag;
+  Bool      m_highPrecisionOffsetsEnabledFlag;
 
   //coding tools (chroma format)
@@ -298,4 +297,5 @@
 #if !SVC_EXTENSION
   Int       m_iWaveFrontSynchro; //< 0: no WPP. >= 1: WPP is enabled, the "Top right" from which inheritance occurs is this LCU offset in the line above the current.
+  Int       m_iWaveFrontFlush; //< enable(1)/disable(0) the CABAC flush at the end of each line of LCUs.
 #endif
 
Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h	(revision 1311)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h	(revision 1316)
@@ -88,4 +88,5 @@
   Int       m_maxTidIlRefPicsPlus1;
   Int       m_waveFrontSynchro;                   ///< 0: no WPP. >= 1: WPP is enabled, the "Top right" from which inheritance occurs is this LCU offset in the line above the current.
+  Int       m_waveFrontFlush;                     ///< enable(1)/disable(0) the CABAC flush at the end of each line of LCUs.
 
   Int       m_iQP;                                            ///< QP value of key-picture (integer)
@@ -115,7 +116,7 @@
   Int       m_MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE];      ///< bit-depth of input samples after MSB extension
   Int       m_internalBitDepth[MAX_NUM_CHANNEL_TYPE];         ///< bit-depth codec operates at (input/output files will be converted)
-  UInt      m_saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE];
-  Bool      m_useExtendedPrecision;
-  Bool      m_useHighPrecisionPredictionWeighting;
+  UInt      m_log2SaoOffsetScale[MAX_NUM_CHANNEL_TYPE];
+  Bool      m_extendedPrecisionProcessingFlag;
+  Bool      m_highPrecisionOffsetsEnabledFlag;
 
   Int       m_repFormatIdx;
Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1311)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1316)
@@ -414,5 +414,5 @@
     m_acTEncTop[layer].setMaxDeltaQP                                       ( m_iMaxDeltaQP  );
     m_acTEncTop[layer].setMaxCuDQPDepth                                    ( m_acLayerCfg[layer].m_iMaxCuDQPDepth  );
-    m_acTEncTop[layer].setMaxCUChromaQpAdjustmentDepth                     ( m_maxCUChromaQpAdjustmentDepth );
+    m_acTEncTop[layer].setDiffCuChromaQpOffsetDepth                        ( m_diffCuChromaQpOffsetDepth );
     m_acTEncTop[layer].setChromaCbQpOffset                                 ( m_cbQpOffset     );
     m_acTEncTop[layer].setChromaCrQpOffset                                 ( m_crQpOffset  );
@@ -426,6 +426,6 @@
     m_acTEncTop[layer].setUseAdaptiveQP                                    ( m_bUseAdaptiveQP  );
     m_acTEncTop[layer].setQPAdaptationRange                                ( m_iQPAdaptationRange );
-    m_acTEncTop[layer].setUseExtendedPrecision                             ( m_acLayerCfg[layer].m_useExtendedPrecision );
-    m_acTEncTop[layer].setUseHighPrecisionPredictionWeighting              ( m_acLayerCfg[layer].m_useHighPrecisionPredictionWeighting );
+    m_acTEncTop[layer].setExtendedPrecisionProcessingFlag                  ( m_acLayerCfg[layer].m_extendedPrecisionProcessingFlag );
+    m_acTEncTop[layer].setHighPrecisionOffsetsEnabledFlag                  ( m_acLayerCfg[layer].m_highPrecisionOffsetsEnabledFlag );
 
     //====== Tool list ========    
@@ -455,18 +455,18 @@
     m_acTEncTop[layer].setUseCbfFastMode                                   ( m_bUseCbfFastMode  );
     m_acTEncTop[layer].setUseEarlySkipDetection                            ( m_useEarlySkipDetection );
-    m_acTEncTop[layer].setUseCrossComponentPrediction                      ( m_useCrossComponentPrediction );
+    m_acTEncTop[layer].setCrossComponentPredictionEnabledFlag              ( m_crossComponentPredictionEnabledFlag );
     m_acTEncTop[layer].setUseReconBasedCrossCPredictionEstimate            ( m_reconBasedCrossCPredictionEstimate );
-    m_acTEncTop[layer].setSaoOffsetBitShift                                ( CHANNEL_TYPE_LUMA  , m_saoOffsetBitShift[CHANNEL_TYPE_LUMA]   );
-    m_acTEncTop[layer].setSaoOffsetBitShift                                ( CHANNEL_TYPE_CHROMA, m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] );
+    m_acTEncTop[layer].setLog2SaoOffsetScale                               ( CHANNEL_TYPE_LUMA  , m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA]   );
+    m_acTEncTop[layer].setLog2SaoOffsetScale                               ( CHANNEL_TYPE_CHROMA, m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA] );
     m_acTEncTop[layer].setUseTransformSkip                                 ( m_useTransformSkip      );
     m_acTEncTop[layer].setUseTransformSkipFast                             ( m_useTransformSkipFast  );
-    m_acTEncTop[layer].setUseResidualRotation                              ( m_useResidualRotation   );
-    m_acTEncTop[layer].setUseSingleSignificanceMapContext                  ( m_useSingleSignificanceMapContext   );
-    m_acTEncTop[layer].setUseGolombRiceParameterAdaptation                 ( m_useGolombRiceParameterAdaptation );
-    m_acTEncTop[layer].setAlignCABACBeforeBypass                           ( m_alignCABACBeforeBypass );
-    m_acTEncTop[layer].setTransformSkipLog2MaxSize                         ( m_transformSkipLog2MaxSize  );
+    m_acTEncTop[layer].setTransformSkipRotationEnabledFlag                 ( m_transformSkipRotationEnabledFlag   );
+    m_acTEncTop[layer].setTransformSkipContextEnabledFlag                  ( m_transformSkipContextEnabledFlag   );
+    m_acTEncTop[layer].setPersistentRiceAdaptationEnabledFlag              ( m_persistentRiceAdaptationEnabledFlag );
+    m_acTEncTop[layer].setCabacBypassAlignmentEnabledFlag                  ( m_cabacBypassAlignmentEnabledFlag );
+    m_acTEncTop[layer].setLog2MaxTransformSkipBlockSize                    ( m_log2MaxTransformSkipBlockSize  );
     for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++)
     {
-      m_acTEncTop[layer].setUseResidualDPCM                                ( RDPCMSignallingMode(signallingModeIndex), m_useResidualDPCM[signallingModeIndex]);
+      m_acTEncTop[layer].setRdpcmEnabledFlag                               ( RDPCMSignallingMode(signallingModeIndex), m_rdpcmEnabledFlag[signallingModeIndex]);
     }
     m_acTEncTop[layer].setUseConstrainedIntraPred                          ( m_bUseConstrainedIntraPred );
@@ -521,5 +521,5 @@
     m_acTEncTop[layer].setPCMFilterDisableFlag                              ( m_bPCMFilterDisableFlag);
 
-    m_acTEncTop[layer].setDisableIntraReferenceSmoothing                    (!m_enableIntraReferenceSmoothing );
+    m_acTEncTop[layer].setIntraSmoothingDisabledFlag                        (!m_enableIntraReferenceSmoothing );
     m_acTEncTop[layer].setDecodedPictureHashSEIEnabled                      ( m_decodedPictureHashSEIEnabled );
     m_acTEncTop[layer].setRecoveryPointSEIEnabled                           ( m_recoveryPointSEIEnabled );
@@ -851,5 +851,5 @@
   m_cTEncTop.setMaxDeltaQP                                        ( m_iMaxDeltaQP  );
   m_cTEncTop.setMaxCuDQPDepth                                     ( m_iMaxCuDQPDepth  );
-  m_cTEncTop.setMaxCUChromaQpAdjustmentDepth                      ( m_maxCUChromaQpAdjustmentDepth );
+  m_cTEncTop.setDiffCuChromaQpOffsetDepth                         ( m_diffCuChromaQpOffsetDepth );
   m_cTEncTop.setChromaCbQpOffset                                  ( m_cbQpOffset     );
   m_cTEncTop.setChromaCrQpOffset                                  ( m_crQpOffset  );
@@ -863,6 +863,6 @@
   m_cTEncTop.setUseAdaptiveQP                                     ( m_bUseAdaptiveQP  );
   m_cTEncTop.setQPAdaptationRange                                 ( m_iQPAdaptationRange );
-  m_cTEncTop.setUseExtendedPrecision                              ( m_useExtendedPrecision );
-  m_cTEncTop.setUseHighPrecisionPredictionWeighting               ( m_useHighPrecisionPredictionWeighting );
+  m_cTEncTop.setExtendedPrecisionProcessingFlag                   ( m_extendedPrecisionProcessingFlag );
+  m_cTEncTop.setHighPrecisionOffsetsEnabledFlag                   ( m_highPrecisionOffsetsEnabledFlag );
   //====== Tool list ========
   m_cTEncTop.setDeltaQpRD                                         ( m_uiDeltaQpRD  );
@@ -892,18 +892,18 @@
   m_cTEncTop.setUseFastIntraScalable                              ( m_useFastIntraScalable );
 #endif
-  m_cTEncTop.setUseCrossComponentPrediction                       ( m_useCrossComponentPrediction );
+  m_cTEncTop.setCrossComponentPredictionEnabledFlag               ( m_crossComponentPredictionEnabledFlag );
   m_cTEncTop.setUseReconBasedCrossCPredictionEstimate             ( m_reconBasedCrossCPredictionEstimate );
-  m_cTEncTop.setSaoOffsetBitShift                                 ( CHANNEL_TYPE_LUMA  , m_saoOffsetBitShift[CHANNEL_TYPE_LUMA]   );
-  m_cTEncTop.setSaoOffsetBitShift                                 ( CHANNEL_TYPE_CHROMA, m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] );
+  m_cTEncTop.setLog2SaoOffsetScale                                ( CHANNEL_TYPE_LUMA  , m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA]   );
+  m_cTEncTop.setLog2SaoOffsetScale                                ( CHANNEL_TYPE_CHROMA, m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA] );
   m_cTEncTop.setUseTransformSkip                                  ( m_useTransformSkip      );
   m_cTEncTop.setUseTransformSkipFast                              ( m_useTransformSkipFast  );
-  m_cTEncTop.setUseResidualRotation                               ( m_useResidualRotation   );
-  m_cTEncTop.setUseSingleSignificanceMapContext                   ( m_useSingleSignificanceMapContext   );
-  m_cTEncTop.setUseGolombRiceParameterAdaptation                  ( m_useGolombRiceParameterAdaptation );
-  m_cTEncTop.setAlignCABACBeforeBypass                            ( m_alignCABACBeforeBypass );
-  m_cTEncTop.setTransformSkipLog2MaxSize                          ( m_transformSkipLog2MaxSize  );
+  m_cTEncTop.setTransformSkipRotationEnabledFlag                  ( m_transformSkipRotationEnabledFlag );
+  m_cTEncTop.setTransformSkipContextEnabledFlag                   ( m_transformSkipContextEnabledFlag   );
+  m_cTEncTop.setPersistentRiceAdaptationEnabledFlag               ( m_persistentRiceAdaptationEnabledFlag );
+  m_cTEncTop.setCabacBypassAlignmentEnabledFlag                   ( m_cabacBypassAlignmentEnabledFlag );
+  m_cTEncTop.setLog2MaxTransformSkipBlockSize                     ( m_log2MaxTransformSkipBlockSize  );
   for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++)
   {
-    m_cTEncTop.setUseResidualDPCM                                 ( RDPCMSignallingMode(signallingModeIndex), m_useResidualDPCM[signallingModeIndex]);
+    m_cTEncTop.setRdpcmEnabledFlag                                ( RDPCMSignallingMode(signallingModeIndex), m_rdpcmEnabledFlag[signallingModeIndex]);
   }
   m_cTEncTop.setUseConstrainedIntraPred                           ( m_bUseConstrainedIntraPred );
@@ -948,5 +948,5 @@
   m_cTEncTop.setPCMFilterDisableFlag                              ( m_bPCMFilterDisableFlag);
 
-  m_cTEncTop.setDisableIntraReferenceSmoothing                    (!m_enableIntraReferenceSmoothing );
+  m_cTEncTop.setIntraSmoothingDisabledFlag                        (!m_enableIntraReferenceSmoothing );
   m_cTEncTop.setDecodedPictureHashSEIEnabled                      ( m_decodedPictureHashSEIEnabled );
   m_cTEncTop.setRecoveryPointSEIEnabled                           ( m_recoveryPointSEIEnabled );
