Index: /branches/HTM-8.2-dev0-Cleanup/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- /branches/HTM-8.2-dev0-Cleanup/source/App/TAppDecoder/TAppDecTop.cpp	(revision 653)
+++ /branches/HTM-8.2-dev0-Cleanup/source/App/TAppDecoder/TAppDecTop.cpp	(revision 654)
@@ -739,5 +739,9 @@
       {
         // write to file
+#if H_MV
+      if ( m_pchReconFiles[decIdx] )
+#else
         if ( m_pchReconFile )
+#endif
         {
           const Window &conf = pcPic->getConformanceWindow();
Index: /branches/HTM-8.2-dev0-Cleanup/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/HTM-8.2-dev0-Cleanup/source/App/TAppEncoder/TAppEncTop.cpp	(revision 653)
+++ /branches/HTM-8.2-dev0-Cleanup/source/App/TAppEncoder/TAppEncTop.cpp	(revision 654)
@@ -1067,22 +1067,22 @@
     Int i;
 #if H_MV
-  if( iNumEncoded > 0 )
-  {
-    TComList<TComPicYuv*>::iterator iterPicYuvRec = m_picYuvRec[layerId]->end();
+    if( iNumEncoded > 0 )
+    {
+      TComList<TComPicYuv*>::iterator iterPicYuvRec = m_picYuvRec[layerId]->end();
 #else
     TComList<TComPicYuv*>::iterator iterPicYuvRec = m_cListPicYuvRec.end();
     list<AccessUnit>::const_iterator iterBitstream = accessUnits.begin();
 #endif
-    
+
     for ( i = 0; i < iNumEncoded; i++ )
     {
       --iterPicYuvRec;
     }
-    
+
     for ( i = 0; i < iNumEncoded/2; i++ )
     {
       TComPicYuv*  pcPicYuvRecTop  = *(iterPicYuvRec++);
       TComPicYuv*  pcPicYuvRecBottom  = *(iterPicYuvRec++);
-      
+
 #if H_MV
       if (m_pchReconFileList[layerId])
@@ -1091,4 +1091,6 @@
       }
     }
+  }
+
   if( ! accessUnits.empty() )
   {
@@ -1109,5 +1111,5 @@
       const vector<UInt>& statsTop = writeAnnexB(bitstreamFile, auTop);
       rateStatsAccum(auTop, statsTop);
-      
+
       const AccessUnit& auBottom = *(iterBitstream++);
       const vector<UInt>& statsBottom = writeAnnexB(bitstreamFile, auBottom);
@@ -1120,17 +1122,17 @@
     Int i;
 #if H_MV
-  if( iNumEncoded > 0 )
-  {
-    TComList<TComPicYuv*>::iterator iterPicYuvRec = m_picYuvRec[layerId]->end();
+    if( iNumEncoded > 0 )
+    {
+      TComList<TComPicYuv*>::iterator iterPicYuvRec = m_picYuvRec[layerId]->end();
 #else
     TComList<TComPicYuv*>::iterator iterPicYuvRec = m_cListPicYuvRec.end();
     list<AccessUnit>::const_iterator iterBitstream = accessUnits.begin();
 #endif
-    
+
     for ( i = 0; i < iNumEncoded; i++ )
     {
       --iterPicYuvRec;
     }
-    
+
     for ( i = 0; i < iNumEncoded; i++ )
     {
@@ -1140,5 +1142,5 @@
       {
         m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRec, m_confLeft, m_confRight, m_confTop, m_confBottom );
-      }
+      }    
     }
   }
@@ -1157,12 +1159,13 @@
         m_cTVideoIOYuvReconFile.write( pcPicYuvRec, m_confLeft, m_confRight, m_confTop, m_confBottom );
       }
-      
+
       const AccessUnit& au = *(iterBitstream++);
       const vector<UInt>& stats = writeAnnexB(bitstreamFile, au);
-      rateStatsAccum(au, stats);
-#endif
-    }
-  }
-}
+      rateStatsAccum(au, stats);   
+    }
+#endif    
+  }
+}
+  
 /**
  *
Index: /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCu.cpp	(revision 653)
+++ /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCu.cpp	(revision 654)
@@ -1004,9 +1004,5 @@
 #endif
         // do normal intra modes
-#if H_3D_DIM_ENC
-        if (( rpcBestCU->getSlice()->getIsDepth() && rpcBestCU->getSlice()->isIRAP() ) )
-        {
-#endif
-        
+       
           // speedup for inter frames
           if( rpcBestCU->getSlice()->getSliceType() == I_SLICE || 
@@ -1060,7 +1056,4 @@
             }
           }
-#if H_3D_DIM_ENC
-        }
-#endif
         // test PCM
         if(pcPic->getSlice(0)->getSPS()->getUsePCM()
Index: /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncTop.cpp	(revision 653)
+++ /branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncTop.cpp	(revision 654)
@@ -1220,7 +1220,4 @@
     }
   }
-#if H_MV
-  }
-#endif
   if(POCCurr == 1 && slice->getPic()->isField())
   {
@@ -1230,4 +1227,8 @@
   slice->setRPS(getSPS()->getRPSList()->getReferencePictureSet(slice->getRPSidx()));
   slice->getRPS()->setNumberOfPictures(slice->getRPS()->getNumberOfNegativePictures()+slice->getRPS()->getNumberOfPositivePictures());
+#if H_MV
+  }
+#endif
+
 }
 
