Index: /branches/HTM-9.1-dev0-MediaTek/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/HTM-9.1-dev0-MediaTek/source/App/TAppEncoder/TAppEncTop.cpp	(revision 754)
+++ /branches/HTM-9.1-dev0-MediaTek/source/App/TAppEncoder/TAppEncTop.cpp	(revision 755)
@@ -76,4 +76,8 @@
 #endif
   
+#if CAM_HLS_F0136_F0045_F0082
+  vps.createCamPars(m_iNumberOfViews);
+#endif
+
 #if DLT_DIFF_CODING_IN_PPS
   TComDLT& dlt = m_dlt;
@@ -792,4 +796,12 @@
 Void TAppEncTop::xInitLib(Bool isFieldCoding)
 {
+#if CAM_HLS_F0136_F0045_F0082
+  for ( Int viewIndex = 0; viewIndex < m_vps.getNumViews(); viewIndex++ )
+  {
+    m_vps.initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(), 
+      m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );
+  }
+#endif
+
 #if H_MV
   for(Int layer=0; layer<m_numberOfLayers; layer++)
Index: /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TComSlice.cpp	(revision 754)
+++ /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TComSlice.cpp	(revision 755)
@@ -782,5 +782,9 @@
 Void TComSlice::setCamparaSlice( Int** aaiScale, Int** aaiOffset )
 {  
+#if CAM_HLS_F0136_F0045_F0082
+  if( m_pcVPS->hasCamParInSliceHeader( m_viewIndex ) )
+#else
   if( m_pcSPS->hasCamParInSliceHeader() )
+#endif
   {    
     for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < m_viewIndex; uiBaseViewIndex++ )
@@ -1920,4 +1924,7 @@
   }
 #endif
+#if CAM_HLS_F0136_F0045_F0082
+  deleteCamPars();
+#endif
 }
 
@@ -2072,4 +2079,95 @@
   return foundLayerIdinNuh;
 }
+#if CAM_HLS_F0136_F0045_F0082
+Void TComVPS::createCamPars(Int iNumViews)
+{
+  Int i = 0, j = 0;
+
+  m_bCamParPresent = new Bool[ iNumViews ];
+  m_bCamParInSliceHeader = new Bool[ iNumViews ];
+
+  m_aaaiCodedScale = new Int**[ iNumViews ];
+  m_aaaiCodedOffset = new Int**[ iNumViews ];
+  for ( i = 0; i < iNumViews ; i++ )
+  {
+    m_aaaiCodedScale[i] = new Int*[ 2 ];
+    m_aaaiCodedOffset[i] = new Int*[ 2 ];
+    for ( j = 0; j < 2; j++ )
+    {
+      m_aaaiCodedScale[i][j] = new Int[ MAX_NUM_LAYERS ];
+      m_aaaiCodedOffset[i][j] = new Int[ MAX_NUM_LAYERS ];
+      for ( Int k = 0; k < MAX_NUM_LAYERS; k++ )
+      {
+        m_aaaiCodedScale[i][j][k] = 0;
+        m_aaaiCodedOffset[i][j][k] = 0;
+      }
+    }
+  }
+}
+
+Void TComVPS::deleteCamPars()
+{
+  Int iNumViews = getNumViews();
+  Int i = 0, j = 0;
+
+  if ( m_bCamParPresent != NULL )
+  {
+    delete [] m_bCamParPresent;
+  }
+  if ( m_bCamParInSliceHeader != NULL )
+  {
+    delete [] m_bCamParInSliceHeader;
+  }
+
+  if ( m_aaaiCodedScale != NULL )
+  {
+    for ( i = 0; i < iNumViews ; i++ )
+    {
+      for ( j = 0; j < 2; j++ )
+      {
+        delete [] m_aaaiCodedScale[i][j];
+      }
+      delete [] m_aaaiCodedScale[i];
+    }
+    delete [] m_aaaiCodedScale;
+  }
+
+  if ( m_aaaiCodedOffset != NULL )
+  {
+    for ( i = 0; i < iNumViews ; i++ )
+    {
+      for ( j = 0; j < 2; j++ )
+      {
+        delete [] m_aaaiCodedOffset[i][j];
+      }
+      delete [] m_aaaiCodedOffset[i];
+    }
+    delete [] m_aaaiCodedOffset;
+  }
+}
+
+
+Void
+  TComVPS::initCamParaVPS( UInt uiViewIndex, Bool bCamParPresent, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset )
+{
+  AOT( uiViewIndex != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) );  
+
+  m_uiCamParPrecision = ( ( uiViewIndex != 0 )? uiCamParPrecision : 0 );
+  m_bCamParPresent[ uiViewIndex ] = (( uiViewIndex != 0 )? bCamParPresent  : false );
+  m_bCamParInSliceHeader[ uiViewIndex ]  = ( (uiViewIndex != 0)? bCamParSlice  : false );
+
+  if( !m_bCamParInSliceHeader[ uiViewIndex ] )
+  {
+    for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ )
+    {
+      m_aaaiCodedScale [ uiViewIndex ][ 0 ][ uiBaseViewIndex ] = aaiScale [ uiBaseViewIndex ][     uiViewIndex ];
+      m_aaaiCodedScale [ uiViewIndex ][ 1 ][ uiBaseViewIndex ] = aaiScale [     uiViewIndex ][ uiBaseViewIndex ];
+      m_aaaiCodedOffset[ uiViewIndex ][ 0 ][ uiBaseViewIndex ] = aaiOffset[ uiBaseViewIndex ][     uiViewIndex ];
+      m_aaaiCodedOffset[ uiViewIndex ][ 1 ][ uiBaseViewIndex ] = aaiOffset[     uiViewIndex ][ uiBaseViewIndex ];
+    }
+  }
+}
+#endif // CAM_HLS_F0136_F0045_F0082
+
 #endif // H_3D
 
@@ -2711,4 +2809,5 @@
 #endif
 #if H_3D
+#if !CAM_HLS_F0136_F0045_F0082
 Void
 TComSPS::initCamParaSPS( UInt uiViewIndex, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset )
@@ -2732,4 +2831,5 @@
   }
 }
+#endif
 #endif
 TComReferencePictureSet::TComReferencePictureSet()
@@ -3443,6 +3543,21 @@
   assert( m_depthToDisparityF != NULL ); 
 
+#if CAM_HLS_F0136_F0045_F0082
+  TComVPS* vps = getVPS(); 
+#else
   TComSPS* sps = getSPS(); 
-
+#endif
+
+#if CAM_HLS_F0136_F0045_F0082
+  Int log2Div = g_bitDepthY - 1 + vps->getCamParPrecision();
+  Int viewIndex = getViewIndex();
+
+  Bool camParaSH = vps->hasCamParInSliceHeader( viewIndex );
+
+  Int* codScale     = camParaSH ? m_aaiCodedScale [ 0 ] : vps->getCodedScale    ( viewIndex ); 
+  Int* codOffset    = camParaSH ? m_aaiCodedOffset[ 0 ] : vps->getCodedOffset   ( viewIndex ); 
+  Int* invCodScale  = camParaSH ? m_aaiCodedScale [ 1 ] : vps->getInvCodedScale ( viewIndex ); 
+  Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : vps->getInvCodedOffset( viewIndex ); 
+#else
   Int log2Div = g_bitDepthY - 1 + sps->getCamParPrecision();
 
@@ -3453,4 +3568,5 @@
   Int* invCodScale  = camParaSH ? m_aaiCodedScale [ 1 ] : sps->getInvCodedScale (); 
   Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : sps->getInvCodedOffset(); 
+#endif
 
   for (Int i = 0; i <= ( getViewIndex() - 1); i++)
Index: /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TComSlice.h	(revision 754)
+++ /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TComSlice.h	(revision 755)
@@ -862,4 +862,11 @@
 
 #if H_3D
+#if CAM_HLS_F0136_F0045_F0082
+  UInt        m_uiCamParPrecision;
+  Bool*       m_bCamParInSliceHeader;
+  Bool*       m_bCamParPresent;
+  Int         ***m_aaaiCodedScale ;
+  Int         ***m_aaaiCodedOffset;
+#endif
   Bool        m_ivMvScalingFlag; 
 #endif
@@ -1143,4 +1150,18 @@
   Void    setARPStepNum( Int layerIdInVps, UInt val )                      { m_uiARPStepNum[layerIdInVps]    = val;     }
 #endif
+#if CAM_HLS_F0136_F0045_F0082
+  Void createCamPars(Int iNumViews);
+  Void deleteCamPars();
+  Void initCamParaVPS      (  UInt uiViewIndex, Bool bCamParPresent = false, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 );
+  UInt getCamParPrecision    ()  { return m_uiCamParPrecision; }
+  Bool getCamParPresent      ( Int viewIndex )  { return m_bCamParPresent[viewIndex]; }
+  Bool hasCamParInSliceHeader( Int viewIndex )  { return m_bCamParInSliceHeader[viewIndex]; }
+  Void setHasCamParInSliceHeader( Int viewIndex, Bool b )  { m_bCamParInSliceHeader[viewIndex] = b; }
+  Int* getCodedScale         ( Int viewIndex )  { return m_aaaiCodedScale [viewIndex][0]; }
+  Int* getCodedOffset        ( Int viewIndex )  { return m_aaaiCodedOffset[viewIndex][0]; }
+  Int* getInvCodedScale      ( Int viewIndex )  { return m_aaaiCodedScale [viewIndex][1]; }
+  Int* getInvCodedOffset     ( Int viewIndex )  { return m_aaaiCodedOffset[viewIndex][1]; }
+#endif
+
 #if H_3D_IV_MERGE
   Void    setIvMvPredFlag     ( Int layerIdInVps, Bool val )  { m_ivMvPredFlag[ layerIdInVps ] = val; }
@@ -1780,4 +1801,5 @@
 #endif
 #if H_3D
+#if !CAM_HLS_F0136_F0045_F0082
   Void initCamParaSPS      (  UInt uiViewIndex, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 );
   UInt getCamParPrecision    ()  { return m_uiCamParPrecision; }
@@ -1790,4 +1812,5 @@
   Int* getInvCodedScale      ()  { return m_aaiCodedScale [1]; }
   Int* getInvCodedOffset     ()  { return m_aaiCodedOffset[1]; }
+#endif
 #endif
 #if H_MV
Index: /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TypeDef.h	(revision 754)
+++ /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TypeDef.h	(revision 755)
@@ -174,4 +174,9 @@
                                               // SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX
 #endif
+
+#define CAM_HLS_F0136_F0045_F0082         1   // JCT3V-F0136/F0045: view order index based camera parameter signaling 
+                                              // JCT3V-F0082: the cp_in_slice_segment_layer_flag to be view specific and used as a condition of the presence of slice header level camera parameters
+#define CAM_HLS_F0044                     1   // JCT3V-F0044: move camera parameter from slice header extension to slice header
+
 
 // Rate Control
Index: /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 754)
+++ /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 755)
@@ -1049,4 +1049,5 @@
 #endif
 
+#if !CAM_HLS_F0136_F0045_F0082
   UInt uiCamParPrecision = 0; 
   Bool bCamParSlice      = false; 
@@ -1068,4 +1069,5 @@
   }
   pcSPS->initCamParaSPS( viewIndex, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 
+#endif
 }
 #endif
@@ -1179,4 +1181,7 @@
 #if H_3D
       m_pcBitstream->readOutTrailingBits();
+#if CAM_HLS_F0136_F0045_F0082
+      pcVPS->createCamPars(pcVPS->getNumViews());
+#endif
       parseVPSExtension2( pcVPS );   
       READ_FLAG( uiCode,  "vps_extension3_flag" );
@@ -1931,4 +1936,31 @@
     }
   }
+#if CAM_HLS_F0136_F0045_F0082
+  UInt uiCamParPrecision = 0; 
+  Bool bCamParSlice      = false; 
+  Bool bCamParPresentFlag = false;
+
+  READ_UVLC( uiCamParPrecision, "cp_precision" );
+  for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
+  {
+    READ_FLAG( uiCode, "cp_present_flag[i]" );                  bCamParPresentFlag = ( uiCode == 1);
+    if ( bCamParPresentFlag )
+    {
+      READ_FLAG( uiCode, "cp_in_slice_segment_header_flag[i]" );          bCamParSlice = ( uiCode == 1);
+      if ( !bCamParSlice )
+      {
+        for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )
+        {
+          Int iCode; 
+          READ_SVLC( iCode, "vps_cp_scale" );                m_aaiTempScale  [ uiBaseIndex ][ viewIndex ]   = iCode;
+          READ_SVLC( iCode, "vps_cp_off" );                  m_aaiTempOffset [ uiBaseIndex ][ viewIndex ]   = iCode;
+          READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale  [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];
+          READ_SVLC( iCode, "vps_cp_inv_off_plus_off" );     m_aaiTempOffset [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];
+        }
+      }
+      pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 
+    }
+  }
+#endif
   READ_FLAG( uiCode, "iv_mv_scaling_flag");                       pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false ); 
 }
@@ -2657,9 +2689,33 @@
   }
 
+#if CAM_HLS_F0044
+#if CAM_HLS_F0136_F0045_F0082
+  if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && !rpcSlice->getIsDepth() )
+#else
+  if( rpcSlice->getSPS()->hasCamParInSliceHeader() )
+#endif
+  {
+    UInt uiViewIndex = rpcSlice->getViewIndex();
+    for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
+    {
+      READ_SVLC( iCode, "cp_scale" );                m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ] = iCode;
+      READ_SVLC( iCode, "cp_off" );                  m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ] = iCode;
+      READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ];
+      READ_SVLC( iCode, "cp_inv_off_plus_off" );     m_aaiTempOffset[ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ];
+    }
+    rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset );
+  }
+
+#endif
+
   if(pps->getSliceHeaderExtensionPresentFlag())
   {
     READ_UVLC(uiCode,"slice_header_extension_length");
-#if H_3D
+#if H_3D && !CAM_HLS_F0044
+#if CAM_HLS_F0136_F0045_F0082
+    if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && !rpcSlice->getIsDepth() )
+#else
     if( rpcSlice->getSPS()->hasCamParInSliceHeader() )
+#endif
     {
       UInt uiViewIndex = rpcSlice->getViewIndex();
Index: /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibDecoder/TDecTop.cpp	(revision 754)
+++ /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibDecoder/TDecTop.cpp	(revision 755)
@@ -228,4 +228,16 @@
     m_uiMaxViewIndex                     = std::max( m_uiMaxViewIndex, uiViewIndex );
     m_aiViewId[ uiViewIndex ]            = pcSlice->getViewId();
+#if CAM_HLS_F0136_F0045_F0082
+    if( uiViewIndex == 1 )
+    {
+      m_uiCamParsCodedPrecision       = pcSlice->getVPS()->getCamParPrecision     ();
+      m_bCamParsVaryOverTime          = pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex );
+    }
+    else if( uiViewIndex > 1 )
+    {
+      AOF( m_uiCamParsCodedPrecision == pcSlice->getVPS()->getCamParPrecision     () );
+      AOF( m_bCamParsVaryOverTime    == pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex ) );
+    }
+#else
     if( uiViewIndex == 1 )
     {
@@ -238,4 +250,5 @@
       AOF( m_bCamParsVaryOverTime    == pcSlice->getSPS()->hasCamParInSliceHeader () );
     }
+#endif
     for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
     {
@@ -251,8 +264,15 @@
       else
       {
+#if CAM_HLS_F0136_F0045_F0082
+        m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getVPS()->getCodedScale    (uiViewIndex) [ uiBaseIndex ];
+        m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getVPS()->getCodedOffset   (uiViewIndex) [ uiBaseIndex ];
+        m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getVPS()->getInvCodedScale (uiViewIndex) [ uiBaseIndex ];
+        m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getVPS()->getInvCodedOffset(uiViewIndex) [ uiBaseIndex ];
+#else
         m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getSPS()->getCodedScale    () [ uiBaseIndex ];
         m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getSPS()->getCodedOffset   () [ uiBaseIndex ];
         m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getSPS()->getInvCodedScale () [ uiBaseIndex ];
         m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getSPS()->getInvCodedOffset() [ uiBaseIndex ];
+#endif
         xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
         xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
@@ -286,8 +306,9 @@
 CamParsCollector::copyCamParamForSlice( TComSlice* pcSlice )
 {
+#if !CAM_HLS_F0136_F0045_F0082
   UInt uiViewIndex = pcSlice->getViewIndex();
 
   pcSlice->getSPS()->initCamParaSPS( uiViewIndex, m_uiCamParsCodedPrecision, m_bCamParsVaryOverTime, m_aaiCodedScale, m_aaiCodedOffset );
-
+#endif
   if( m_bCamParsVaryOverTime )
   {
@@ -1109,5 +1130,7 @@
   if( pcSlice->getIsDepth() )
   {
+#if !CAM_HLS_F0136_F0045_F0082
     pcSlice->getSPS()->setHasCamParInSliceHeader( false );
+#endif
   }
 #endif
Index: /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 754)
+++ /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 755)
@@ -861,19 +861,21 @@
 }
 #endif
-  if (!depthFlag )
-  {
-    WRITE_UVLC( pcSPS->getCamParPrecision(), "cp_precision" );
-    WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "cp_in_slice_header_flag" );
-    if( !pcSPS->hasCamParInSliceHeader() )
-    {
-      for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ )
-      {
-        WRITE_SVLC( pcSPS->getCodedScale    ()[ uiIndex ],                                      "cp_scale" );
-        WRITE_SVLC( pcSPS->getCodedOffset   ()[ uiIndex ],                                      "cp_off" );
-        WRITE_SVLC( pcSPS->getInvCodedScale ()[ uiIndex ] + pcSPS->getCodedScale ()[ uiIndex ], "cp_inv_scale_plus_scale" );
-        WRITE_SVLC( pcSPS->getInvCodedOffset()[ uiIndex ] + pcSPS->getCodedOffset()[ uiIndex ], "cp_inv_off_plus_off" );
-      }
-    }
-  }
+#if !CAM_HLS_F0136_F0045_F0082
+if (!depthFlag )
+{
+  WRITE_UVLC( pcSPS->getCamParPrecision(), "cp_precision" );
+  WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "cp_in_slice_header_flag" );
+  if( !pcSPS->hasCamParInSliceHeader() )
+  {
+    for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ )
+    {
+      WRITE_SVLC( pcSPS->getCodedScale    ()[ uiIndex ],                                      "cp_scale" );
+      WRITE_SVLC( pcSPS->getCodedOffset   ()[ uiIndex ],                                      "cp_off" );
+      WRITE_SVLC( pcSPS->getInvCodedScale ()[ uiIndex ] + pcSPS->getCodedScale ()[ uiIndex ], "cp_inv_scale_plus_scale" );
+      WRITE_SVLC( pcSPS->getInvCodedOffset()[ uiIndex ] + pcSPS->getCodedOffset()[ uiIndex ], "cp_inv_off_plus_off" );
+    }
+  }
+}
+#endif
 }
 #endif
@@ -1675,4 +1677,25 @@
     }  
   }
+#if CAM_HLS_F0136_F0045_F0082
+  WRITE_UVLC( pcVPS->getCamParPrecision(), "cp_precision" );
+  for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
+  {
+    WRITE_FLAG( pcVPS->getCamParPresent(viewIndex) ? 1 : 0, "cp_present_flag[i]" );
+    if ( pcVPS->getCamParPresent(viewIndex) )
+    {
+      WRITE_FLAG( pcVPS->hasCamParInSliceHeader(viewIndex) ? 1 : 0, "cp_in_slice_segment_header_flag[i]" );
+      if ( !pcVPS->hasCamParInSliceHeader(viewIndex) )
+      {
+        for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ )
+        {
+          WRITE_SVLC( pcVPS->getCodedScale    (viewIndex)[ uiIndex ],                                               "vps_cp_scale" );
+          WRITE_SVLC( pcVPS->getCodedOffset   (viewIndex)[ uiIndex ],                                               "vps_cp_off" );
+          WRITE_SVLC( pcVPS->getInvCodedScale (viewIndex)[ uiIndex ] + pcVPS->getCodedScale (viewIndex)[ uiIndex ], "vps_cp_inv_scale_plus_scale" );
+          WRITE_SVLC( pcVPS->getInvCodedOffset(viewIndex)[ uiIndex ] + pcVPS->getCodedOffset(viewIndex)[ uiIndex ], "vps_cp_inv_off_plus_off" );
+        }
+      }
+    }
+  }
+#endif
 #if H_3D_TMVP
   WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 ,          "iv_mv_scaling_flag" );
@@ -2139,13 +2162,37 @@
     }
   }
+#if CAM_HLS_F0044
+#if QC_DEPTH_IV_MRG_F0125
+#if CAM_HLS_F0136_F0045_F0082
+  if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && !pcSlice->getIsDepth() )
+#else
+  if( pcSlice->getSPS()->hasCamParInSliceHeader() && !pcSlice->getIsDepth() )
+#endif
+#else
+  if( pcSlice->getSPS()->hasCamParInSliceHeader() )
+#endif
+  {
+    for( UInt uiId = 0; uiId < pcSlice->getViewIndex(); uiId++ )
+    {
+      WRITE_SVLC( pcSlice->getCodedScale    ()[ uiId ],                                     "cp_scale" );
+      WRITE_SVLC( pcSlice->getCodedOffset   ()[ uiId ],                                     "cp_off" );
+      WRITE_SVLC( pcSlice->getInvCodedScale ()[ uiId ] + pcSlice->getCodedScale ()[ uiId ], "cp_inv_scale_plus_scale" );
+      WRITE_SVLC( pcSlice->getInvCodedOffset()[ uiId ] + pcSlice->getCodedOffset()[ uiId ], "cp_inv_off_plus_off" );
+    }
+  }
+#endif
+
   if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag())
   {
-#if !H_3D
+#if !H_3D || CAM_HLS_F0044
     WRITE_UVLC(0,"slice_header_extension_length");
 #else
     WRITE_UVLC(0,"slice_header_extension_length"); //<- this element needs to be set to the correct value!!
-
 #if QC_DEPTH_IV_MRG_F0125
+#if CAM_HLS_F0136_F0045_F0082
+    if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && !pcSlice->getIsDepth() )
+#else
     if( pcSlice->getSPS()->hasCamParInSliceHeader() && !pcSlice->getIsDepth() )
+#endif
 #else
     if( pcSlice->getSPS()->hasCamParInSliceHeader() )
Index: /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibEncoder/TEncTop.cpp	(revision 754)
+++ /branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibEncoder/TEncTop.cpp	(revision 755)
@@ -854,4 +854,5 @@
   }
 #if H_3D
+#if !CAM_HLS_F0136_F0045_F0082
 #if !QC_DEPTH_IV_MRG_F0125
   if ( !m_isDepth )
@@ -860,4 +861,5 @@
     m_cSPS.initCamParaSPS           ( m_viewIndex, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset );
   }
+#endif
 #endif
 }
@@ -1010,5 +1012,9 @@
   }
 #if H_3D
+#if CAM_HLS_F0136_F0045_F0082
+  if( m_cVPS->hasCamParInSliceHeader( getViewIndex() ) )
+#else
   if( m_cSPS.hasCamParInSliceHeader() )
+#endif
   {
     m_cPPS.setSliceHeaderExtensionPresentFlag( true ); 
