Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1380)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1381)
@@ -119,5 +119,4 @@
 , m_snrInternalColourSpace(false)
 , m_outputInternalColourSpace(false)
-, m_scalingListFile()
 , m_elRapSliceBEnabled(0)
 {
@@ -172,6 +171,6 @@
   free(m_pchReconFile);
   free(m_pchdQPFile);
-#endif
   free(m_scalingListFile);
+#endif
 }
 
@@ -900,4 +899,6 @@
   Int*    cfg_layerSwitchOffEnd[MAX_LAYERS];
   Int*    cfg_layerPTLIdx[MAX_VPS_LAYER_IDX_PLUS1];
+  string  cfg_ScalingListFile[MAX_LAYERS];
+  ScalingListMode*   cfg_UseScalingListId[MAX_LAYERS];
 
   for( UInt layer = 0; layer < m_numLayers; layer++ )
@@ -989,5 +990,7 @@
     cfg_layerSwitchOffBegin[layer]  = &m_apcLayerCfg[layer]->m_layerSwitchOffBegin;
     cfg_layerSwitchOffEnd[layer]    = &m_apcLayerCfg[layer]->m_layerSwitchOffEnd;
-    cfg_layerPTLIdx[layer]          = &m_apcLayerCfg[layer]->m_layerPTLIdx; 
+    cfg_layerPTLIdx[layer]          = &m_apcLayerCfg[layer]->m_layerPTLIdx;
+
+    cfg_UseScalingListId[layer]     = &m_apcLayerCfg[layer]->m_useScalingListId;
   }
 
@@ -1025,6 +1028,6 @@
   string cfg_colourRemapSEIFileRoot;
 #endif
+  string cfg_ScalingListFile;
 #endif //SVC_EXTENSION
-  string cfg_ScalingListFile;
 
   Int tmpChromaFormat;
@@ -1459,9 +1462,11 @@
 #if SVC_EXTENSION
   ("WaveFrontSynchro%d",                              cfg_waveFrontSynchro,                   0,  m_numLayers, "0: no synchro; 1 synchro with TR; 2 TRR etc")
+  ("ScalingList%d",                                   cfg_UseScalingListId,     SCALING_LIST_OFF, m_numLayers, "0/off: no scaling list, 1/default: default scaling lists, 2/file: scaling lists specified in ScalingListFile")
+  ("ScalingListFile%d",                               cfg_ScalingListFile,            string(""), m_numLayers, "Scaling list file name. Use an empty string to produce help.")
 #else
   ("WaveFrontSynchro",                                m_iWaveFrontSynchro,                                  0, "0: no synchro; 1 synchro with top-right-right")
-#endif
   ("ScalingList",                                     m_useScalingListId,                    SCALING_LIST_OFF, "0/off: no scaling list, 1/default: default scaling lists, 2/file: scaling lists specified in ScalingListFile")
   ("ScalingListFile",                                 cfg_ScalingListFile,                         string(""), "Scaling list file name. Use an empty string to produce help.")
+#endif
   ("SignHideFlag,-SBH",                               m_signHideFlag,                                    true)
   ("MaxNumMergeCand",                                 m_maxNumMergeCand,                                   5u, "Maximum number of merge candidates")
@@ -1897,13 +1902,11 @@
     m_tileRowHeight.clear();
   }
-
-  m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str());
-
-
-  
+    
   /* rules for input, output and internal bitdepths as per help text */
 #if SVC_EXTENSION
   for( Int layer = 0; layer < m_numLayers; layer++ )
   {
+    m_apcLayerCfg[layer]->m_scalingListFile = cfg_ScalingListFile[layer].empty() ? NULL : strdup(cfg_ScalingListFile[layer].c_str());
+
     if( m_apcLayerCfg[layer]->m_layerId < 0 )
     {
@@ -2026,4 +2029,6 @@
   }
 #else
+  m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str());
+
  /* rules for input, output and internal bitdepths as per help text */
   if (m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ] == 0)
@@ -4379,5 +4384,5 @@
   }
   printf("=== Common configuration settings === \n");
-  printf("Bitstream      File               : %s\n", m_pchBitstreamFile      );
+  printf("Bitstream File                         : %s\n", m_pchBitstreamFile      );
 #else //SVC_EXTENSION
   printf("\n");
@@ -4563,6 +4568,6 @@
   printf(" WaveFrontSynchro:%d WaveFrontSubstreams:%d",
           m_iWaveFrontSynchro, iWaveFrontSubstreams);
-#endif
   printf(" ScalingList:%d ", m_useScalingListId );
+#endif
   printf("TMVPMode:%d ", m_TMVPModeId     );
 #if ADAPTIVE_QP_SELECTION
Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1380)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1381)
@@ -400,6 +400,8 @@
   Bool      m_RCForceIntraQP;                     ///< force all intra picture to use initial QP or not
 #endif
+#if !SVC_EXTENSION
   ScalingListMode m_useScalingListId;                         ///< using quantization matrix
   Char*     m_scalingListFile;                                ///< quantization matrix file name
+#endif
 
   Bool      m_TransquantBypassEnableFlag;                     ///< transquant_bypass_enable_flag setting in PPS.
Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp	(revision 1380)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp	(revision 1381)
@@ -42,11 +42,12 @@
 #if SVC_EXTENSION
 TAppEncLayerCfg::TAppEncLayerCfg()
-  :m_cInputFile(string("")),
-  m_cReconFile(string("")),
-  m_conformanceMode( 0 ),
-  m_aidQP(NULL),
-  m_repFormatIdx (-1)
-#if Q0074_COLOUR_REMAPPING_SEI
-,  m_colourRemapSEIFileRoot(string(""))
+: m_cInputFile(string(""))
+, m_cReconFile(string(""))
+, m_conformanceMode( 0 )
+, m_scalingListFile(NULL)
+, m_aidQP(NULL)
+, m_repFormatIdx(-1)
+#if Q0074_COLOUR_REMAPPING_SEI
+, m_colourRemapSEIFileRoot(string(""))
 #endif
 {
@@ -108,4 +109,5 @@
   }
 #endif
+  free(m_scalingListFile);
 }
 
@@ -270,5 +272,6 @@
   const Int iWaveFrontSubstreams = m_waveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1;
   printf("WaveFrontSubstreams               : %d\n", iWaveFrontSubstreams);
-  printf("PCM                               : %d ", (m_cAppEncCfg->getUsePCM() && (1<<m_cAppEncCfg->getPCMLog2MinSize()) <= m_uiMaxCUWidth)? 1 : 0);
+  printf("ScalingList                       : %d\n", m_useScalingListId );
+  printf("PCM                               : %d\n", (m_cAppEncCfg->getUsePCM() && (1<<m_cAppEncCfg->getPCMLog2MinSize()) <= m_uiMaxCUWidth)? 1 : 0);
 }
 
Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h	(revision 1380)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h	(revision 1381)
@@ -87,4 +87,7 @@
 #endif
 
+  ScalingListMode m_useScalingListId;                         ///< using quantization matrix
+  Char*     m_scalingListFile;                                ///< quantization matrix file name
+
   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.
@@ -92,5 +95,5 @@
 
   Int       m_iQP;                                            ///< QP value of key-picture (integer)
-  char*     m_pchdQPFile;                                     ///< QP offset for each slice (initialized from external file)
+  Char*     m_pchdQPFile;                                     ///< QP offset for each slice (initialized from external file)
   Int*      m_aidQP;                                          ///< array of slice QP values
   TAppEncCfg* m_cAppEncCfg;                                   ///< pointer to app encoder config
Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1380)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1381)
@@ -487,4 +487,7 @@
     Int           m_RCInitialQP                                = m_apcLayerCfg[layer]->getRCInitialQP();
     Bool          m_RCForceIntraQP                             = m_apcLayerCfg[layer]->getRCForceIntraQP();
+
+    ScalingListMode m_useScalingListId                         = m_apcLayerCfg[layer]->m_useScalingListId;
+    Char*         m_scalingListFile                            = m_apcLayerCfg[layer]->m_scalingListFile;
 #endif
 
