Ignore:
Timestamp:
6 Jun 2013, 11:46:05 (11 years ago)
Author:
hhi
Message:

Integation of depth intra methods in macro H_3D_DIM, including:

  • DMM coding modes in H_3D_DIM_DMM.
  • RBC coding mode in H_3D_DIM_RBC.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev1/source/Lib/TLibCommon/TComDataCU.cpp

    r446 r459  
    109109  m_apiMVPNum[1]       = NULL;
    110110
     111#if H_3D_DIM
     112  for( Int i = 0; i < DIM_NUM_TYPE; i++ )
     113  {
     114    m_dimDeltaDC[i][0] = NULL;
     115    m_dimDeltaDC[i][1] = NULL;
     116  }
     117#if H_3D_DIM_DMM
     118  for( Int i = 0; i < DMM_NUM_TYPE; i++ )
     119  {
     120    m_dmmWedgeTabIdx[i] = NULL;
     121  }
     122  m_dmm2DeltaEnd    = NULL;
     123  m_dmm3IntraTabIdx = NULL;
     124#endif
     125#if H_3D_DIM_RBC
     126  m_pucEdgeCode     = NULL;
     127  m_pucEdgeNumber   = NULL;
     128  m_pucEdgeStartPos = NULL;
     129  m_pbEdgeLeftFirst = NULL;
     130  m_pbEdgePartition = NULL;
     131#endif
     132#endif
     133
    111134  m_bDecSubCu          = false;
    112135  m_sliceStartCU        = 0;
     
    202225    m_acCUMvField[1].create( uiNumPartition );
    203226   
     227#if H_3D_DIM
     228    for( Int i = 0; i < DIM_NUM_TYPE; i++ )
     229    {
     230      m_dimDeltaDC[i][0] = (Pel* )xMalloc(Pel, uiNumPartition);
     231      m_dimDeltaDC[i][1] = (Pel* )xMalloc(Pel, uiNumPartition);
     232    }
     233#if H_3D_DIM_DMM
     234    for( Int i = 0; i < DMM_NUM_TYPE; i++ )
     235    {
     236      m_dmmWedgeTabIdx[i]    = (UInt*)xMalloc(UInt, uiNumPartition);
     237    }
     238    m_dmm2DeltaEnd    = (Int* )xMalloc(Int,  uiNumPartition);
     239    m_dmm3IntraTabIdx = (UInt*)xMalloc(UInt, uiNumPartition);
     240#endif
     241#if H_3D_DIM_RBC
     242    m_pucEdgeCode     = (UChar*)xMalloc(UChar, uiNumPartition * RBC_MAX_EDGE_NUM_PER_4x4);
     243    m_pucEdgeNumber   = (UChar*)xMalloc(UChar, uiNumPartition);
     244    m_pucEdgeStartPos = (UChar*)xMalloc(UChar, uiNumPartition);
     245    m_pbEdgeLeftFirst = (Bool*)xMalloc(Bool, uiNumPartition);
     246    m_pbEdgePartition = (Bool*)xMalloc(Bool, uiNumPartition * 16);
     247#endif
     248#endif
    204249  }
    205250  else
     
    288333    m_acCUMvField[1].destroy();
    289334   
     335#if H_3D_DIM
     336    for( Int i = 0; i < DIM_NUM_TYPE; i++ )
     337    {
     338      if ( m_dimDeltaDC[i][0] ) { xFree( m_dimDeltaDC[i][0] ); m_dimDeltaDC[i][0] = NULL; }
     339      if ( m_dimDeltaDC[i][1] ) { xFree( m_dimDeltaDC[i][1] ); m_dimDeltaDC[i][1] = NULL; }
     340    }
     341#if H_3D_DIM_DMM
     342    for( Int i = 0; i < DMM_NUM_TYPE; i++ )
     343    {
     344      if ( m_dmmWedgeTabIdx[i] ) { xFree( m_dmmWedgeTabIdx[i] ); m_dmmWedgeTabIdx[i] = NULL; }
     345    }
     346    if ( m_dmm2DeltaEnd    ) { xFree( m_dmm2DeltaEnd    ); m_dmm2DeltaEnd    = NULL; }
     347    if ( m_dmm3IntraTabIdx ) { xFree( m_dmm3IntraTabIdx ); m_dmm3IntraTabIdx = NULL; }
     348#endif
     349#if H_3D_DIM_RBC
     350    if ( m_pbEdgeLeftFirst ) { xFree( m_pbEdgeLeftFirst ); m_pbEdgeLeftFirst = NULL; }
     351    if ( m_pucEdgeStartPos ) { xFree( m_pucEdgeStartPos ); m_pucEdgeStartPos = NULL; }
     352    if ( m_pucEdgeNumber   ) { xFree( m_pucEdgeNumber   ); m_pucEdgeNumber   = NULL; }
     353    if ( m_pucEdgeCode     ) { xFree( m_pucEdgeCode     ); m_pucEdgeCode     = NULL; }
     354    if ( m_pbEdgePartition ) { xFree( m_pbEdgePartition ); m_pbEdgePartition = NULL; }
     355#endif
     356#endif
    290357  }
    291358 
     
    447514    memset( m_puhCbf[2]         + firstElement, 0,                        numElements * sizeof( *m_puhCbf[2] ) );
    448515    memset( m_pbIPCMFlag        + firstElement, false,                    numElements * sizeof( *m_pbIPCMFlag ) );
     516
     517#if H_3D_DIM
     518    for( Int i = 0; i < DIM_NUM_TYPE; i++ )
     519    {
     520      memset( m_dimDeltaDC[i][0] + firstElement, 0,                       numElements * sizeof( *m_dimDeltaDC[i][0] ) );
     521      memset( m_dimDeltaDC[i][1] + firstElement, 0,                       numElements * sizeof( *m_dimDeltaDC[i][1] ) );
     522    }
     523#if H_3D_DIM_DMM
     524    for( Int i = 0; i < DMM_NUM_TYPE; i++ )
     525    {
     526      memset( m_dmmWedgeTabIdx[i] + firstElement, 0,                      numElements * sizeof( *m_dmmWedgeTabIdx[i] ) );
     527    }
     528    memset( m_dmm2DeltaEnd      + firstElement, 0,                        numElements * sizeof( *m_dmm2DeltaEnd    ) );
     529    memset( m_dmm3IntraTabIdx   + firstElement, 0,                        numElements * sizeof( *m_dmm3IntraTabIdx ) );
     530#endif
     531#if H_3D_DIM_RBC
     532    memset( m_pucEdgeCode       + firstElement, 0,                        numElements * sizeof( *m_pucEdgeCode     ) * RBC_MAX_EDGE_NUM_PER_4x4 );
     533    memset( m_pucEdgeNumber     + firstElement, 0,                        numElements * sizeof( *m_pucEdgeNumber   ) );
     534    memset( m_pucEdgeStartPos   + firstElement, 0,                        numElements * sizeof( *m_pucEdgeStartPos ) );
     535    memset( m_pbEdgeLeftFirst   + firstElement, false,                    numElements * sizeof( *m_pbEdgeLeftFirst ) );
     536    memset( m_pbEdgePartition   + firstElement, false,                    numElements * sizeof( *m_pbEdgePartition ) * 16 );
     537#endif
     538#endif
    449539  }
    450540 
     
    582672      m_puhCbf[1][ui] = 0;
    583673      m_puhCbf[2][ui] = 0;
     674
     675#if H_3D_DIM
     676      for( Int i = 0; i < DIM_NUM_TYPE; i++ )
     677      {
     678        m_dimDeltaDC[i][0] [ui] = 0;
     679        m_dimDeltaDC[i][1] [ui] = 0;
     680      }
     681#if H_3D_DIM_DMM
     682      for( Int i = 0; i < DMM_NUM_TYPE; i++ )
     683      {
     684        m_dmmWedgeTabIdx[i] [ui] = 0;
     685      }
     686      m_dmm2DeltaEnd    [ui] = 0;
     687      m_dmm3IntraTabIdx [ui] = 0;
     688#endif
     689#endif
    584690    }
    585691  }
     
    658764  memset( m_puhHeight,         uhHeight, iSizeInUchar );
    659765  memset( m_pbIPCMFlag,        0, iSizeInBool  );
     766 
     767#if H_3D_DIM
     768  for( Int i = 0; i < DIM_NUM_TYPE; i++ )
     769  {
     770    memset( m_dimDeltaDC[i][0], 0, sizeof(Pel ) * m_uiNumPartition );
     771    memset( m_dimDeltaDC[i][1], 0, sizeof(Pel ) * m_uiNumPartition );
     772  }
     773#if H_3D_DIM_DMM
     774  for( Int i = 0; i < DMM_NUM_TYPE; i++ )
     775  {
     776    memset( m_dmmWedgeTabIdx[i], 0, sizeof(UInt) * m_uiNumPartition );
     777  }
     778  memset( m_dmm2DeltaEnd   , 0, sizeof(Int ) * m_uiNumPartition );
     779  memset( m_dmm3IntraTabIdx, 0, sizeof(UInt) * m_uiNumPartition );
     780#endif
     781#if H_3D_DIM_RBC
     782  memset( m_pucEdgeCode    , 0, iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );
     783  memset( m_pucEdgeNumber  , 0, iSizeInUchar );
     784  memset( m_pucEdgeStartPos, 0, iSizeInUchar );
     785  memset( m_pbEdgeLeftFirst, 0, iSizeInBool );
     786  memset( m_pbEdgePartition, 0, iSizeInBool * 16 );
     787#endif
     788#endif
     789 
    660790  for (UInt ui = 0; ui < m_uiNumPartition; ui++)
    661791  {
     
    696826      m_puhCbf[2][ui]=pcCU->m_puhCbf[2][uiPartOffset+ui];
    697827
     828#if H_3D_DIM
     829      for( Int i = 0; i < DIM_NUM_TYPE; i++ )
     830      {
     831        m_dimDeltaDC[i][0] [ui] = pcCU->m_dimDeltaDC[i][0] [uiPartOffset+ui];
     832        m_dimDeltaDC[i][1] [ui] = pcCU->m_dimDeltaDC[i][1] [uiPartOffset+ui];
     833      }
     834#if H_3D_DIM_DMM
     835      for( Int i = 0; i < DMM_NUM_TYPE; i++ )
     836      {
     837        m_dmmWedgeTabIdx[i] [ui] = pcCU->m_dmmWedgeTabIdx[i] [uiPartOffset+ui];
     838      }
     839      m_dmm2DeltaEnd    [ui] = pcCU->m_dmm2DeltaEnd   [uiPartOffset+ui];
     840      m_dmm3IntraTabIdx [ui] = pcCU->m_dmm3IntraTabIdx[uiPartOffset+ui];
     841#endif
     842#endif
    698843    }
    699844  }
     
    815960  m_puhCbf[2]= pcCU->getCbf(TEXT_CHROMA_V)        + uiPart;
    816961 
     962#if H_3D_DIM
     963  for( Int i = 0; i < DIM_NUM_TYPE; i++ )
     964  {
     965    m_dimDeltaDC[i][0] = pcCU->getDimDeltaDC( i, 0 ) + uiPart;
     966    m_dimDeltaDC[i][1] = pcCU->getDimDeltaDC( i, 1 ) + uiPart;
     967  }
     968#if H_3D_DIM_DMM
     969  for( Int i = 0; i < DMM_NUM_TYPE; i++ )
     970  {
     971    m_dmmWedgeTabIdx[i] = pcCU->getDmmWedgeTabIdx( i ) + uiPart;
     972  }
     973  m_dmm2DeltaEnd    = pcCU->getDmm2DeltaEnd()    + uiPart;
     974  m_dmm3IntraTabIdx = pcCU->getDmm3IntraTabIdx() + uiPart;
     975#endif
     976#if H_3D_DIM_RBC
     977  m_pucEdgeCode     = pcCU->getEdgeCode( uiPart );
     978  m_pucEdgeNumber   = pcCU->getEdgeNumber()      + uiPart;
     979  m_pucEdgeStartPos = pcCU->getEdgeStartPos()    + uiPart;
     980  m_pbEdgeLeftFirst = pcCU->getEdgeLeftFirst()   + uiPart;
     981  m_pbEdgePartition = pcCU->getEdgePartition( uiPart );
     982#endif
     983#endif
     984
    817985  m_puhDepth=pcCU->getDepth()                     + uiPart;
    818986  m_puhWidth=pcCU->getWidth()                     + uiPart;
     
    9421110  memcpy( m_puhCbf[2] + uiOffset, pcCU->getCbf(TEXT_CHROMA_V), iSizeInUchar );
    9431111 
     1112#if H_3D_DIM
     1113  for( Int i = 0; i < DIM_NUM_TYPE; i++ )
     1114  {
     1115    memcpy( m_dimDeltaDC[i][0] + uiOffset, pcCU->getDimDeltaDC( i, 0 ), sizeof(Pel ) * uiNumPartition );
     1116    memcpy( m_dimDeltaDC[i][1] + uiOffset, pcCU->getDimDeltaDC( i, 1 ), sizeof(Pel ) * uiNumPartition );
     1117  }
     1118#if H_3D_DIM_DMM
     1119  for( Int i = 0; i < DMM_NUM_TYPE; i++ )
     1120  {
     1121    memcpy( m_dmmWedgeTabIdx[i] + uiOffset, pcCU->getDmmWedgeTabIdx( i ), sizeof(UInt) * uiNumPartition );
     1122  }
     1123  memcpy( m_dmm2DeltaEnd    + uiOffset, pcCU->getDmm2DeltaEnd()   , sizeof(Int ) * uiNumPartition );
     1124  memcpy( m_dmm3IntraTabIdx + uiOffset, pcCU->getDmm3IntraTabIdx(), sizeof(UInt) * uiNumPartition );
     1125#endif
     1126#if H_3D_DIM_RBC
     1127  memcpy( getEdgeCode( uiOffset ),       pcCU->getEdgeCode(0),      iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );
     1128  memcpy( getEdgeNumber()    + uiOffset, pcCU->getEdgeNumber(),     iSizeInUchar );
     1129  memcpy( getEdgeStartPos()  + uiOffset, pcCU->getEdgeStartPos(),   iSizeInUchar );
     1130  memcpy( getEdgeLeftFirst() + uiOffset, pcCU->getEdgeLeftFirst(),  iSizeInBool );
     1131  memcpy( getEdgePartition( uiOffset ),  pcCU->getEdgePartition(0), iSizeInBool * 16 );
     1132#endif
     1133#endif
     1134
    9441135  memcpy( m_puhDepth  + uiOffset, pcCU->getDepth(),  iSizeInUchar );
    9451136  memcpy( m_puhWidth  + uiOffset, pcCU->getWidth(),  iSizeInUchar );
     
    10221213  memcpy( rpcCU->getCbf(TEXT_CHROMA_V) + m_uiAbsIdxInLCU, m_puhCbf[2], iSizeInUchar );
    10231214 
     1215#if H_3D_DIM
     1216  for( Int i = 0; i < DIM_NUM_TYPE; i++ )
     1217  {
     1218    memcpy( rpcCU->getDimDeltaDC( i, 0 ) + m_uiAbsIdxInLCU, m_dimDeltaDC[i][0], sizeof(Pel ) * m_uiNumPartition );
     1219    memcpy( rpcCU->getDimDeltaDC( i, 1 ) + m_uiAbsIdxInLCU, m_dimDeltaDC[i][1], sizeof(Pel ) * m_uiNumPartition );
     1220  }
     1221#if H_3D_DIM_DMM
     1222  for( Int i = 0; i < DMM_NUM_TYPE; i++ )
     1223  {
     1224    memcpy( rpcCU->getDmmWedgeTabIdx( i ) + m_uiAbsIdxInLCU, m_dmmWedgeTabIdx[i], sizeof(UInt) * m_uiNumPartition );
     1225  }
     1226  memcpy( rpcCU->getDmm2DeltaEnd()    + m_uiAbsIdxInLCU, m_dmm2DeltaEnd   , sizeof(Int ) * m_uiNumPartition );
     1227  memcpy( rpcCU->getDmm3IntraTabIdx() + m_uiAbsIdxInLCU, m_dmm3IntraTabIdx, sizeof(UInt) * m_uiNumPartition );
     1228#endif
     1229#if H_3D_DIM_RBC
     1230  memcpy( rpcCU->getEdgeCode( m_uiAbsIdxInLCU ),         m_pucEdgeCode,     iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );
     1231  memcpy( rpcCU->getEdgeNumber()      + m_uiAbsIdxInLCU, m_pucEdgeNumber,   iSizeInUchar );
     1232  memcpy( rpcCU->getEdgeStartPos()    + m_uiAbsIdxInLCU, m_pucEdgeStartPos, iSizeInUchar );
     1233  memcpy( rpcCU->getEdgeLeftFirst()   + m_uiAbsIdxInLCU, m_pbEdgeLeftFirst, iSizeInBool );
     1234  memcpy( rpcCU->getEdgePartition( m_uiAbsIdxInLCU ),    m_pbEdgePartition, iSizeInBool * 16 );
     1235#endif
     1236#endif
     1237
    10241238  memcpy( rpcCU->getDepth()  + m_uiAbsIdxInLCU, m_puhDepth,  iSizeInUchar );
    10251239  memcpy( rpcCU->getWidth()  + m_uiAbsIdxInLCU, m_puhWidth,  iSizeInUchar );
     
    10931307  memcpy( rpcCU->getCbf(TEXT_CHROMA_V) + uiPartOffset, m_puhCbf[2], iSizeInUchar );
    10941308 
     1309#if H_3D_DIM
     1310  for( Int i = 0; i < DMM_NUM_TYPE; i++ )
     1311  {
     1312    memcpy( rpcCU->getDimDeltaDC( i, 0 ) + uiPartOffset, m_dimDeltaDC[i][0], sizeof(Pel ) * uiQNumPart );
     1313    memcpy( rpcCU->getDimDeltaDC( i, 1 ) + uiPartOffset, m_dimDeltaDC[i][1], sizeof(Pel ) * uiQNumPart );
     1314  }
     1315#if H_3D_DIM_DMM
     1316  for( Int i = 0; i < DMM_NUM_TYPE; i++ )
     1317  {
     1318    memcpy( rpcCU->getDmmWedgeTabIdx( i ) + uiPartOffset, m_dmmWedgeTabIdx[i], sizeof(UInt) * uiQNumPart );
     1319  }
     1320  memcpy( rpcCU->getDmm2DeltaEnd()    + uiPartOffset, m_dmm2DeltaEnd   , sizeof(Int ) * uiQNumPart );
     1321  memcpy( rpcCU->getDmm3IntraTabIdx() + uiPartOffset, m_dmm3IntraTabIdx, sizeof(UInt) * uiQNumPart );
     1322#endif
     1323#if H_3D_DIM_RBC
     1324  memcpy( rpcCU->getEdgeCode( uiPartOffset ),         m_pucEdgeCode,     iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );
     1325  memcpy( rpcCU->getEdgeNumber()      + uiPartOffset, m_pucEdgeNumber,   iSizeInUchar );
     1326  memcpy( rpcCU->getEdgeStartPos()    + uiPartOffset, m_pucEdgeStartPos, iSizeInUchar );
     1327  memcpy( rpcCU->getEdgeLeftFirst()   + uiPartOffset, m_pbEdgeLeftFirst, iSizeInBool );
     1328  memcpy( rpcCU->getEdgePartition( uiPartOffset ),    m_pbEdgePartition, iSizeInBool * 16 );
     1329#endif
     1330#endif
     1331
    10951332  memcpy( rpcCU->getDepth()  + uiPartOffset, m_puhDepth,  iSizeInUchar );
    10961333  memcpy( rpcCU->getWidth()  + uiPartOffset, m_puhWidth,  iSizeInUchar );
     
    16481885 
    16491886  iLeftIntraDir  = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
     1887#if H_3D_DIM
     1888  mapDepthModeToIntraDir( iLeftIntraDir );
     1889#endif
    16501890 
    16511891  // Get intra direction of above PU
     
    16531893 
    16541894  iAboveIntraDir = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
     1895#if H_3D_DIM
     1896  mapDepthModeToIntraDir( iAboveIntraDir );
     1897#endif
    16551898 
    16561899  uiPredNum = 3;
     
    34373680  {
    34383681    uiDirMode = getLumaIntraDir(uiAbsPartIdx);
     3682#if H_3D_DIM
     3683    mapDepthModeToIntraDir( uiDirMode );
     3684#endif
    34393685    uiScanIdx = SCAN_DIAG;
    34403686    if (uiCTXIdx >3 && uiCTXIdx < 6) //if multiple scans supported for transform size
     
    34543700      // get luma mode from upper-left corner of current CU
    34553701      uiDirMode = getLumaIntraDir((uiAbsPartIdx/numParts)*numParts);
     3702#if H_3D_DIM
     3703      mapDepthModeToIntraDir( uiDirMode );
     3704#endif
    34563705    }
    34573706    uiScanIdx = SCAN_DIAG;
     
    38454094  riPosY = g_auiRasterToPelY[g_auiZscanToRaster[uiAbsPartIndex]] + getCUPelY(); 
    38464095}
     4096#if H_3D_DIM_DMM
     4097Void TComDataCU::setDmmWedgeTabIdxSubParts( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth )
     4098{
     4099  UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
     4100  for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; }
     4101}
     4102Void  TComDataCU::setDmm2DeltaEndSubParts( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth )
     4103{
     4104  UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
     4105  for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm2DeltaEnd[uiAbsPartIdx+ui] = iDelta; }
     4106}
     4107Void  TComDataCU::setDmm3IntraTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth )
     4108{
     4109  UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
     4110  for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm3IntraTabIdx[uiAbsPartIdx+ui] = uiTIdx; }
     4111}
     4112#endif
     4113#if H_3D_DIM_RBC
     4114Void TComDataCU::reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion )
     4115{
     4116  Int iWidth;
     4117  Int iHeight;
     4118  if( uiDepth == 0 )
     4119  {
     4120    iWidth = 64;
     4121    iHeight = 64;
     4122  }
     4123  else if( uiDepth == 1 )
     4124  {
     4125    iWidth = 32;
     4126    iHeight = 32;
     4127  }
     4128  else if( uiDepth == 2 )
     4129  {
     4130    iWidth = 16;
     4131    iHeight = 16;
     4132  }
     4133  else if( uiDepth == 3 )
     4134  {
     4135    iWidth = 8;
     4136    iHeight = 8;
     4137  }
     4138  else // uiDepth == 4
     4139  {
     4140    iWidth = 4;
     4141    iHeight = 4;
     4142  }
     4143
     4144  Int iPtr = 0;
     4145  Int iX, iY;
     4146  Int iDir = -1;
     4147  Int iDiffX = 0, iDiffY = 0;
     4148
     4149  // 1. Edge Code -> Vert & Horz Edges
     4150  Bool*  pbEdge = (Bool*) xMalloc( Bool, 4 * iWidth * iHeight );
     4151
     4152  for( UInt ui = 0; ui < 4 * iWidth * iHeight; ui++ )
     4153    pbEdge  [ ui ] = false;
     4154
     4155  // Direction : left(0), right(1), top(2), bottom(3), left-top(4), right-top(5), left-bottom(6), right-bottom(7)
     4156  // Code      : 0deg(0), 45deg(1), -45deg(2), 90deg(3), -90deg(4), 135deg(5), -135deg(6)
     4157  const UChar tableDir[8][7] = { { 0, 6, 4, 3, 2, 7, 5 },
     4158  { 1, 5, 7, 2, 3, 4, 6 },
     4159  { 2, 4, 5, 0, 1, 6, 7 },
     4160  { 3, 7, 6, 1, 0, 5, 4 },
     4161  { 4, 0, 2, 6, 5, 3, 1 },
     4162  { 5, 2, 1, 4, 7, 0, 3 },
     4163  { 6, 3, 0, 7, 4, 1, 2 },
     4164  { 7, 1, 3, 5, 6, 2, 0 }};
     4165
     4166  UChar ucCode = pucEdgeCode[iPtr++];
     4167
     4168  if( !bLeft )
     4169  {
     4170    iX = ucStartPos;
     4171    iY = 0;
     4172
     4173    switch(ucCode)
     4174    {
     4175    case 0: // bottom
     4176      iDir = 3;
     4177      if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4178      break;
     4179    case 2: // left-bottom
     4180      iDir = 6;
     4181      if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4182      break;
     4183    case 1: // right-bottom
     4184      iDir = 7;
     4185      if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4186      if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4187      break;
     4188    case 4: // left
     4189      iDir = 0;
     4190      assert(false);
     4191      break;
     4192    case 3: // right
     4193      iDir = 1;
     4194      if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4195      if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4196      break;
     4197    }
     4198  }
     4199  else
     4200  {
     4201    iX = 0;
     4202    iY = ucStartPos;
     4203
     4204    switch(ucCode)
     4205    {
     4206    case 0: // right
     4207      iDir = 1;
     4208      if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4209      break;
     4210    case 1: // right-top
     4211      iDir = 5;
     4212      if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4213      if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4214      break;
     4215    case 2: // right-bottom
     4216      iDir = 7;
     4217      if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4218      break;
     4219    case 3: // top
     4220      iDir = 2;
     4221      if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4222      if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4223      break;
     4224    case 4: // bottom
     4225      iDir = 3;
     4226      assert(false);
     4227      break;
     4228    }
     4229  }
     4230
     4231  switch( iDir )
     4232  {
     4233  case 0: // left
     4234    iDiffX = -1;
     4235    iDiffY = 0;
     4236    break;
     4237  case 1: // right
     4238    iDiffX = +1;
     4239    iDiffY = 0;
     4240    break;
     4241  case 2: // top
     4242    iDiffX = 0;
     4243    iDiffY = -1;
     4244    break;
     4245  case 3: // bottom
     4246    iDiffX = 0;
     4247    iDiffY = +1;
     4248    break;
     4249  case 4: // left-top
     4250    iDiffX = -1;
     4251    iDiffY = -1;
     4252    break;
     4253  case 5: // right-top
     4254    iDiffX = +1;
     4255    iDiffY = -1;
     4256    break;
     4257  case 6: // left-bottom
     4258    iDiffX = -1;
     4259    iDiffY = +1;
     4260    break;
     4261  case 7: // right-bottom
     4262    iDiffX = +1;
     4263    iDiffY = +1;
     4264    break;
     4265  }
     4266
     4267  iX += iDiffX;
     4268  iY += iDiffY;
     4269
     4270  while( iPtr < ucNumEdge )
     4271  {
     4272    ucCode = pucEdgeCode[iPtr++];
     4273
     4274    Int iNewDir = tableDir[iDir][ucCode];
     4275
     4276    switch( iNewDir )
     4277    {
     4278    case 0: // left
     4279      iDiffX = -1;
     4280      iDiffY = 0;
     4281      break;
     4282    case 1: // right
     4283      iDiffX = +1;
     4284      iDiffY = 0;
     4285      break;
     4286    case 2: // top
     4287      iDiffX = 0;
     4288      iDiffY = -1;
     4289      break;
     4290    case 3: // bottom
     4291      iDiffX = 0;
     4292      iDiffY = +1;
     4293      break;
     4294    case 4: // left-top
     4295      iDiffX = -1;
     4296      iDiffY = -1;
     4297      break;
     4298    case 5: // right-top
     4299      iDiffX = +1;
     4300      iDiffY = -1;
     4301      break;
     4302    case 6: // left-bottom
     4303      iDiffX = -1;
     4304      iDiffY = +1;
     4305      break;
     4306    case 7: // right-bottom
     4307      iDiffX = +1;
     4308      iDiffY = +1;
     4309      break;
     4310    }
     4311
     4312    switch( iDir )
     4313    {
     4314    case 0: // left
     4315      switch( ucCode )
     4316      {
     4317      case 0:
     4318      case 2:
     4319        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
     4320        break;
     4321      case 1:
     4322      case 3:
     4323        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
     4324        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4325        break;
     4326      case 4:
     4327      case 6:
     4328        // no
     4329        break;
     4330      case 5:
     4331        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
     4332        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4333        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4334        break;
     4335      }
     4336      break;
     4337    case 1: // right
     4338      switch( ucCode )
     4339      {
     4340      case 0:
     4341      case 2:
     4342        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4343        break;
     4344      case 1:
     4345      case 3:
     4346        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4347        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4348        break;
     4349      case 4:
     4350      case 6:
     4351        // no
     4352        break;
     4353      case 5:
     4354        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
     4355        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4356        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4357        break;
     4358      }
     4359      break;
     4360    case 2: // top
     4361      switch( ucCode )
     4362      {
     4363      case 0:
     4364      case 2:
     4365        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4366        break;
     4367      case 1:
     4368      case 3:
     4369        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
     4370        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4371        break;
     4372      case 4:
     4373      case 6:
     4374        // no
     4375        break;
     4376      case 5:
     4377        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
     4378        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4379        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4380        break;
     4381      }
     4382      break;
     4383    case 3: // bottom
     4384      switch( ucCode )
     4385      {
     4386      case 0:
     4387      case 2:
     4388        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4389        break;
     4390      case 1:
     4391      case 3:
     4392        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4393        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4394        break;
     4395      case 4:
     4396      case 6:
     4397        // no
     4398        break;
     4399      case 5:
     4400        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4401        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4402        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4403        break;
     4404      }
     4405      break;
     4406    case 4: // left-top
     4407      switch( ucCode )
     4408      {
     4409      case 0:
     4410      case 1:
     4411        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
     4412        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4413        break;
     4414      case 2:
     4415      case 4:
     4416        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4417        break;
     4418      case 3:
     4419      case 5:
     4420        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
     4421        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4422        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4423        break;
     4424      case 6:
     4425        // no
     4426        break;
     4427      }
     4428      break;
     4429    case 5: // right-top
     4430      switch( ucCode )
     4431      {
     4432      case 0:
     4433      case 1:
     4434        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4435        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4436        break;
     4437      case 2:
     4438      case 4:
     4439        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4440        break;
     4441      case 3:
     4442      case 5:
     4443        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
     4444        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4445        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4446        break;
     4447      case 6:
     4448        // no
     4449        break;
     4450      }
     4451      break;
     4452    case 6: // left-bottom
     4453      switch( ucCode )
     4454      {
     4455      case 0:
     4456      case 1:
     4457        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
     4458        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4459        break;
     4460      case 2:
     4461      case 4:
     4462        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
     4463        break;
     4464      case 3:
     4465      case 5:
     4466        if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
     4467        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4468        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4469        break;
     4470      case 6:
     4471        // no
     4472        break;
     4473      }
     4474      break;
     4475    case 7: // right-bottom
     4476      switch( ucCode )
     4477      {
     4478      case 0:
     4479      case 1:
     4480        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4481        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4482        break;
     4483      case 2:
     4484      case 4:
     4485        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4486        break;
     4487      case 3:
     4488      case 5:
     4489        if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
     4490        if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
     4491        if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
     4492        break;
     4493      case 6:
     4494        // no
     4495        break;
     4496      }
     4497      break;
     4498    }
     4499
     4500    assert( iX >= 0 && iX <= iWidth );
     4501    assert( iY >= 0 && iY <= iHeight );
     4502
     4503    iX += iDiffX;
     4504    iY += iDiffY;
     4505    iDir = iNewDir;
     4506  }
     4507
     4508  // finalize edge chain
     4509  if( iX == iWidth-1 )
     4510  {
     4511    if( iY == 0 )
     4512    {
     4513      if( iDir == 1 )
     4514      {
     4515        pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
     4516      }
     4517      else if( iDir == 5 )
     4518      {
     4519        pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
     4520      }
     4521      else
     4522      {
     4523        assert(false);
     4524      }
     4525    }
     4526    else if( iY == iHeight-1 )
     4527    {
     4528      if( iDir == 3 )
     4529      {
     4530        pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
     4531      }
     4532      else if( iDir == 7 )
     4533      {
     4534        pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
     4535      }
     4536      else
     4537      {
     4538        assert(false);
     4539      }
     4540    }
     4541    else
     4542    {
     4543      if( iDir == 1 )
     4544      {
     4545        pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
     4546      }
     4547      else if( iDir == 3 )
     4548      {
     4549        pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
     4550        pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
     4551      }
     4552      else if( iDir == 5 )
     4553      {
     4554        pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
     4555      }
     4556      else if( iDir == 7 )
     4557      {
     4558        pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
     4559        pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
     4560      }
     4561      else
     4562      {
     4563        assert(false);
     4564      }
     4565    }
     4566  }
     4567  else if( iX == 0 )
     4568  {
     4569    if( iY == 0 )
     4570    {
     4571      if( iDir == 2 )
     4572      {
     4573        pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
     4574      }
     4575      else if( iDir == 4 )
     4576      {
     4577        pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
     4578      }
     4579      else
     4580      {
     4581        assert(false);
     4582      }
     4583    }
     4584    else if( iY == iHeight-1 )
     4585    {
     4586      if( iDir == 0 )
     4587      {
     4588        pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
     4589      }
     4590      else if( iDir == 6 )
     4591      {
     4592        pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
     4593      }
     4594      else
     4595      {
     4596        assert(false);
     4597      }
     4598    }
     4599    else
     4600    {
     4601      if( iDir == 0 )
     4602      {
     4603        pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
     4604      }
     4605      else if( iDir == 2 )
     4606      {
     4607        pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
     4608        pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
     4609      }
     4610      else if( iDir == 4 )
     4611      {
     4612        pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
     4613        pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
     4614      }
     4615      else if( iDir == 6 )
     4616      {
     4617        pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
     4618      }
     4619      else
     4620      {
     4621        assert(false);
     4622      }
     4623    }
     4624  }
     4625  else if( iY == 0 )
     4626  {
     4627    if( iDir == 1 )
     4628    {
     4629      pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
     4630      pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
     4631    }
     4632    else if( iDir == 2 )
     4633    {
     4634      pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
     4635    }
     4636    else if( iDir == 4 )
     4637    {
     4638      pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
     4639    }
     4640    else if( iDir == 5 )
     4641    {
     4642      pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
     4643      pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
     4644    }
     4645    else
     4646    {
     4647      assert(false);
     4648    }
     4649  }
     4650  else if( iY == iHeight-1 )
     4651  {
     4652    if( iDir == 0 )
     4653    {
     4654      pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
     4655      pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
     4656    }
     4657    else if( iDir == 3 )
     4658    {
     4659      pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
     4660    }
     4661    else if( iDir == 6 )
     4662    {
     4663      pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
     4664      pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
     4665    }
     4666    else if( iDir == 7 )
     4667    {
     4668      pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
     4669    }
     4670    else
     4671    {
     4672      assert(false);
     4673    }
     4674  }
     4675  else
     4676  {
     4677    printf("reconPartiton: wrong termination\n");
     4678    assert(false);
     4679  }
     4680
     4681  // Reconstruct Region from Chain Code
     4682  Bool* pbVisit  = (Bool*) xMalloc( Bool, iWidth * iHeight );
     4683  Int*  piStack  = (Int* ) xMalloc( Int,  iWidth * iHeight );
     4684
     4685  for( UInt ui = 0; ui < iWidth * iHeight; ui++ )
     4686  {
     4687    pbRegion[ ui ] = true; // fill it as region 1 (we'll discover region 0 next)
     4688    pbVisit [ ui ] = false;
     4689  }
     4690
     4691  iPtr = 0;
     4692  piStack[iPtr++] = (0 << 8) | (0);
     4693  pbRegion[ 0 ] = false;
     4694
     4695  while(iPtr > 0)
     4696  {
     4697    Int iTmp = piStack[--iPtr];
     4698    Int iX1, iY1;
     4699    iX1 = iTmp & 0xff;
     4700    iY1 = (iTmp >> 8) & 0xff;
     4701
     4702    pbVisit[ iX1 + iY1 * iWidth ] = true;
     4703
     4704    assert( iX1 >= 0 && iX1 < iWidth );
     4705    assert( iY1 >= 0 && iY1 < iHeight );
     4706
     4707    if( iX1 > 0 && !pbEdge[ 2 * iX1 - 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 - 1 + iY1 * iWidth ] )
     4708    {
     4709      piStack[iPtr++] = (iY1 << 8) | (iX1 - 1);
     4710      pbRegion[ iX1 - 1 + iY1 * iWidth ] = false;
     4711    }
     4712    if( iX1 < iWidth - 1 && !pbEdge[ 2 * iX1 + 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 + 1 + iY1 * iWidth ] )
     4713    {
     4714      piStack[iPtr++] = (iY1 << 8) | (iX1 + 1);
     4715      pbRegion[ iX1 + 1 + iY1 * iWidth ] = false;
     4716    }
     4717    if( iY1 > 0 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 - 1) * iWidth ] && !pbVisit[ iX1 + (iY1 - 1) * iWidth ] )
     4718    {
     4719      piStack[iPtr++] = ((iY1 - 1) << 8) | iX1;
     4720      pbRegion[ iX1 + (iY1 - 1) * iWidth ] = false;
     4721    }
     4722    if( iY1 < iHeight - 1 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 + 1) * iWidth ] && !pbVisit[ iX1 + (iY1 + 1) * iWidth ] )
     4723    {
     4724      piStack[iPtr++] = ((iY1 + 1) << 8) | iX1;
     4725      pbRegion[ iX1 + (iY1 + 1) * iWidth ] = false;
     4726    }
     4727  }
     4728
     4729  xFree( pbEdge );
     4730  xFree( pbVisit );
     4731  xFree( piStack );
     4732}
     4733#endif
    38474734#endif
    38484735
Note: See TracChangeset for help on using the changeset viewer.