Index: /branches/SHM-5.0-dev/cfg/encoder_intra_he10.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/encoder_intra_he10.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/encoder_intra_he10.cfg	(revision 574)
@@ -44,6 +44,4 @@
 #=========== Misc. ============
 #InternalBitDepth             : 10          # codec operating bit-depth
-InternalBitDepth0             : 10          # codec operating bit-depth for layer 0
-InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 
 #=========== Coding Tools =================
Index: /branches/SHM-5.0-dev/cfg/encoder_intra_main.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/encoder_intra_main.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/encoder_intra_main.cfg	(revision 574)
@@ -49,6 +49,4 @@
 #=========== Misc. ============
 #InternalBitDepth             : 8           # codec operating bit-depth
-InternalBitDepth0             : 8           # codec operating bit-depth for layer 0
-InternalBitDepth1             : 8           # codec operating bit-depth for layer 1
 
 #=========== Coding Tools =================
Index: /branches/SHM-5.0-dev/cfg/encoder_intra_main10.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/encoder_intra_main10.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/encoder_intra_main10.cfg	(revision 574)
@@ -49,6 +49,4 @@
 #=========== Misc. ============
 #InternalBitDepth             : 10          # codec operating bit-depth
-InternalBitDepth0             : 10          # codec operating bit-depth for layer 0
-InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 
 #=========== Coding Tools =================
Index: /branches/SHM-5.0-dev/cfg/encoder_lowdelay_P_he10.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/encoder_lowdelay_P_he10.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/encoder_lowdelay_P_he10.cfg	(revision 574)
@@ -51,6 +51,4 @@
 #=========== Misc. ============
 #InternalBitDepth             : 10          # internal bit-depth = BitDepth + BitIncrement
-InternalBitDepth0             : 10          # codec operating bit-depth for layer 0
-InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 
 #=========== Coding Tools =================
Index: /branches/SHM-5.0-dev/cfg/encoder_lowdelay_P_main.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/encoder_lowdelay_P_main.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/encoder_lowdelay_P_main.cfg	(revision 574)
@@ -54,6 +54,4 @@
 #=========== Misc. ============
 #InternalBitDepth             : 8           # codec operating bit-depth
-InternalBitDepth0             : 8           # codec operating bit-depth for layer 0
-InternalBitDepth1             : 8           # codec operating bit-depth for layer 1
 
 #=========== Coding Tools =================
Index: /branches/SHM-5.0-dev/cfg/encoder_lowdelay_P_main10.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/encoder_lowdelay_P_main10.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/encoder_lowdelay_P_main10.cfg	(revision 574)
@@ -56,6 +56,4 @@
 #=========== Misc. ============
 #InternalBitDepth             : 10          # codec operating bit-depth
-InternalBitDepth0             : 10          # codec operating bit-depth for layer 0
-InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 
 #=========== Coding Tools =================
Index: /branches/SHM-5.0-dev/cfg/encoder_lowdelay_he10.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/encoder_lowdelay_he10.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/encoder_lowdelay_he10.cfg	(revision 574)
@@ -49,6 +49,4 @@
 #=========== Misc. ============
 #InternalBitDepth             : 10          # codec operating bit-depth
-InternalBitDepth0             : 10          # codec operating bit-depth for layer 0
-InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 
 #=========== Coding Tools =================
Index: /branches/SHM-5.0-dev/cfg/encoder_lowdelay_main.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/encoder_lowdelay_main.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/encoder_lowdelay_main.cfg	(revision 574)
@@ -54,6 +54,4 @@
 #=========== Misc. ============
 #InternalBitDepth             : 8           # codec operating bit-depth
-InternalBitDepth0             : 8           # codec operating bit-depth for layer 0
-InternalBitDepth1             : 8           # codec operating bit-depth for layer 1
 
 #=========== Coding Tools =================
Index: /branches/SHM-5.0-dev/cfg/encoder_lowdelay_main10.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/encoder_lowdelay_main10.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/encoder_lowdelay_main10.cfg	(revision 574)
@@ -54,6 +54,4 @@
 #=========== Misc. ============
 #InternalBitDepth             : 10          # codec operating bit-depth
-InternalBitDepth0             : 10          # codec operating bit-depth for layer 0
-InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 
 #=========== Coding Tools =================
Index: /branches/SHM-5.0-dev/cfg/encoder_randomaccess_he10.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/encoder_randomaccess_he10.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/encoder_randomaccess_he10.cfg	(revision 574)
@@ -54,6 +54,4 @@
 #=========== Misc. ============
 #InternalBitDepth             : 10          # codec operating bit-depth
-InternalBitDepth0             : 10          # codec operating bit-depth for layer 0
-InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 
 #=========== Coding Tools =================
Index: /branches/SHM-5.0-dev/cfg/encoder_randomaccess_main.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/encoder_randomaccess_main.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/encoder_randomaccess_main.cfg	(revision 574)
@@ -57,6 +57,4 @@
 #=========== Misc. ============
 #InternalBitDepth             : 8           # codec operating bit-depth
-InternalBitDepth0             : 8           # codec operating bit-depth for layer 0
-InternalBitDepth1             : 8           # codec operating bit-depth for layer 1
 
 #=========== Coding Tools =================
Index: /branches/SHM-5.0-dev/cfg/encoder_randomaccess_main10.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/encoder_randomaccess_main10.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/encoder_randomaccess_main10.cfg	(revision 574)
@@ -57,6 +57,4 @@
 #=========== Misc. ============
 #InternalBitDepth             : 10           # codec operating bit-depth
-InternalBitDepth0             : 10           # codec operating bit-depth for layer 0
-InternalBitDepth1             : 10           # codec operating bit-depth for layer 1
 
 #=========== Coding Tools =================
Index: /branches/SHM-5.0-dev/cfg/layers.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/layers.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/layers.cfg	(revision 574)
@@ -9,7 +9,10 @@
 CrossLayerPictureTypeAlignFlag: 1           # Picture type alignment across layers
 CrossLayerIrapAlignFlag       : 1           # Align IRAP across layers
+InterLayerWeightedPred        : 0           # enable IL WP parameters estimation at encoder
+
 #============= LAYER 0 ==================
 QP0                           : 22
 MaxTidIlRefPicsPlus10         : 1           # max_tid_il_ref_pics_plus1 for layer0
+InternalBitDepth0             : 8           # codec operating bit-depth for layer 0
 #============ Rate Control ==============
 RateControl0                  : 0           # Rate control: enable rate control for layer 0
@@ -24,4 +27,5 @@
 #============= LAYER 1 ==================
 QP1                           : 20
+InternalBitDepth1             : 8           # codec operating bit-depth for layer 1
 NumSamplePredRefLayers1       : 1           # number of sample pred reference layers
 SamplePredRefLayerIds1        : 0           # reference layer id
Index: /branches/SHM-5.0-dev/cfg/layers_avcbase.cfg
===================================================================
--- /branches/SHM-5.0-dev/cfg/layers_avcbase.cfg	(revision 573)
+++ /branches/SHM-5.0-dev/cfg/layers_avcbase.cfg	(revision 574)
@@ -6,6 +6,8 @@
 CrossLayerPictureTypeAlignFlag: 0           # Picture type alignment across layers
 CrossLayerIrapAlignFlag       : 0           # Align IRAP across layers
+InterLayerWeightedPred        : 0           # enable IL WP parameters estimation at encoder
 #============= LAYER 0 ==================
 QP0                           : 22
+InternalBitDepth0             : 8           # codec operating bit-depth for layer 0
 
 #============ Rate Control ==============
@@ -21,4 +23,5 @@
 #============= LAYER 1 ==================
 QP1                           : 20
+InternalBitDepth0             : 8           # codec operating bit-depth for layer 0
 NumSamplePredRefLayers1       : 1           # number of sample pred reference layers
 SamplePredRefLayerIds1        : 0           # reference layer id
Index: /branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 573)
+++ /branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 574)
@@ -587,5 +587,8 @@
 #endif
 #if N0147_IRAP_ALIGN_FLAG
-    ("CrossLayerIrapAlignFlag", m_crossLayerIrapAlignFlag, true, "align IRAP across layers" )  
+  ("CrossLayerIrapAlignFlag", m_crossLayerIrapAlignFlag, true, "align IRAP across layers" )  
+#endif
+#if O0194_WEIGHTED_PREDICTION_CGS
+  ("InterLayerWeightedPred", m_useInterLayerWeightedPred, false, "enable IL WP parameters estimation at encoder" )  
 #endif
 #if AVC_BASE
@@ -2347,4 +2350,7 @@
   printf("Cross layer IRAP alignment    : %d\n", m_crossLayerIrapAlignFlag );
 #endif
+#if O0194_WEIGHTED_PREDICTION_CGS
+  printf("InterLayerWeightedPred        : %d\n", m_useInterLayerWeightedPred );
+#endif
   for(UInt layer=0; layer<m_numLayers; layer++)
   {
@@ -2492,5 +2498,4 @@
   printf("O0194_DIFFERENT_BITDEPTH_EL_BL: %d ", O0194_DIFFERENT_BITDEPTH_EL_BL);
   printf("O0194_JOINT_US_BITSHIFT: %d ", O0194_JOINT_US_BITSHIFT);
-  printf("O0194_WEIGHTED_PREDICTION_CGS: %d ",O0194_WEIGHTED_PREDICTION_CGS);
 #else
   printf("RecalQP:%d", m_recalculateQPAccordingToLambda ? 1 : 0 );
Index: /branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- /branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 573)
+++ /branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 574)
@@ -381,14 +381,17 @@
 #endif
 #if O0215_PHASE_ALIGNMENT
-  Bool m_phaseAlignFlag;
+  Bool      m_phaseAlignFlag;
 #endif
 #if O0223_PICTURE_TYPES_ALIGN_FLAG
-  Bool m_crossLayerPictureTypeAlignFlag;
+  Bool      m_crossLayerPictureTypeAlignFlag;
 #endif
 #if N0147_IRAP_ALIGN_FLAG
-  Bool m_crossLayerIrapAlignFlag;
+  Bool      m_crossLayerIrapAlignFlag;
 #endif
 #if O0149_CROSS_LAYER_BLA_FLAG
-  bool      m_crossLayerBLAFlag;
+  Bool      m_crossLayerBLAFlag;
+#endif
+#if O0194_WEIGHTED_PREDICTION_CGS
+  Bool      m_useInterLayerWeightedPred;
 #endif
 public:
Index: /branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 573)
+++ /branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 574)
@@ -178,16 +178,4 @@
 #endif
 
-#if O0194_WEIGHTED_PREDICTION_CGS
-  Bool bitDepthScalabilityFlag = false;
-  for(UInt layer=0; layer<m_numLayers; layer++)
-  {
-    if( m_acLayerCfg[0].m_internalBitDepthY != m_acLayerCfg[layer].m_internalBitDepthY )
-    {
-      bitDepthScalabilityFlag = true;
-      break;
-    }
-  }
-#endif
-
   for(UInt layer=0; layer<m_numLayers; layer++)
   {
@@ -205,5 +193,5 @@
 
 #if O0194_WEIGHTED_PREDICTION_CGS
-    m_acTEncTop[layer].setBitDepthScalabilityFlag( bitDepthScalabilityFlag );
+    m_acTEncTop[layer].setInterLayerWeightedPredFlag( m_useInterLayerWeightedPred );
 #endif
 #endif
Index: /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 573)
+++ /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 574)
@@ -1558,5 +1558,5 @@
 #if O0194_WEIGHTED_PREDICTION_CGS
       // Calculate for the base layer to be used in EL as Inter layer reference
-      if( m_pcEncTop->getBitDepthScalabilityFlag() )
+      if( m_pcEncTop->getInterLayerWeightedPredFlag() )
       {
         m_pcSliceEncoder->estimateILWpParam( pcSlice );
Index: /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 573)
+++ /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 574)
@@ -811,5 +811,5 @@
   }
 #if O0194_WEIGHTED_PREDICTION_CGS
-  else if( m_ppcTEncTop[pcSlice->getLayerId()]->getBitDepthScalabilityFlag() )
+  else if( m_ppcTEncTop[pcSlice->getLayerId()]->getInterLayerWeightedPredFlag() )
   {
     // Calculate for the base layer to be used in EL as Inter layer reference
Index: /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncTop.h
===================================================================
--- /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncTop.h	(revision 573)
+++ /branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncTop.h	(revision 574)
@@ -152,5 +152,5 @@
 #endif
 #if O0194_WEIGHTED_PREDICTION_CGS
-  Bool                    m_bitDepthScalabilityFlag;
+  Bool                    m_interLayerWeightedPredFlag;
 #endif
 #endif //SVC_EXTENSION
@@ -238,6 +238,6 @@
 #endif
 #if O0194_WEIGHTED_PREDICTION_CGS
-  Void      setBitDepthScalabilityFlag(Bool flag)   { m_bitDepthScalabilityFlag = flag; }
-  Bool      getBitDepthScalabilityFlag()            { return m_bitDepthScalabilityFlag; }
+  Void      setInterLayerWeightedPredFlag(Bool flag)   { m_interLayerWeightedPredFlag = flag; }
+  Bool      getInterLayerWeightedPredFlag()            { return m_interLayerWeightedPredFlag; }
 #endif
 #if AVC_SYNTAX
