Index: /branches/HTM-12.2-dev2-LGE/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1094)
@@ -885,8 +885,10 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
           m_acTEncTopList[ layer ]->getSliceEncoder()->setDDDPar( m_cCameraData.getCodedScale()[0][ m_acTEncTopList[layer]->getViewIndex() ], 
               m_cCameraData.getCodedOffset()[0][ m_acTEncTopList[layer]->getViewIndex() ], 
               m_cCameraData.getCamParsCodedPrecision() );
+#endif
 #endif
         Int   iNumEncoded = 0;
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1094)
@@ -154,7 +154,9 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   m_pucDisparityDerivedDepth = NULL;
   m_pbUseDDD = NULL;
+#endif
 #endif
 }
@@ -298,9 +300,11 @@
   // create pattern memory
   m_pcPattern            = (TComPattern*)xMalloc(TComPattern, 1);
-  
+
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   m_pucDisparityDerivedDepth         = (UChar*  )xMalloc( UChar,  uiNumPartition);
   m_pbUseDDD                         = (Bool*  ) xMalloc( Bool,   uiNumPartition);
 #endif 
+#endif
 
   // create motion vector fields
@@ -386,7 +390,9 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
     if ( m_pucDisparityDerivedDepth ) { xFree(m_pucDisparityDerivedDepth);          m_pucDisparityDerivedDepth        = NULL; }
     if ( m_pbUseDDD                 ) { xFree(m_pbUseDDD);                          m_pbUseDDD                        = NULL; }
+#endif
 #endif
 
@@ -518,9 +524,10 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
     m_pucDisparityDerivedDepth[ui] = pcFrom->m_pucDisparityDerivedDepth[ui];
     m_pbUseDDD[ui] = pcFrom->m_pbUseDDD[ui];
 #endif
-
+#endif
     m_puhWidth  [ui] = pcFrom->getWidth(ui);
     m_puhHeight [ui] = pcFrom->getHeight(ui);
@@ -604,7 +611,9 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
     memset( m_pucDisparityDerivedDepth        + firstElement, 0,           numElements * sizeof( *m_pucDisparityDerivedDepth ) );
     memset( m_pbUseDDD                        + firstElement, 0,           numElements * sizeof( *m_pbUseDDD ) );
+#endif
 #endif
 
@@ -784,7 +793,9 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
       m_pucDisparityDerivedDepth[ui] = 0;
       m_pbUseDDD[ui] = 0;
+#endif
 #endif
 
@@ -893,7 +904,9 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   memset( m_pucDisparityDerivedDepth,         0, iSizeInUchar );
   memset( m_pbUseDDD,                         0, iSizeInBool );
+#endif
 #endif
 
@@ -990,7 +1003,9 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
       m_pucDisparityDerivedDepth[ui] = pcCU->m_pucDisparityDerivedDepth[uiPartOffset+ui];
       m_pbUseDDD[ui]                 = pcCU->m_pbUseDDD[uiPartOffset+ui];
+#endif
 #endif
 
@@ -1139,7 +1154,9 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   m_pucDisparityDerivedDepth          = pcCU->getDDDepth()        + uiPart;
   m_pbUseDDD                          = pcCU->getUseDDD()         + uiPart;
+#endif
 #endif
 
@@ -1292,7 +1309,9 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   m_pucDisparityDerivedDepth         = pcCU->getDDDepth()              + uiAbsPartIdx;
   m_pbUseDDD                         = pcCU->getUseDDD()              + uiAbsPartIdx;
+#endif
 #endif
     
@@ -1360,8 +1379,10 @@
   memcpy( m_puhCbf[1] + uiOffset, pcCU->getCbf(TEXT_CHROMA_U), iSizeInUchar );
   memcpy( m_puhCbf[2] + uiOffset, pcCU->getCbf(TEXT_CHROMA_V), iSizeInUchar );
-  
+
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   memcpy( m_pucDisparityDerivedDepth          + uiOffset, pcCU->getDDDepth(),         iSizeInUchar );
   memcpy( m_pbUseDDD                          + uiOffset, pcCU->getUseDDD(),          iSizeInBool );
+#endif
 #endif
 
@@ -1464,7 +1485,9 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   memcpy( rpcCU->getDDDepth()          + m_uiAbsIdxInLCU, m_pucDisparityDerivedDepth,         iSizeInUchar  );
   memcpy( rpcCU->getUseDDD()           + m_uiAbsIdxInLCU, m_pbUseDDD,                         iSizeInBool  );
+#endif
 #endif
 
@@ -1600,8 +1623,10 @@
   memcpy( rpcCU->getCbf(TEXT_CHROMA_U) + uiPartOffset, m_puhCbf[1], iSizeInUchar );
   memcpy( rpcCU->getCbf(TEXT_CHROMA_V) + uiPartOffset, m_puhCbf[2], iSizeInUchar );
-  
+
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   memcpy( rpcCU->getDDDepth()          + uiPartOffset, m_pucDisparityDerivedDepth,         iSizeInUchar );
   memcpy( rpcCU->getUseDDD()           + uiPartOffset, m_pbUseDDD,                         iSizeInBool );
+#endif
 #endif
 
@@ -1671,4 +1696,5 @@
 }
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
 Void TComDataCU::setDDDepthSubParts ( UChar ucDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
@@ -1687,4 +1713,5 @@
 }
 
+#endif
 #endif
 
@@ -3877,6 +3904,8 @@
   UChar tmpDir;
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   m_iUseDDDCandIdx = -1;
+#endif
 #endif
 
@@ -4276,4 +4305,5 @@
     }
   }
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   if( m_pcSlice->getIsDepth() && m_pcSlice->getViewIndex() != 0  && bMPIFlag )
@@ -4359,4 +4389,5 @@
     }
   }
+#endif
 #endif
   /////////////////////////////////////////////////////////////////
@@ -4554,4 +4585,5 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   // early termination
@@ -4560,4 +4592,5 @@
       return;
   }
+#endif
 #endif
 
@@ -6076,4 +6109,20 @@
 
   TComMv cMv; 
+#if LGE_DEFAULT_DV_J0046
+  if ( getSlice()->getDefaultRefViewIdxAvailableFlag() )
+  {
+      Int iViewIdx = getSlice()->getDefaultRefViewIdx();
+      pDisp->m_aVIdxCan = iViewIdx;
+      Int iDisp     = getSlice()->getDepthToDisparityB( iViewIdx )[ 1 << ( getSlice()->getSPS()->getBitDepthY() - 1 ) ];
+
+      cMv.setHor(iDisp);
+      cMv.setVer(0);
+      pDisp->m_acNBDV = cMv;
+      pDisp->m_aVIdxCan = iViewIdx;
+
+      return true;
+  }
+  return false;
+#else
 #if MTK_I0093
   Int iDisp     = getSlice()->getDepthToDisparityB( 0 )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepthY() - 1 )) ];
@@ -6087,4 +6136,5 @@
 
   return true;
+#endif
 }
 #endif
@@ -6338,4 +6388,37 @@
   pDInfo->m_acNBDV = defaultDV;
 
+#if LGE_DEFAULT_DV_J0046
+  if (getSlice()->getDefaultRefViewIdxAvailableFlag())
+  {
+      pDInfo->m_aVIdxCan = getSlice()->getDefaultRefViewIdx();
+
+#if H_3D_NBDV_REF
+          TComPic* picDepth = NULL;
+#if H_3D_FCO_VSP_DONBDV_E0163
+          picDepth  = getSlice()->getIvPic(true, getSlice()->getViewIndex() );
+      if ( picDepth->getPicYuvRec() != NULL )  
+      {
+          defaultDV.setZero();
+      }
+      else // Go back with virtual depth
+      {
+          picDepth = getSlice()->getIvPic( true, getSlice()->getDefaultRefViewIdx());
+      }
+
+      assert(picDepth != NULL);
+#else
+          picDepth = getSlice()->getIvPic( true, getSlice()->getDefaultRefViewIdx());
+#endif
+      if (picDepth && bDepthRefine)
+      {
+          estimateDVFromDM(getSlice()->getDefaultRefViewIdx(), uiPartIdx, picDepth, uiPartAddr, &defaultDV ); // from base view
+      }
+      pDInfo->m_acDoNBDV = defaultDV;
+#endif
+#if LGE_SIMP_DISP_AVAIL_J0041
+      return true;
+#endif
+  }
+#else
   Int valid = 0;
   Int viewIndex = 0;
@@ -6389,5 +6472,9 @@
     pDInfo->m_acDoNBDV = defaultDV;
 #endif
-  }
+#if LGE_SIMP_DISP_AVAIL_J0041
+    return true;
+#endif
+  }
+#endif
   return false; 
 }
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComDataCU.h	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComDataCU.h	(revision 1094)
@@ -227,5 +227,5 @@
   DisInfo       m_cDefaultDisInfo;    ///< Default disparity information for initializing
 #endif
-
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   UChar*        m_pucDisparityDerivedDepth;
@@ -234,5 +234,5 @@
   UChar         m_ucDDTmpDepth;
 #endif
-
+#endif
 #if H_3D_IV_MERGE
   TComMotionCand  m_mergCands[MRG_IVSHIFT+1];
@@ -743,4 +743,5 @@
   UInt          getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra);
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   UChar*       getDDDepth        ()                        { return m_pucDisparityDerivedDepth;        }
@@ -759,4 +760,5 @@
   Int          getUseDDDCandIdx(){ return m_iUseDDDCandIdx;}
 
+#endif
 #endif
 
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComPrediction.cpp	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComPrediction.cpp	(revision 1094)
@@ -1158,4 +1158,5 @@
   pcCU->clipMv(cMv);
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   if( pcCU->getUseDDD( uiPartAddr ) )
@@ -1193,4 +1194,5 @@
       //return;
   } else
+#endif
 #endif
 #if H_3D_ARP
@@ -1949,4 +1951,5 @@
     Int a, b, i, j;
     const Int iShift = IC_CONST_SHIFT;
+
     xGetLLSICPrediction( cu, mv, refPic, a, b, TEXT_CHROMA_U ); // Cb
     for ( i = 0; i < cxHeight; i++ )
@@ -2187,6 +2190,13 @@
       x += pRef[j];
       y += pRec[j];
-      xx += (pRef[j] * pRef[j])>>precShift;
-      xy += (pRef[j] * pRec[j])>>precShift;
+#if LGE_CHROMA_IC_J0050_J0034
+      if ( eType == TEXT_LUMA )
+      {
+#endif
+        xx += (pRef[j] * pRef[j])>>precShift;
+        xy += (pRef[j] * pRec[j])>>precShift;
+#if LGE_CHROMA_IC_J0050_J0034
+      }
+#endif
     }
     iCountShift += g_aucConvertToBit[ uiWidth ] + 1;
@@ -2217,8 +2227,13 @@
       x += pRef[0];
       y += pRec[0];
-
-      xx += (pRef[0] * pRef[0])>>precShift;
-      xy += (pRef[0] * pRec[0])>>precShift;
-
+#if LGE_CHROMA_IC_J0050_J0034
+      if ( eType == TEXT_LUMA )
+      {
+#endif
+        xx += (pRef[0] * pRef[0])>>precShift;
+        xy += (pRef[0] * pRec[0])>>precShift;
+#if LGE_CHROMA_IC_J0050_J0034
+      }
+#endif      
       pRef += iRefStride*2;
       pRec += iRecStride*2;
@@ -2234,4 +2249,13 @@
   }
 
+#if LGE_CHROMA_IC_J0050_J0034
+  if (  eType != TEXT_LUMA )
+  {
+    a = 32;
+    b = (  y - x + ( 1 << ( iCountShift - 1 ) ) ) >> iCountShift;
+  }
+  else
+  {
+#endif
   xy += xx >> IC_REG_COST_SHIFT;
   xx += xx >> IC_REG_COST_SHIFT;
@@ -2275,4 +2299,7 @@
     }
   }   
+#if LGE_CHROMA_IC_J0050_J0034
+  }
+#endif
 }
 #endif
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComSlice.cpp	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComSlice.cpp	(revision 1094)
@@ -178,4 +178,8 @@
     m_interLayerPredLayerIdc[ i ] = -1;
   }
+#endif
+#if LGE_DEFAULT_DV_J0046
+  m_iDefaultRefViewIdx = -1;
+  m_bDefaultRefViewIdxAvailableFlag = false;
 #endif
 }
@@ -3883,4 +3887,5 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
 #if H_3D_FCO
@@ -3896,4 +3901,5 @@
   }  
 #endif 
+#endif
 
   if( !setupLUT )
@@ -3944,13 +3950,15 @@
       m_depthToDisparityF[ i ][ d ] = ( invCodScale[ i ] * d + invOffset ) >> log2Div; 
     }
-
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
     initializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i );
 #endif
-  }
-}
-#endif
-#endif
-
+#endif
+  }
+}
+#endif
+#endif
+
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
 Void TComSlice::initializeDDDPara( UInt uiCamParsCodedPrecision, Int  iCodedScale,Int  iCodedOffset, Int iBaseViewIdx )
@@ -4015,4 +4023,5 @@
 
 #endif
+#endif
 
 #if H_MV
@@ -4048,4 +4057,5 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DBBP
 Int TComSlice::getDepthFromDV( Int iDV, Int iBaseViewIdx )
@@ -4053,4 +4063,5 @@
   return ClipY(( iDV * m_aiDDDInvScale[ iBaseViewIdx ] + m_aiDDDInvOffset[ iBaseViewIdx ] ) >> m_aiDDDShift[ iBaseViewIdx ]);
 }
+#endif
 #endif
 
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComSlice.h	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TComSlice.h	(revision 1094)
@@ -2342,5 +2342,5 @@
 #endif
 #endif
-
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   Int          m_aiDDDInvScale [MAX_NUM_LAYERS];
@@ -2348,4 +2348,5 @@
   UInt         m_aiDDDShift    [MAX_NUM_LAYERS];
 #endif
+#endif
 #if H_3D_SINGLE_DEPTH
   Bool      m_bApplySingleDepthMode;
@@ -2354,4 +2355,8 @@
   Int *m_aICEnableCandidate;
   Int *m_aICEnableNum;
+#endif
+#if LGE_DEFAULT_DV_J0046
+  Int       m_iDefaultRefViewIdx;
+  Bool      m_bDefaultRefViewIdxAvailableFlag;
 #endif
 public:
@@ -2762,7 +2767,16 @@
   Bool inferPocMsbValPresentFlag();  
 #endif
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   Void initializeDDDPara( UInt uiCamParsCodedPrecision, Int  iCodedScale,Int  iCodedOffset, Int iBaseViewIdx );
   Int  getDepthFromDV( Int iDV, Int iBaseViewIdx );
+#endif
+#endif
+#if LGE_DEFAULT_DV_J0046
+  Int  getDefaultRefViewIdx() { return m_iDefaultRefViewIdx; }
+  Void setDefaultRefViewIdx(Int iViewIdx) { m_iDefaultRefViewIdx = iViewIdx; }
+
+  Bool getDefaultRefViewIdxAvailableFlag() { return m_bDefaultRefViewIdxAvailableFlag; }
+  Void setDefaultRefViewIdxAvailableFlag(Bool bViewIdx) { m_bDefaultRefViewIdxAvailableFlag = bViewIdx; }
 #endif
 
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TypeDef.h	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibCommon/TypeDef.h	(revision 1094)
@@ -103,4 +103,5 @@
                                               // MTK_NBDV_TN_FIX_E0172     fix the issue of DV derivation from the temporal neighboring blocks, issue 7 in JCT3V-E0172
                                               // MTK_TEXTURE_MRGCAND_BUGFIX_E0182  Bug fix for TEXTURE MERGING CANDIDATE     , JCT3V-E0182
+#define LGE_SIMP_DISP_AVAIL_J0041    1   // Use 2 status for disparity availability - DISP_AVAILABLE and DISP_NONE
 
 #define H_3D_ARP                          1   // Advanced residual prediction (ARP), JCT3V-D0177
@@ -256,4 +257,5 @@
 
 #define H_3D_DDD                          1   // Disparity derived depth coding
+#define LGE_DDD_REMOVAL_J0042_J0030    1   // DDD removal
 
 #define H_3D_FCO                          0   // Flexible coding order for 3D
@@ -307,4 +309,5 @@
 #define DVFROM_ABOVE                      1
 #define IDV_CANDS                         2
+#define LGE_DEFAULT_DV_J0046              1
 #endif
 
@@ -342,4 +345,5 @@
 #define IC_SHIFT_DIFF                     12
 #define IC_LOW_LATENCY_ENCODING_THRESHOLD 0.1 // Threshold for low-latency IC encoding in JCT3V-H0086
+#define LGE_CHROMA_IC_J0050_J0034         1
 #endif
 
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1094)
@@ -291,8 +291,8 @@
   DTRACE_CU_S("=========== coding_unit ===========\n")
 #endif
-
-
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
       pcCU->setUseDDD( false, uiAbsPartIdx, uiDepth );
+#endif
 #endif
 
@@ -452,5 +452,5 @@
 #endif
     pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
-
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
     if( uiMergeIndex == m_ppcCU[uiDepth]->getUseDDDCandIdx() )
@@ -460,4 +460,5 @@
         pcCU->setDDDepthSubParts( m_ppcCU[uiDepth]->getDDTmpDepth(),uiAbsPartIdx, 0, uiDepth );
     }
+#endif
 #endif
 
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1094)
@@ -337,5 +337,5 @@
       }
       pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
-
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
       if( uiMergeIndex == pcSubCU->getUseDDDCandIdx() )
@@ -349,4 +349,5 @@
           pcCU->setUseDDD( false, uiSubPartIdx, uiPartIdx, uiDepth );
       }
+#endif
 #endif
 
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibDecoder/TDecSlice.cpp
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 1094)
@@ -280,4 +280,36 @@
       iNumSubstreamsPerTile = 1;
     }
+#if LGE_DEFAULT_DV_J0046
+    pcSlice->setDefaultRefViewIdx( -1 );
+    pcSlice->setDefaultRefViewIdxAvailableFlag( false ); 
+
+    Int valid = 0;
+    Int viewIndex = 0;
+    for( UInt uiBId = 0; uiBId < pcSlice->getViewIndex() && valid==0; uiBId++ )
+    {
+        UInt        uiBaseId    = uiBId;
+        TComPic*    pcBasePic   = pcSlice->getIvPic( false, uiBaseId );
+        for( Int iRefListId = 0; ( iRefListId < (pcSlice->isInterB()? 2:1) ) && !pcSlice->isIntra() && valid==0; iRefListId++ )
+        {
+            RefPicList  eRefPicListTest = RefPicList( iRefListId );
+            Int         iNumRefPics = pcSlice->getNumRefIdx( eRefPicListTest ) ;
+            for( Int iRefIndex = 0; iRefIndex < iNumRefPics; iRefIndex++ )
+            { 
+                if(pcBasePic->getPOC() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getPOC() 
+                    && pcBasePic->getViewIndex() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getViewIndex())
+                {
+                    valid=1;
+                    viewIndex = uiBaseId;
+                    break;
+                }
+            }
+        }
+    }
+    if( valid )
+    {
+        pcSlice->setDefaultRefViewIdx( viewIndex );
+        pcSlice->setDefaultRefViewIdxAvailableFlag( true );   
+    }
+#endif
 
     if ( (iCUAddr == rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getFirstCUAddr()) && // 1st in tile.
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibDecoder/TDecTop.h	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibDecoder/TDecTop.h	(revision 1094)
@@ -83,8 +83,10 @@
 #endif
 
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   Int getCodedScale( Int iBaseView, Int iCureView){ return m_aaiCodedScale[ iBaseView ][ iCureView ];}
   Int getCodedOffset( Int iBaseView, Int iCureView){ return m_aaiCodedOffset[ iBaseView ][ iCureView ];}
   UInt getCamParsCodedPrecision(){ return m_vps->getCamParPrecision(); }
+#endif
 #endif
 
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibEncoder/TEncCu.cpp	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibEncoder/TEncCu.cpp	(revision 1094)
@@ -1869,9 +1869,10 @@
 
 #endif
-
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
     Int iDDDCand = rpcTempCU->getUseDDDCandIdx(); 
     UChar ucDDDepth = rpcTempCU->getDDTmpDepth();
     rpcTempCU->setUseDDD( false, 0, uhDepth );
+#endif
 #endif
 
@@ -1908,4 +1909,5 @@
           rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth );
 #endif
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
           if( rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewIndex() != 0 && iDDDCand == uiMergeCand )
@@ -1918,4 +1920,5 @@
               rpcTempCU->setUseDDD( false, 0, 0, uhDepth );
           }
+#endif
 #endif
 #if H_3D_SPIVMP
@@ -2204,6 +2207,8 @@
   rpcTempCU->setPartSizeSubParts  ( ePartSize,  0, uhDepth );
   rpcTempCU->setPredModeSubParts  ( MODE_INTER, 0, uhDepth );
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   rpcTempCU->setUseDDD( false, 0, uhDepth );
+#endif
 #endif
 
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1094)
@@ -4143,5 +4143,5 @@
       }
 #endif
-
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
       if( uiMergeCand == pcCU->getUseDDDCandIdx() )
@@ -4154,4 +4154,5 @@
         pcCU->setUseDDD( false, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
       }
+#endif
 #endif
 
@@ -4841,4 +4842,5 @@
         pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
 #endif
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
         if( uiMRGIndex == pcCU->getUseDDDCandIdx() )
@@ -4853,4 +4855,5 @@
             pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
         }
+#endif
 #endif
 #if H_3D_SPIVMP
@@ -4930,6 +4933,8 @@
         pcCU->setSPIVMPFlagSubParts(0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 
 #endif
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
         pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
+#endif
 #endif
         // set ME result
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 1094)
@@ -1011,4 +1011,37 @@
     }
   }
+#if LGE_DEFAULT_DV_J0046
+  pcSlice->setDefaultRefViewIdx( -1 );
+  pcSlice->setDefaultRefViewIdxAvailableFlag( false ); 
+
+  Int valid = 0;
+  Int viewIndex = 0;
+  for( UInt uiBId = 0; uiBId < pcSlice->getViewIndex() && valid==0; uiBId++ )
+  {
+      UInt        uiBaseId    = uiBId;
+      TComPic*    pcBasePic   = pcSlice->getIvPic( false, uiBaseId );
+      for( Int iRefListId = 0; ( iRefListId < (pcSlice->isInterB()? 2:1) ) && !pcSlice->isIntra() && valid==0; iRefListId++ )
+      {
+          RefPicList  eRefPicListTest = RefPicList( iRefListId );
+          Int         iNumRefPics = pcSlice->getNumRefIdx( eRefPicListTest ) ;
+          for( Int iRefIndex = 0; iRefIndex < iNumRefPics; iRefIndex++ )
+          { 
+              if(pcBasePic->getPOC() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getPOC() 
+                  && pcBasePic->getViewIndex() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getViewIndex())
+              {
+                  valid=1;
+                  viewIndex = uiBaseId;
+                  break;
+              }
+          }
+      }
+  }
+  if( valid )
+  {
+      pcSlice->setDefaultRefViewIdx( viewIndex );
+      pcSlice->setDefaultRefViewIdxAvailableFlag( true );   
+  }
+#endif
+
   // for every CU in slice
 #if H_3D
@@ -1169,5 +1202,4 @@
 #endif
       }
-
       // run CU encoder
       m_pcCuEncoder->compressCU( pcCU );
Index: /branches/HTM-12.2-dev2-LGE/source/Lib/TLibEncoder/TEncSlice.h
===================================================================
--- /branches/HTM-12.2-dev2-LGE/source/Lib/TLibEncoder/TEncSlice.h	(revision 1093)
+++ /branches/HTM-12.2-dev2-LGE/source/Lib/TLibEncoder/TEncSlice.h	(revision 1094)
@@ -107,8 +107,10 @@
   UInt                    m_uiSliceIdx;
   std::vector<TEncSbac*> CTXMem;
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   Int          m_iDDDScale;
   Int          m_iDDDOffset;
   UInt         m_uiDDDPrecision;
+#endif
 #endif
 public:
@@ -145,7 +147,8 @@
   Void      initCtxMem( UInt i );
   Void      setCtxMem( TEncSbac* sb, Int b )   { CTXMem[b] = sb; }
-
+#if !LGE_DDD_REMOVAL_J0042_J0030
 #if H_3D_DDD
   Void setDDDPar( Int iScale, Int iOffset, UInt uiPrecision ){ m_iDDDScale = iScale; m_iDDDOffset = iOffset; m_uiDDDPrecision = uiPrecision; }
+#endif
 #endif
 
