Index: branches/SHM-6-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/SHM-6-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 765)
+++ branches/SHM-6-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 766)
@@ -1976,5 +1976,4 @@
     rpcPicYuvRec = new TComPicYuv;
 
-#if SVC_EXTENSION
 #if LAYER_CTB
 #if AUXILIARY_PICTURES
@@ -1990,7 +1989,4 @@
 #endif
 #endif
-#else
-    rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );
-#endif
 
   }
@@ -2017,4 +2013,10 @@
 Void TAppEncTop::xWriteRecon(UInt layer, Int iNumEncoded)
 {
+#if REPN_FORMAT_IN_VPS
+  ChromaFormat chromaFormatIdc = m_acLayerCfg[layer].getChromaFormatIDC();
+  Int xScal = TComSPS::getWinUnitX( chromaFormatIdc );
+  Int yScal = TComSPS::getWinUnitY( chromaFormatIdc );
+#endif
+
   if (m_isField)
   {
@@ -2039,5 +2041,10 @@
 #endif
       {
+#if REPN_FORMAT_IN_VPS
+        m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, m_acLayerCfg[layer].getConfLeft() * xScal, m_acLayerCfg[layer].getConfRight() * xScal, 
+          m_acLayerCfg[layer].getConfTop() * yScal, m_acLayerCfg[layer].getConfBottom() * yScal, m_isTopFieldFirst );
+#else
         m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, m_acLayerCfg[layer].getConfLeft(), m_acLayerCfg[layer].getConfRight(), m_acLayerCfg[layer].getConfTop(), m_acLayerCfg[layer].getConfBottom(), m_isTopFieldFirst );
+#endif
       }
     }
@@ -2063,6 +2070,11 @@
 #endif
       {
+#if REPN_FORMAT_IN_VPS
+        m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, m_acLayerCfg[layer].getConfLeft() * xScal, m_acLayerCfg[layer].getConfRight() * xScal,
+          m_acLayerCfg[layer].getConfTop() * yScal, m_acLayerCfg[layer].getConfBottom() * yScal );
+#else
         m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, m_acLayerCfg[layer].getConfLeft(), m_acLayerCfg[layer].getConfRight(),
           m_acLayerCfg[layer].getConfTop(), m_acLayerCfg[layer].getConfBottom() );
+#endif
       }
     }
