Index: /branches/SHM-3.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/SHM-3.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 404)
+++ /branches/SHM-3.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 405)
@@ -502,6 +502,11 @@
   ("NumLayers",               m_numLayers, 1, "Number of layers to code")
   ("ConformanceMode%d",       cfg_conformanceMode,0, MAX_LAYERS, "Window conformance mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping")
+#if SCALABILITY_MASK_E0104
+  ("ScalabilityMask1",        m_scalabilityMask[1], 0, "scalability_mask[1] (multiview)")
+  ("ScalabilityMask2",        m_scalabilityMask[2], 1, "scalability_mask[2] (scalable)" )
+#else
   ("ScalabilityMask0",        m_scalabilityMask[0], 0, "scalability_mask[0] (multiview)")
   ("ScalabilityMask1",        m_scalabilityMask[1], 1, "scalability_mask[1] (scalable)" )
+#endif
   ("BitstreamFile,b",         cfg_BitstreamFile, string(""), "Bitstream output file name")
   ("InputBitDepth",           m_inputBitDepthY,    8, "Bit-depth of input file")
@@ -2147,6 +2152,11 @@
 #if SVC_EXTENSION  
   printf("Total number of layers        : %d\n", m_numLayers       );
+#if SCALABILITY_MASK_E0104
+  printf("Multiview                     : %d\n", m_scalabilityMask[1] );
+  printf("Scalable                      : %d\n", m_scalabilityMask[2] );
+#else
   printf("Multiview                     : %d\n", m_scalabilityMask[0] );
   printf("Scalable                      : %d\n", m_scalabilityMask[1] );
+#endif
 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
   printf("Adaptive Resolution Change    : %d\n", m_adaptiveResolutionChange );
Index: /branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 404)
+++ /branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 405)
@@ -496,5 +496,9 @@
     }
 #if MAX_ONE_RESAMPLING_DIRECT_LAYERS
+#if SCALABILITY_MASK_E0104
+    if( m_pcVPS->getScalabilityMask(2) )
+#else
     if( m_pcVPS->getScalabilityMask(1) )
+#endif
     {
       Int numResampler = 0;
Index: /branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h	(revision 404)
+++ /branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h	(revision 405)
@@ -40,4 +40,6 @@
 
 #define SVC_EXTENSION                    1
+
+#define SCALABILITY_MASK_E0104           1
 
 #define SYNTAX_BYTES                     10      ///< number of bytes taken by syntaxes per 4x4 block [RefIdxL0(1byte), RefIdxL1(1byte), MVxL0(2bytes), MVyL0(2bytes), MVxL1(2bytes), MVyL1(2bytes)]
Index: /branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 404)
+++ /branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 405)
@@ -306,8 +306,16 @@
 
           //only for scalable extension
+#if SCALABILITY_MASK_E0104
+          assert( pcSlice->getVPS()->getScalabilityMask(2) == true );
+#else
           assert( pcSlice->getVPS()->getScalabilityMask(1) == true );
+#endif
         }
 #if MAX_ONE_RESAMPLING_DIRECT_LAYERS
+#if SCALABILITY_MASK_E0104
+        if(pcSlice->getVPS()->getScalabilityMask(2))
+#else
         if(pcSlice->getVPS()->getScalabilityMask(1))
+#endif
         {
           pcSlice->setPic(rpcPic);
Index: /branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncTop.cpp	(revision 404)
+++ /branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncTop.cpp	(revision 405)
@@ -520,5 +520,9 @@
 
             //only for scalable extension
+#if SCALABILITY_MASK_E0104
+            assert( m_cVPS.getScalabilityMask(2) == true );
+#else
             assert( m_cVPS.getScalabilityMask(1) == true );
+#endif
           }
         }
@@ -557,5 +561,9 @@
 
             //only for scalable extension
+#if SCALABILITY_MASK_E0104
+            assert( m_cVPS.getScalabilityMask(2) == true );
+#else
             assert( m_cVPS.getScalabilityMask(1) == true );
+#endif
           }
         }
