bool ACLosslessScan::WriteMCU(void)
{
#if ACCUSOFT_CODE
  int i;
  struct Line *top[4],*prev[4];
  int lines      = 8; // total number of MCU lines processed.
  
  for(i = 0;i < m_ucCount;i++) {
    class Component *comp = ComponentOf(i);
    UBYTE idx       = comp->IndexOf();
    top[i]          = m_pLineCtrl->CurrentLineOf(idx);
    prev[i]         = m_pLineCtrl->PreviousLineOf(idx);
    m_ulX[i]        = 0;
    m_ulY[i]        = m_pLineCtrl->CurrentYOf(idx);
  }

  // Loop over lines and columns
  do {
    do {
      BeginWriteMCU(m_Coder.ByteStreamOf());
      //
      WriteMCU(prev,top);
    } while(AdvanceToTheRight());
    //
    // Reset conditioning to the left
    for(i = 0;i < m_ucCount;i++) {
      memset(m_plDa[i],0,sizeof(LONG) * m_ucMCUHeight[i]);
    }
    //
    // Advance to the next line.
  } while(AdvanceToTheNextLine(prev,top) && --lines);
#endif
  return false;
}
bool ACLosslessScan::WriteMCU(void)
{
#if ACCUSOFT_CODE
  int i;
  struct Line *top[4],*prev[4];
  int lines      = 8;  
  
  for(i = 0;i < m_ucCount;i++) {
    class Component *comp = ComponentOf(i);
    UBYTE idx       = comp->IndexOf();
    top[i]          = m_pLineCtrl->CurrentLineOf(idx);
    prev[i]         = m_pLineCtrl->PreviousLineOf(idx);
    m_ulX[i]        = 0;
    m_ulY[i]        = m_pLineCtrl->CurrentYOf(idx);
  }

   
  do {
    do {
      BeginWriteMCU(m_Coder.ByteStreamOf());
       
      WriteMCU(prev,top);
    } while(AdvanceToTheRight());
     
     
    for(i = 0;i < m_ucCount;i++) {
      memset(m_plDa[i],0,sizeof(LONG) * m_ucMCUHeight[i]);
    }
     
     
  } while(AdvanceToTheNextLine(prev,top) && --lines);
#endif
  return false;
}