Index: /branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp
===================================================================
--- /branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 1202)
+++ /branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 1203)
@@ -95,8 +95,4 @@
 #if AVC_BASE
   ("BLReconFile,-ibl",    cfg_BLReconFile,  string(""), "BL reconstructed YUV input file name")
-#if !REPN_FORMAT_IN_VPS
-  ("BLSourceWidth,-wdt",    m_iBLSourceWidth,        0, "BL source picture width")
-  ("BLSourceHeight,-hgt",   m_iBLSourceHeight,       0, "BL source picture height")
-#endif
 #endif
   ("TargetLayerId,-lid", targetLayerId, -1, "Target layer id")
Index: /branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.h
===================================================================
--- /branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.h	(revision 1202)
+++ /branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.h	(revision 1203)
@@ -84,8 +84,4 @@
 #if AVC_BASE
   Char*         m_pchBLReconFile;                     ///< input BL reconstruction file name
-#if !REPN_FORMAT_IN_VPS
-  Int           m_iBLSourceWidth;
-  Int           m_iBLSourceHeight;
-#endif
 #endif
   CommonDecoderParams             m_commonDecoderParams;
@@ -113,10 +109,4 @@
 #if Q0074_COLOUR_REMAPPING_SEI
   , m_colourRemapSEIEnabled(0)
-#endif
-#if SVC_EXTENSION
-#if AVC_BASE && !REPN_FORMAT_IN_VPS
-  , m_iBLSourceWidth(0)
-  , m_iBLSourceHeight(0)
-#endif
 #endif
   , m_respectDefDispWindow(0)
Index: /branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- /branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1202)
+++ /branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1203)
@@ -796,5 +796,4 @@
           if (display)
           {            
-#if REPN_FORMAT_IN_VPS
             UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
             Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
@@ -806,12 +805,4 @@
               conf.getWindowTopOffset()   * yScal + defDisp.getWindowTopOffset(),
               conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset(), NUM_CHROMA_FORMAT, isTff );
-#else
-            m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
-              m_outputColourSpaceConvert,
-              conf.getWindowLeftOffset()   + defDisp.getWindowLeftOffset(),
-              conf.getWindowRightOffset()  + defDisp.getWindowRightOffset(),
-              conf.getWindowTopOffset()    + defDisp.getWindowTopOffset(),
-              conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), NUM_CHROMA_FORMAT, isTff );
-#endif
           }
         }
@@ -915,5 +906,5 @@
           const Window &conf = pcPic->getConformanceWindow();
           const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();          
-#if REPN_FORMAT_IN_VPS
+
           UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
           Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
@@ -924,11 +915,4 @@
             conf.getWindowTopOffset()   * yScal + defDisp.getWindowTopOffset(),
             conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset() );
-#else
-          m_acTVideoIOYuvReconFile[layerId].write( pcPic->getPicYuvRec(), m_outputColourSpaceConvert,
-            conf.getWindowLeftOffset()   + defDisp.getWindowLeftOffset(),
-            conf.getWindowRightOffset()  + defDisp.getWindowRightOffset(),
-            conf.getWindowTopOffset()    + defDisp.getWindowTopOffset(),
-            conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() );
-#endif
         }
 
@@ -1051,5 +1035,5 @@
           const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window();
           const Bool isTff = pcPicTop->isTopField();          
-#if REPN_FORMAT_IN_VPS
+
           UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
           Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
@@ -1060,11 +1044,4 @@
             conf.getWindowTopOffset()   *yScal + defDisp.getWindowTopOffset(),
             conf.getWindowBottomOffset()*yScal + defDisp.getWindowBottomOffset(), NUM_CHROMA_FORMAT, isTff );
-#else
-          m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), m_outputColourSpaceConvert,
-            conf.getWindowLeftOffset()   + defDisp.getWindowLeftOffset(),
-            conf.getWindowRightOffset()  + defDisp.getWindowRightOffset(),
-            conf.getWindowTopOffset()    + defDisp.getWindowTopOffset(),
-            conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), NUM_CHROMA_FORMAT, isTff );
-#endif
         }
 
@@ -1154,5 +1131,5 @@
           const Window &conf = pcPic->getConformanceWindow();
           const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();          
-#if REPN_FORMAT_IN_VPS
+
           UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
           Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
@@ -1163,11 +1140,4 @@
             conf.getWindowTopOffset()   *yScal + defDisp.getWindowTopOffset(),
             conf.getWindowBottomOffset()*yScal + defDisp.getWindowBottomOffset() );
-#else
-          m_acTVideoIOYuvReconFile[layerId].write( pcPic->getPicYuvRec(), m_outputColourSpaceConvert,
-            conf.getWindowLeftOffset()   + defDisp.getWindowLeftOffset(),
-            conf.getWindowRightOffset()  + defDisp.getWindowRightOffset(),
-            conf.getWindowTopOffset()    + defDisp.getWindowTopOffset(),
-            conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() );
-#endif
         }
 
@@ -1300,9 +1270,9 @@
     const Window &defDisp = m_respectDefDispWindow ? pic->getDefDisplayWindow() : Window();
     Int xScal =  1, yScal = 1;
-#if REPN_FORMAT_IN_VPS
+
     UInt chromaFormatIdc = pic->getSlice(0)->getChromaFormatIdc();
     xScal = TComSPS::getWinUnitX( chromaFormatIdc );
     yScal = TComSPS::getWinUnitY( chromaFormatIdc );
-#endif
+
     TComPicYuv* pPicCYuvRec = pic->getPicYuvRec();
     m_acTVideoIOYuvReconFile[layerId].write( pPicCYuvRec, m_outputColourSpaceConvert,
@@ -1655,9 +1625,9 @@
         const Window &defDisp = m_respectDefDispWindow ? checkPic.getDefDisplayWindow() : Window();
         Int xScal = 1, yScal = 1;
-  #if REPN_FORMAT_IN_VPS
+  
         UInt chromaFormatIdc = checkPic.getSlice(0)->getChromaFormatIdc();
         xScal = TComSPS::getWinUnitX( chromaFormatIdc );
         yScal = TComSPS::getWinUnitY( chromaFormatIdc );
-  #endif
+  
         if( checkPic.getPOC() <= pocValue )
         {
Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1202)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1203)
@@ -737,7 +737,5 @@
   Double* cfg_fQP            [MAX_LAYERS];
   Int*    cfg_layerId        [MAX_LAYERS];
-#if REPN_FORMAT_IN_VPS
   Int*    cfg_repFormatIdx  [MAX_LAYERS];
-#endif
   Int*    cfg_SourceWidth   [MAX_LAYERS]; 
   Int*    cfg_SourceHeight  [MAX_LAYERS];
@@ -848,7 +846,5 @@
     cfg_colourRemapSEIFileRoot[layer] = &m_acLayerCfg[layer].m_colourRemapSEIFileRoot;
 #endif
-#if REPN_FORMAT_IN_VPS
-    cfg_repFormatIdx[layer] = &m_acLayerCfg[layer].m_repFormatIdx;
-#endif
+    cfg_repFormatIdx[layer]         = &m_acLayerCfg[layer].m_repFormatIdx;
     cfg_layerId[layer]              = &m_acLayerCfg[layer].m_layerId;
     cfg_SourceWidth[layer]          = &m_acLayerCfg[layer].m_iSourceWidth;
@@ -1041,7 +1037,5 @@
   ("FrameRate%d,-fr%d",                             cfg_FrameRate,                               0, MAX_LAYERS, "Frame rate for layer %d")
   ("LambdaModifier%d,-LM%d",                        m_adLambdaModifier,                Double(1.0), MAX_TLAYER, "Lambda modifier for temporal layer %d")
-#if REPN_FORMAT_IN_VPS
   ("RepFormatIdx%d",                                cfg_repFormatIdx,                           -1, MAX_LAYERS, "Index to the representation format structure used from the VPS")
-#endif
   ("LayerId%d",                                     cfg_layerId,                                -1, MAX_LAYERS,  "Layer id")
 
Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1202)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 1203)
@@ -472,7 +472,6 @@
   Int       m_adaptiveResolutionChange;                       ///< Indicate adaptive resolution change frame
   Bool      m_skipPictureAtArcSwitch;                         ///< Indicates that when ARC up-switching is performed the higher layer picture is a skip picture
-#if REPN_FORMAT_IN_VPS
+
   RepFormatCfg m_repFormatCfg[16];                            ///< Rep_format structures
-#endif
 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI
   Bool      m_interLayerConstrainedTileSetsSEIEnabled;
@@ -557,7 +556,5 @@
   Void cfgStringToArrayNumEntries(Int **arr, string const cfgString, Int &numEntries, const char* logString);
 
-#if REPN_FORMAT_IN_VPS
   RepFormatCfg* getRepFormatCfg(Int i)  { return &m_repFormatCfg[i]; }
-#endif
 #if LAYER_CTB
   Bool getUsePCM()                  { return m_usePCM;               }
Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp	(revision 1202)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp	(revision 1203)
@@ -45,8 +45,6 @@
   m_cReconFile(string("")),
   m_conformanceMode( 0 ),
-  m_aidQP(NULL)
-#if REPN_FORMAT_IN_VPS
-, m_repFormatIdx (-1)
-#endif
+  m_aidQP(NULL),
+  m_repFormatIdx (-1)
 #if Q0074_COLOUR_REMAPPING_SEI
 ,  m_colourRemapSEIFileRoot(string(""))
@@ -214,5 +212,5 @@
   printf("Input File                        : %s\n", m_cInputFile.c_str()  );
   printf("Reconstruction File               : %s\n", m_cReconFile.c_str()  );
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   printf("Real     Format                   : %dx%d %dHz\n", m_iSourceWidth - ( m_confWinLeft + m_confWinRight ) * TComSPS::getWinUnitX( m_chromaFormatIDC ), m_iSourceHeight - ( m_confWinTop + m_confWinBottom ) * TComSPS::getWinUnitY( m_chromaFormatIDC ), m_iFrameRate );
 #else
@@ -314,5 +312,5 @@
         m_aiPad[0] = m_confWinRight  = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth;
         m_iSourceWidth  += m_confWinRight;
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
         m_confWinRight /= TComSPS::getWinUnitX( m_chromaFormatIDC );
 #endif
@@ -327,5 +325,5 @@
           m_aiPad[1] = m_confWinBottom << 1;
         }
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
         m_confWinBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC );
 #endif
@@ -346,5 +344,5 @@
       m_confWinRight  = m_aiPad[0];
       m_confWinBottom = m_aiPad[1];
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
       m_confWinRight /= TComSPS::getWinUnitX( m_chromaFormatIDC );
       m_confWinBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC );
@@ -429,5 +427,5 @@
   xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(CHROMA_420) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling");
 
-#if !REPN_FORMAT_IN_VPS
+#if !SVC_EXTENSION
   xConfirmPara( m_confLeft   % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling");
   xConfirmPara( m_confRight  % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling");
Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h	(revision 1202)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h	(revision 1203)
@@ -118,7 +118,5 @@
   Bool      m_useHighPrecisionPredictionWeighting;
 
-#if REPN_FORMAT_IN_VPS
   Int       m_repFormatIdx;
-#endif
 #if Q0074_COLOUR_REMAPPING_SEI
   string    m_colourRemapSEIFileRoot;                           ///< Colour Remapping Information SEI message parameters file
@@ -206,10 +204,8 @@
   Bool    getRCForceIntraQP()         {return m_RCForceIntraQP;        }
 #endif
-#if REPN_FORMAT_IN_VPS
   Int     getRepFormatIdx()           { return m_repFormatIdx;  }
   Void    setRepFormatIdx(Int x)      { m_repFormatIdx = x;     }
   Void    setSourceWidth(Int x)       { m_iSourceWidth = x;     }
   Void    setSourceHeight(Int x)      { m_iSourceHeight = x;    }
-#endif
   Int     getMaxTidIlRefPicsPlus1()   { return m_maxTidIlRefPicsPlus1; }
 #if LAYER_CTB
Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1202)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1203)
@@ -93,5 +93,4 @@
   }
 
-#if REPN_FORMAT_IN_VPS  
   Int maxRepFormatIdx = -1;
   Int formatIdx = -1;
@@ -183,6 +182,6 @@
     m_acTEncTop[mapIdxToLayer[idx]].setSkipPictureAtArcSwitch             ( m_skipPictureAtArcSwitch );
   }
+
   delete [] mapIdxToLayer;
-#endif
 
   //Populate PTL in VPS
@@ -2198,5 +2197,5 @@
 Void TAppEncTop::xWriteRecon(UInt layer, Int iNumEncoded)
 {
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   ChromaFormat chromaFormatIdc = m_acLayerCfg[layer].getChromaFormatIDC();
   Int xScal = TComSPS::getWinUnitX( chromaFormatIdc );
@@ -2224,5 +2223,5 @@
       if( !m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRecTop->isReconstructed() && pcPicYuvRecBottom->isReconstructed() )
       {
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
         m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, ipCSC, m_acLayerCfg[layer].getConfWinLeft() * xScal, m_acLayerCfg[layer].getConfWinRight() * xScal, 
           m_acLayerCfg[layer].getConfWinTop() * yScal, m_acLayerCfg[layer].getConfWinBottom() * yScal, NUM_CHROMA_FORMAT, m_isTopFieldFirst );
@@ -2249,5 +2248,5 @@
       if( !m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRec->isReconstructed() )
       {
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
         m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, ipCSC, m_acLayerCfg[layer].getConfWinLeft() * xScal, m_acLayerCfg[layer].getConfWinRight() * xScal,
           m_acLayerCfg[layer].getConfWinTop() * yScal, m_acLayerCfg[layer].getConfWinBottom() * yScal );
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1203)
@@ -326,5 +326,5 @@
   TComSlice * pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx());
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   const UInt picWidth = pcSlice->getPicWidthInLumaSamples();
   const UInt picHeight = pcSlice->getPicHeightInLumaSamples();
@@ -1149,5 +1149,5 @@
   const UInt numPartInCtuWidth = m_pcPic->getNumPartInCtuWidth();
   
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxRT] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getPicWidthInLumaSamples() )
 #else
@@ -1209,5 +1209,5 @@
   UInt uiAbsZorderCUIdxLB = g_auiZscanToRaster[ m_absZIdxInCtu ] + (m_puhHeight[0] / m_pcPic->getMinCUHeight() - 1)*numPartInCtuWidth;
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxLB] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getPicHeightInLumaSamples() )
 #else
@@ -1257,5 +1257,5 @@
   UInt uiAbsZorderCUIdxLB = g_auiZscanToRaster[ m_absZIdxInCtu ] + ((m_puhHeight[0] / m_pcPic->getMinCUHeight()) - 1)*numPartInCtuWidth;
   
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxLB] + (m_pcPic->getPicSym()->getMinCUHeight() * uiPartUnitOffset)) >= m_pcSlice->getPicHeightInLumaSamples())
 #else
@@ -1305,5 +1305,5 @@
   const UInt numPartInCtuWidth = m_pcPic->getNumPartInCtuWidth();
   
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxRT] + (m_pcPic->getPicSym()->getMinCUHeight() * uiPartUnitOffset)) >= m_pcSlice->getPicWidthInLumaSamples() )
 #else
@@ -2511,5 +2511,5 @@
     Int ctuRsAddr = -1;
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
     if (   ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth () ) < m_pcSlice->getPicWidthInLumaSamples() )  // image boundary check
         && ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getPicHeightInLumaSamples() ) )
@@ -2853,5 +2853,6 @@
     uiAbsPartIdx = g_auiZscanToRaster[uiPartIdxRB];
     Int ctuRsAddr = -1;
-#if REPN_FORMAT_IN_VPS
+
+#if SVC_EXTENSION
     if (  ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdx] + m_pcPic->getMinCUWidth () ) < m_pcSlice->getPicWidthInLumaSamples())   // image boundary check
        && ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdx] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getPicHeightInLumaSamples() ) )    
@@ -2930,5 +2931,5 @@
   Int  iMvShift = 2;
   Int iOffset = 8;
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   Int iHorMax = ( m_pcSlice->getPicWidthInLumaSamples() + iOffset - m_uiCUPelX - 1 ) << iMvShift;
 #else
@@ -2937,5 +2938,5 @@
   Int iHorMin = (       -(Int)g_uiMaxCUWidth - iOffset - (Int)m_uiCUPelX + 1 ) << iMvShift;
   
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   Int iVerMax = ( m_pcSlice->getPicHeightInLumaSamples() + iOffset - m_uiCUPelY - 1 ) << iMvShift;
 #else
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComLoopFilter.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComLoopFilter.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComLoopFilter.cpp	(revision 1203)
@@ -181,5 +181,5 @@
       UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsZorderIdx] ];
       UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsZorderIdx] ];
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
       if( ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) )
 #else
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp	(revision 1203)
@@ -668,5 +668,5 @@
       UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsZorderIdx] ];
       UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsZorderIdx] ];
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
       if( ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) )
 #else
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1203)
@@ -1932,8 +1932,6 @@
 , m_bitRatePresentVpsFlag     (false)
 , m_picRatePresentVpsFlag     (false)
-#if REPN_FORMAT_IN_VPS
 , m_repFormatIdxPresentFlag   (false)
 , m_vpsNumRepFormats          (1)
-#endif
 , m_viewIdLen                (0)
 , m_vpsNonVuiExtLength (0)
@@ -2009,14 +2007,12 @@
   }
 
-  ::memset(m_bitRatePresentFlag, 0, sizeof(m_bitRatePresentFlag));
-  ::memset(m_picRatePresentFlag, 0, sizeof(m_picRatePresentFlag));
-  ::memset(m_avgBitRate        , 0, sizeof(m_avgBitRate)        );
-  ::memset(m_maxBitRate        , 0, sizeof(m_maxBitRate)        );
-  ::memset(m_constPicRateIdc   , 0, sizeof(m_constPicRateIdc)   );
-  ::memset(m_avgPicRate        , 0, sizeof(m_avgPicRate)        );
-#if REPN_FORMAT_IN_VPS
-  ::memset( m_vpsRepFormatIdx, 0, sizeof(m_vpsRepFormatIdx) );
-#endif
-  ::memset(m_viewIdVal, 0, sizeof(m_viewIdVal));
+  ::memset( m_bitRatePresentFlag, 0, sizeof(m_bitRatePresentFlag) );
+  ::memset( m_picRatePresentFlag, 0, sizeof(m_picRatePresentFlag) );
+  ::memset( m_avgBitRate        , 0, sizeof(m_avgBitRate)         );
+  ::memset( m_maxBitRate        , 0, sizeof(m_maxBitRate)         );
+  ::memset( m_constPicRateIdc   , 0, sizeof(m_constPicRateIdc)    );
+  ::memset( m_avgPicRate        , 0, sizeof(m_avgPicRate)         );
+  ::memset( m_vpsRepFormatIdx   , 0, sizeof(m_vpsRepFormatIdx)    );
+  ::memset( m_viewIdVal         , 0, sizeof(m_viewIdVal))         ;
 
   for( Int i = 0; i < MAX_NUM_LAYER_IDS; i++ )
@@ -2115,8 +2111,6 @@
 , m_extensionFlag             ( false )
 , m_bV1CompatibleSPSFlag      (  0)
-#if REPN_FORMAT_IN_VPS
 , m_updateRepFormatFlag       (false)
 , m_updateRepFormatIndex      (0)
-#endif
 #if SCALINGLIST_INFERRING
 , m_inferScalingListFlag ( false )
@@ -3507,5 +3501,4 @@
 }
 
-#if REPN_FORMAT_IN_VPS
 UInt TComSlice::getPicWidthInLumaSamples()
 {
@@ -3573,5 +3566,5 @@
 #endif
 
-  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
+  if( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
   {
     if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
@@ -3598,5 +3591,5 @@
   UInt retVal, layerId = getLayerId();
 
-  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
+  if( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
   {
     if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
@@ -3623,5 +3616,5 @@
   UInt retVal, layerId = getLayerId();
 
-  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
+  if( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
   {
     if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() )
@@ -3687,5 +3680,4 @@
 , m_bitDepthVpsChroma           (0)
 {}
-#endif //REPN_FORMAT_IN_VPS
 
 Void TComPTL::copyProfileInfo(TComPTL *ptl)
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1203)
@@ -508,5 +508,5 @@
 };
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
 class RepFormat
 {
@@ -558,5 +558,5 @@
   Void    setConformanceWindowVps(Window& conformanceWindow ) { m_conformanceWindowVps = conformanceWindow; }
 };
-#endif //REPN_FORMAT_IN_VPS
+#endif
 
 class TComVPS
@@ -682,10 +682,9 @@
   Bool       m_altOutputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS];
 
-#if REPN_FORMAT_IN_VPS
   Bool       m_repFormatIdxPresentFlag;
   Int        m_vpsNumRepFormats;            // coded as minus1
   RepFormat  m_vpsRepFormat[16];
   Int        m_vpsRepFormatIdx[16];
-#endif
+
   Int        m_viewIdLen;
   Int        m_viewIdVal                [MAX_LAYERS];
@@ -1051,30 +1050,28 @@
   Void     setBspHrdIdx(Int  i, Int j, Int k, Int l, Int m, Int val)            { m_bspHrdIdx[i][j][k][l][m] = val; }
 #endif
-  Void   setBaseLayerPSCompatibilityFlag (Int layer, int val)   { m_baseLayerPSCompatibilityFlag[layer] = val; }
-  Int    getBaseLayerPSCompatibilityFlag (Int layer)            { return m_baseLayerPSCompatibilityFlag[layer];}
-  Bool   getAltOuputLayerFlag(Int idx)                          { return m_altOutputLayerFlag[idx]; }
-  Void   setAltOuputLayerFlag(Int idx, Bool x)                  { m_altOutputLayerFlag[idx] = x;    }
-
-#if REPN_FORMAT_IN_VPS
-  Bool   getRepFormatIdxPresentFlag()       { return m_repFormatIdxPresentFlag; }
-  Void   setRepFormatIdxPresentFlag(Bool x) { m_repFormatIdxPresentFlag = x;    }
-
-  Int    getVpsNumRepFormats()              { return m_vpsNumRepFormats;        }
-  Void   setVpsNumRepFormats(Int x)         { m_vpsNumRepFormats = x;           }
-
-  RepFormat* getVpsRepFormat(Int idx)       { return &m_vpsRepFormat[idx];      }
-
-  Int    getVpsRepFormatIdx(Int idx)        { return m_vpsRepFormatIdx[idx];    }
-  Void   setVpsRepFormatIdx(Int idx, Int x) { m_vpsRepFormatIdx[idx] = x;       }         
-#endif
-
-  Void   setViewIdLen( Int  val )                                   { m_viewIdLen = val;  } 
-  Int    getViewIdLen(  )                                           { return m_viewIdLen; } 
-
-  Void   setViewIdVal( Int viewOrderIndex, Int  val )               { m_viewIdVal[viewOrderIndex] = val;  } 
-  Int    getViewIdVal( Int viewOrderIndex )                         { return m_viewIdVal[viewOrderIndex]; } 
+  Void   setBaseLayerPSCompatibilityFlag (Int layer, int val)                   { m_baseLayerPSCompatibilityFlag[layer] = val; }
+  Int    getBaseLayerPSCompatibilityFlag (Int layer)                            { return m_baseLayerPSCompatibilityFlag[layer];}
+  Bool   getAltOuputLayerFlag(Int idx)                                          { return m_altOutputLayerFlag[idx]; }
+  Void   setAltOuputLayerFlag(Int idx, Bool x)                                  { m_altOutputLayerFlag[idx] = x;    }
+
+  Bool   getRepFormatIdxPresentFlag()                                           { return m_repFormatIdxPresentFlag; }
+  Void   setRepFormatIdxPresentFlag(Bool x)                                     { m_repFormatIdxPresentFlag = x;    }
+
+  Int    getVpsNumRepFormats()                                                  { return m_vpsNumRepFormats;        }
+  Void   setVpsNumRepFormats(Int x)                                             { m_vpsNumRepFormats = x;           }
+
+  RepFormat* getVpsRepFormat(Int idx)                                           { return &m_vpsRepFormat[idx];      }
+
+  Int    getVpsRepFormatIdx(Int idx)                                            { return m_vpsRepFormatIdx[idx];    }
+  Void   setVpsRepFormatIdx(Int idx, Int x)                                     { m_vpsRepFormatIdx[idx] = x;       }         
+
+  Void   setViewIdLen( Int  val )                                               { m_viewIdLen = val;  } 
+  Int    getViewIdLen(  )                                                       { return m_viewIdLen; } 
+
+  Void   setViewIdVal( Int viewOrderIndex, Int  val )                           { m_viewIdVal[viewOrderIndex] = val;  } 
+  Int    getViewIdVal( Int viewOrderIndex )                                     { return m_viewIdVal[viewOrderIndex]; } 
   Int    getScalabilityId(Int, ScalabilityType scalType );
 
-  Int    getViewIndex    ( Int layerIdInNuh )                       { return getScalabilityId( getLayerIdxInVps(layerIdInNuh), VIEW_ORDER_INDEX  ); }    
+  Int    getViewIndex    ( Int layerIdInNuh )                                   { return getScalabilityId( getLayerIdxInVps(layerIdInNuh), VIEW_ORDER_INDEX  ); }    
 
   Int    getNumViews();
@@ -1376,8 +1373,6 @@
   Bool        m_multiLayerExtSpsFlag;
   Int         m_NumDirectRefLayers;
-#if REPN_FORMAT_IN_VPS
   Bool        m_updateRepFormatFlag;
   UInt        m_updateRepFormatIndex;
-#endif
 #if SCALINGLIST_INFERRING
   Bool        m_inferScalingListFlag;
@@ -1548,10 +1543,8 @@
   Int      getNumDirectRefLayers()                  { return  m_NumDirectRefLayers;  }
   Void     setNumDirectRefLayers(Int n)             {  m_NumDirectRefLayers = n;     }
-#if REPN_FORMAT_IN_VPS
   Bool     getUpdateRepFormatFlag()                 { return m_updateRepFormatFlag;   }
   Void     setUpdateRepFormatFlag(Bool x)           { m_updateRepFormatFlag = x;      }
   Int      getUpdateRepFormatIndex()                { return m_updateRepFormatIndex;  }
   Void     setUpdateRepFormatIndex(UInt index)      { m_updateRepFormatIndex = index; }
-#endif
 #if SCALINGLIST_INFERRING
   Bool     getInferScalingListFlag()                { return m_inferScalingListFlag;  }
@@ -2343,5 +2336,4 @@
   Int       getNumNegativeRpsCurrTempList();
 
-#if REPN_FORMAT_IN_VPS
   UInt getPicWidthInLumaSamples();
   UInt getPicHeightInLumaSamples();
@@ -2357,5 +2349,4 @@
 
   Window& getConformanceWindow();
-#endif
 
   Void setILRPic(TComPic **pcIlpPic);
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp	(revision 1203)
@@ -112,5 +112,5 @@
   }
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   TComSlice* slice = const_cast<TComSlice*> (cu.getSlice());
 #endif
@@ -118,5 +118,5 @@
   *this = QpParam(cu.getQP( 0 ),
                   toChannelType(compID),
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
                   isLuma(compID) ? slice->getQpBDOffsetY() : slice->getQpBDOffsetC(),
 #else
Index: /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1203)
@@ -78,5 +78,4 @@
 #endif
 #define POC_RESET_INFO_INFERENCE         1      ///< JCTVC-Q0146: Infer the value of poc_reset_info_present_flag when not present
-#define REPN_FORMAT_IN_VPS               1      ///< JCTVC-N0092: Signal represenation format (spatial resolution, bit depth, colour format) in the VPS
 #define SCALINGLIST_INFERRING            1      ///< JCTVC-N0371: inter-layer scaling list
 
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1203)
@@ -738,5 +738,5 @@
   {
     Window &conf = pcSPS->getConformanceWindow();
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
     READ_UVLC(   uiCode, "conf_win_left_offset" );               conf.setWindowLeftOffset  ( uiCode );
     READ_UVLC(   uiCode, "conf_win_right_offset" );              conf.setWindowRightOffset ( uiCode );
@@ -1188,5 +1188,5 @@
     pcSlice->setDependentSliceSegmentFlag(false);
   }
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   Int numCTUs = ((pcSlice->getPicWidthInLumaSamples()+sps->getMaxCUWidth()-1)/sps->getMaxCUWidth())*((pcSlice->getPicHeightInLumaSamples()+sps->getMaxCUHeight()-1)/sps->getMaxCUHeight());
 #else
@@ -1789,5 +1789,5 @@
     pcSlice->setSliceQp (26 + pps->getPicInitQPMinus26() + iCode);
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
     g_bitDepthLayer[CHANNEL_TYPE_LUMA][pcSlice->getLayerId()] = pcSlice->getBitDepthY();
     g_bitDepthLayer[CHANNEL_TYPE_CHROMA][pcSlice->getLayerId()] = pcSlice->getBitDepthC();
@@ -2336,5 +2336,5 @@
 #endif
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffsetY();
 #else
@@ -2957,5 +2957,4 @@
   vps->checkNecessaryLayerFlagCondition();  
 
-#if REPN_FORMAT_IN_VPS
   READ_UVLC( uiCode, "vps_num_rep_formats_minus1" );
   vps->setVpsNumRepFormats( uiCode + 1 );
@@ -3005,5 +3004,4 @@
     }
   }
-#endif
 
   READ_FLAG(uiCode, "max_one_active_ref_layer_flag" );
@@ -3183,5 +3181,4 @@
 }
 
-#if REPN_FORMAT_IN_VPS
 Void  TDecCavlc::parseRepFormat( RepFormat *repFormat, RepFormat *repFormatPrev )
 {
@@ -3235,5 +3232,5 @@
   }
 }
-#endif //REPN_FORMAT_IN_VPS
+
 #if VPS_DPB_SIZE_TABLE
 Void TDecCavlc::parseVpsDpbSizeTable( TComVPS *vps )
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1203)
@@ -132,7 +132,5 @@
   Void  parseVPSVUI         ( TComVPS* pcVPS );
   Void  defaultVPSVUI       ( TComVPS* pcVPS );
-#if REPN_FORMAT_IN_VPS
   Void  parseRepFormat      ( RepFormat *repFormat, RepFormat *repFormatPrev );
-#endif
 #if VPS_DPB_SIZE_TABLE
   Void  parseVpsDpbSizeTable( TComVPS *vps );
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1203)
@@ -222,5 +222,6 @@
 
   TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx());
-#if REPN_FORMAT_IN_VPS
+
+#if SVC_EXTENSION
   if( ( uiRPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getPicHeightInLumaSamples() ) )
 #else
@@ -254,5 +255,5 @@
       uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ];
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
       if ( !isLastCtuOfSliceSegment && ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) )
 #else
@@ -406,7 +407,6 @@
   TComSlice * pcSlice = pCtu->getPic()->getSlice(pCtu->getPic()->getCurrSliceIdx());
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   if( ( uiRPelX >= pcSlice->getPicWidthInLumaSamples() ) || ( uiBPelY >= pcSlice->getPicHeightInLumaSamples() ) )
-
 #else
   if( ( uiRPelX >= pcSlice->getSPS()->getPicWidthInLumaSamples() ) || ( uiBPelY >= pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
@@ -426,5 +426,5 @@
       uiTPelY = pCtu->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ];
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
       if( ( uiLPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getPicHeightInLumaSamples() ) )
 #else
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1203)
@@ -946,5 +946,5 @@
   {
     UInt uiSign;
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
     Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffsetY();
 #else
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1203)
@@ -288,12 +288,6 @@
     }
 
-#if REPN_FORMAT_IN_VPS
     rpcPic->create ( pcSlice->getPicWidthInLumaSamples(), pcSlice->getPicHeightInLumaSamples(), pcSlice->getChromaFormatIdc(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 
                      conformanceWindow, defaultDisplayWindow, numReorderPics, pcSlice->getSPS(), true);
-#else
-    rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), pcSlice->getSPS()->getChromaFormatIdc(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 
-                     conformanceWindow, defaultDisplayWindow, numReorderPics, pcSlice->getSPS(), true);
-#endif
-
 #else //SVC_EXTENSION
     rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), pcSlice->getSPS()->getChromaFormatIdc(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
@@ -345,11 +339,6 @@
   }
 
-#if REPN_FORMAT_IN_VPS
   rpcPic->create ( pcSlice->getPicWidthInLumaSamples(), pcSlice->getPicHeightInLumaSamples(), pcSlice->getChromaFormatIdc(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
                    conformanceWindow, defaultDisplayWindow, numReorderPics, pcSlice->getSPS(), true);
-#else
-  rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), pcSlice->getSPS()->getChromaFormatIdc(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
-                   conformanceWindow, defaultDisplayWindow, numReorderPics, pcSlice->getSPS(), true);
-#endif
 #else  //SVC_EXTENSION
   rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), pcSlice->getSPS()->getChromaFormatIdc(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
@@ -652,5 +641,5 @@
   for (UInt channel = 0; channel < MAX_NUM_CHANNEL_TYPE; channel++)
   {
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
     g_bitDepth[channel] = isLuma(ChannelType(channel)) ? m_apcSlicePilot->getBitDepthY() : m_apcSlicePilot->getBitDepthC();
 #else
@@ -677,5 +666,5 @@
 
   m_cSAO.destroy();
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   m_cSAO.create( m_apcSlicePilot->getPicWidthInLumaSamples(), m_apcSlicePilot->getPicHeightInLumaSamples(), sps->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxCUDepth(), pps->getSaoOffsetBitShift(CHANNEL_TYPE_LUMA), pps->getSaoOffsetBitShift(CHANNEL_TYPE_CHROMA) );
 #else
@@ -1205,5 +1194,5 @@
   xActivateParameterSets();
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   // Initialize ILRP if needed, only for the current layer  
   // ILRP intialization should go along with activation of parameters sets, 
@@ -1211,4 +1200,5 @@
   xInitILRP(m_apcSlicePilot);
 #endif
+
   if (!m_apcSlicePilot->getDependentSliceSegmentFlag()) 
   {
@@ -2284,11 +2274,6 @@
 
 #if SVC_EXTENSION
-#if !REPN_FORMAT_IN_VPS
-Void TDecTop::xInitILRP(TComSPS *pcSPS)
-#else
 Void TDecTop::xInitILRP(TComSlice *slice)
-#endif
-{
-#if REPN_FORMAT_IN_VPS
+{
   TComSPS* pcSPS = slice->getSPS();
   Int bitDepthY   = slice->getBitDepthY();
@@ -2296,14 +2281,10 @@
   Int picWidth    = slice->getPicWidthInLumaSamples();
   Int picHeight   = slice->getPicHeightInLumaSamples();
-#endif
-  if(m_layerId>0)
-  {
-#if REPN_FORMAT_IN_VPS
+
+  if( m_layerId > 0 )
+  {
+
     g_bitDepth[CHANNEL_TYPE_LUMA]     = bitDepthY;
     g_bitDepth[CHANNEL_TYPE_CHROMA]   = bitDepthC;
-#else
-    g_bitDepth[CHANNEL_TYPE_LUMA]     = pcSPS->getBitDepthY();
-    g_bitDepth[CHANNEL_TYPE_CHROMA]   = pcSPS->getBitDepthC();
-#endif
     g_uiMaxCUWidth  = pcSPS->getMaxCUWidth();
     g_uiMaxCUHeight = pcSPS->getMaxCUHeight();
@@ -2338,15 +2319,7 @@
 
 #if AUXILIARY_PICTURES
-#if REPN_FORMAT_IN_VPS
         m_cIlpPic[j]->create(picWidth, picHeight, slice->getChromaFormatIdc(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, pcSPS, true);
 #else
-        m_cIlpPic[j]->create(pcSPS->getPicWidthInLumaSamples(), pcSPS->getPicHeightInLumaSamples(), pcSPS->getChromaFormatIdc(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, pcSPS, true);
-#endif
-#else
-#if REPN_FORMAT_IN_VPS
         m_cIlpPic[j]->create(picWidth, picHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, pcSPS, true);
-#else
-        m_cIlpPic[j]->create(pcSPS->getPicWidthInLumaSamples(), pcSPS->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, pcSPS, true);
-#endif
 #endif
         for (Int i=0; i<m_cIlpPic[j]->getPicSym()->getNumberOfCtusInFrame(); i++)
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 1203)
@@ -136,8 +136,4 @@
 #if AVC_BASE
   fstream*                m_pBLReconFile;
-#if !REPN_FORMAT_IN_VPS
-  Int                     m_iBLSourceWidth;
-  Int                     m_iBLSourceHeight;
-#endif
 #endif
 
@@ -258,15 +254,6 @@
   Void      setBLReconFile( fstream* pFile )                                { m_pBLReconFile = pFile; }
   fstream*  getBLReconFile()                                                { return m_pBLReconFile;  }
-#if !REPN_FORMAT_IN_VPS
-  Void      setBLsize( Int iWidth, Int iHeight ) { m_iBLSourceWidth = iWidth; m_iBLSourceHeight = iHeight; }
-  Int       getBLWidth() { return  m_iBLSourceWidth; }
-  Int       getBLHeight() { return  m_iBLSourceHeight; }
-#endif
-#endif
-#if REPN_FORMAT_IN_VPS
+#endif
   Void      xInitILRP(TComSlice *slice);
-#else
-  Void      xInitILRP(TComSPS *pcSPS);
-#endif
   CommonDecoderParams*    getCommonDecoderParams()                          { return m_commonDecoderParams; }
   Void                    setCommonDecoderParams(CommonDecoderParams* x)    { m_commonDecoderParams = x;    }
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1203)
@@ -587,5 +587,5 @@
   if (conf.getWindowEnabledFlag())
   {
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
     WRITE_UVLC( conf.getWindowLeftOffset(),   "conf_win_left_offset"   );
     WRITE_UVLC( conf.getWindowRightOffset(),  "conf_win_right_offset"  );
@@ -1606,5 +1606,5 @@
   Int iDQp  = pcCU->getQP( uiAbsPartIdx ) - pcCU->getRefQP( uiAbsPartIdx );
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   Int qpBdOffsetY =  pcCU->getSlice()->getQpBDOffsetY();
 #else
@@ -2132,5 +2132,4 @@
   }
 
-#if REPN_FORMAT_IN_VPS
   // The value of vps_num_rep_formats_minus1 shall be in the range of 0 to 255, inclusive.
   assert( vps->getVpsNumRepFormats() > 0 && vps->getVpsNumRepFormats() <= 256 );
@@ -2166,5 +2165,4 @@
     }
   }
-#endif
 
   WRITE_FLAG(vps->getMaxOneActiveRefLayerFlag(), "max_one_active_ref_layer_flag");
@@ -2230,5 +2228,4 @@
 }
 
-#if REPN_FORMAT_IN_VPS
 Void  TEncCavlc::codeRepFormat( RepFormat *repFormat )
 {
@@ -2263,5 +2260,5 @@
   }
 }
-#endif
+
 #if VPS_DPB_SIZE_TABLE
 Void TEncCavlc::codeVpsDpbSizeTable(TComVPS *vps)
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.h	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.h	(revision 1203)
@@ -160,7 +160,5 @@
   Void codeVPSExtension        ( TComVPS* pcVPS );
   Void codeVPSVUI              ( TComVPS *vps   );
-#if REPN_FORMAT_IN_VPS
   Void  codeRepFormat          ( RepFormat *repFormat );
-#endif
 #if VPS_DPB_SIZE_TABLE
   Void  codeVpsDpbSizeTable    (TComVPS *vps);
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h	(revision 1203)
@@ -1163,5 +1163,4 @@
 
 #if SVC_EXTENSION
-#if REPN_FORMAT_IN_VPS
 struct RepFormatCfg
 {
@@ -1182,5 +1181,4 @@
 };
 std::istringstream &operator>>(std::istringstream &in, RepFormatCfg &repFormatCfg);
-#endif
 #endif //SVC_EXTENSION
 
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp	(revision 1203)
@@ -410,5 +410,5 @@
   {
     Int idQP = m_pcEncCfg->getMaxDeltaQP();
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
     iMinQP = Clip3( -rpcTempCU->getSlice()->getQpBDOffsetY(), MAX_QP, iBaseQP-idQP );
     iMaxQP = Clip3( -rpcTempCU->getSlice()->getQpBDOffsetY(), MAX_QP, iBaseQP+idQP );
@@ -446,5 +446,5 @@
   TComSlice * pcSlice = rpcTempCU->getPic()->getSlice(rpcTempCU->getPic()->getCurrSliceIdx());
   // We need to split, so don't try these modes.
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   if ( ( uiRPelX < rpcBestCU->getSlice()->getPicWidthInLumaSamples() ) &&
        ( uiBPelY < rpcBestCU->getSlice()->getPicHeightInLumaSamples() ) )
@@ -808,5 +808,5 @@
   {
     Int idQP = m_pcEncCfg->getMaxDeltaQP();
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
     iMinQP = Clip3( -rpcTempCU->getSlice()->getQpBDOffsetY(), MAX_QP, iBaseQP-idQP );
     iMaxQP = Clip3( -rpcTempCU->getSlice()->getQpBDOffsetY(), MAX_QP, iBaseQP+idQP );
@@ -858,5 +858,5 @@
         pcSubTempPartCU->initSubCU( rpcTempCU, uiPartUnitIdx, uhNextDepth, iQP );           // clear sub partition datas or init.
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
         if( ( pcSubBestPartCU->getCUPelX() < pcSlice->getPicWidthInLumaSamples() ) && ( pcSubBestPartCU->getCUPelY() < pcSlice->getPicHeightInLumaSamples() ) )
 #else
@@ -1032,5 +1032,5 @@
     iQpOffset = Int(floor( dQpOffset + 0.49999 ));
   }
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   return Clip3(-pcCU->getSlice()->getQpBDOffsetY(), MAX_QP, iBaseQp+iQpOffset );
 #else
@@ -1063,5 +1063,5 @@
 #endif
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   if( ( uiRPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getPicHeightInLumaSamples() ) )
 #else
@@ -1093,5 +1093,6 @@
       uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
       uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
-#if REPN_FORMAT_IN_VPS
+
+#if SVC_EXTENSION
       if( ( uiLPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getPicHeightInLumaSamples() ) )
 #else
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1203)
@@ -2237,5 +2237,5 @@
       }
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
       sliceQP = Clip3( -pcSlice->getQpBDOffsetY(), MAX_QP, sliceQP );
 #else
@@ -3016,5 +3016,5 @@
       const Int minCuWidth  = pcPic->getMinCUWidth();
       const Int minCuHeight = pcPic->getMinCUHeight();
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
       const Int paddedWidth = ((pcSlice->getPicWidthInLumaSamples()  + minCuWidth  - 1) / minCuWidth) * minCuWidth;
       const Int paddedHeight= ((pcSlice->getPicHeightInLumaSamples() + minCuHeight - 1) / minCuHeight) * minCuHeight;
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 1203)
@@ -876,5 +876,5 @@
   Int iDQp  = pcCU->getQP( uiAbsPartIdx ) - pcCU->getRefQP( uiAbsPartIdx );
   
-#if REPN_FORMAT_IN_VPS  
+#if SVC_EXTENSION  
   Int qpBdOffsetY =  pcCU->getSlice()->getQpBDOffsetY();
 #else
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1203)
@@ -4696,5 +4696,5 @@
   }
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
   qpMin =  bHighPass ? Clip3( -pcCU->getSlice()->getQpBDOffsetY(), MAX_QP, pcCU->getQP(0) - m_iMaxDeltaQP ) : pcCU->getQP( 0 );
   qpMax =  bHighPass ? Clip3( -pcCU->getSlice()->getQpBDOffsetY(), MAX_QP, pcCU->getQP(0) + m_iMaxDeltaQP ) : pcCU->getQP( 0 );
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 1203)
@@ -339,5 +339,5 @@
   if(eSliceType!=I_SLICE)
   {
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
     if (!(( m_pcCfg->getMaxDeltaQP() == 0 ) && (dQP == -rpcSlice->getQpBDOffsetY() ) && (rpcSlice->getPPS()->getTransquantBypassEnableFlag())))
 #else
@@ -413,5 +413,5 @@
     }
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
     iQP = max( -rpcSlice->getQpBDOffsetY(), min( MAX_QP, (Int) floor( dQP + 0.5 ) ) );
 #else
@@ -474,5 +474,5 @@
   {
     dQP = xGetQPValueAccordingToLambda( dLambda );
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
     iQP = max( -rpcSlice->getQpBDOffsetY(), min( MAX_QP, (Int) floor( dQP + 0.5 ) ) );
 #else
@@ -721,5 +721,5 @@
     pCtu->initCtu( pcPic, ctuRsAddr );
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
     Int height  = min( pcSlice->getSPS()->getMaxCUHeight(),pcSlice->getPicHeightInLumaSamples() - ctuRsAddr / pcPic->getFrameWidthInCtus() * pcSlice->getSPS()->getMaxCUHeight() );
     Int width   = min( pcSlice->getSPS()->getMaxCUWidth(),pcSlice->getPicWidthInLumaSamples() - ctuRsAddr % pcPic->getFrameWidthInCtus() * pcSlice->getSPS()->getMaxCUWidth() );
@@ -897,5 +897,5 @@
         }
 
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
         estQP     = Clip3( -pcSlice->getQpBDOffsetY(), MAX_QP, estQP );
 #else
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1202)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1203)
@@ -813,5 +813,5 @@
   for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++)
   {
-#if REPN_FORMAT_IN_VPS
+#if SVC_EXTENSION
     m_cSPS.setBitDepth    (ChannelType(channelType), m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType))            );
     m_cSPS.setQpBDOffset  (ChannelType(channelType), (6 * (m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType)) - 8)));
@@ -1408,39 +1408,4 @@
 }
 
-#if !REPN_FORMAT_IN_VPS
-Void TEncTop::xInitILRP()
-{
-  if(m_layerId>0)
-  {
-    g_bitDepthY     = m_cSPS.getBitDepthY();
-    g_bitDepthC     = m_cSPS.getBitDepthC();
-    g_uiMaxCUWidth  = m_cSPS.getMaxCUWidth();
-    g_uiMaxCUHeight = m_cSPS.getMaxCUHeight();
-    g_uiMaxCUDepth  = m_cSPS.getMaxCUDepth();
-    g_uiAddCUDepth  = max (0, m_cSPS.getLog2MinCodingBlockSize() - (Int)m_cSPS.getQuadtreeTULog2MinSize() );
-
-    Int  numReorderPics[MAX_TLAYER];
-    Window &conformanceWindow = m_cSPS.getConformanceWindow();
-    Window defaultDisplayWindow = m_cSPS.getVuiParametersPresentFlag() ? m_cSPS.getVuiParameters()->getDefaultDisplayWindow() : Window();
-
-    if (m_cIlpPic[0] == NULL)
-    {
-      for (Int j=0; j < m_numLayer; j++) // consider to set to NumDirectRefLayers[LayerIdInVps[nuh_layer_id]]
-      {
-        m_cIlpPic[j] = new  TComPic;
-#if AUXILIARY_PICTURES
-        m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, &m_cSPS, true);
-#else
-        m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, &m_cSPS, true);
-#endif
-        for (Int i=0; i<m_cIlpPic[j]->getPicSym()->getNumberOfCUsInFrame(); i++)
-        {
-          m_cIlpPic[j]->getPicSym()->getCU(i)->initCU(m_cIlpPic[j], i);
-        }
-      }
-    }
-  }
-}
-#else
 Void TEncTop::xInitILRP()
 {
@@ -1510,5 +1475,4 @@
   }
 }
-#endif
 
 Window& TEncTop::getScaledRefLayerWindowForLayer(Int layerId)
