Index: /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 599)
+++ /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 600)
@@ -6320,5 +6320,4 @@
 #endif
 
-#if H_3D_FIX
 #if H_3D_IC
 Void TComDataCU::setICFlagSubParts( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
@@ -7013,698 +7012,5 @@
 }
 #endif
-#else
-#if H_3D_IC
-Void TComDataCU::setICFlagSubParts( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
-{
-  memset( m_pbICFlag + uiAbsPartIdx, bICFlag, (m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ))*sizeof(Bool) );
-}
-
-Bool TComDataCU::isICFlagRequired( UInt uiAbsPartIdx )
-{
-  UInt uiPartAddr;
-  UInt iNumbPart;
-
-  if( !( getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) )
-  {
-    return false;
-  }
-
-  if( getSlice()->getIcSkipParseFlag() )
-  {
-    if( getMergeFlag( uiAbsPartIdx ) && getMergeIndex( uiAbsPartIdx ) == 0 )
-    {
-      return false;
-    }
-  }
-
-  if( getMergeFlag( uiAbsPartIdx ) )
-  {
-    return true;
-  }
-
-
-  Int iWidth, iHeight;
-
-  iNumbPart = ( getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ? 1 : ( getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ? 4 : 2 ) );
-
-  for(UInt i = 0; i < iNumbPart; i++)
-  {
-    getPartIndexAndSize( i, uiPartAddr, iWidth, iHeight, uiAbsPartIdx, true );
-    uiPartAddr += uiAbsPartIdx;
-
-    for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++)
-    {
-      RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
-      Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr);
-
-      if( ( getInterDir( uiPartAddr ) & ( uiRefIdx+1 ) ) && iBestRefIdx >= 0 && getSlice()->getViewIndex() != getSlice()->getRefPic( eRefList, iBestRefIdx )->getViewIndex() )
-      {
-        return true;
-      }
-    }
-  }
-
-  return false;
-}
-#if H_3D_DIM_DMM
-Void TComDataCU::setDmmWedgeTabIdxSubParts( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth )
-{
-  UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
-  for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; }
-}
-Void  TComDataCU::setDmm2DeltaEndSubParts( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth )
-{
-  UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
-  for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm2DeltaEnd[uiAbsPartIdx+ui] = iDelta; }
-}
-Void  TComDataCU::setDmm3IntraTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth )
-{
-  UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
-  for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm3IntraTabIdx[uiAbsPartIdx+ui] = uiTIdx; }
-}
-#endif
-#if H_3D_DIM_RBC
-Void TComDataCU::reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion )
-{
-  Int iWidth;
-  Int iHeight;
-  if( uiDepth == 0 )
-  {
-    iWidth = 64;
-    iHeight = 64;
-  }
-  else if( uiDepth == 1 )
-  {
-    iWidth = 32;
-    iHeight = 32;
-  }
-  else if( uiDepth == 2 )
-  {
-    iWidth = 16;
-    iHeight = 16;
-  }
-  else if( uiDepth == 3 )
-  {
-    iWidth = 8;
-    iHeight = 8;
-  }
-  else // uiDepth == 4
-  {
-    iWidth = 4;
-    iHeight = 4;
-  }
-
-  Int iPtr = 0;
-  Int iX, iY;
-  Int iDir = -1;
-  Int iDiffX = 0, iDiffY = 0;
-
-  // 1. Edge Code -> Vert & Horz Edges
-  Bool*  pbEdge = (Bool*) xMalloc( Bool, 4 * iWidth * iHeight );
-
-  for( UInt ui = 0; ui < 4 * iWidth * iHeight; ui++ )
-    pbEdge  [ ui ] = false;
-
-  // Direction : left(0), right(1), top(2), bottom(3), left-top(4), right-top(5), left-bottom(6), right-bottom(7)
-  // Code      : 0deg(0), 45deg(1), -45deg(2), 90deg(3), -90deg(4), 135deg(5), -135deg(6)
-  const UChar tableDir[8][7] = { { 0, 6, 4, 3, 2, 7, 5 },
-  { 1, 5, 7, 2, 3, 4, 6 },
-  { 2, 4, 5, 0, 1, 6, 7 },
-  { 3, 7, 6, 1, 0, 5, 4 },
-  { 4, 0, 2, 6, 5, 3, 1 },
-  { 5, 2, 1, 4, 7, 0, 3 },
-  { 6, 3, 0, 7, 4, 1, 2 },
-  { 7, 1, 3, 5, 6, 2, 0 }};
-
-  UChar ucCode = pucEdgeCode[iPtr++];
-
-  if( !bLeft )
-  {
-    iX = ucStartPos;
-    iY = 0;
-
-    switch(ucCode)
-    {
-    case 0: // bottom
-      iDir = 3;
-      if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-      break;
-    case 2: // left-bottom
-      iDir = 6;
-      if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-      break;
-    case 1: // right-bottom
-      iDir = 7;
-      if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-      if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-      break;
-    case 4: // left
-      iDir = 0;
-      assert(false);
-      break;
-    case 3: // right
-      iDir = 1;
-      if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-      if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-      break;
-    }
-  }
-  else
-  {
-    iX = 0;
-    iY = ucStartPos;
-
-    switch(ucCode)
-    {
-    case 0: // right
-      iDir = 1;
-      if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-      break;
-    case 1: // right-top
-      iDir = 5;
-      if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-      if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-      break;
-    case 2: // right-bottom
-      iDir = 7;
-      if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-      break;
-    case 3: // top
-      iDir = 2;
-      if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-      if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-      break;
-    case 4: // bottom
-      iDir = 3;
-      assert(false);
-      break;
-    }
-  }
-
-  switch( iDir )
-  {
-  case 0: // left
-    iDiffX = -1;
-    iDiffY = 0;
-    break;
-  case 1: // right
-    iDiffX = +1;
-    iDiffY = 0;
-    break;
-  case 2: // top
-    iDiffX = 0;
-    iDiffY = -1;
-    break;
-  case 3: // bottom
-    iDiffX = 0;
-    iDiffY = +1;
-    break;
-  case 4: // left-top
-    iDiffX = -1;
-    iDiffY = -1;
-    break;
-  case 5: // right-top
-    iDiffX = +1;
-    iDiffY = -1;
-    break;
-  case 6: // left-bottom
-    iDiffX = -1;
-    iDiffY = +1;
-    break;
-  case 7: // right-bottom
-    iDiffX = +1;
-    iDiffY = +1;
-    break;
-  }
-
-  iX += iDiffX;
-  iY += iDiffY;
-
-  while( iPtr < ucNumEdge )
-  {
-    ucCode = pucEdgeCode[iPtr++];
-
-    Int iNewDir = tableDir[iDir][ucCode];
-
-    switch( iNewDir )
-    {
-    case 0: // left
-      iDiffX = -1;
-      iDiffY = 0;
-      break;
-    case 1: // right
-      iDiffX = +1;
-      iDiffY = 0;
-      break;
-    case 2: // top
-      iDiffX = 0;
-      iDiffY = -1;
-      break;
-    case 3: // bottom
-      iDiffX = 0;
-      iDiffY = +1;
-      break;
-    case 4: // left-top
-      iDiffX = -1;
-      iDiffY = -1;
-      break;
-    case 5: // right-top
-      iDiffX = +1;
-      iDiffY = -1;
-      break;
-    case 6: // left-bottom
-      iDiffX = -1;
-      iDiffY = +1;
-      break;
-    case 7: // right-bottom
-      iDiffX = +1;
-      iDiffY = +1;
-      break;
-    }
-
-    switch( iDir )
-    {
-    case 0: // left
-      switch( ucCode )
-      {
-      case 0:
-      case 2:
-        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
-        break;
-      case 1:
-      case 3:
-        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
-        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      case 4:
-      case 6:
-        // no
-        break;
-      case 5:
-        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
-        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      }
-      break;
-    case 1: // right
-      switch( ucCode )
-      {
-      case 0:
-      case 2:
-        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-        break;
-      case 1:
-      case 3:
-        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      case 4:
-      case 6:
-        // no
-        break;
-      case 5:
-        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
-        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      }
-      break;
-    case 2: // top
-      switch( ucCode )
-      {
-      case 0:
-      case 2:
-        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      case 1:
-      case 3:
-        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
-        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      case 4:
-      case 6:
-        // no
-        break;
-      case 5:
-        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
-        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      }
-      break;
-    case 3: // bottom
-      switch( ucCode )
-      {
-      case 0:
-      case 2:
-        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      case 1:
-      case 3:
-        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-        break;
-      case 4:
-      case 6:
-        // no
-        break;
-      case 5:
-        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-        break;
-      }
-      break;
-    case 4: // left-top
-      switch( ucCode )
-      {
-      case 0:
-      case 1:
-        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
-        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      case 2:
-      case 4:
-        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      case 3:
-      case 5:
-        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
-        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      case 6:
-        // no
-        break;
-      }
-      break;
-    case 5: // right-top
-      switch( ucCode )
-      {
-      case 0:
-      case 1:
-        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      case 2:
-      case 4:
-        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-        break;
-      case 3:
-      case 5:
-        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
-        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      case 6:
-        // no
-        break;
-      }
-      break;
-    case 6: // left-bottom
-      switch( ucCode )
-      {
-      case 0:
-      case 1:
-        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
-        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      case 2:
-      case 4:
-        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
-        break;
-      case 3:
-      case 5:
-        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
-        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-        break;
-      case 6:
-        // no
-        break;
-      }
-      break;
-    case 7: // right-bottom
-      switch( ucCode )
-      {
-      case 0:
-      case 1:
-        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      case 2:
-      case 4:
-        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-        break;
-      case 3:
-      case 5:
-        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
-        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
-        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
-        break;
-      case 6:
-        // no
-        break;
-      }
-      break;
-    }
-
-    assert( iX >= 0 && iX <= iWidth );
-    assert( iY >= 0 && iY <= iHeight );
-
-    iX += iDiffX;
-    iY += iDiffY;
-    iDir = iNewDir;
-  }
-
-  // finalize edge chain
-  if( iX == iWidth-1 )
-  {
-    if( iY == 0 )
-    {
-      if( iDir == 1 )
-      {
-        pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
-      }
-      else if( iDir == 5 )
-      {
-        pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
-      }
-      else
-      {
-        assert(false);
-      }
-    }
-    else if( iY == iHeight-1 )
-    {
-      if( iDir == 3 )
-      {
-        pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
-      }
-      else if( iDir == 7 )
-      {
-        pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
-      }
-      else
-      {
-        assert(false);
-      }
-    }
-    else
-    {
-      if( iDir == 1 )
-      {
-        pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
-      }
-      else if( iDir == 3 )
-      {
-        pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
-        pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
-      }
-      else if( iDir == 5 )
-      {
-        pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
-      }
-      else if( iDir == 7 )
-      {
-        pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
-        pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
-      }
-      else
-      {
-        assert(false);
-      }
-    }
-  }
-  else if( iX == 0 )
-  {
-    if( iY == 0 )
-    {
-      if( iDir == 2 )
-      {
-        pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
-      }
-      else if( iDir == 4 )
-      {
-        pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
-      }
-      else
-      {
-        assert(false);
-      }
-    }
-    else if( iY == iHeight-1 )
-    {
-      if( iDir == 0 )
-      {
-        pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
-      }
-      else if( iDir == 6 )
-      {
-        pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
-      }
-      else
-      {
-        assert(false);
-      }
-    }
-    else
-    {
-      if( iDir == 0 )
-      {
-        pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
-      }
-      else if( iDir == 2 )
-      {
-        pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
-        pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
-      }
-      else if( iDir == 4 )
-      {
-        pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
-        pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
-      }
-      else if( iDir == 6 )
-      {
-        pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
-      }
-      else
-      {
-        assert(false);
-      }
-    }
-  }
-  else if( iY == 0 )
-  {
-    if( iDir == 1 )
-    {
-      pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
-      pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
-    }
-    else if( iDir == 2 )
-    {
-      pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
-    }
-    else if( iDir == 4 )
-    {
-      pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
-    }
-    else if( iDir == 5 )
-    {
-      pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
-      pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
-    }
-    else
-    {
-      assert(false);
-    }
-  }
-  else if( iY == iHeight-1 )
-  {
-    if( iDir == 0 )
-    {
-      pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
-      pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
-    }
-    else if( iDir == 3 )
-    {
-      pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
-    }
-    else if( iDir == 6 )
-    {
-      pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
-      pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
-    }
-    else if( iDir == 7 )
-    {
-      pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
-    }
-    else
-    {
-      assert(false);
-    }
-  }
-  else
-  {
-    printf("reconPartiton: wrong termination\n");
-    assert(false);
-  }
-
-  // Reconstruct Region from Chain Code
-  Bool* pbVisit  = (Bool*) xMalloc( Bool, iWidth * iHeight );
-  Int*  piStack  = (Int* ) xMalloc( Int,  iWidth * iHeight );
-
-  for( UInt ui = 0; ui < iWidth * iHeight; ui++ )
-  {
-    pbRegion[ ui ] = true; // fill it as region 1 (we'll discover region 0 next)
-    pbVisit [ ui ] = false;
-  }
-
-  iPtr = 0;
-  piStack[iPtr++] = (0 << 8) | (0);
-  pbRegion[ 0 ] = false;
-
-  while(iPtr > 0)
-  {
-    Int iTmp = piStack[--iPtr];
-    Int iX1, iY1;
-    iX1 = iTmp & 0xff;
-    iY1 = (iTmp >> 8) & 0xff;
-
-    pbVisit[ iX1 + iY1 * iWidth ] = true;
-
-    assert( iX1 >= 0 && iX1 < iWidth );
-    assert( iY1 >= 0 && iY1 < iHeight );
-
-    if( iX1 > 0 && !pbEdge[ 2 * iX1 - 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 - 1 + iY1 * iWidth ] )
-    {
-      piStack[iPtr++] = (iY1 << 8) | (iX1 - 1);
-      pbRegion[ iX1 - 1 + iY1 * iWidth ] = false;
-    }
-    if( iX1 < iWidth - 1 && !pbEdge[ 2 * iX1 + 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 + 1 + iY1 * iWidth ] )
-    {
-      piStack[iPtr++] = (iY1 << 8) | (iX1 + 1);
-      pbRegion[ iX1 + 1 + iY1 * iWidth ] = false;
-    }
-    if( iY1 > 0 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 - 1) * iWidth ] && !pbVisit[ iX1 + (iY1 - 1) * iWidth ] )
-    {
-      piStack[iPtr++] = ((iY1 - 1) << 8) | iX1;
-      pbRegion[ iX1 + (iY1 - 1) * iWidth ] = false;
-    }
-    if( iY1 < iHeight - 1 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 + 1) * iWidth ] && !pbVisit[ iX1 + (iY1 + 1) * iWidth ] )
-    {
-      piStack[iPtr++] = ((iY1 + 1) << 8) | iX1;
-      pbRegion[ iX1 + (iY1 + 1) * iWidth ] = false;
-    }
-  }
-
-  xFree( pbEdge );
-  xFree( pbVisit );
-  xFree( piStack );
-}
-#endif
-#endif
-#endif
+
 
 //! \}
Index: /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 599)
+++ /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 600)
@@ -165,5 +165,5 @@
                                               // FIX_SDC_ENC_RD_WVSO_D0163
                                               // MTK_SAMPLE_BASED_SDC_D0110
-#define H_3D_FIX                             1
+
 #if H_3D_FIX
 #define H_3D_BVSP_FIX                        1  //DV from NBDV instead of DoNBDV should be used
