Index: /branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.cpp	(revision 1212)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.cpp	(revision 1213)
@@ -285,10 +285,9 @@
   rYUVP.U = sPred.U + ( deltaU << m_nResQuanBit );
   rYUVP.V = sPred.V + ( deltaV << m_nResQuanBit );
-#if R0150_CGS_SIGNAL_CONSTRAINTS
+
   // LUT coefficients are less than 12-bit
   assert( -2048 <= rYUVP.Y && rYUVP.Y <= 2047 );
   assert( -2048 <= rYUVP.U && rYUVP.U <= 2047 );
   assert( -2048 <= rYUVP.V && rYUVP.V <= 2047 );
-#endif
 }
 
@@ -413,5 +412,4 @@
 #endif
 
-#if R0150_CGS_SIGNAL_CONSTRAINTS
 Bool TCom3DAsymLUT::isRefLayer( UInt uiRefLayerId )
 {
@@ -428,5 +426,4 @@
   return( bIsRefLayer );
 }
-#endif
 
 #if R0164_CGS_LUT_BUGFIX_CHECK
Index: /branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.h	(revision 1212)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.h	(revision 1213)
@@ -4,10 +4,8 @@
 
 #include "TypeDef.h"
-#if R0150_CGS_SIGNAL_CONSTRAINTS
+
+#if CGS_3D_ASYMLUT
 #include <cassert>
 #include <vector>
-#endif
-
-#if CGS_3D_ASYMLUT
 
 typedef struct _SYUVP
@@ -29,9 +27,5 @@
   virtual ~TCom3DAsymLUT();
 
-  virtual Void  create( Int nMaxOctantDepth , Int nInputBitDepth , Int nInputBitDepthC , Int nOutputBitDepth , Int nOutputBitDepthC , Int nMaxYPartNumLog2 
-#if R0151_CGS_3D_ASYMLUT_IMPROVE
-  , Int nAdaptCThresholdU , Int nAdaptCThresholdV
-#endif
-    );
+  virtual Void  create( Int nMaxOctantDepth, Int nInputBitDepth, Int nInputBitDepthC, Int nOutputBitDepth, Int nOutputBitDepthC, Int nMaxYPartNumLog2, Int nAdaptCThresholdU, Int nAdaptCThresholdV );
   virtual Void  destroy();
 
@@ -51,5 +45,5 @@
   Int   getMaxYPartNumLog2() { return m_nMaxYPartNumLog2; }
   Int   getCurYPartNumLog2() { return m_nCurYPartNumLog2; }
-#if R0150_CGS_SIGNAL_CONSTRAINTS
+
   Void  addRefLayerId( UInt uiRefLayerId )  
   { 
@@ -60,5 +54,5 @@
   UInt  getRefLayerId( UInt n )  { assert( n < m_vRefLayerId.size() ); return m_vRefLayerId[n];   }
   Bool  isRefLayer( UInt uiRefLayerId );
-#endif
+
 #if R0151_CGS_3D_ASYMLUT_IMPROVE
   Void  setAdaptChromaThresholdU( Int n ) { m_nAdaptCThresholdU = n; }
@@ -113,7 +107,5 @@
   SCuboid *** m_pCuboid;
   const static Int m_nVertexIdxOffset[4][3];
-#if R0150_CGS_SIGNAL_CONSTRAINTS
   std::vector<UInt> m_vRefLayerId;
-#endif
 #if R0151_CGS_3D_ASYMLUT_IMPROVE
   Int   m_nAdaptCThresholdU;
Index: /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1212)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1213)
@@ -58,5 +58,4 @@
 #if CGS_3D_ASYMLUT
 #define CGS_GCC_NO_VECTORIZATION         1
-#define R0150_CGS_SIGNAL_CONSTRAINTS     1      ///< JCTVC-R0150: CGS signaling improvement and constraints
 #define R0151_CGS_3D_ASYMLUT_IMPROVE     1      ///< JCTVC-R0151: Non-uniform chroma partitioning and improved LUT coefficient coding
 #define R0164_CGS_LUT_BUGFIX             1      ///< JCTVC-R0164: Bug fix with LUT syntax
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1212)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1213)
@@ -3506,5 +3506,4 @@
 Void TDecCavlc::xParse3DAsymLUT( TCom3DAsymLUT * pc3DAsymLUT )
 {
-#if R0150_CGS_SIGNAL_CONSTRAINTS
   UInt uiNumRefLayersM1;
   READ_UVLC( uiNumRefLayersM1 , "num_cm_ref_layers_minus1" );
@@ -3516,5 +3515,5 @@
     pc3DAsymLUT->addRefLayerId( uiRefLayerId );
   }
-#endif
+
   UInt uiCurOctantDepth , uiCurPartNumLog2 , uiInputBitDepthM8 , uiOutputBitDepthM8 , uiResQaunBit;
 #if R0300_CGS_RES_COEFF_CODING
@@ -3523,18 +3522,11 @@
   READ_CODE( 2 , uiCurOctantDepth , "cm_octant_depth" ); 
   READ_CODE( 2 , uiCurPartNumLog2 , "cm_y_part_num_log2" );     
-#if R0150_CGS_SIGNAL_CONSTRAINTS
+
   UInt uiChromaInputBitDepthM8 , uiChromaOutputBitDepthM8;
+
   READ_UVLC( uiInputBitDepthM8 , "cm_input_luma_bit_depth_minus8" );
   READ_UVLC( uiChromaInputBitDepthM8 , "cm_input_chroma_bit_depth_minus8" );
   READ_UVLC( uiOutputBitDepthM8 , "cm_output_luma_bit_depth_minus8" );
   READ_UVLC( uiChromaOutputBitDepthM8 , "cm_output_chroma_bit_depth_minus8" );
-#else
-  READ_CODE( 3 , uiInputBitDepthM8 , "cm_input_bit_depth_minus8" );
-  Int iInputBitDepthCDelta;
-  READ_SVLC(iInputBitDepthCDelta, "cm_input_bit_depth_chroma delta");
-  READ_CODE( 3 , uiOutputBitDepthM8 , "cm_output_bit_depth_minus8" ); 
-  Int iOutputBitDepthCDelta;
-  READ_SVLC(iOutputBitDepthCDelta, "cm_output_bit_depth_chroma_delta");
-#endif
   READ_CODE( 2 , uiResQaunBit , "cm_res_quant_bit" );
 #if R0300_CGS_RES_COEFF_CODING
@@ -3544,11 +3536,7 @@
 
 #if R0151_CGS_3D_ASYMLUT_IMPROVE
-#if R0150_CGS_SIGNAL_CONSTRAINTS
   Int nAdaptCThresholdU = 1 << ( uiChromaInputBitDepthM8 + 8 - 1 );
   Int nAdaptCThresholdV = 1 << ( uiChromaInputBitDepthM8 + 8 - 1 );
-#else
-  Int nAdaptCThresholdU = 1 << ( uiInputBitDepthM8 + 8 + iInputBitDepthCDelta - 1 );
-  Int nAdaptCThresholdV = 1 << ( uiInputBitDepthM8 + 8 + iInputBitDepthCDelta - 1 );
-#endif
+
   if( uiCurOctantDepth == 1 )
   {
@@ -3562,15 +3550,7 @@
   pc3DAsymLUT->destroy();
   pc3DAsymLUT->create( uiCurOctantDepth , uiInputBitDepthM8 + 8 ,  
-#if R0150_CGS_SIGNAL_CONSTRAINTS
     uiChromaInputBitDepthM8 + 8 ,
-#else
-    uiInputBitDepthM8 + 8 + iInputBitDepthCDelta, 
-#endif
     uiOutputBitDepthM8 + 8 , 
-#if R0150_CGS_SIGNAL_CONSTRAINTS
     uiChromaOutputBitDepthM8 + 8 ,
-#else
-    uiOutputBitDepthM8 + 8 + iOutputBitDepthCDelta ,
-#endif
     uiCurPartNumLog2 
 #if R0151_CGS_3D_ASYMLUT_IMPROVE
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1212)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1213)
@@ -1636,24 +1636,21 @@
 #if CGS_3D_ASYMLUT 
         TComPicYuv* pBaseColRec = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec();
-        if( pcSlice->getPPS()->getCGSFlag() 
-#if R0150_CGS_SIGNAL_CONSTRAINTS
-          && m_c3DAsymLUTPPS.isRefLayer( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) )
-#endif
-          )
-        {
-#if R0150_CGS_SIGNAL_CONSTRAINTS
+        if( pcSlice->getPPS()->getCGSFlag() && m_c3DAsymLUTPPS.isRefLayer( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) ) )
+        {
           assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getBitDepthY() == m_c3DAsymLUTPPS.getInputBitDepthY() );
           assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getBitDepthC() == m_c3DAsymLUTPPS.getInputBitDepthC() );
           assert( pcSlice->getBitDepthY() >= m_c3DAsymLUTPPS.getOutputBitDepthY() );
           assert( pcSlice->getBitDepthY() >= m_c3DAsymLUTPPS.getOutputBitDepthC() );
-#endif
-          if(!m_pColorMappedPic)
+
+          if( !m_pColorMappedPic )
           {
             initAsymLut(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0));
           }
+
           m_c3DAsymLUTPPS.colorMapping( pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(),  m_pColorMappedPic );
           pBaseColRec = m_pColorMappedPic;
         }
 #endif
+
         if( m_pcPic->isSpatialEnhLayer(refLayerIdc) )
         {
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1212)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1213)
@@ -2470,5 +2470,4 @@
 Void TEncCavlc::xCode3DAsymLUT( TCom3DAsymLUT * pc3DAsymLUT )
 {
-#if R0150_CGS_SIGNAL_CONSTRAINTS
   UInt uiNumRefLayers = ( UInt )pc3DAsymLUT->getRefLayerNum();
   WRITE_UVLC( uiNumRefLayers - 1 , "num_cm_ref_layers_minus1" );
@@ -2477,5 +2476,5 @@
     WRITE_CODE( pc3DAsymLUT->getRefLayerId( i ) , 6 , "cm_ref_layer_id" );
   }
-#endif
+
   assert( pc3DAsymLUT->getCurOctantDepth() < 4 );
   WRITE_CODE( pc3DAsymLUT->getCurOctantDepth() , 2 , "cm_octant_depth" );
@@ -2483,16 +2482,10 @@
   WRITE_CODE( pc3DAsymLUT->getCurYPartNumLog2() , 2 , "cm_y_part_num_log2" );
   assert( pc3DAsymLUT->getInputBitDepthY() < 16 );
-#if R0150_CGS_SIGNAL_CONSTRAINTS
+
   WRITE_UVLC( pc3DAsymLUT->getInputBitDepthY() - 8 , "cm_input_luma_bit_depth_minus8" );
   WRITE_UVLC( pc3DAsymLUT->getInputBitDepthC() - 8 , "cm_input_chroma_bit_depth_minus8" );
   WRITE_UVLC( pc3DAsymLUT->getOutputBitDepthY() - 8 , "cm_output_luma_bit_depth_minus8" );
   WRITE_UVLC( pc3DAsymLUT->getOutputBitDepthC() - 8 , "cm_output_chroma_bit_depth_minus8" );
-#else
-  WRITE_CODE( pc3DAsymLUT->getInputBitDepthY() - 8 , 3 , "cm_input_bit_depth_minus8" );
-  WRITE_SVLC(pc3DAsymLUT->getInputBitDepthC()-pc3DAsymLUT->getInputBitDepthY(), "cm_input_bit_depth_chroma delta");
-  assert( pc3DAsymLUT->getOutputBitDepthY() < 16 );
-  WRITE_CODE( pc3DAsymLUT->getOutputBitDepthY() - 8 , 3 , "cm_output_bit_depth_minus8" );
-  WRITE_SVLC(pc3DAsymLUT->getOutputBitDepthC()-pc3DAsymLUT->getOutputBitDepthY(), "cm_output_bit_depth_chroma_delta");
-#endif
+
   assert( pc3DAsymLUT->getResQuantBit() < 4 );
   WRITE_CODE( pc3DAsymLUT->getResQuantBit() , 2 , "cm_res_quant_bit" );
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1212)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1213)
@@ -1398,14 +1398,13 @@
         if( pcSlice->getPPS()->getCGSFlag() )
         {
-#if R0150_CGS_SIGNAL_CONSTRAINTS
           // all reference layers are currently taken as CGS reference layers
           m_Enc3DAsymLUTPPS.addRefLayerId( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) );
           m_Enc3DAsymLUTPicUpdate.addRefLayerId( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) );
-#endif
-          if(g_posScalingFactor[refLayerIdc][0] < (1<<16) || g_posScalingFactor[refLayerIdc][1] < (1<<16)) //if(pcPic->isSpatialEnhLayer(refLayerIdc))
+
+          if( g_posScalingFactor[refLayerIdc][0] < (1<<16) || g_posScalingFactor[refLayerIdc][1] < (1<<16) ) //if(pcPic->isSpatialEnhLayer(refLayerIdc))
           {
-            //downsampling;
+            //downsampling
             downScalePic(pcPic->getPicYuvOrg(), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg());
-            //pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg()->dump("ds.yuv", true, true);
+            
             m_Enc3DAsymLUTPPS.setDsOrigPic(pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg());
             m_Enc3DAsymLUTPicUpdate.setDsOrigPic(pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg());
