Index: branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComPic.cpp
===================================================================
--- branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComPic.cpp	(revision 57)
+++ branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComPic.cpp	(revision 58)
@@ -749,6 +749,7 @@
   }
 
-  UInt   uiWidth      = this->getPicYuvRec()->getWidth() - this->getPicYuvRec()->getPicCropLeftOffset() - this->getPicYuvRec()->getPicCropRightOffset();
-  UInt   uiHeight     = this->getPicYuvRec()->getHeight() - this->getPicYuvRec()->getPicCropTopOffset() - this->getPicYuvRec()->getPicCropBottomOffset();
+  const Window &conf = this->getPicYuvRec()->getConformanceWindow();
+  UInt   uiWidth      = this->getPicYuvRec()->getWidth() - conf.getWindowLeftOffset() - conf.getWindowRightOffset();
+  UInt   uiHeight     = this->getPicYuvRec()->getHeight() - conf.getWindowTopOffset() - conf.getWindowBottomOffset();
   UInt64 uiPOC        = (UInt64)this->getPOC();
   UInt   uiPartWidth  = uiWidth / 4;
Index: branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecTop.cpp	(revision 57)
+++ branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecTop.cpp	(revision 58)
@@ -523,6 +523,7 @@
     TComPic* pBLPic = (*m_ppcTDecTop[0]->getListPic()->begin());
     fstream* pFile  = m_ppcTDecTop[0]->getBLReconFile();
-    UInt uiWidth    = pBLPic->getPicYuvRec()->getWidth() - pBLPic->getPicYuvRec()->getPicCropLeftOffset() - pBLPic->getPicYuvRec()->getPicCropRightOffset();;
-    UInt uiHeight   = pBLPic->getPicYuvRec()->getHeight() - pBLPic->getPicYuvRec()->getPicCropTopOffset() - pBLPic->getPicYuvRec()->getPicCropBottomOffset();
+    const Window &conf = pBLPic->getConformanceWindow();
+    UInt uiWidth    = pBLPic->getPicYuvRec()->getWidth() - conf.getWindowLeftOffset() - conf.getWindowRightOffset();
+    UInt uiHeight   = pBLPic->getPicYuvRec()->getHeight() - conf.getWindowTopOffset() - conf.getWindowBottomOffset();
         
     if( pFile->good() )
@@ -962,10 +963,14 @@
 #if AVC_SYNTAX
           TComSPS* sps = new TComSPS();
-          pBLPic->create( m_ppcTDecTop[0]->getBLWidth(), m_ppcTDecTop[0]->getBLHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, sps, true);
-#else
-          pBLPic->create( m_ppcTDecTop[0]->getBLWidth(), m_ppcTDecTop[0]->getBLHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL, true);
-#endif
-#else
-          pBLPic->create( m_ppcTDecTop[0]->getBLWidth(), m_ppcTDecTop[0]->getBLHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true);
+          Int  numReorderPics[MAX_TLAYER];
+          Window &conformanceWindow = sps->getConformanceWindow();
+          Window defaultDisplayWindow = sps->getVuiParametersPresentFlag() ? sps->getVuiParameters()->getDefaultDisplayWindow() : Window();
+
+          pBLPic->create( m_ppcTDecTop[0]->getBLWidth(), m_ppcTDecTop[0]->getBLHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, sps, true);
+#else
+          pBLPic->create( m_ppcTDecTop[0]->getBLWidth(), m_ppcTDecTop[0]->getBLHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL, onformanceWindow, defaultDisplayWindow, numReorderPics, true);
+#endif
+#else
+          pBLPic->create( m_ppcTDecTop[0]->getBLWidth(), m_ppcTDecTop[0]->getBLHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, onformanceWindow, defaultDisplayWindow, numReorderPics, true);
 #endif
         }
