Index: /branches/HTM-5.1-dev2-Sony/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/App/TAppDecoder/TAppDecTop.cpp	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/App/TAppDecoder/TAppDecTop.cpp	(revision 262)
@@ -96,7 +96,4 @@
 #endif
 
-#if SONY_COLPIC_AVAILABILITY
-  m_tDecTop[0]->setViewOrderIdx(0);
-#endif
   Int                 viewDepthId = 0;
   Int                 previousViewDepthId  = 0;
Index: /branches/HTM-5.1-dev2-Sony/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 262)
@@ -341,4 +341,7 @@
 #if LGE_ILLUCOMP_B0045
   ("IlluCompEnable",                  m_bUseIC                  , true         , "Use illumination compensation for inter-view prediction" )
+#endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  ("IVSEnable",                       m_bUseIVS                 , true         , "Use inter-view vector scaling" )
 #endif
 #if DBL_CONTROL
@@ -1806,5 +1809,7 @@
   printf("IlluCompEnable: %d ", m_bUseIC);
 #endif
-
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  printf("IVSEnable: %d ", m_bUseIVS);
+#endif
   printf("\n");
 
Index: /branches/HTM-5.1-dev2-Sony/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/App/TAppEncoder/TAppEncCfg.h	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/App/TAppEncoder/TAppEncCfg.h	(revision 262)
@@ -170,5 +170,8 @@
   vector<Bool> m_abUseSAO;
 #if LGE_ILLUCOMP_B0045
-  Bool      m_bUseIC;                                     ///< flag for using illumination compensation for inter-view prediction
+  Bool      m_bUseIC;                                         ///< flag for using illumination compensation for inter-view prediction
+#endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  Bool      m_bUseIVS;                                        ///< flag for using inter-view vector scaling
 #endif
 #if SAO_UNIT_INTERLEAVING
Index: /branches/HTM-5.1-dev2-Sony/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/App/TAppEncoder/TAppEncTop.cpp	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/App/TAppEncoder/TAppEncTop.cpp	(revision 262)
@@ -121,4 +121,7 @@
     m_cVPS.setDependentFlag                                    ( iViewIdx ? true:false, layerId );
     m_cVPS.setDependentLayer                                   ( layerId - (m_bUsingDepthMaps ? 2:1), layerId );
+#if INTER_VIEW_VECTOR_SCALING_C0115
+    m_cVPS.setIVScalingFlag                                    ( m_bUseIVS );
+#endif
 #endif
     
@@ -316,4 +319,7 @@
 #if LGE_ILLUCOMP_B0045
     m_acTEncTopList[iViewIdx]->setUseIC                ( m_bUseIC          );
+#endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+    m_acTEncTopList[iViewIdx]->setUseIVS               ( m_bUseIVS          );
 #endif
 #if SAO_UNIT_INTERLEAVING
@@ -639,4 +645,7 @@
       m_acTEncDepthTopList[iViewIdx]->setUseIC                ( false     );
 #endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+     m_acTEncDepthTopList[iViewIdx]->setUseIVS                ( m_bUseIVS );
+#endif
 #if SAO_UNIT_INTERLEAVING
       m_acTEncDepthTopList[iViewIdx]->setMaxNumOffsetsPerPic (m_maxNumOffsetsPerPic);
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComDataCU.cpp	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComDataCU.cpp	(revision 262)
@@ -6901,17 +6901,9 @@
   RefPicList  eColRefPicList;
   Int iColPOC, iColRefPOC, iCurrPOC, iCurrRefPOC, iScale;
-#if SONY_COLPIC_AVAILABILITY
-#if QC_IV_AS_LT_B0046
-  Int iColViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx;
-#else
-  Int iColViewOrderIdx, iColRefViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx;
-#endif
-#endif
   TComMv cColMv;
-
-#if SONY_COLPIC_AVAILABILITY
-  iCurrViewOrderIdx    = m_pcSlice->getViewOrderIdx();
-  iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();
-#endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  Int iColViewId, iColRefViewId, iCurrViewId, iCurrRefViewId;
+#endif
+
   // use coldir.
 #if COLLOCATED_REF_IDX
@@ -6928,6 +6920,8 @@
   iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();
   iColPOC = pColCU->getSlice()->getPOC();  
-#if SONY_COLPIC_AVAILABILITY
-  iColViewOrderIdx = pColCU->getSlice()->getViewOrderIdx();
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  iCurrViewId = m_pcSlice->getViewOrderIdx(); // will be changed to view_id    
+  iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx(); // will be changed to view_id
+  iColViewId = pColCU->getSlice()->getViewOrderIdx(); // will be changed to view_id
 #endif
 
@@ -6937,5 +6931,5 @@
   }
 
-#if !SONY_COLPIC_AVAILABILITY&!QC_IV_AS_LT_B0046
+#if !INTER_VIEW_VECTOR_SCALING_C0115&!QC_IV_AS_LT_B0046
   if( m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId() != m_pcSlice->getViewId() )
     return false;
@@ -6964,14 +6958,12 @@
   // Scale the vector.
   iColRefPOC = pColCU->getSlice()->getRefPOC(eColRefPicList, iColRefIdx);
-
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  iColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx(); // will be changed to view_id 
+#endif
 #if !QC_IV_AS_LT_B0046
-#if SONY_COLPIC_AVAILABILITY
-  iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx();
-#else
   if( pColCU->getSlice()->getRefViewId( eColRefPicList, iColRefIdx ) != pColCU->getSlice()->getViewId() )
   {
     return false;
   }
-#endif
 #else
   Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsLongTerm();
@@ -6990,6 +6982,6 @@
         bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsLongTerm();
         iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();
-#if SONY_COLPIC_AVAILABILITY
-        iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();
+#if INTER_VIEW_VECTOR_SCALING_C0115
+        iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx(); // will be changed to view_id
 #endif
       }
@@ -7024,48 +7016,25 @@
       }
     }else
-#if QC_MVHEVC_B0046
-      rcMv = cColMv; //inter-view
-#else
-    {
-#if SONY_COLPIC_AVAILABILITY
-      Int iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx();
-      iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx);
-      if ( iScale == 4096 )
-      {
-        rcMv = cColMv;
-      }
-      else
-      {
-        rcMv = cColMv.scaleMv( iScale );
-      }
-#else
-      return false;
-#endif
-    }
-#endif
-  }
-#else
-#if SONY_COLPIC_AVAILABILITY
-  iScale = 0;
-  iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();
-  if((iColPOC != iColRefPOC)&&(iCurrPOC != iCurrRefPOC))
-    iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
-  else if((iColPOC == iColRefPOC)&&(iCurrPOC == iCurrRefPOC))
-    iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx);
-  else
-    return false; 
-
-#else
-  iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
-#endif
-  if ( iScale == 4096 )
-  {
-    rcMv = cColMv;
-  }
-  else
-  {
-    rcMv = cColMv.scaleMv( iScale );
-  }
-#endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+    {
+        if((iCurrPOC == iCurrRefPOC) && m_pcSlice->getIVScalingFlag())    // inter-view & inter-view
+            iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId );
+        else
+            iScale = 4096;            // inter & inter
+        if ( iScale == 4096 )
+        {
+          rcMv = cColMv;
+        }
+        else
+        {
+          rcMv = cColMv.scaleMv( iScale );
+        }
+    }
+#else
+    rcMv = cColMv; //inter-view
+#endif
+  }
+#endif
+
   return true;
 }
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComPic.cpp
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComPic.cpp	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComPic.cpp	(revision 262)
@@ -76,6 +76,6 @@
   m_pcUsedPelsMap     = NULL;
 #endif
-#if SONY_COLPIC_AVAILABILITY
-  m_iViewOrderIdx     = 0;
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  m_iViewOrderIdx     = 0;    // will be changed to view_id
 #endif
   m_aaiCodedScale     = 0;
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComPic.h
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComPic.h	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComPic.h	(revision 262)
@@ -112,6 +112,6 @@
   TComPicYuv*           m_pcUsedPelsMap;
 #endif
-#if SONY_COLPIC_AVAILABILITY
-  Int                   m_iViewOrderIdx;
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  Int                   m_iViewOrderIdx;    // will be changed to view_id
 #endif
   Int**                 m_aaiCodedScale;
@@ -188,7 +188,7 @@
 #endif
 
-#if SONY_COLPIC_AVAILABILITY
-  Void          setViewOrderIdx(Int i)                        { m_iViewOrderIdx = i; }
-  Int           getViewOrderIdx()                             { return m_iViewOrderIdx; }
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  Void          setViewOrderIdx(Int i)                        { m_iViewOrderIdx = i; }        // will be changed to view_id
+  Int           getViewOrderIdx()                             { return m_iViewOrderIdx; }    // will be changed to view_id
 #endif
 
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComSlice.cpp	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComSlice.cpp	(revision 262)
@@ -113,9 +113,10 @@
 , m_numEntryPointOffsets          ( 0 )
 #endif
-#if SONY_COLPIC_AVAILABILITY
-, m_iViewOrderIdx                 ( 0 )
-#endif
 #if LGE_ILLUCOMP_B0045
 , m_bApplyIC                      ( false )
+#endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+, m_bIVScalingFlag                (false)
+, m_iViewOrderIdx                 ( 0 )        // will be changed to view_id
 #endif
 {
@@ -722,6 +723,7 @@
   m_iPOC                 = pSrc->m_iPOC;
   m_viewId               = pSrc->m_viewId;
-#if SONY_COLPIC_AVAILABILITY
-  m_iViewOrderIdx        = pSrc->m_iViewOrderIdx;
+#if INTER_VIEW_VECTOR_SCALING_C0115    
+  m_iViewOrderIdx        = pSrc->m_iViewOrderIdx;// will be changed to view_id
+  m_bIVScalingFlag       = pSrc->m_bIVScalingFlag;
 #endif
   m_eNalUnitType         = pSrc->m_eNalUnitType;
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComSlice.h	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComSlice.h	(revision 262)
@@ -179,5 +179,7 @@
   UInt        m_uiMaxDecPicBuffering[MAX_TLAYER]; 
   UInt        m_uiMaxLatencyIncrease[MAX_TLAYER];
-  
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  Bool          m_bIVScalingFlag;
+#endif
 public:
   TComVPS();
@@ -213,4 +215,8 @@
   Void    setDependentLayer(UInt v, UInt layer)                     { m_uiDependentLayer[layer] = v;    }
   UInt    getDependentLayer(UInt layer)                             { return m_uiDependentLayer[layer]; }
+#endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  Bool getIVScalingFlag( )                                   { return m_bIVScalingFlag; }
+  Void setIVScalingFlag(Bool b)                              { m_bIVScalingFlag = b;    }
 #endif
   Void    setNumReorderPics(UInt v, UInt tLayer)                { m_numReorderPics[tLayer] = v;    }
@@ -1343,11 +1349,11 @@
   Int        m_aaiCodedOffset[2][MAX_VIEW_NUM];
 
-#if SONY_COLPIC_AVAILABILITY|QC_MVHEVC_B0046
-  Int         m_iViewOrderIdx;
-#endif
 #if LGE_ILLUCOMP_B0045
   Bool        m_bApplyIC;
 #endif
-
+#if INTER_VIEW_VECTOR_SCALING_C0115|QC_MVHEVC_B0046
+  Bool       m_bIVScalingFlag;
+  Int        m_iViewOrderIdx;    // will be changed to view_id
+#endif
 public:
   TComSlice();
@@ -1433,7 +1439,4 @@
   Int       getRefViewId        ( RefPicList e, Int iRefIdx)    { return  m_aiRefViewIdList[e][iRefIdx]; }
   TComPic*  getTexturePic       () const                        { return  m_pcTexturePic; }
-#if SONY_COLPIC_AVAILABILITY
-  Int       getViewOrderIdx     ()                                  { return  m_iViewOrderIdx;              }
-#endif
   Int       getDepth            ()                              { return  m_iDepth;                     }
   UInt      getColDir           ()                              { return  m_uiColDir;                   }
@@ -1485,7 +1488,4 @@
   Void      setRefViewId        ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefViewIdList[e][iRefIdx] = i; }
   Void      setTexturePic       ( TComPic *pcTexturePic )       { m_pcTexturePic = pcTexturePic; }
-#if SONY_COLPIC_AVAILABILITY
-  Void      setViewOrderIdx     ( Int i )                       { m_iViewOrderIdx     = i;      }
-#endif
   Void      setNumRefIdx        ( RefPicList e, Int i )         { m_aiNumRefIdx[e]    = i;      }
   Void      setPic              ( TComPic* p )                  { m_pcPic             = p;      }
@@ -1661,5 +1661,10 @@
   Void      setNewRefIdx        ( RefPicList e, Int i )         { m_aiNewRefIdx[e]    = i;      }
 #endif
-
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  Void setIVScalingFlag( Bool val )         { m_bIVScalingFlag = val;     }
+  Bool getIVScalingFlag()                   { return m_bIVScalingFlag;    }
+  Void setViewOrderIdx     ( Int i )        { m_iViewOrderIdx     = i;    }   // will be changed to view_id
+  Int  getViewOrderIdx     ()               { return  m_iViewOrderIdx;    }   // will be changed to view_id
+#endif
 protected:
   TComPic*  xGetRefPic        (TComList<TComPic*>& rcListPic, UInt uiPOC);
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TypeDef.h	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TypeDef.h	(revision 262)
@@ -148,5 +148,5 @@
 ///// ***** OTHERS *********
 #define LG_ZEROINTRADEPTHRESI_A0087       1   // JCT2-A0087
-#define SONY_COLPIC_AVAILABILITY          1
+#define INTER_VIEW_VECTOR_SCALING_C0115   1   // JCT2-C0115 Inter-view vector scaling for TMVP & flag
 #define HHI_FULL_PEL_DEPTH_MAP_MV_ACC     1   // full-pel mv accuracy for depth maps
 #define VIDYO_VPS_INTEGRATION             1
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 262)
@@ -1458,4 +1458,7 @@
       }
     }
+#if INTER_VIEW_VECTOR_SCALING_C0115
+    READ_FLAG( uiCode,  "inter_view_vector_scaling_flag" );    pcVPS->setIVScalingFlag( uiCode ? true:false); 
+#endif
   }
   
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibDecoder/TDecTop.cpp	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibDecoder/TDecTop.cpp	(revision 262)
@@ -254,7 +254,4 @@
   m_iMaxRefPicNum = 0;
   m_uiValidPS = 0;
-#if SONY_COLPIC_AVAILABILITY
-  m_iViewOrderIdx = 0;
-#endif
 #if ENC_DEC_TRACE
   g_hTrace = fopen( "TraceDec.txt", "wb" );
@@ -687,8 +684,4 @@
   }
 
-#if SONY_COLPIC_AVAILABILITY
-  m_apcSlicePilot->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx());
-#endif
-
 #if NAL_REF_FLAG
   m_apcSlicePilot->setReferenced(nalu.m_nalRefFlag);
@@ -768,8 +761,7 @@
     xGetNewPicBuffer (m_apcSlicePilot, pcPic);
 
-#if SONY_COLPIC_AVAILABILITY
-    pcPic->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx() );
-#endif
-
+#if INTER_VIEW_VECTOR_SCALING_C0115
+    pcPic->setViewOrderIdx( m_apcSlicePilot->getVPS()->getViewOrderIdx(nalu.m_layerId) );    // will be changed to view_id
+#endif
     /* transfer any SEI messages that have been received to the picture */
     pcPic->setSEIs(m_SEIs);
@@ -996,10 +988,14 @@
 #endif
 
-#if SONY_COLPIC_AVAILABILITY
+#if INTER_VIEW_VECTOR_SCALING_C0115
 #if VIDYO_VPS_INTEGRATION
-    pcSlice->setViewOrderIdx( pcSlice->getVPS()->getViewOrderIdx(nalu.m_layerId) );
+    pcSlice->setViewOrderIdx( pcSlice->getVPS()->getViewOrderIdx(nalu.m_layerId) );        // will be changed to view_id
 #else
     pcSlice->setViewOrderIdx( pcPic->getViewOrderIdx() );
 #endif
+#endif
+
+#if INTER_VIEW_VECTOR_SCALING_C0115
+    pcSlice->setIVScalingFlag( pcSlice->getVPS()->getIVScalingFlag());
 #endif
 
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibDecoder/TDecTop.h	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibDecoder/TDecTop.h	(revision 262)
@@ -118,8 +118,4 @@
   
   SEImessages *m_SEIs; ///< "all" SEI messages.  If not NULL, we own the object.
-
-#if SONY_COLPIC_AVAILABILITY
-  Int                     m_iViewOrderIdx;
-#endif
 
   // functional classes
@@ -187,9 +183,4 @@
   Void setIsDepth( Bool isDepth ) { m_isDepth = isDepth; }
 
-#if SONY_COLPIC_AVAILABILITY
-  Void setViewOrderIdx(Int i)     { m_iViewOrderIdx = i ;}
-  Int  getViewOrderIdx()          { return m_iViewOrderIdx ; }
-#endif
-
 #if DEPTH_MAP_GENERATION
   TComDepthMapGenerator*  getDepthMapGenerator  () { return &m_cDepthMapGenerator; }
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 262)
@@ -498,4 +498,7 @@
       }
     }
+#if INTER_VIEW_VECTOR_SCALING_C0115
+      WRITE_FLAG( pcVPS->getIVScalingFlag(),                      "inter_view_vector_scaling_flag" );
+#endif
   }
   
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncCfg.h	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncCfg.h	(revision 262)
@@ -170,4 +170,7 @@
   Bool      m_bUseIC;
 #endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  Bool      m_bUseIVS;
+#endif
 #if SAO_UNIT_INTERLEAVING
   Int       m_maxNumOffsetsPerPic;
@@ -713,4 +716,8 @@
   Void  setUseIC                       ( Bool bVal )   {m_bUseIC = bVal;}
   Bool  getUseIC                       ()              {return m_bUseIC;}
+#endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  Void  setUseIVS                       ( Bool bVal )   {m_bUseIVS = bVal;}
+  Bool  getUseIVS                       ()              {return m_bUseIVS;}
 #endif
 #if SAO_UNIT_INTERLEAVING
@@ -869,6 +876,6 @@
   Void      setCodedOffset                  ( Int** p )      { m_aaiCodedOffset         = p; }
 
-#if SONY_COLPIC_AVAILABILITY
-  Int       getViewOrderIdx                 ()      { return  m_iViewOrderIdx; }
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  Int       getViewOrderIdx                 ()      { return  m_iViewOrderIdx; }    // will be changed to view_id
 #endif
 };
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 262)
@@ -259,4 +259,7 @@
       pcSlice->setViewId( m_pcEncTop->getViewId() );
       pcSlice->setIsDepth( m_pcEncTop->getIsDepth() ); 
+#if INTER_VIEW_VECTOR_SCALING_C0115
+      pcSlice->setIVScalingFlag( m_pcEncTop->getUseIVS() );
+#endif
 
       m_pcEncTop->getSPS()->setDisInter4x4(m_pcEncTop->getDisInter4x4());
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 262)
@@ -190,6 +190,6 @@
   rpcSlice->setPOC( uiPOCCurr );
   
-#if SONY_COLPIC_AVAILABILITY
-  rpcSlice->setViewOrderIdx(m_pcCfg->getViewOrderIdx());
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  rpcSlice->setViewOrderIdx(m_pcCfg->getViewOrderIdx());    // will be changed to view_id
 #endif 
 #if LGE_ILLUCOMP_B0045
Index: /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncTop.cpp	(revision 261)
+++ /branches/HTM-5.1-dev2-Sony/source/Lib/TLibEncoder/TEncTop.cpp	(revision 262)
@@ -404,6 +404,6 @@
   pcPicYuvOrg->copyToPic( pcPicCurr->getPicYuvOrg() );
 
-#if SONY_COLPIC_AVAILABILITY
-  pcPicCurr->setViewOrderIdx(m_iViewOrderIdx);
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  pcPicCurr->setViewOrderIdx(m_iViewOrderIdx);    // will be changed to view_id
 #endif
   pcPicCurr->setScaleOffset( m_aaiCodedScale, m_aaiCodedOffset );
