Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TAppCommon/TAppComCamPara.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TAppCommon/TAppComCamPara.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TAppCommon/TAppComCamPara.cpp	(revision 464)
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/ContextTables.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/ContextTables.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/ContextTables.h	(revision 464)
@@ -95,4 +95,9 @@
 #define NUM_TRANSFORMSKIP_FLAG_CTX    1       ///< number of context models for transform skipping 
 #define NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX  1 
+
+#if H_3D_ARP
+#define NUM_ARPW_CTX                  4       ///< number of context models for weighting factor index used by advanced residual prediction
+#endif
+
 #define CNU                          154      ///< dummy initialization value for unused context models 'Context model Not Used'
 
@@ -334,4 +339,14 @@
   { 139,  139}, 
 };
+
+#if H_3D_ARP
+static const UChar 
+INIT_ARPW[3][NUM_ARPW_CTX] = 
+{
+  { 154, 154, 154, 154 }, 
+  { 154, 154, 154, 154 }, 
+  { 154, 154, 154, 154 }, 
+};
+#endif
 //! \}
 
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComDataCU.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComDataCU.cpp	(revision 464)
@@ -115,4 +115,8 @@
   m_pDvInfo              = NULL;
 #endif
+
+#if H_3D_ARP
+  m_puhARPW              = NULL;
+#endif
 }
 
@@ -208,4 +212,7 @@
     m_acCUMvField[1].create( uiNumPartition );
     
+#if H_3D_ARP
+    m_puhARPW            = new UChar[ uiNumPartition];
+#endif
   }
   else
@@ -293,4 +300,9 @@
     if ( m_pDvInfo            ) { xFree(m_pDvInfo);             m_pDvInfo           = NULL; }
 #endif
+
+#if H_3D_ARP
+    if ( m_puhARPW            ) { delete[] m_puhARPW;           m_puhARPW           = NULL; }
+#endif
+
     m_acCUMvField[0].destroy();
     m_acCUMvField[1].destroy();
@@ -402,4 +414,7 @@
     m_CUTransquantBypass[ui] = pcFrom->getCUTransquantBypass(ui);
     m_puhDepth[ui] = pcFrom->getDepth(ui);
+#if H_3D_ARP
+    m_puhARPW   [ui] = pcFrom->getARPW( ui );
+#endif
     m_puhWidth  [ui] = pcFrom->getWidth(ui);
     m_puhHeight [ui] = pcFrom->getHeight(ui);
@@ -455,4 +470,7 @@
     memset( m_puhCbf[2]         + firstElement, 0,                        numElements * sizeof( *m_puhCbf[2] ) );
     memset( m_pbIPCMFlag        + firstElement, false,                    numElements * sizeof( *m_pbIPCMFlag ) );
+#if H_3D_ARP
+    memset( m_puhARPW           + firstElement, 0,                        numElements * sizeof( UChar )         );
+#endif
   }
   
@@ -590,4 +608,7 @@
       m_puhCbf[1][ui] = 0;
       m_puhCbf[2][ui] = 0;
+#if H_3D_ARP
+      m_puhARPW[ui] = 0;
+#endif
     }
   }
@@ -662,4 +683,7 @@
 #if H_3D_NBDV
   m_pDvInfo->bDV = false;
+#endif
+#if H_3D_ARP
+  memset( m_puhARPW,            0, iSizeInUchar  );
 #endif
   UChar uhWidth  = g_uiMaxCUWidth  >> uiDepth;
@@ -706,4 +730,7 @@
       m_puhCbf[2][ui]=pcCU->m_puhCbf[2][uiPartOffset+ui];
 
+#if H_3D_ARP
+      m_puhARPW           [ui] = pcCU->getARPW( uiPartOffset+ui );
+#endif
     }
   }
@@ -816,4 +843,8 @@
   m_puhMergeIndex       = pcCU->getMergeIndex()       + uiPart;
 
+#if H_3D_ARP
+  m_puhARPW             = pcCU->getARPW()             + uiPart;
+#endif
+
   m_puhLumaIntraDir     = pcCU->getLumaIntraDir()     + uiPart;
   m_puhChromaIntraDir   = pcCU->getChromaIntraDir()   + uiPart;
@@ -932,4 +963,8 @@
   m_apiMVPNum[eRefPicList] = pcCU->getMVPNum(eRefPicList) + uiAbsPartIdx;
   
+#if H_3D_ARP
+  m_puhARPW            = pcCU->getARPW()                  + uiAbsPartIdx;
+#endif
+
   m_acCUMvField[ eRefPicList ].linkToWithOffset( pcCU->getCUMvField(eRefPicList), uiAbsPartIdx );
 
@@ -1019,4 +1054,8 @@
   memcpy( m_sliceStartCU        + uiOffset, pcCU->m_sliceStartCU,        sizeof( UInt ) * uiNumPartition  );
   memcpy( m_sliceSegmentStartCU + uiOffset, pcCU->m_sliceSegmentStartCU, sizeof( UInt ) * uiNumPartition  );
+
+#if H_3D_ARP
+  memcpy( m_puhARPW             + uiOffset, pcCU->getARPW(),              iSizeInUchar );
+#endif
 }
 
@@ -1094,4 +1133,8 @@
   memcpy( rpcCU->m_sliceStartCU        + m_uiAbsIdxInLCU, m_sliceStartCU,        sizeof( UInt ) * m_uiNumPartition  );
   memcpy( rpcCU->m_sliceSegmentStartCU + m_uiAbsIdxInLCU, m_sliceSegmentStartCU, sizeof( UInt ) * m_uiNumPartition  );
+
+#if H_3D_ARP
+  memcpy( rpcCU->getARPW()             + m_uiAbsIdxInLCU, m_puhARPW,             iSizeInUchar );
+#endif
 }
 
@@ -1166,4 +1209,8 @@
   memcpy( rpcCU->m_sliceStartCU        + uiPartOffset, m_sliceStartCU,        sizeof( UInt ) * uiQNumPart  );
   memcpy( rpcCU->m_sliceSegmentStartCU + uiPartOffset, m_sliceSegmentStartCU, sizeof( UInt ) * uiQNumPart  );
+
+#if H_3D_ARP
+  memcpy( rpcCU->getARPW()             + uiPartOffset, m_puhARPW,             iSizeInUchar );
+#endif
 }
 
@@ -1807,4 +1854,21 @@
   return uiCtx;
 }
+
+#if H_3D_ARP
+UInt TComDataCU::getCTXARPWFlag( UInt uiAbsPartIdx )
+{
+  TComDataCU* pcTempCU;
+  UInt        uiTempPartIdx;
+  UInt        uiCtx = 0;
+  
+  pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
+  uiCtx    = ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1) : 0;
+  
+  pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
+  uiCtx   += ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1): 0;
+  
+  return uiCtx;
+}
+#endif
 
 UInt TComDataCU::getCtxInterDir( UInt uiAbsPartIdx )
@@ -4246,3 +4310,10 @@
 }
 #endif 
+#if H_3D_ARP
+Void TComDataCU::setARPWSubParts ( UChar w, UInt uiAbsPartIdx, UInt uiDepth )
+{
+  assert( sizeof( *m_puhARPW) == 1 );
+  memset( m_puhARPW + uiAbsPartIdx, w, m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ) );
+}
+#endif
 //! \}
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComDataCU.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComDataCU.h	(revision 464)
@@ -49,4 +49,8 @@
 #include "TComPattern.h"
 
+#if H_3D_ARP
+#include "TComYuv.h"
+#endif
+
 #include <algorithm>
 #include <vector>
@@ -190,4 +194,7 @@
   DisInfo*      m_pDvInfo;
 #endif
+#if H_3D_ARP
+  UChar*        m_puhARPW;
+#endif
   // -------------------------------------------------------------------------------------------------------------------
   // misc. variables
@@ -220,6 +227,8 @@
   
   /// compute scaling factor from POC difference
+#if !H_3D_ARP
   Int           xGetDistScaleFactor   ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC );
-  
+#endif
+
   Void xDeriveCenterIdx( UInt uiPartIdx, UInt& ruiPartIdxCenter );
 
@@ -231,5 +240,7 @@
   // create / destroy / initialize / copy
   // -------------------------------------------------------------------------------------------------------------------
-  
+#if H_3D_ARP
+  Int           xGetDistScaleFactor   ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC );
+#endif 
   Void          create                ( UInt uiNumPartition, UInt uiWidth, UInt uiHeight, Bool bDecSubCu, Int unitSize
 #if ADAPTIVE_QP_SELECTION
@@ -434,4 +445,12 @@
    
 #endif
+
+#if H_3D_ARP
+  UChar*        getARPW            ()                        { return m_puhARPW;               }
+  UChar         getARPW            ( UInt uiIdx )            { return m_puhARPW[uiIdx];        }
+  Void          setARPW            ( UInt uiIdx, UChar w )   { m_puhARPW[uiIdx] = w;           }
+  Void          setARPWSubParts    ( UChar w, UInt uiAbsPartIdx, UInt uiDepth );
+  Double        getARPWFactor      ( UInt uiIdx );
+#endif
   // -------------------------------------------------------------------------------------------------------------------
   // member functions for accessing partition information
@@ -539,4 +558,8 @@
   UInt          getCtxInterDir                  ( UInt   uiAbsPartIdx                                 );
   
+#if H_3D_ARP
+  UInt          getCTXARPWFlag                  ( UInt   uiAbsPartIdx                                 );
+#endif  
+
   UInt          getSliceStartCU         ( UInt pos )                  { return m_sliceStartCU[pos-m_uiAbsIdxInLCU];                                                                                          }
   UInt          getSliceSegmentStartCU  ( UInt pos )                  { return m_sliceSegmentStartCU[pos-m_uiAbsIdxInLCU];                                                                                   }
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComInterpolationFilter.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComInterpolationFilter.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComInterpolationFilter.cpp	(revision 464)
@@ -73,4 +73,25 @@
 };
 
+#if H_3D_ARP
+const Short TComInterpolationFilter::m_lumaFilterARP[4][NTAPS_LUMA_ARP] =
+{
+  {64,  0},
+  {48, 16},
+  {32, 32},
+  {16, 48}
+};
+const Short TComInterpolationFilter::m_chromaFilterARP[8][NTAPS_CHROMA_ARP] =
+{
+  {64,  0},
+  {56,  8},
+  {48, 16},
+  {40, 24},
+  {32, 32},
+  {24, 40},
+  {16, 48},
+  {8,  56}
+};
+#endif
+
 // ====================================================================================================================
 // Private member functions
@@ -325,5 +346,9 @@
  * \param  isLast     Flag indicating whether it is the last filtering operation
  */
-Void TComInterpolationFilter::filterHorLuma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast )
+Void TComInterpolationFilter::filterHorLuma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast 
+#if H_3D_ARP
+    , Bool filterType
+#endif
+  )
 {
   assert(frac >= 0 && frac < 4);
@@ -335,5 +360,16 @@
   else
   {
+#if H_3D_ARP
+    if(filterType)
+    {
+      filterHor<NTAPS_LUMA_ARP>(g_bitDepthY, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilterARP[frac]);
+    }
+    else
+    {
+#endif
     filterHor<NTAPS_LUMA>(g_bitDepthY, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilter[frac]);
+#if H_3D_ARP
+    }
+#endif
   }
 }
@@ -352,5 +388,9 @@
  * \param  isLast     Flag indicating whether it is the last filtering operation
  */
-Void TComInterpolationFilter::filterVerLuma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast )
+Void TComInterpolationFilter::filterVerLuma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast 
+#if H_3D_ARP
+    , Bool filterType
+#endif
+  )
 {
   assert(frac >= 0 && frac < 4);
@@ -362,5 +402,16 @@
   else
   {
+#if H_3D_ARP
+    if(filterType)
+    {
+      filterVer<NTAPS_LUMA_ARP>(g_bitDepthY, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilterARP[frac]);    
+    }
+    else
+    {
+#endif
     filterVer<NTAPS_LUMA>(g_bitDepthY, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilter[frac]);
+#if H_3D_ARP
+    }
+#endif
   }
 }
@@ -378,5 +429,9 @@
  * \param  isLast     Flag indicating whether it is the last filtering operation
  */
-Void TComInterpolationFilter::filterHorChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast )
+Void TComInterpolationFilter::filterHorChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast 
+#if H_3D_ARP
+    , Bool filterType
+#endif
+  )
 {
   assert(frac >= 0 && frac < 8);
@@ -388,5 +443,16 @@
   else
   {
+#if H_3D_ARP
+    if(filterType)
+    {
+      filterHor<NTAPS_CHROMA_ARP>(g_bitDepthC, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterARP[frac]);
+    }
+    else
+    {
+#endif
     filterHor<NTAPS_CHROMA>(g_bitDepthC, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilter[frac]);
+#if H_3D_ARP
+    }
+#endif
   }
 }
@@ -405,5 +471,9 @@
  * \param  isLast     Flag indicating whether it is the last filtering operation
  */
-Void TComInterpolationFilter::filterVerChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast )
+Void TComInterpolationFilter::filterVerChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast 
+#if H_3D_ARP
+    , Bool filterType
+#endif
+  )
 {
   assert(frac >= 0 && frac < 8);
@@ -415,5 +485,16 @@
   else
   {
+#if H_3D_ARP
+    if(filterType)
+    {
+      filterVer<NTAPS_CHROMA_ARP>(g_bitDepthC, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterARP[frac]);
+    }
+    else
+    {
+#endif
     filterVer<NTAPS_CHROMA>(g_bitDepthC, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilter[frac]);
+#if H_3D_ARP
+    }
+#endif
   }
 }
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComInterpolationFilter.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComInterpolationFilter.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComInterpolationFilter.h	(revision 464)
@@ -45,4 +45,9 @@
 //! \{
 
+#if H_3D_ARP
+#define NTAPS_LUMA_ARP    2 ///< Number of taps for luma
+#define NTAPS_CHROMA_ARP  2 ///< Number of taps for chroma
+#endif
+
 #define NTAPS_LUMA        8 ///< Number of taps for luma
 #define NTAPS_CHROMA      4 ///< Number of taps for chroma
@@ -58,5 +63,8 @@
   static const Short m_lumaFilter[4][NTAPS_LUMA];     ///< Luma filter taps
   static const Short m_chromaFilter[8][NTAPS_CHROMA]; ///< Chroma filter taps
-  
+#if H_3D_ARP
+  static const Short m_lumaFilterARP  [4][NTAPS_LUMA_ARP];     ///< Luma filter taps for ARP
+  static const Short m_chromaFilterARP[8][NTAPS_CHROMA_ARP];   ///< Chroma filter taps for ARP
+#endif
   static Void filterCopy(Int bitDepth, const Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Bool isFirst, Bool isLast);
   
@@ -73,8 +81,24 @@
   ~TComInterpolationFilter() {}
 
-  Void filterHorLuma  (Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac,               Bool isLast );
-  Void filterVerLuma  (Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast );
-  Void filterHorChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac,               Bool isLast );
-  Void filterVerChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast );
+  Void filterHorLuma  (Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac,               Bool isLast 
+#if H_3D_ARP
+    , Bool filterType = false
+#endif
+    );
+  Void filterVerLuma  (Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast 
+#if H_3D_ARP
+    , Bool filterType = false
+#endif
+    );
+  Void filterHorChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac,               Bool isLast 
+#if H_3D_ARP
+    , Bool filterType = false
+#endif
+    );
+  Void filterVerChroma(Pel *src, Int srcStride, Short *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast 
+#if H_3D_ARP
+    , Bool filterType = false
+#endif
+    );
 };
 
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComPrediction.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComPrediction.cpp	(revision 464)
@@ -63,4 +63,9 @@
   m_cYuvPredTemp.destroy();
 
+#if H_3D_ARP
+  m_acYuvPredBase[0].destroy();
+  m_acYuvPredBase[1].destroy();
+#endif
+
   if( m_pLumaRecBuffer )
   {
@@ -103,4 +108,8 @@
 
     m_cYuvPredTemp.create( MAX_CU_SIZE, MAX_CU_SIZE );
+#if H_3D_ARP
+    m_acYuvPredBase[0] .create( g_uiMaxCUWidth, g_uiMaxCUHeight );
+    m_acYuvPredBase[1] .create( g_uiMaxCUWidth, g_uiMaxCUHeight );
+#endif
   }
 
@@ -485,7 +494,114 @@
   TComMv      cMv         = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr );
   pcCU->clipMv(cMv);
+#if H_3D_ARP
+  if(  pcCU->getARPW( uiPartAddr ) > 0 
+    && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N 
+    && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() 
+    )
+  {
+    xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi );
+  }
+  else
+  {
+#endif
   xPredInterLumaBlk  ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );
   xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );
-}
+#if H_3D_ARP
+  }
+#endif
+}
+
+#if H_3D_ARP
+Void TComPrediction::xPredInterUniARP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled )
+{
+  Int         iRefIdx      = pNewMvFiled ? pNewMvFiled->getRefIdx() : pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr );           
+  TComMv      cMv          = pNewMvFiled ? pNewMvFiled->getMv()     : pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr );
+  Bool        bTobeScaled  = false;
+  TComPic* pcPicYuvBaseCol = NULL;
+  TComPic* pcPicYuvBaseRef = NULL;
+
+#if H_3D_NBDV
+  DisInfo cDistparity;
+  cDistparity.bDV           = pcCU->getDvInfo(uiPartAddr).bDV;
+  if( cDistparity.bDV )
+  {
+    cDistparity.m_acNBDV = pcCU->getDvInfo(0).m_acNBDV;
+    assert(pcCU->getDvInfo(uiPartAddr).bDV ==  pcCU->getDvInfo(0).bDV);
+    cDistparity.m_aVIdxCan = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan;
+  }
+#else
+  assert(0); // ARP can be applied only when a DV is available
+#endif
+
+  UChar dW = cDistparity.bDV ? pcCU->getARPW ( uiPartAddr ) : 0;
+
+  if( cDistparity.bDV ) 
+  {
+    if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC()!= pcCU->getSlice()->getPOC() )
+    {
+      bTobeScaled = true;
+    }
+
+    pcPicYuvBaseCol =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(),                              cDistparity.m_aVIdxCan );
+    pcPicYuvBaseRef =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC(), cDistparity.m_aVIdxCan );
+    
+    if( ( !pcPicYuvBaseCol || pcPicYuvBaseCol->getPOC() != pcCU->getSlice()->getPOC() ) || ( !pcPicYuvBaseRef || pcPicYuvBaseRef->getPOC() != pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() ) )
+    {
+      dW = 0;
+      bTobeScaled = false;
+    }
+    else
+    {
+      assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() );
+    }
+
+    if(bTobeScaled)
+    {     
+      Int iCurrPOC    = pcCU->getSlice()->getPOC();
+      Int iColRefPOC  = pcCU->getSlice()->getRefPOC( eRefPicList, iRefIdx );
+      Int iCurrRefPOC = pcCU->getSlice()->getRefPOC( eRefPicList,  0);
+      Int iScale = pcCU-> xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iCurrPOC, iColRefPOC);
+      if ( iScale != 4096 )
+      {
+        cMv = cMv.scaleMv( iScale );
+      }
+      iRefIdx = 0;
+    }
+  }
+
+  pcCU->clipMv(cMv);
+  TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec();
+  xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi, true );
+  xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi, true );
+
+  if( dW > 0 )
+  {
+    TComYuv * pYuvB0 = &m_acYuvPredBase[0];
+    TComYuv * pYuvB1  = &m_acYuvPredBase[1];
+
+    TComMv cMVwithDisparity = cMv + cDistparity.m_acNBDV;
+    pcCU->clipMv(cMVwithDisparity);
+
+    assert ( cDistparity.bDV );
+
+    pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec();
+    xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cDistparity.m_acNBDV, iWidth, iHeight, pYuvB0, bi, true );
+    xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cDistparity.m_acNBDV, iWidth, iHeight, pYuvB0, bi, true );
+    
+    pcPicYuvRef = pcPicYuvBaseRef->getPicYuvRec();
+    xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, bi, true );
+    xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, bi, true );
+
+    pYuvB0->subtractARP( pYuvB0 , pYuvB1 , uiPartAddr , iWidth , iHeight );
+
+    if( 2 == dW )
+    {
+      pYuvB0->multiplyARP( uiPartAddr , iWidth , iHeight , dW );
+    }
+
+    rpcYuvPred->addARP( rpcYuvPred , pYuvB0 , uiPartAddr , iWidth , iHeight , !bi );
+  }
+}
+#endif
 
 Void TComPrediction::xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred )
@@ -551,5 +667,9 @@
  * \param bi       Flag indicating whether bipred is used
  */
-Void TComPrediction::xPredInterLumaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi )
+Void TComPrediction::xPredInterLumaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi 
+#if H_3D_ARP
+    , Bool filterType
+#endif
+  )
 {
   Int refStride = refPic->getStride();  
@@ -565,9 +685,17 @@
   if ( yFrac == 0 )
   {
-    m_if.filterHorLuma( ref, refStride, dst, dstStride, width, height, xFrac,       !bi );
+    m_if.filterHorLuma( ref, refStride, dst, dstStride, width, height, xFrac,       !bi 
+#if H_3D_ARP
+    , filterType
+#endif
+      );
   }
   else if ( xFrac == 0 )
   {
-    m_if.filterVerLuma( ref, refStride, dst, dstStride, width, height, yFrac, true, !bi );
+    m_if.filterVerLuma( ref, refStride, dst, dstStride, width, height, yFrac, true, !bi 
+#if H_3D_ARP
+    , filterType
+#endif
+      );
   }
   else
@@ -579,6 +707,14 @@
     Int halfFilterSize = ( filterSize >> 1 );
 
-    m_if.filterHorLuma(ref - (halfFilterSize-1)*refStride, refStride, tmp, tmpStride, width, height+filterSize-1, xFrac, false     );
-    m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height,              yFrac, false, !bi);    
+    m_if.filterHorLuma(ref - (halfFilterSize-1)*refStride, refStride, tmp, tmpStride, width, height+filterSize-1, xFrac, false     
+#if H_3D_ARP 
+    , filterType
+#endif 
+      );
+    m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height,              yFrac, false, !bi
+#if H_3D_ARP
+    , filterType
+#endif 
+      );    
   }
 }
@@ -596,5 +732,9 @@
  * \param bi       Flag indicating whether bipred is used
  */
-Void TComPrediction::xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi )
+Void TComPrediction::xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi 
+#if H_3D_ARP
+    , Bool filterType
+#endif   
+  )
 {
   Int     refStride  = refPic->getCStride();
@@ -623,19 +763,51 @@
   if ( yFrac == 0 )
   {
-    m_if.filterHorChroma(refCb, refStride, dstCb,  dstStride, cxWidth, cxHeight, xFrac, !bi);    
-    m_if.filterHorChroma(refCr, refStride, dstCr,  dstStride, cxWidth, cxHeight, xFrac, !bi);    
+    m_if.filterHorChroma(refCb, refStride, dstCb,  dstStride, cxWidth, cxHeight, xFrac, !bi
+#if H_3D_ARP
+    , filterType
+#endif
+    );    
+    m_if.filterHorChroma(refCr, refStride, dstCr,  dstStride, cxWidth, cxHeight, xFrac, !bi
+#if H_3D_ARP
+    , filterType
+#endif
+    );
   }
   else if ( xFrac == 0 )
   {
-    m_if.filterVerChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, yFrac, true, !bi);    
-    m_if.filterVerChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, yFrac, true, !bi);    
+    m_if.filterVerChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, yFrac, true, !bi
+#if H_3D_ARP
+    , filterType
+#endif
+    );
+    m_if.filterVerChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, yFrac, true, !bi
+#if H_3D_ARP
+    , filterType
+#endif
+    );
   }
   else
   {
-    m_if.filterHorChroma(refCb - (halfFilterSize-1)*refStride, refStride, extY,  extStride, cxWidth, cxHeight+filterSize-1, xFrac, false);
-    m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCb, dstStride, cxWidth, cxHeight  , yFrac, false, !bi);
+    m_if.filterHorChroma(refCb - (halfFilterSize-1)*refStride, refStride, extY,  extStride, cxWidth, cxHeight+filterSize-1, xFrac, false
+#if H_3D_ARP
+    , filterType
+#endif  
+      );
+    m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCb, dstStride, cxWidth, cxHeight  , yFrac, false, !bi
+#if H_3D_ARP
+    , filterType
+#endif 
+      );
     
-    m_if.filterHorChroma(refCr - (halfFilterSize-1)*refStride, refStride, extY,  extStride, cxWidth, cxHeight+filterSize-1, xFrac, false);
-    m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight  , yFrac, false, !bi);    
+    m_if.filterHorChroma(refCr - (halfFilterSize-1)*refStride, refStride, extY,  extStride, cxWidth, cxHeight+filterSize-1, xFrac, false
+#if H_3D_ARP
+    , filterType
+#endif 
+      );
+    m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight  , yFrac, false, !bi
+#if H_3D_ARP
+    , filterType
+#endif 
+      );    
   }
 }
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComPrediction.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComPrediction.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComPrediction.h	(revision 464)
@@ -65,4 +65,7 @@
   TComYuv   m_acYuvPred[2];
   TComYuv   m_cYuvPredTemp;
+#if H_3D_ARP
+  TComYuv   m_acYuvPredBase[2];
+#endif
   TComYuv m_filteredBlock[4][4];
   TComYuv m_filteredBlockTmp[4];
@@ -77,8 +80,19 @@
   
   // motion compensation functions
+#if H_3D_ARP
+  Void xPredInterUniARP         ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false, TComMvField * pNewMvFiled = NULL );
+#endif
   Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false          );
   Void xPredInterBi             ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight,                         TComYuv*& rpcYuvPred );
-  Void xPredInterLumaBlk  ( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi );
-  Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi );
+  Void xPredInterLumaBlk  ( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi 
+#if H_3D_ARP
+    , Bool filterType = false
+#endif
+    );
+  Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi 
+#if H_3D_ARP
+    , Bool filterType = false
+#endif
+    );
   Void xWeightedAverage         ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvDst );
   
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComSlice.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComSlice.cpp	(revision 464)
@@ -1486,4 +1486,9 @@
       m_dimensionId[i][j] = 0;
     }
+
+#if H_3D_ARP
+    m_uiUseAdvResPred[i]  = 0;
+    m_uiARPStepNum[i]     = 1;
+#endif
   }
 #endif
@@ -2257,4 +2262,41 @@
   }
 }
+
+#if H_3D_ARP
+Void TComSlice::setARPStepNum()                                  
+{
+  Bool bAllIvRef = true;
+
+  if(!getVPS()->getUseAdvRP(getLayerId()))
+  {
+    m_nARPStepNum = 0;
+  }
+  else
+  {
+    for( Int iRefListId = 0; iRefListId < 2; iRefListId++ )
+    {
+      RefPicList  eRefPicList = RefPicList( iRefListId );
+      Int iNumRefIdx = getNumRefIdx(eRefPicList);
+      
+      if( iNumRefIdx <= 0 )
+      {
+        continue;
+      }
+
+      for ( Int i = 0; i < iNumRefIdx; i++ )
+      {
+        if( getRefPic( eRefPicList, i)->getPOC() != getPOC() )
+        {
+          bAllIvRef = false;
+          break;
+        }
+      }
+
+      if( bAllIvRef == false ) { break; }
+    }
+    m_nARPStepNum = !bAllIvRef ? getVPS()->getARPStepNum(getLayerId()) : 0;
+  }
+}
+#endif
 #endif
 /** get scaling matrix from RefMatrixID
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComSlice.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComSlice.h	(revision 464)
@@ -524,4 +524,8 @@
 #if H_3D
   Int         m_viewIndex                [MAX_NUM_LAYERS   ];
+#if H_3D_ARP
+  UInt        m_uiUseAdvResPred          [MAX_NUM_LAYERS   ];
+  UInt        m_uiARPStepNum             [MAX_NUM_LAYERS   ];
+#endif
 #endif
 
@@ -642,4 +646,10 @@
   Int     getDepthId      ( Int layerIdInVps )                             { return getScalabilityId( layerIdInVps, DEPTH_ID ); }
   Int     getLayerIdInNuh( Int viewIndex, Bool depthFlag );  
+#if H_3D_ARP
+  UInt    getUseAdvRP  ( Int layerIdInVps )                                { return m_uiUseAdvResPred[layerIdInVps];    }
+  UInt    getARPStepNum( Int layerIdInVps )                                { return m_uiARPStepNum[layerIdInVps];       }
+  Void    setUseAdvRP  ( Int layerIdInVps, UInt val )                      { m_uiUseAdvResPred[layerIdInVps] = val;     }
+  Void    setARPStepNum( Int layerIdInVps, UInt val )                      { m_uiARPStepNum[layerIdInVps]    = val;     }
+#endif
 #endif
 
@@ -1486,4 +1496,8 @@
   Int        m_aaiCodedScale [2][MAX_NUM_LAYERS];
   Int        m_aaiCodedOffset[2][MAX_NUM_LAYERS];
+#if H_3D_ARP
+  TComList<TComPic*> * m_pBaseViewRefPicList[MAX_NUM_LAYERS];
+  UInt                 m_nARPStepNum; 
+#endif
 #endif
 #endif
@@ -1611,4 +1625,12 @@
 #endif
 #endif
+
+#if H_3D_ARP
+  Void      setBaseViewRefPicList( TComList<TComPic*> *pListPic, Int iViewIdx )      { m_pBaseViewRefPicList[iViewIdx] = pListPic;                   }
+  Void      setARPStepNum();                                 
+  TComPic*  getBaseViewRefPic    ( UInt uiPOC , Int iViewIdx )                       { return xGetRefPic( *m_pBaseViewRefPicList[iViewIdx], uiPOC ); }
+  UInt      getARPStepNum( )                                                         { return m_nARPStepNum;                                         }  
+#endif
+
   Void      setRefPOCList       ();
   Void      setColFromL0Flag    ( UInt colFromL0 ) { m_colFromL0Flag = colFromL0; }
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComYuv.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComYuv.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComYuv.cpp	(revision 464)
@@ -661,4 +661,173 @@
   }
 }
+
+#if H_3D_ARP
+Void TComYuv::addARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip )
+{
+  addARPLuma   ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth   , uiHeight    , bClip );
+  addARPChroma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1, uiHeight>>1 , bClip );
+}
+
+Void TComYuv::addARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip )
+{
+  Int x, y;
+
+  Pel* pSrc0 = pcYuvSrc0->getLumaAddr( uiAbsPartIdx );
+  Pel* pSrc1 = pcYuvSrc1->getLumaAddr( uiAbsPartIdx );
+  Pel* pDst  = getLumaAddr( uiAbsPartIdx );
+
+  UInt iSrc0Stride = pcYuvSrc0->getStride();
+  UInt iSrc1Stride = pcYuvSrc1->getStride();
+  UInt iDstStride  = getStride();
+  for ( y = uiHeight-1; y >= 0; y-- )
+  {
+    for ( x = uiWidth-1; x >= 0; x-- )
+    {
+      pDst[x] = pSrc0[x] + pSrc1[x];
+      if( bClip )
+      {
+        pDst[x] = ClipY( pDst[x] );
+      }
+    }
+    pSrc0 += iSrc0Stride;
+    pSrc1 += iSrc1Stride;
+    pDst  += iDstStride;
+  }
+}
+
+Void TComYuv::addARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip )
+{
+  Int x, y;
+
+  Pel* pSrcU0 = pcYuvSrc0->getCbAddr( uiAbsPartIdx );
+  Pel* pSrcU1 = pcYuvSrc1->getCbAddr( uiAbsPartIdx );
+  Pel* pSrcV0 = pcYuvSrc0->getCrAddr( uiAbsPartIdx );
+  Pel* pSrcV1 = pcYuvSrc1->getCrAddr( uiAbsPartIdx );
+  Pel* pDstU = getCbAddr( uiAbsPartIdx );
+  Pel* pDstV = getCrAddr( uiAbsPartIdx );
+
+  UInt  iSrc0Stride = pcYuvSrc0->getCStride();
+  UInt  iSrc1Stride = pcYuvSrc1->getCStride();
+  UInt  iDstStride  = getCStride();
+  for ( y = uiHeight-1; y >= 0; y-- )
+  {
+    for ( x = uiWidth-1; x >= 0; x-- )
+    {
+      pDstU[x] = pSrcU0[x] + pSrcU1[x];
+      pDstV[x] = pSrcV0[x] + pSrcV1[x];
+      if( bClip )
+      {
+        pDstU[x] = ClipC( pDstU[x] );
+        pDstV[x] = ClipC( pDstV[x] );
+      }
+    }
+
+    pSrcU0 += iSrc0Stride;
+    pSrcU1 += iSrc1Stride;
+    pSrcV0 += iSrc0Stride;
+    pSrcV1 += iSrc1Stride;
+    pDstU  += iDstStride;
+    pDstV  += iDstStride;
+  }
+}
+
+Void TComYuv::subtractARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )
+{
+  subtractARPLuma  ( pcYuvSrc0, pcYuvSrc1,  uiAbsPartIdx, uiWidth    , uiHeight    );
+  subtractARPChroma( pcYuvSrc0, pcYuvSrc1,  uiAbsPartIdx, uiWidth>>1 , uiHeight>>1 );
+}
+
+Void TComYuv::subtractARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )
+{
+  Int x, y;
+
+  Pel* pSrc0 = pcYuvSrc0->getLumaAddr( uiAbsPartIdx );
+  Pel* pSrc1 = pcYuvSrc1->getLumaAddr( uiAbsPartIdx );
+  Pel* pDst  = getLumaAddr( uiAbsPartIdx );
+
+  Int  iSrc0Stride = pcYuvSrc0->getStride();
+  Int  iSrc1Stride = pcYuvSrc1->getStride();
+  Int  iDstStride  = getStride();
+  for ( y = uiHeight-1; y >= 0; y-- )
+  {
+    for ( x = uiWidth-1; x >= 0; x-- )
+    {
+      pDst[x] = pSrc0[x] - pSrc1[x];
+    }
+    pSrc0 += iSrc0Stride;
+    pSrc1 += iSrc1Stride;
+    pDst  += iDstStride;
+  }
+}
+
+Void TComYuv::subtractARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )
+{
+  Int x, y;
+
+  Pel* pSrcU0 = pcYuvSrc0->getCbAddr( uiAbsPartIdx );
+  Pel* pSrcU1 = pcYuvSrc1->getCbAddr( uiAbsPartIdx );
+  Pel* pSrcV0 = pcYuvSrc0->getCrAddr( uiAbsPartIdx );
+  Pel* pSrcV1 = pcYuvSrc1->getCrAddr( uiAbsPartIdx );
+  Pel* pDstU  = getCbAddr( uiAbsPartIdx );
+  Pel* pDstV  = getCrAddr( uiAbsPartIdx );
+
+  Int  iSrc0Stride = pcYuvSrc0->getCStride();
+  Int  iSrc1Stride = pcYuvSrc1->getCStride();
+  Int  iDstStride  = getCStride();
+  for ( y = uiHeight-1; y >= 0; y-- )
+  {
+    for ( x = uiWidth-1; x >= 0; x-- )
+    {
+      pDstU[x] = pSrcU0[x] - pSrcU1[x];
+      pDstV[x] = pSrcV0[x] - pSrcV1[x];
+    }
+    pSrcU0 += iSrc0Stride;
+    pSrcU1 += iSrc1Stride;
+    pSrcV0 += iSrc0Stride;
+    pSrcV1 += iSrc1Stride;
+    pDstU  += iDstStride;
+    pDstV  += iDstStride;
+  }
+}
+
+Void TComYuv::multiplyARP( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW )
+{
+  multiplyARPLuma( uiAbsPartIdx , uiWidth , uiHeight , dW );
+  multiplyARPChroma( uiAbsPartIdx , uiWidth >> 1 , uiHeight >> 1 , dW );
+}
+
+Void TComYuv::xxMultiplyLine( Pel* pSrcDst , UInt uiWidth , UChar dW )
+{
+  assert( dW == 2 );
+  for( UInt x = 0 ; x < uiWidth ; x++ )
+    pSrcDst[x] =  pSrcDst[x] >> 1;
+}
+
+Void TComYuv::multiplyARPLuma( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW )
+{
+  Pel* pDst  = getLumaAddr( uiAbsPartIdx );
+  Int  iDstStride  = getStride();
+  for ( Int y = uiHeight-1; y >= 0; y-- )
+  {
+    xxMultiplyLine( pDst , uiWidth , dW );
+    pDst  += iDstStride;
+  }
+}
+
+Void TComYuv::multiplyARPChroma( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW )
+{
+  Pel* pDstU  = getCbAddr( uiAbsPartIdx );
+  Pel* pDstV  = getCrAddr( uiAbsPartIdx );
+
+  Int  iDstStride  = getCStride();
+  for ( Int y = uiHeight-1; y >= 0; y-- )
+  {
+    xxMultiplyLine( pDstU , uiWidth , dW );
+    xxMultiplyLine( pDstV , uiWidth , dW );
+    pDstU  += iDstStride;
+    pDstV  += iDstStride;
+  }
+}
+#endif
 #endif
 //! \}
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComYuv.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComYuv.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TComYuv.h	(revision 464)
@@ -182,5 +182,19 @@
 #if H_3D
   Void addClipPartLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
+
+#if H_3D_ARP
+  Void    addARP           ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip );
+  Void    addARPLuma       ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip );
+  Void    addARPChroma     ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip );
+  Void    subtractARP      ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight );
+  Void    subtractARPLuma  ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight );
+  Void    subtractARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight );
+  Void    multiplyARP      ( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW );
+  Void    multiplyARPLuma  ( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW );
+  Void    multiplyARPChroma( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW );
+private:
+  Void    xxMultiplyLine( Pel * pSrcDst , UInt uiWidth , UChar dW );
 #endif
+#endif
 
 };// END CLASS DEFINITION TComYuv
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TypeDef.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibCommon/TypeDef.h	(revision 464)
@@ -89,4 +89,6 @@
                                               // QC_CU_NBDV_D0181
                                               // SEC_DEFAULT_DV_D0112
+
+#define H_3D_ARP                          1   // Advanced residual prediction (ARP), JCT3V-D0177
 #endif 
 
@@ -115,4 +117,10 @@
 #define DVFROM_ABOVELEFT                  5
 #endif
+
+///// ***** ADVANCED INTERVIEW RESIDUAL PREDICTION *********
+#if H_3D_ARP
+#define H_3D_ARP_WFNR                     3
+#endif
+
 /////////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////   HM RELATED DEFINES ////////////////////////////////
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 464)
@@ -950,4 +950,21 @@
     }
     
+#if H_3D_ARP
+    for( Int layer = 0; layer <= pcVPS->getMaxLayers() - 1; layer++ )
+    {
+      if( ( layer!=0 ) && ( pcVPS->getDepthId(layer)!=1 ) )
+      {
+        READ_FLAG( uiCode, "advanced_residual_pred_flag"  );
+        pcVPS->setUseAdvRP  ( layer, uiCode );
+        pcVPS->setARPStepNum( layer, uiCode ? H_3D_ARP_WFNR : 1 );
+      }
+      else
+      {
+        pcVPS->setUseAdvRP  ( layer, 0 );
+        pcVPS->setARPStepNum( layer, 1 );
+      }
+    }
+#endif
+
     READ_FLAG( uiCode,  "vps_extension2_flag" );
     if (uiCode)
@@ -1860,4 +1877,11 @@
 }
 
+#if H_3D_ARP
+Void TDecCavlc::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
+{
+  assert(0);
+}
+#endif
+
 // ====================================================================================================================
 // Protected member functions
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 464)
@@ -99,4 +99,7 @@
   Void parseMergeFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
   Void parseMergeIndex      ( TComDataCU* pcCU, UInt& ruiMergeIndex );
+#if H_3D_ARP 
+  Void parseARPW            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#endif
   Void parseSplitFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void parsePartSize        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecCu.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecCu.cpp	(revision 464)
@@ -281,5 +281,9 @@
   if(!pcCU->getSlice()->isIntra())
   {
+#if H_3D_ARP
+    if( pcCU->getSlice()->getVPS()->getUseAdvRP( pcCU->getSlice()->getLayerId() ) )
+#else
     if(pcCU->getSlice()->getViewIndex() && !pcCU->getSlice()->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
+#endif
     {
       m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true );
@@ -343,4 +347,7 @@
       }
     }
+#if H_3D_ARP
+    m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
+#endif
     xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
     return;
@@ -366,5 +373,7 @@
   // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
   m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
-  
+#if H_3D_ARP
+  m_pcEntropyDecoder->decodeARPW    ( pcCU , uiAbsPartIdx , uiDepth );  
+#endif  
   // Coefficient decoding
   Bool bCodeDQP = getdQPFlag();
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 464)
@@ -87,4 +87,23 @@
 }
 
+#if H_3D_ARP
+Void TDecEntropy::decodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
+{
+  if( !pcCU->getSlice()->getARPStepNum() || pcCU->isIntra( uiAbsPartIdx ) )
+  {
+    return;
+  }
+
+  if( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N )
+  {
+    pcCU->setARPWSubParts( 0 , uiAbsPartIdx, uiDepth );
+  }
+  else
+  {
+    m_pcEntropyDecoderIf->parseARPW( pcCU , uiAbsPartIdx , uiDepth );
+  }
+}
+#endif
+
 Void TDecEntropy::decodeSplitFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecEntropy.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecEntropy.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecEntropy.h	(revision 464)
@@ -85,4 +85,7 @@
   virtual Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ) = 0;
   virtual Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex ) = 0;
+#if H_3D_ARP
+  virtual Void parseARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
+#endif
   virtual Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
   virtual Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
@@ -154,4 +157,8 @@
   Void decodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   
+#if H_3D_ARP
+  Void decodeARPW              ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#endif
+
   Void decodeIPCMInfo          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 464)
@@ -54,4 +54,7 @@
 , m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cCUMergeIdxExtSCModel     ( 1,             1,               NUM_MERGE_IDX_EXT_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
+#if H_3D_ARP
+, m_cCUPUARPW                 ( 1,             1,               NUM_ARPW_CTX                  , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
 , m_cCUPartSizeSCModel        ( 1,             1,               NUM_PART_SIZE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cCUPredModeSCModel        ( 1,             1,               NUM_PRED_MODE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
@@ -113,4 +116,7 @@
   m_cCUMergeFlagExtSCModel.initBuffer    ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT );
   m_cCUMergeIdxExtSCModel.initBuffer     ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT );
+#if H_3D_ARP
+  m_cCUPUARPW.initBuffer                 ( sliceType, qp, (UChar*)INIT_ARPW );
+#endif
   m_cCUPartSizeSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_PART_SIZE );
   m_cCUAMPSCModel.initBuffer             ( sliceType, qp, (UChar*)INIT_CU_AMP_POS );
@@ -158,4 +164,7 @@
   m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT );
   m_cCUMergeIdxExtSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT );
+#if H_3D_ARP
+  m_cCUPUARPW.initBuffer                 ( eSliceType, iQp, (UChar*)INIT_ARPW );
+#endif
   m_cCUPartSizeSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_PART_SIZE );
   m_cCUAMPSCModel.initBuffer             ( eSliceType, iQp, (UChar*)INIT_CU_AMP_POS );
@@ -1551,3 +1560,25 @@
   xCopyContextsFrom(pScr);
 }
+
+#if H_3D_ARP
+Void TDecSbac::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
+{
+  UInt uiMaxW = pcCU->getSlice()->getARPStepNum() - 1;
+  UInt uiW = 0;
+  UInt uiOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx);
+  UInt uiCode = 0;
+
+  assert ( uiMaxW > 0 );
+
+  m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPW.get( 0, 0, 0 + uiOffset ) );
+
+  uiW = uiCode;
+  if( 1 == uiW )   
+  {
+    m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPW.get( 0, 0, 3 ) );
+    uiW += ( 1 == uiCode ? 1 : 0 );
+  }
+  pcCU->setARPWSubParts( ( UChar )( uiW ) , uiAbsPartIdx, uiDepth );  
+}
+#endif
 //! \}
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecSbac.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecSbac.h	(revision 464)
@@ -108,4 +108,7 @@
   Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
   Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex );
+#if H_3D_ARP
+  Void parseARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#endif
   Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
@@ -145,4 +148,7 @@
   ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
   ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
+#if H_3D_ARP
+  ContextModel3DBuffer m_cCUPUARPW;
+#endif
   ContextModel3DBuffer m_cCUPartSizeSCModel;
   ContextModel3DBuffer m_cCUPredModeSCModel;
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.cpp	(revision 464)
@@ -37,4 +37,7 @@
 
 #include "NALread.h"
+#if H_3D_ARP
+#include "../../App/TAppDecoder/TAppDecTop.h"
+#endif
 #include "TDecTop.h"
 
@@ -886,4 +889,19 @@
 #if H_MV    
     pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer, true );    
+#if H_3D_ARP
+    pcSlice->setARPStepNum();
+    if( pcSlice->getARPStepNum() > 1 )
+    {
+      for(Int iLayerId = 0; iLayerId < nalu.m_layerId; iLayerId ++ )
+      {
+        Int  iViewIdx =   pcSlice->getVPS()->getViewIndex(iLayerId);
+        Bool bIsDepth = ( pcSlice->getVPS()->getDepthId  ( iLayerId ) == 1 );
+        if( iViewIdx<getViewIndex() && !bIsDepth )
+        {
+          pcSlice->setBaseViewRefPicList( m_tAppDecTop->getTDecTop(iLayerId)->getListPic(), iViewIdx );
+        }
+      }
+    }
+#endif
 #else
 #if FIX1071
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.h	(revision 464)
@@ -225,4 +225,8 @@
 #endif
 
+#if H_3D_ARP
+  TAppDecTop*             m_tAppDecTop;
+#endif
+
 public:
   TDecTop();
@@ -265,4 +269,9 @@
   Bool                    getIsDepth            ()               { return m_isDepth;    }
   Void                    setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
+
+#if H_3D_ARP
+  Void                    setTAppDecTop( TAppDecTop* pcTAppDecTop ) { m_tAppDecTop = pcTAppDecTop; }
+  TAppDecTop*             getTAppDecTop()                           { return  m_tAppDecTop; }
+#endif
 #endif
 #endif
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 464)
@@ -741,4 +741,19 @@
     }
   }
+
+#if H_3D_ARP
+  for( Int layer = 0; layer <= pcVPS->getMaxLayers() - 1; layer++ )
+  {
+    if( ( layer!=0 ) && ( pcVPS->getDepthId(layer)!=1 ) )
+    {
+      WRITE_FLAG( pcVPS->getUseAdvRP ( layer ) ? 1 : 0,      "advanced_residual_pred_flag"  );
+    }
+    else
+    {
+      assert( pcVPS->getUseAdvRP ( layer ) == 0 );
+    }
+  }
+#endif
+
   WRITE_FLAG( 0,                                             "vps_extension2_flag" );
 #else
@@ -1349,4 +1364,11 @@
 }
 
+#if H_3D_ARP
+Void TEncCavlc::codeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx )
+{
+  assert(0);
+}
+#endif
+
 Void TEncCavlc::codeInterModeFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiEncMode )
 {
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCavlc.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCavlc.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCavlc.h	(revision 464)
@@ -114,4 +114,8 @@
   Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
  
+#if H_3D_ARP
+  Void codeARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
+#endif
+
   Void codeInterModeFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiEncMode );
   Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCfg.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCfg.h	(revision 464)
@@ -394,4 +394,9 @@
   Bool      m_bUseEstimatedVSD; 
   Double    m_dDispCoeff;
+
+#if H_3D_ARP
+  UInt      m_uiUseAdvResPred;
+  UInt      m_uiARPStepNum;
+#endif
 #endif
 
@@ -467,4 +472,13 @@
   Bool      getMaxTempLayer                 ()                              { return m_maxTempLayer;              } 
   Void      setMaxTempLayer                 ( Int maxTempLayer )            { m_maxTempLayer = maxTempLayer;      }
+
+#if H_3D_ARP
+  UInt       getUseAdvRP                    ( )              { return m_uiUseAdvResPred; }
+  Void       setUseAdvRP                    ( UInt  u )      { m_uiUseAdvResPred = u;    }
+
+  UInt       getARPStepNum                  ()               { return m_uiARPStepNum;    }
+  Void       setARPStepNum                  ( UInt  u )      { m_uiARPStepNum = u;       }
+#endif
+
   //======== Transform =============
   Void      setQuadtreeTULog2MaxSize        ( UInt  u )      { m_uiQuadtreeTULog2MaxSize = u; }
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCu.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCu.cpp	(revision 464)
@@ -65,4 +65,8 @@
   m_ppcTempCU      = new TComDataCU*[m_uhTotalDepth-1];
     
+#if H_3D_ARP
+  m_ppcWeightedTempCU = new TComDataCU*[m_uhTotalDepth-1];
+#endif 
+
   m_ppcPredYuvBest = new TComYuv*[m_uhTotalDepth-1];
   m_ppcResiYuvBest = new TComYuv*[m_uhTotalDepth-1];
@@ -83,4 +87,8 @@
     m_ppcTempCU[i] = new TComDataCU; m_ppcTempCU[i]->create( uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) );
     
+#if H_3D_ARP
+    m_ppcWeightedTempCU[i] = new TComDataCU; m_ppcWeightedTempCU[i]->create( uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) );
+#endif  
+
     m_ppcPredYuvBest[i] = new TComYuv; m_ppcPredYuvBest[i]->create(uiWidth, uiHeight);
     m_ppcResiYuvBest[i] = new TComYuv; m_ppcResiYuvBest[i]->create(uiWidth, uiHeight);
@@ -124,4 +132,10 @@
       m_ppcTempCU[i]->destroy();      delete m_ppcTempCU[i];      m_ppcTempCU[i] = NULL;
     }
+#if H_3D_ARP
+    if(m_ppcWeightedTempCU[i])
+    {
+      m_ppcWeightedTempCU[i]->destroy(); delete m_ppcWeightedTempCU[i]; m_ppcWeightedTempCU[i] = NULL;
+    }
+#endif
     if(m_ppcPredYuvBest[i])
     {
@@ -468,5 +482,9 @@
       if( rpcTempCU->getSlice()->getSliceType() != I_SLICE )
       {
+#if H_3D_ARP
+        if( rpcTempCU->getSlice()->getVPS()->getUseAdvRP(rpcTempCU->getSlice()->getLayerId()) )
+#else
         if(rpcTempCU->getSlice()->getViewIndex() && !rpcTempCU->getSlice()->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. Remove this comment once it is done.
+#endif
         {
           PartSize ePartTemp = rpcTempCU->getPartitionSize(0);
@@ -1220,4 +1238,7 @@
   {
     m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx );
+#if H_3D_ARP
+    m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );
+#endif
     finishCU(pcCU,uiAbsPartIdx,uiDepth);
     return;
@@ -1241,5 +1262,8 @@
   // prediction Info ( Intra : direction mode, Inter : Mv, reference idx )
   m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
-  
+#if H_3D_ARP
+  m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );
+#endif
+
   // Encode Coefficients
   Bool bCodeDQP = getdQPFlag();
@@ -1302,4 +1326,14 @@
   }
 
+#if H_3D_ARP
+  Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1;
+  if( nARPWMax < 0 || !rpcTempCU->getDvInfo(0).bDV )
+  {
+    nARPWMax = 0;
+  }
+  for( Int nARPW=nARPWMax; nARPW >= 0 ; nARPW-- )
+  {
+    memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS*sizeof(Int) );
+#endif
   for( UInt uiNoResidual = 0; uiNoResidual < iteration; ++uiNoResidual )
   {
@@ -1316,4 +1350,7 @@
           rpcTempCU->setCUTransquantBypassSubParts( m_pcEncCfg->getCUTransquantBypassFlagValue(),     0, uhDepth );
           rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level
+#if H_3D_ARP
+          rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );
+#endif
           rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to LCU level
           rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to LCU level
@@ -1322,4 +1359,23 @@
           rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
 
+#if H_3D_ARP
+          if( nARPW )
+          {
+            Bool bSignalflag[2] = { true, true };
+            for( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ )
+            {
+              Int iRefIdx = cMvFieldNeighbours[uiRefListIdx + 2*uiMergeCand].getRefIdx();
+              RefPicList eRefList = uiRefListIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
+              if( iRefIdx < 0 || rpcTempCU->getSlice()->getPOC() == rpcTempCU->getSlice()->getRefPOC(eRefList, iRefIdx) )
+              {
+                bSignalflag[uiRefListIdx] = false;
+              }
+            }
+            if( !bSignalflag[0] && !bSignalflag[1] )
+            {
+              rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth );
+            }
+          }
+#endif
        // do MC
        m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );
@@ -1401,4 +1457,7 @@
   }
  }
+#if H_3D_ARP
+ }
+#endif
 }
 
@@ -1411,4 +1470,21 @@
 {
   UChar uhDepth = rpcTempCU->getDepth( 0 );
+#if H_3D_ARP
+  Int iLayerId    = rpcTempCU->getSlice()->getLayerId();
+  Bool bFirstTime = true;
+  Int nARPWMax    = rpcTempCU->getSlice()->getARPStepNum() - 1;
+
+  if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || !rpcTempCU->getDvInfo(0).bDV  )
+  {
+    nARPWMax = 0;
+  }
+
+  for( Int nARPW = 0; nARPW <= nARPWMax; nARPW++ )
+  {
+    if( bFirstTime == false && rpcTempCU->getSlice()->getVPS()->getUseAdvRP( iLayerId ) )
+    {
+      rpcTempCU->initEstData( rpcTempCU->getDepth(0), rpcTempCU->getQP(0) );
+    }
+#endif
 #if H_3D_VSO // M3
   if( m_pcRdCost->getUseRenModel() )
@@ -1430,4 +1506,38 @@
   rpcTempCU->setCUTransquantBypassSubParts  ( m_pcEncCfg->getCUTransquantBypassFlagValue(),      0, uhDepth );
   
+#if H_3D_ARP
+  rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );
+#endif
+
+#if H_3D_ARP
+  if( bFirstTime == false && nARPWMax )
+  {
+    rpcTempCU->copyPartFrom( m_ppcWeightedTempCU[uhDepth] , 0 , uhDepth );
+    rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );
+
+    m_pcPredSearch->motionCompensation( rpcTempCU , m_ppcPredYuvTemp[uhDepth] );
+
+    if(rpcTempCU->getPartitionSize(0)==SIZE_2Nx2N)
+    {
+      Bool bSignalflag[2] = { true, true };
+      for(UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ )
+      {
+        RefPicList eRefList = uiRefListIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
+        Int iRefIdx = rpcTempCU->getCUMvField(eRefList)->getRefIdx(0);
+        if( iRefIdx < 0 || rpcTempCU->getSlice()->getPOC() == rpcTempCU->getSlice()->getRefPOC(eRefList, iRefIdx) )
+        {
+          bSignalflag[uiRefListIdx] = false;
+        }
+      }
+      if( !bSignalflag[0] && !bSignalflag[1] )
+      {
+        rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth );
+      }
+    }
+  }
+  else
+  {
+    bFirstTime = false;
+#endif
 #if AMP_MRG
   rpcTempCU->setMergeAMP (true);
@@ -1436,8 +1546,37 @@
   m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] );
 #endif
+#if H_3D_ARP
+   if( nARPWMax )
+   {
+     m_ppcWeightedTempCU[uhDepth]->copyPartFrom( rpcTempCU , 0 , uhDepth );
+
+     Bool bSignalflag[2] = { true, true };
+     for(UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ )
+     {
+       RefPicList eRefList = uiRefListIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
+       Int iRefIdx = rpcTempCU->getCUMvField(eRefList)->getRefIdx(0);
+       if( iRefIdx < 0 || rpcTempCU->getSlice()->getPOC() == rpcTempCU->getSlice()->getRefPOC(eRefList, iRefIdx) )
+       {
+         bSignalflag[uiRefListIdx] = false;
+       }
+     }
+     if( !bSignalflag[0] && !bSignalflag[1])
+     {
+       rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth );
+     }
+   }
+  }
+#endif
 
 #if AMP_MRG
   if ( !rpcTempCU->getMergeAMP() )
   {
+#if H_3D_ARP
+    if( nARPWMax )
+    {
+      continue;
+    }
+    else
+#endif
     return;
   }
@@ -1466,4 +1605,7 @@
   xCheckDQP( rpcTempCU );
   xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);
+#if H_3D_ARP
+  }
+#endif
 }
 
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCu.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCu.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCu.h	(revision 464)
@@ -69,4 +69,7 @@
   TComDataCU**            m_ppcBestCU;      ///< Best CUs in each depth
   TComDataCU**            m_ppcTempCU;      ///< Temporary CUs in each depth
+#if H_3D_ARP
+  TComDataCU**            m_ppcWeightedTempCU;
+#endif
   UChar                   m_uhTotalDepth;
   
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 464)
@@ -157,4 +157,23 @@
 }
 
+#if H_3D_ARP
+Void TEncEntropy::encodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx )
+{
+  if( !pcCU->getSlice()->getARPStepNum() || pcCU->isIntra( uiAbsPartIdx ) ) 
+  {
+    return;
+  }
+
+  if ( pcCU->getPartitionSize(uiAbsPartIdx)!=SIZE_2Nx2N )
+  {
+    assert(pcCU->getARPW (uiAbsPartIdx) == 0);
+  }
+  else
+  {
+    m_pcEntropyCoderIf->codeARPW( pcCU, uiAbsPartIdx );
+  }
+}
+#endif
+
 /** encode prediction mode
  * \param pcCU
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncEntropy.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncEntropy.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncEntropy.h	(revision 464)
@@ -88,4 +88,7 @@
   virtual Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
   virtual Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
+#if H_3D_ARP
+  virtual Void codeARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
+#endif
   virtual Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
   
@@ -169,4 +172,7 @@
   Void encodeMergeFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
   Void encodeMergeIndex   ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
+#if H_3D_ARP
+  Void encodeARPW         ( TComDataCU* pcCU, UInt uiAbspartIdx );
+#endif
   Void encodePredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
   Void encodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false );
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 464)
@@ -47,4 +47,7 @@
 #include "TLibCommon/NAL.h"
 #include "NALwrite.h"
+#if H_3D_ARP
+#include "../../App/TAppEncoder/TAppEncTop.h"
+#endif
 #include <time.h>
 #include <math.h>
@@ -670,4 +673,19 @@
 #if H_MV    
     pcSlice->setRefPicList( rcListPic, m_refPicSetInterLayer );
+#if H_3D_ARP
+    pcSlice->setARPStepNum();
+    if(pcSlice->getARPStepNum() > 1)
+    {
+      for(Int iLayerId = 0; iLayerId < getLayerId(); iLayerId ++ )
+      {
+        Int  iViewIdx =   pcSlice->getVPS()->getViewIndex(iLayerId);
+        Bool bIsDepth = ( pcSlice->getVPS()->getDepthId  ( iLayerId ) == 1 );
+        if( iViewIdx<getViewIndex() && !bIsDepth )
+        {
+          pcSlice->setBaseViewRefPicList( m_pcEncTop->getTAppEncTop()->getTEncTop( iLayerId )->getListPic(), iViewIdx );
+        }
+      }
+    }
+#endif
 #else
     pcSlice->setRefPicList ( rcListPic );
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 464)
@@ -60,4 +60,7 @@
 , m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cCUMergeIdxExtSCModel     ( 1,             1,               NUM_MERGE_IDX_EXT_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
+#if H_3D_ARP
+, m_cCUPUARPW                 ( 1,             1,               NUM_ARPW_CTX                  , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
 , m_cCUPartSizeSCModel        ( 1,             1,               NUM_PART_SIZE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cCUPredModeSCModel        ( 1,             1,               NUM_PRED_MODE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
@@ -111,4 +114,7 @@
   m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT);
   m_cCUMergeIdxExtSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT);
+#if H_3D_ARP
+  m_cCUPUARPW.initBuffer                 ( eSliceType, iQp, (UChar*)INIT_ARPW );
+#endif
   m_cCUPartSizeSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_PART_SIZE );
   m_cCUAMPSCModel.initBuffer             ( eSliceType, iQp, (UChar*)INIT_CU_AMP_POS );
@@ -214,4 +220,7 @@
   m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT);
   m_cCUMergeIdxExtSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT);
+#if H_3D_ARP
+  m_cCUPUARPW.initBuffer                 ( eSliceType, iQp, (UChar*)INIT_ARPW );
+#endif
   m_cCUPartSizeSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_PART_SIZE );
   m_cCUAMPSCModel.initBuffer             ( eSliceType, iQp, (UChar*)INIT_CU_AMP_POS );
@@ -589,4 +598,21 @@
   DTRACE_CABAC_T( "\n" );
 }
+
+#if H_3D_ARP
+Void TEncSbac::codeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx )
+{
+  Int  iW = (Int)pcCU->getARPW( uiAbsPartIdx );
+  Int  iMaxW = pcCU->getSlice()->getARPStepNum() - 1;
+  assert( iMaxW > 0);
+
+  Int nOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx);
+  Int nBinNum = iW + ( iW != iMaxW );
+  m_pcBinIf->encodeBin( iW ? 1 : 0 , m_cCUPUARPW.get( 0, 0, 0 + nOffset ) );
+  if( nBinNum > 1 )
+  {
+     m_pcBinIf->encodeBin( ( iW == iMaxW ) ? 1 : 0, m_cCUPUARPW.get( 0, 0, 3 ) );
+  }
+}
+#endif
 
 Void TEncSbac::codeSplitFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncSbac.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncSbac.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncSbac.h	(revision 464)
@@ -134,4 +134,7 @@
   Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
   Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
+#if H_3D_ARP
+  Void codeARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
+#endif
   Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void codeMVPIdx        ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefList );
@@ -181,4 +184,7 @@
   ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
   ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
+#if H_3D_ARP
+  ContextModel3DBuffer m_cCUPUARPW;
+#endif
   ContextModel3DBuffer m_cCUPartSizeSCModel;
   ContextModel3DBuffer m_cCUPredModeSCModel;
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 464)
@@ -4741,5 +4741,7 @@
     m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true);
     m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, true );
-    
+#if H_3D_ARP
+    m_pcEntropyCoder->encodeARPW( pcCU, 0 );
+#endif
     uiBits = m_pcEntropyCoder->getNumberOfWrittenBits();
     pcCU->getTotalBits()       = uiBits;
@@ -6150,4 +6152,7 @@
     m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true);
     m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, true);
+#if H_3D_ARP
+    m_pcEntropyCoder->encodeARPW( pcCU, 0 );
+#endif
     ruiBits += m_pcEntropyCoder->getNumberOfWrittenBits();
   }
@@ -6163,4 +6168,7 @@
     m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
     m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
+#if H_3D_ARP
+    m_pcEntropyCoder->encodeARPW( pcCU , 0 );
+#endif
     Bool bDummy = false;
     m_pcEntropyCoder->encodeCoeff   ( pcCU, 0, pcCU->getDepth(0), pcCU->getWidth(0), pcCU->getHeight(0), bDummy );
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncTop.h
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncTop.h	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncTop.h	(revision 464)
@@ -63,4 +63,8 @@
 // Class definition
 // ====================================================================================================================
+
+#if H_3D_ARP
+class TAppEncTop;
+#endif
 
 /// encoder class
@@ -124,5 +128,9 @@
   TComScalingList         m_scalingList;                 ///< quantization matrix information
   TEncRateCtrl            m_cRateCtrl;                    ///< Rate control class
-  
+
+#if H_3D_ARP
+  TAppEncTop*             m_pcTAppEncTop;
+#endif
+
 #if H_MV
   TEncAnalyze             m_cAnalyzeAll;
@@ -205,4 +213,8 @@
   Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
 #endif
+#if H_3D_ARP
+  Void            setTAppEncTop( TAppEncTop* pcTAppEncTop ) { m_pcTAppEncTop = pcTAppEncTop; }
+  TAppEncTop*     getTAppEncTop()                           { return  m_pcTAppEncTop; }
+#endif
   // -------------------------------------------------------------------------------------------------------------------
   // encoder function
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibExtractor/TExtrTop.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibExtractor/TExtrTop.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibExtractor/TExtrTop.cpp	(revision 464)
@@ -115,2 +115,3 @@
 }
 #endif
+
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenImage.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenImage.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenImage.cpp	(revision 464)
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenImagePlane.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenImagePlane.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenImagePlane.cpp	(revision 464)
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenInterpFilter.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenInterpFilter.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenInterpFilter.cpp	(revision 464)
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenModel.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenModel.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenModel.cpp	(revision 464)
Index: branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenTop.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenTop.cpp	(revision 457)
+++ branches/HTM-DEV-0.3-dev2a/source/Lib/TLibRenderer/TRenTop.cpp	(revision 464)
