Index: branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 27)
+++ branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 28)
@@ -237,5 +237,12 @@
   xReadFlag( uiCode ); pcSPS->setUseSAO       ( uiCode ? true : false );
 #endif
-
+#if POZNAN_DBMP
+	  xReadFlag( uiCode );
+	  pcSPS->setDBMP  ( uiCode );
+#endif
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+	  xReadFlag( uiCode );
+	  pcSPS->setUseCUSkip ( uiCode );
+#endif
   xReadFlag( uiCode ); // SPS base view flag
   if( uiCode )
@@ -270,4 +277,17 @@
       xReadFlag( uiCode );
       pcSPS->setUseMVI( uiCode ? true : false );
+#endif
+#if POZNAN_NONLINEAR_DEPTH
+#if POZNAN_NONLINEAR_DEPTH_SEND_AS_BYTE
+      uiCode = 0;
+      xReadCode(8, uiCode);
+      pcSPS->setDepthPower(dequantizeDepthPower(uiCode));
+#else
+      uiCode = 0;
+      xReadCode(sizeof(float)*8, uiCode); // We do not send seign
+      //uiCode &= ~0x80000000;
+      pcSPS->setDepthPower(*((float*)&uiCode));  
+#endif
+      printf("\nfDepthPower = %f", pcSPS->getDepthPower());
 #endif
     }
@@ -325,4 +345,8 @@
       pcSPS->setMultiviewResPredMode  ( uiMultiviewResPredMode );
 #endif
+#endif
+#if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH
+      xReadFlag( uiCode );
+      pcSPS->setUseTexDqpAccordingToDepth( uiCode ? true : false );
 #endif
 #if HHI_MPI
@@ -2621,5 +2645,5 @@
 
 
-#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
+#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_DBMP
 Void 
 TDecCavlc::parseMergeIndexMV( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth )
@@ -2632,4 +2656,8 @@
     uiNumCand++;
 #endif
+#if POZNAN_DBMP
+  UInt uiModIdx;
+  const Bool bDBMPAvailable = pcCU->getSlice()->getMP()->isDBMPEnabled();
+#endif
   for( UInt uiIdx = 0; uiIdx < MRG_MAX_NUM_CANDS; uiIdx++ )
   {
@@ -2656,15 +2684,43 @@
     if( uiIdx > uiMviMergePos )
     {
+#if POZNAN_DBMP
+	  if(bDBMPAvailable)
+	  {
+		  if(uiIdx==POZNAN_DBMP_MERGE_POS) uiModIdx = POZNAN_DBMP_MRG_CAND;
+		  else if(uiIdx>POZNAN_DBMP_MERGE_POS) uiModIdx = uiIdx--;
+		  else uiModIdx = uiIdx;
+	  }
+	  else uiModIdx = uiIdx;
+	  if( pcCU->getNeighbourCandIdx( uiModIdx-1, uiAbsPartIdx ) != uiModIdx )
+	  {
+        ruiMergeIndex++;
+      }
+#else
       if( pcCU->getNeighbourCandIdx( uiIdx - 1, uiAbsPartIdx ) != uiIdx )
       {
         ruiMergeIndex++;
       }
+#endif
     }
     else if( uiIdx < uiMviMergePos )
 #endif
+#if POZNAN_DBMP
+	if(bDBMPAvailable)
+	{
+	  if(uiIdx==POZNAN_DBMP_MERGE_POS) uiModIdx = POZNAN_DBMP_MRG_CAND;
+	  else if(uiIdx>POZNAN_DBMP_MERGE_POS) uiModIdx = uiIdx--;
+	  else uiModIdx = uiIdx;
+	}
+	else uiModIdx = uiIdx;
+	if( pcCU->getNeighbourCandIdx( uiModIdx, uiAbsPartIdx ) != uiModIdx + 1 )
+	{
+	  ruiMergeIndex++;
+	}
+#else
     if( pcCU->getNeighbourCandIdx( uiIdx, uiAbsPartIdx ) != uiIdx + 1 )
     {
       ruiMergeIndex++;
     }
+#endif
   }
 #if HHI_MPI
@@ -2676,4 +2732,11 @@
   {
     pcCU->setTextureModeDepthSubParts( uiDepth, uiAbsPartIdx, uiDepth );
+  }
+#endif
+#if POZNAN_DBMP
+  if(bDBMPAvailable)
+  {	  
+	if(ruiMergeIndex==POZNAN_DBMP_MERGE_POS) ruiMergeIndex = POZNAN_DBMP_MRG_CAND;
+	else if(ruiMergeIndex>POZNAN_DBMP_MERGE_POS) ruiMergeIndex--;
   }
 #endif
@@ -2691,5 +2754,5 @@
 Void TDecCavlc::parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth )
 {
-#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
+#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_DBMP
   if(
 #if HHI_INTER_VIEW_MOTION_PRED
@@ -2698,4 +2761,7 @@
 #if HHI_MPI
       ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ||
+#endif
+#if	POZNAN_DBMP  
+	  ( pcCU->getSlice()->getMP()->isDBMPEnabled() ) ||
 #endif
       0
Index: branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 27)
+++ branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 28)
@@ -195,5 +195,5 @@
   Void parseMergeFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
   Void parseMergeIndex      ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
-#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
+#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_DBMP
   Void parseMergeIndexMV    ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
 #endif
Index: branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCu.cpp	(revision 27)
+++ branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCu.cpp	(revision 28)
@@ -49,4 +49,10 @@
   m_ppcYuvReco    = NULL;
   m_ppcYuvResPred = NULL;
+#if POZNAN_AVAIL_MAP
+  m_ppcYuvAvail   = NULL;
+#endif
+#if POZNAN_SYNTH_VIEW
+  m_ppcYuvSynth   = NULL;
+#endif
   m_ppcCU         = NULL;
 }
@@ -75,4 +81,10 @@
   m_ppcYuvReco    = new TComYuv*    [m_uiMaxDepth-1];
   m_ppcYuvResPred = new TComYuv*    [m_uiMaxDepth-1];
+#if POZNAN_AVAIL_MAP
+  m_ppcYuvAvail   = new TComYuv*    [m_uiMaxDepth-1];
+#endif
+#if POZNAN_SYNTH_VIEW
+  m_ppcYuvSynth   = new TComYuv*    [m_uiMaxDepth-1];
+#endif
   m_ppcCU         = new TComDataCU* [m_uiMaxDepth-1];
   
@@ -87,4 +99,11 @@
     m_ppcYuvReco   [ui] = new TComYuv;    m_ppcYuvReco   [ui]->create( uiWidth, uiHeight );
     m_ppcYuvResPred[ui] = new TComYuv;    m_ppcYuvResPred[ui]->create( uiWidth, uiHeight );
+#if POZNAN_AVAIL_MAP
+    m_ppcYuvAvail  [ui] = new TComYuv;    m_ppcYuvAvail  [ui]->create( uiWidth, uiHeight );
+#endif
+#if POZNAN_SYNTH_VIEW
+    m_ppcYuvSynth  [ui] = new TComYuv;    m_ppcYuvSynth  [ui]->create( uiWidth, uiHeight );
+#endif
+
     m_ppcCU        [ui] = new TComDataCU; m_ppcCU        [ui]->create( uiNumPartitions, uiWidth, uiHeight, true );
   }
@@ -106,4 +125,10 @@
     m_ppcYuvReco   [ui]->destroy(); delete m_ppcYuvReco   [ui]; m_ppcYuvReco   [ui] = NULL;
     m_ppcYuvResPred[ui]->destroy(); delete m_ppcYuvResPred[ui]; m_ppcYuvResPred[ui] = NULL;
+#if POZNAN_AVAIL_MAP
+    m_ppcYuvAvail  [ui]->destroy(); delete m_ppcYuvAvail  [ui]; m_ppcYuvAvail  [ui] = NULL;
+#endif
+#if POZNAN_SYNTH_VIEW
+    m_ppcYuvSynth  [ui]->destroy(); delete m_ppcYuvSynth  [ui]; m_ppcYuvSynth  [ui] = NULL;
+#endif
     m_ppcCU        [ui]->destroy(); delete m_ppcCU        [ui]; m_ppcCU        [ui] = NULL;
   }
@@ -112,4 +137,11 @@
   delete [] m_ppcYuvReco;    m_ppcYuvReco    = NULL;
   delete [] m_ppcYuvResPred; m_ppcYuvResPred = NULL;
+#if POZNAN_AVAIL_MAP
+  delete [] m_ppcYuvAvail;   m_ppcYuvAvail   = NULL;
+#endif
+#if POZNAN_SYNTH_VIEW
+  delete [] m_ppcYuvSynth;   m_ppcYuvSynth   = NULL;
+#endif
+
   delete [] m_ppcCU;         m_ppcCU         = NULL;
 }
@@ -184,4 +216,44 @@
 {
   TComPic* pcPic = pcCU->getPic();
+
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+  Bool bWholeCUCanBeSynthesized = false;
+  Bool bOneSubCUCanNotBeSynthesied = false;
+  Bool bSubCUCanBeSynthesized[4];
+  Bool * pbSubCUCanBeSynthesized = bSubCUCanBeSynthesized;
+  pcPic->checkSynthesisAvailability(pcCU, pcCU->getAddr(), uiAbsPartIdx, uiDepth, pbSubCUCanBeSynthesized); //KUBA SYNTH
+  Int  iSubCUCanNotBeSynthesized = 0;
+  Int  iSubCUCanBeSynthesizedCnt = 0;
+  for(Int i = 0; i < 4; i++)
+  {
+    if (!bSubCUCanBeSynthesized[i])
+    {
+      iSubCUCanNotBeSynthesized = i;
+    }
+    else
+    {
+      iSubCUCanBeSynthesizedCnt ++;
+    }
+  }
+  if(iSubCUCanBeSynthesizedCnt == 4)
+  {
+    bWholeCUCanBeSynthesized = true;
+  }
+  else if(iSubCUCanBeSynthesizedCnt == 3)
+  {
+    bOneSubCUCanNotBeSynthesied = true;
+  }
+
+  if(bWholeCUCanBeSynthesized)
+  {
+    pcCU->setPredModeSubParts( MODE_SYNTH, uiAbsPartIdx, uiDepth );
+    pcCU->setDepthSubParts( uiDepth, uiAbsPartIdx );
+    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
+    pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
+    //pcCU->setSizeSubParts( pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth, pcCU->getSlice()->getSPS()->getMaxCUHeight()>>uiDepth, uiAbsPartIdx, uiDepth );
+    return;    
+  }
+#endif
+
   UInt uiCurNumParts    = pcPic->getNumPartInCU() >> (uiDepth<<1);
   UInt uiQNumParts      = uiCurNumParts>>2;
@@ -195,4 +267,11 @@
   if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) )
   {
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+    if(bOneSubCUCanNotBeSynthesied && (uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth )) // Check if CU has 3 synthesied subCU - no split flag is send in that case and CU split is assumed
+    {
+      pcCU->setDepthSubParts( uiDepth + 1, uiAbsPartIdx );
+    }
+    else 
+#endif
 #if HHI_MPI
     if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) )
@@ -367,4 +446,10 @@
 {
   TComPic* pcPic = pcCU->getPic();
+#if POZNAN_SYNTH_VIEW
+  if(pcPic->getPicYuvSynth())  m_ppcYuvSynth[uiDepth]->copyFromPicYuv( pcPic->getPicYuvSynth(), pcCU->getAddr(), uiAbsPartIdx );
+#endif
+#if POZNAN_AVAIL_MAP
+  if(pcPic->getPicYuvAvail())  m_ppcYuvAvail[uiDepth]->copyFromPicYuv( pcPic->getPicYuvAvail(), pcCU->getAddr(), uiAbsPartIdx );
+#endif
   
   Bool bBoundary = false;
@@ -411,4 +496,15 @@
       xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
       break;
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+    case MODE_SYNTH:
+    //  break;
+#if POZNAN_FILL_OCCLUDED_CU_WITH_SYNTHESIS
+      m_ppcYuvReco[uiDepth]->copyFromPicYuv(pcPic->getPicYuvSynth(), pcCU->getAddr(), uiAbsPartIdx);
+#else
+      m_ppcYuvReco[uiDepth]->copyFromPicYuv(pcPic->getPicYuvAvail(), pcCU->getAddr(), uiAbsPartIdx); //Poprawiæ
+#endif
+      //m_ppcYuvReco[uiDepth]->clear();
+      break;
+#endif
     default:
       assert(0);
@@ -485,5 +581,9 @@
     m_pcPrediction->predIntraLumaAng( pcPattern, pcCU->getLumaIntraDir(uiPartIdx), pPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail );
     
+#if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH
+    m_pcTrQuant->setQPforQuant( pcCU->getQP(uiPartIdx) + pcCU->getQpOffsetForTextCU(uiPartIdx, true), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA );
+#else
     m_pcTrQuant->setQPforQuant( pcCU->getQP(uiPartIdx), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA );
+#endif
 #if INTRA_DST_TYPE_7
   m_pcTrQuant->invtransformNxN(TEXT_LUMA, pcCU->getLumaIntraDir(uiPartIdx), pResi, uiStride, pCoeff, uiWidth, uiHeight );
@@ -682,5 +782,9 @@
   }
   //===== inverse transform =====
+#if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH
+    m_pcTrQuant->setQPforQuant( pcCU->getQP(0) + pcCU->getQpOffsetForTextCU(uiAbsPartIdx, true), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA );
+#else
   m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA );
+#endif
 #if INTRA_DST_TYPE_7
   m_pcTrQuant->invtransformNxN( TEXT_LUMA, pcCU->getLumaIntraDir( uiAbsPartIdx ), piResi, uiStride, pcCoeff, uiWidth, uiHeight );
@@ -789,5 +893,9 @@
 
   //===== inverse transform =====
+#if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH
+  m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0) + pcCU->getQpOffsetForTextCU(uiAbsPartIdx, true), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), eText );
+#else
   m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), eText );
+#endif
 #if INTRA_DST_TYPE_7 
   m_pcTrQuant->invtransformNxN( eText, REG_DCT, piResi, uiStride, pcCoeff, uiWidth, uiHeight );
@@ -965,9 +1073,18 @@
   piCoeff = pcCU->getCoeffY();
   pResi = m_ppcYuvResi[uiDepth]->getLumaAddr();
+#if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH
+  Int QPoffset = pcCU->getQpOffsetForTextCU(uiAbsPartIdx, false);
+  m_pcTrQuant->setQPforQuant  ( pcCU->getQP(uiAbsPartIdx) + QPoffset, !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA );
+#else
   m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA );
+#endif
   m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_LUMA, pResi, 0, m_ppcYuvResi[uiDepth]->getStride(), uiWidth, uiHeight, uiLumaTrMode, 0, piCoeff );
   
   // Cb and Cr
+#if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH
+    m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ) + QPoffset, !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA );
+#else
   m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA );
+#endif
   
   uiWidth  >>= 1;
Index: branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCu.h
===================================================================
--- branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCu.h	(revision 27)
+++ branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCu.h	(revision 28)
@@ -61,4 +61,10 @@
   TComYuv**           m_ppcYuvReco;       ///< array of prediction & reconstruction buffer
   TComYuv**           m_ppcYuvResPred;    ///< residual prediction buffer
+#if POZNAN_AVAIL_MAP
+  TComYuv**           m_ppcYuvAvail;      ///< array of available map buffer
+#endif
+#if POZNAN_SYNTH_VIEW
+  TComYuv**           m_ppcYuvSynth;      ///< array of synth buffer
+#endif
   TComDataCU**        m_ppcCU;            ///< CU data array
   
Index: branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 27)
+++ branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 28)
@@ -430,4 +430,15 @@
   pcCU->setInterDirSubParts( puhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, uiPartIdx, uiDepth );
 
+#if POZNAN_DBMP_CALC_PRED_DATA
+  Int ref_idx0_DBMP,ref_idx1_DBMP;
+  TComMv cMv0_DBMP( 0, 0 ),cMv1_DBMP( 0, 0 );
+  if(uiMergeIndex==POZNAN_DBMP_MRG_CAND)
+  {	
+    pcCU->getCUMvField2nd( REF_PIC_LIST_0 )->setAllMvField( pcMvFieldNeighbours[ 2*uiMergeIndex ].getMv(), pcMvFieldNeighbours[ 2*uiMergeIndex ].getRefIdx(), eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth );
+    pcCU->getCUMvField2nd( REF_PIC_LIST_1 )->setAllMvField( pcMvFieldNeighbours[ 2*uiMergeIndex + 1 ].getMv(), pcMvFieldNeighbours[ 2*uiMergeIndex + 1 ].getRefIdx(), eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth );	
+    pcCU->getSlice()->getMP()->calcDBMPPredData(pcCU, uiAbsPartIdx, ref_idx0_DBMP, cMv0_DBMP, ref_idx1_DBMP, cMv1_DBMP);
+  }
+#endif
+
   TComMv cTmpMv( 0, 0 );
   if ( pcCU->getSlice()->getNumRefIdx( REF_PIC_LIST_0 ) > 0  ) //if ( ref. frame list0 has at least 1 entry )
@@ -436,4 +447,9 @@
     pcCU->setMVPNumSubParts( 0, REF_PIC_LIST_0, uiAbsPartIdx, uiPartIdx, uiDepth);
     pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvd( cTmpMv, eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth );
+#if POZNAN_DBMP_CALC_PRED_DATA
+    if(uiMergeIndex==POZNAN_DBMP_MRG_CAND) 
+       pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMv0_DBMP, ref_idx0_DBMP, eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth );
+    else
+#endif
     pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( pcMvFieldNeighbours[ 2*uiMergeIndex ].getMv(), pcMvFieldNeighbours[ 2*uiMergeIndex ].getRefIdx(), eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth );
 
@@ -444,4 +460,9 @@
     pcCU->setMVPNumSubParts( 0, REF_PIC_LIST_1, uiAbsPartIdx, uiPartIdx, uiDepth);
     pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvd( cTmpMv, eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth );
+#if POZNAN_DBMP_CALC_PRED_DATA
+    if(uiMergeIndex==POZNAN_DBMP_MRG_CAND)
+       pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMv1_DBMP, ref_idx1_DBMP, eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth );
+    else
+#endif
     pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( pcMvFieldNeighbours[ 2*uiMergeIndex + 1 ].getMv(), pcMvFieldNeighbours[ 2*uiMergeIndex + 1 ].getRefIdx(), eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth );
   }
Index: branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecGop.cpp
===================================================================
--- branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecGop.cpp	(revision 27)
+++ branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecGop.cpp	(revision 28)
@@ -199,4 +199,14 @@
 #endif
 
+#if POZNAN_MP
+	if( uiStartCUAddr == 0 )
+    {
+#if POZNAN_MP_USE_DEPTH_MAP_GENERATION
+	  pcSlice->getMP()->setDepthMapGenerator(m_pcDepthMapGenerator);
+#endif
+      pcSlice->getMP()->pairMultiview(rpcPic);
+	}
+#endif
+
     // decode slice
     m_pcSliceDecoder->decompressSlice(pcBitstream, rpcPic);
Index: branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 27)
+++ branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 28)
@@ -579,5 +579,5 @@
 
 
-#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
+#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_DBMP
 Void TDecSbac::parseMergeIndexMV( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -585,4 +585,8 @@
   const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE;
   const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : MRG_MAX_NUM_CANDS;
+#endif
+#if POZNAN_DBMP
+  const Bool bDBMPAvailable = pcCU->getSlice()->getMP()->isDBMPEnabled();
+  Bool bDBMPModifyMergeIdx = true;
 #endif
   //--- set number of candidates and availability ---
@@ -611,4 +615,32 @@
     }
   }
+
+#if POZNAN_DBMP
+  if(bDBMPAvailable)
+  {
+    UInt uiDBMPMergePos = POZNAN_DBMP_MERGE_POS;
+#if HHI_MPI
+	if(bMVIAvailable && uiDBMPMergePos>=uiMviMergePos) uiDBMPMergePos++;
+#endif
+	for( Int iIdx = MRG_MAX_NUM_CANDS-2; iIdx >= (Int)uiDBMPMergePos; iIdx-- )
+	{
+		Int iWrIdx = iIdx+1;
+#if HHI_MPI
+		if(bMVIAvailable) 
+		{
+			if(iIdx==(Int)uiMviMergePos) continue;
+			if(iWrIdx==(Int)uiMviMergePos) iWrIdx++;
+		}
+#endif
+		if(iWrIdx>=MRG_MAX_NUM_CANDS) continue;
+
+		abAvailable[ iWrIdx ] = abAvailable[ iIdx ];
+	}
+	abAvailable[ uiDBMPMergePos ] = ( pcCU->getNeighbourCandIdx( POZNAN_DBMP_MRG_CAND, uiAbsPartIdx ) == POZNAN_DBMP_MRG_CAND + 1 );
+	
+	uiNumCand = 0; for( UInt uiIdx = 0; uiIdx < MRG_MAX_NUM_CANDS; uiIdx++ ) if(abAvailable[ uiIdx ]) uiNumCand++;
+  }
+#endif
+
   AOF( uiNumCand > 1 );
 
@@ -665,4 +697,15 @@
   {
     pcCU->setTextureModeDepthSubParts( uiDepth, uiAbsPartIdx, uiDepth );
+#if POZNAN_DBMP
+	bDBMPModifyMergeIdx = false;
+#endif
+  }
+#endif
+
+#if POZNAN_DBMP
+  if(bDBMPAvailable && bDBMPModifyMergeIdx)
+  {
+	if(ruiMergeIndex==POZNAN_DBMP_MERGE_POS) ruiMergeIndex = POZNAN_DBMP_MRG_CAND;
+	else if(ruiMergeIndex>POZNAN_DBMP_MERGE_POS) ruiMergeIndex--;
   }
 #endif
@@ -694,5 +737,5 @@
 Void TDecSbac::parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth )
 {
-#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
+#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_DBMP
   if(
 #if HHI_INTER_VIEW_MOTION_PRED
@@ -701,4 +744,7 @@
 #if HHI_MPI
       ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ||
+#endif
+#if	POZNAN_DBMP  
+	  ( pcCU->getSlice()->getMP()->isDBMPEnabled() ) ||
 #endif
       0
Index: branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecSbac.h	(revision 27)
+++ branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecSbac.h	(revision 28)
@@ -144,5 +144,5 @@
   Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
   Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
-#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
+#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_DBMP
   Void parseMergeIndexMV  ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
 #endif
Index: branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecTop.cpp	(revision 27)
+++ branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecTop.cpp	(revision 28)
@@ -53,4 +53,10 @@
     m_aaiCodedScale       [ uiId ] = new Int [ MAX_NUMBER_VIEWS ];
   }
+#if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION)
+  xCreateLUTs   ( (UInt)MAX_NUMBER_VIEWS, (UInt)MAX_NUMBER_VIEWS,  m_adBaseViewShiftLUT,  m_aiBaseViewShiftLUT);
+
+  m_iLog2Precision   = LOG2_DISP_PREC_LUT;
+  m_uiBitDepthForLUT = 8; //fixed
+#endif
 }
 
@@ -66,4 +72,9 @@
   delete [] m_aiViewOrderIndex;
   delete [] m_aiViewReceived;
+
+#if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION)
+  xDeleteArray( m_adBaseViewShiftLUT,        MAX_NUMBER_VIEWS, MAX_NUMBER_VIEWS,  2 );
+  xDeleteArray( m_aiBaseViewShiftLUT,        MAX_NUMBER_VIEWS, MAX_NUMBER_VIEWS,  2 );
+#endif
 }
 
@@ -78,5 +89,124 @@
   m_iLastPOC                = -1;
   m_uiMaxViewId             = 0;
-}
+#if POZNAN_NONLINEAR_DEPTH
+  m_fDepthPower             = 1.0;
+#endif
+}
+
+#if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION)
+Void
+CamParsCollector::xCreateLUTs( UInt uiNumberSourceViews, UInt uiNumberTargetViews, Double****& radLUT, Int****& raiLUT)
+{
+  //AOF( m_uiBitDepthForLUT == 8 );
+  //AOF(radLUT == NULL && raiLUT == NULL );
+
+  uiNumberSourceViews = Max( 1, uiNumberSourceViews );
+  uiNumberTargetViews = Max( 1, uiNumberTargetViews );
+
+  radLUT         = new Double***[ uiNumberSourceViews ];
+  raiLUT         = new Int   ***[ uiNumberSourceViews ];
+
+  for( UInt uiSourceView = 0; uiSourceView < uiNumberSourceViews; uiSourceView++ )
+  {
+    radLUT        [ uiSourceView ] = new Double**[ uiNumberTargetViews ];
+    raiLUT        [ uiSourceView ] = new Int   **[ uiNumberTargetViews ];
+
+    for( UInt uiTargetView = 0; uiTargetView < uiNumberTargetViews; uiTargetView++ )
+    {
+      radLUT        [ uiSourceView ][ uiTargetView ]      = new Double*[ 2 ];
+      radLUT        [ uiSourceView ][ uiTargetView ][ 0 ] = new Double [ 257 ];
+      radLUT        [ uiSourceView ][ uiTargetView ][ 1 ] = new Double [ 257 ];
+
+      raiLUT        [ uiSourceView ][ uiTargetView ]      = new Int*   [ 2 ];
+      raiLUT        [ uiSourceView ][ uiTargetView ][ 0 ] = new Int    [ 257 ];
+      raiLUT        [ uiSourceView ][ uiTargetView ][ 1 ] = new Int    [ 257 ];
+    }
+  }
+}
+
+Void 
+CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT)
+{
+  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
+  Int     iLog2DivChroma = iLog2DivLuma + 1;
+
+  iOffset <<= m_uiBitDepthForLUT;
+
+  Double dScale  = (Double) iScale  / (( Double ) ( 1 << iLog2DivLuma ));
+  Double dOffset = (Double) iOffset / (( Double ) ( 1 << iLog2DivLuma ));
+
+  // offsets including rounding offsets
+  Int64 iOffsetLuma   = iOffset + ( ( 1 << iLog2DivLuma   ) >> 1 );
+  Int64 iOffsetChroma = iOffset + ( ( 1 << iLog2DivChroma ) >> 1 );
+
+#if POZNAN_NONLINEAR_DEPTH
+  TComNonlinearDepthBackward cNonlinearDepthBwd(m_fDepthPower, (POZNAN_LUT_INCREASED_PRECISION) ? g_uiBitIncrement : 0, (POZNAN_LUT_INCREASED_PRECISION) ? g_uiBitIncrement : 0);
+#endif
+
+  for( UInt uiDepthValue = 0; uiDepthValue < 256; uiDepthValue++ )
+  {
+    Double  dDepthValue = (Double)uiDepthValue;
+    Int64   iDepthValue = (Int64)uiDepthValue;
+#if POZNAN_NONLINEAR_DEPTH
+    dDepthValue = cNonlinearDepthBwd(dDepthValue);
+    iDepthValue = (Int64)(dDepthValue+0.5);
+#endif
+#if POZNAN_LUT_INCREASED_PRECISION
+    dDepthValue /= (1<<g_uiBitIncrement);
+#endif
+
+    // real-valued look-up tables
+    Double  dShiftLuma      = ( dDepthValue * dScale + dOffset ) * Double( 1 << m_iLog2Precision );
+    Double  dShiftChroma    = dShiftLuma / 2;
+    radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ uiDepthValue ] = dShiftLuma;
+    radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ uiDepthValue ] = dShiftChroma;
+
+    // integer-valued look-up tables
+    Int64   iTempScale      = iDepthValue * iScale;
+#if POZNAN_LUT_INCREASED_PRECISION
+    iTempScale >>= g_uiBitIncrement;
+#endif
+    Int64   iTestScale      = ( iTempScale + iOffset       );   // for checking accuracy of camera parameters
+    Int64   iShiftLuma      = ( iTempScale + iOffsetLuma   ) >> iLog2DivLuma;
+    Int64   iShiftChroma    = ( iTempScale + iOffsetChroma ) >> iLog2DivChroma;
+    raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ uiDepthValue ] = (Int)iShiftLuma;
+    raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ uiDepthValue ] = (Int)iShiftChroma;
+
+    // maximum deviation
+    //dMaxDispDev     = Max( dMaxDispDev,    fabs( Double( (Int) iTestScale   ) - dShiftLuma * Double( 1 << iLog2DivLuma ) ) / Double( 1 << iLog2DivLuma ) );
+    //dMaxRndDispDvL  = Max( dMaxRndDispDvL, fabs( Double( (Int) iShiftLuma   ) - dShiftLuma   ) );
+    //dMaxRndDispDvC  = Max( dMaxRndDispDvC, fabs( Double( (Int) iShiftChroma ) - dShiftChroma ) );
+  }
+
+  radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 256 ] = radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 255 ];
+  radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 256 ] = radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 255 ];
+  raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 256 ] = raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 255 ];
+  raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 256 ] = raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 255 ];
+}
+
+Bool
+CamParsCollector::getNearestBaseView( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft)
+{
+  /*
+  riNearestViewIdx = 0;
+
+  Bool bDecencdingVN = ( m_aiSortedBaseViews.size() >= 2 && m_aiSortedBaseViews[ 0 ] > m_aiSortedBaseViews[ 1 ] );
+  Int  iFactor       = ( bDecencdingVN ? -1 : 1 );
+
+  if( ( m_aiBaseId2SortedId[iSynthViewIdx] - m_aiBaseId2SortedId[riNearestViewIdx] ) * iFactor  <= 0 )
+  {
+    rbRenderFromLeft = true;
+  }
+  else
+  {
+    rbRenderFromLeft = false;
+  }
+
+  riRelDistToLeft = 128; //Not used for now;
+//*/
+  return true;
+}
+
+#endif
 
 Void
@@ -102,5 +232,14 @@
   if ( pcSlice->getSPS()->isDepth  () )
   {
+#if POZNAN_NONLINEAR_DEPTH
+    m_fDepthPower = pcSlice->getSPS()->getDepthPower();
+#endif
     return;
+  }
+  else
+  {
+#if POZNAN_NONLINEAR_DEPTH
+    pcSlice->getSPS()->setDepthPower(m_fDepthPower); // OLGIERD: ToDo - QP-Tex should not use getDepthPower() from texture SPS.
+#endif
   }
   Bool  bFirstAU          = ( pcSlice->getPOC()               == 0 );
@@ -161,4 +300,8 @@
         m_aaiCodedScale [ uiViewId ][ uiBaseId ]  = pcSlice->getInvCodedScale () [ uiBaseId ];
         m_aaiCodedOffset[ uiViewId ][ uiBaseId ]  = pcSlice->getInvCodedOffset() [ uiBaseId ];
+#if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION)
+        xInitLUTs(uiBaseId,uiViewId,m_aaiCodedScale [ uiBaseId ][ uiViewId ],m_aaiCodedOffset[ uiBaseId ][ uiViewId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
+        xInitLUTs(uiViewId,uiBaseId,m_aaiCodedScale [ uiViewId ][ uiBaseId ],m_aaiCodedOffset[ uiViewId ][ uiBaseId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
+#endif
       }
       else
@@ -168,4 +311,8 @@
         m_aaiCodedScale [ uiViewId ][ uiBaseId ]  = pcSlice->getSPS()->getInvCodedScale () [ uiBaseId ];
         m_aaiCodedOffset[ uiViewId ][ uiBaseId ]  = pcSlice->getSPS()->getInvCodedOffset() [ uiBaseId ];
+#if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION)
+        xInitLUTs(uiBaseId,uiViewId,m_aaiCodedScale [ uiBaseId ][ uiViewId ],m_aaiCodedOffset[ uiBaseId ][ uiViewId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
+        xInitLUTs(uiViewId,uiBaseId,m_aaiCodedScale [ uiViewId ][ uiBaseId ],m_aaiCodedOffset[ uiViewId ][ uiBaseId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
+#endif
       }
     }
@@ -182,4 +329,8 @@
         m_aaiCodedScale [ uiViewId ][ uiBaseId ]  = pcSlice->getInvCodedScale () [ uiBaseId ];
         m_aaiCodedOffset[ uiViewId ][ uiBaseId ]  = pcSlice->getInvCodedOffset() [ uiBaseId ];
+#if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION)
+        xInitLUTs(uiBaseId,uiViewId,m_aaiCodedScale [ uiBaseId ][ uiViewId ],m_aaiCodedOffset[ uiBaseId ][ uiViewId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
+        xInitLUTs(uiViewId,uiBaseId,m_aaiCodedScale [ uiViewId ][ uiBaseId ],m_aaiCodedOffset[ uiViewId ][ uiBaseId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
+#endif
       }
     }
@@ -269,4 +420,7 @@
   m_bFirstSliceInSequence   = true;
   m_pcCamParsCollector = 0;
+#if POZNAN_MP
+  m_pcMP = NULL;
+#endif
 }
 
@@ -299,4 +453,8 @@
 #if HHI_INTER_VIEW_RESIDUAL_PRED
   m_cResidualGenerator.destroy();
+#endif
+
+#if POZNAN_MP
+  m_pcMP = NULL;
 #endif
 }
@@ -336,4 +494,8 @@
   m_cResidualGenerator.init( &m_cTrQuant, &m_cDepthMapGenerator );
 #endif
+
+#if POZNAN_MP
+  m_pcMP = pcTAppDecTop->getMP();
+#endif
 }
 
@@ -462,4 +624,13 @@
 #if HHI_INTERVIEW_SKIP
     pcPic->removeUsedPelsMapBuffer();
+#endif
+#if POZNAN_AVAIL_MAP
+    pcPic->removeAvailabilityBuffer();
+#endif
+#if POZNAN_SYNTH_VIEW
+    pcPic->removeSynthesisBuffer();
+#endif
+#if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH
+    pcPic->removeSynthesisDepthBuffer();
 #endif
   }
@@ -549,4 +720,12 @@
       else
       {
+#if POZNAN_NONLINEAR_DEPTH
+        // For texture complete depth power information. Depth power is sended, for example, for base view depth map and it should be available prior non-base texture decoding
+        if(!cTempSPS.isDepth() && cTempSPS.getViewId())
+        {
+          Float fDepthPower = getDecTop()->getPicFromView( 0, pcPic->getPOC(), true )->getSPS()->getDepthPower();
+          cTempSPS.setDepthPower(fDepthPower);
+        }
+#endif
         cComSPS = cTempSPS;
         return false;
@@ -563,4 +742,12 @@
       }
       m_uiValidPS |= 1;
+
+#if POZNAN_MP
+#if POZNAN_MP_USE_DEPTH_MAP_GENERATION
+      m_pcMP->init( m_cSPS.getHeight(), m_cSPS.getWidth() );
+#else
+      m_pcMP->init( m_cSPS.getHeight(), m_cSPS.getWidth(), m_pcCamParsCollector->getBaseViewShiftLUTI());
+#endif 
+#endif 
 
       return false;
@@ -686,4 +873,8 @@
       m_apcSlicePilot = pcPic->getPicSym()->getSlice(m_uiSliceIdx);
       pcPic->getPicSym()->setSlice(pcSlice, m_uiSliceIdx);
+
+#if POZNAN_MP
+	  pcSlice->setMP(m_pcMP);
+#endif
 
       if (bNextSlice)
@@ -744,6 +935,40 @@
 #endif
 
+#if POZNAN_SYNTH
+      if( m_pcCamParsCollector)
+      {
+        m_pcCamParsCollector->setSlice( pcSlice );
+      }
+      //if(!getIsDepth())
+      if(pcSlice->getSPS()->getUseCUSkip())
+      {
+        getDecTop()->storeSynthPicsInBuffer(pcSlice->getViewIdx(),pcSlice->getSPS()->getViewOrderIdx(),pcSlice->getPOC(),getIsDepth());
+      }
+#endif
+
+      //*
+#if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH
+      if(!getIsDepth() && pcSlice->getSPS()->getUseTexDqpAccordingToDepth())
+      {
+        getDecTop()->storeDepthSynthPicsInBuffer(pcSlice->getViewIdx(),pcSlice->getSPS()->getViewOrderIdx(),pcSlice->getPOC());
+      }
+#endif
+      //*/
+
+#if POZNAN_MP 
+	std::vector<TComPic*> apcSpatDataRefPics = getDecTop()->getSpatialRefPics( pcPic->getViewIdx(), pcSlice->getPOC(), m_cSPS.isDepth() );
+	pcSlice->getMP()->setRefPicsList(&apcSpatDataRefPics);  
+#if !POZNAN_MP_USE_DEPTH_MAP_GENERATION
+	std::vector<TComPic*> apcSpatDepthRefPics = getDecTop()->getSpatialRefPics( pcPic->getViewIdx(), pcSlice->getPOC(), true );
+	pcSlice->getMP()->setDepthRefPicsList(&apcSpatDepthRefPics);
+#endif
+#endif
+
       //  Decode a picture
       m_cGopDecoder.decompressGop ( bEos, pcBitstream, pcPic, false );
+
+#if POZNAN_MP
+	  //pcSlice->getMP()->disable();
+#endif
 
       if( m_pcCamParsCollector )
Index: branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecTop.h	(revision 27)
+++ branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecTop.h	(revision 28)
@@ -55,4 +55,8 @@
 #include "TDecCAVLC.h"
 
+#if POZNAN_MP
+#include "../TLibCommon/TComMP.h"
+#endif
+
 // ====================================================================================================================
 // Class definition
@@ -71,4 +75,13 @@
   Void  uninit      ();
   Void  setSlice    ( TComSlice* pcSlice );
+#if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION)
+  Double****          getBaseViewShiftLUTD      ()  { return m_adBaseViewShiftLUT;   }
+  Int****             getBaseViewShiftLUTI      ()  { return m_aiBaseViewShiftLUT;   }
+
+  Int**               getBaseViewOffsetI        ()  { return m_aaiCodedOffset;   }
+  Int**               getBaseViewScaleI         ()  { return m_aaiCodedScale;   }
+
+  Bool                getNearestBaseView        ( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft);
+#endif
 
 private:
@@ -89,5 +102,86 @@
   Int     m_iLastPOC;
   UInt    m_uiMaxViewId;
+
+#if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION)
+
+  UInt    m_uiBitDepthForLUT;
+  UInt    m_iLog2Precision;
+  UInt    m_uiInputBitDepth;
+
+  // look-up tables
+  Double****          m_adBaseViewShiftLUT;										///< Disparity LUT
+  Int****             m_aiBaseViewShiftLUT;									  ///< Disparity LUT
+
+  Void xCreateLUTs( UInt uiNumberSourceViews, UInt uiNumberTargetViews, Double****& radLUT, Int****& raiLUT);
+  Void xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT);
+
+  template<class T> Void  xDeleteArray  ( T*& rpt, UInt uiSize1, UInt uiSize2, UInt uiSize3 );
+  template<class T> Void  xDeleteArray  ( T*& rpt, UInt uiSize1, UInt uiSize2 );
+  template<class T> Void  xDeleteArray  ( T*& rpt, UInt uiSize );
+#endif
+#if POZNAN_NONLINEAR_DEPTH
+  Float               m_fDepthPower;
+#endif
+
+
 };
+
+#if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION)
+  template <class T>
+Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize1, UInt uiSize2, UInt uiSize3 )
+{
+  if( rpt )
+  {
+    for( UInt uiK = 0; uiK < uiSize1; uiK++ )
+    {
+      for( UInt uiL = 0; uiL < uiSize2; uiL++ )
+      {
+        for( UInt uiM = 0; uiM < uiSize3; uiM++ )
+        {
+          delete[] rpt[ uiK ][ uiL ][ uiM ];
+        }
+        delete[] rpt[ uiK ][ uiL ];
+      }
+      delete[] rpt[ uiK ];
+    }
+    delete[] rpt;
+  }
+  rpt = NULL;
+};
+
+
+template <class T>
+Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize1, UInt uiSize2 )
+{
+  if( rpt )
+  {
+    for( UInt uiK = 0; uiK < uiSize1; uiK++ )
+    {
+      for( UInt uiL = 0; uiL < uiSize2; uiL++ )
+      {
+        delete[] rpt[ uiK ][ uiL ];
+      }
+      delete[] rpt[ uiK ];
+    }
+    delete[] rpt;
+  }
+  rpt = NULL;
+};
+
+
+template <class T>
+Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize )
+{
+  if( rpt )
+  {
+    for( UInt uiK = 0; uiK < uiSize; uiK++ )
+    {
+      delete[] rpt[ uiK ];
+    }
+    delete[] rpt;
+  }
+  rpt = NULL;
+};
+#endif
 
 
@@ -138,4 +232,8 @@
 #endif
 
+#if POZNAN_MP
+  TComMP*				  m_pcMP;
+#endif
+
   Bool                    m_bIsDepth;
   Int                     m_iViewIdx;
