Remove some particularly pointless comments, reduce size of block comments.

merge-requests/1/head
Jan Hauffa 2011-03-06 01:50:53 +01:00 zatwierdzone przez m. allan noah
rodzic 047631050c
commit d1851a6512
5 zmienionych plików z 57 dodań i 391 usunięć

Wyświetl plik

@ -149,8 +149,6 @@ static Scanner_Model mustek_A2nu2_model = {
}; };
/* Forward declarations */
static SANE_Bool SetParameters (LPSETPARAMETERS pSetParameters); static SANE_Bool SetParameters (LPSETPARAMETERS pSetParameters);
static SANE_Bool GetParameters (LPGETPARAMETERS pGetParameters); static SANE_Bool GetParameters (LPGETPARAMETERS pGetParameters);
static SANE_Bool StartScan (void); static SANE_Bool StartScan (void);
@ -195,7 +193,7 @@ calc_parameters (Mustek_Scanner * s)
s->params.last_frame = SANE_TRUE; s->params.last_frame = SANE_TRUE;
if (strcmp (val, "Color48") == 0) /* Color48 */ if (strcmp (val, "Color48") == 0)
{ {
s->params.format = SANE_FRAME_RGB; s->params.format = SANE_FRAME_RGB;
s->params.depth = 16; s->params.depth = 16;
@ -207,7 +205,7 @@ calc_parameters (Mustek_Scanner * s)
s->setpara.smScanMode = SM_RGB24; s->setpara.smScanMode = SM_RGB24;
} }
} }
else if (strcmp (val, "Color24") == 0) /* Color24 */ else if (strcmp (val, "Color24") == 0)
{ {
s->params.format = SANE_FRAME_RGB; s->params.format = SANE_FRAME_RGB;
s->params.depth = 8; s->params.depth = 8;
@ -516,7 +514,6 @@ init_options (Mustek_Scanner * s)
return SANE_STATUS_GOOD; return SANE_STATUS_GOOD;
} }
/***************************** Code from spicall.c *****************************/
static SANE_Byte * g_lpNegImageData = NULL; static SANE_Byte * g_lpNegImageData = NULL;
static SANE_Bool g_bIsFirstGetNegData = TRUE; static SANE_Bool g_bIsFirstGetNegData = TRUE;
@ -525,16 +522,11 @@ static unsigned int g_dwAlreadyGetNegLines = 0;
#ifdef SANE_UNUSED #ifdef SANE_UNUSED
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
Get gamma input/output bit count Get gamma input/output bit count
Parameters: Parameters:
pGammaInfo: the gamma information pGammaInfo: the gamma information
Return value: Return value:
if the operation success TRUE if the operation success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
GetGammaInfo (LPGAMMAINFO pGammaInfo) GetGammaInfo (LPGAMMAINFO pGammaInfo)
@ -570,16 +562,11 @@ GetGammaInfo (LPGAMMAINFO pGammaInfo)
} }
#endif #endif
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
set scan parameters set scan parameters
Parameters: Parameters:
pSetParameters: the information of scaning pSetParameters: the information of scaning
Return value: Return value:
if the operation success TRUE if the operation success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
SetParameters (LPSETPARAMETERS pSetParameters) SetParameters (LPSETPARAMETERS pSetParameters)
@ -799,16 +786,11 @@ SetParameters (LPSETPARAMETERS pSetParameters)
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
get the optical dpi and scan area get the optical dpi and scan area
Parameters: Parameters:
pGetParameters: the information of scan pGetParameters: the information of scan
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
GetParameters (LPGETPARAMETERS pGetParameters) GetParameters (LPGETPARAMETERS pGetParameters)
@ -842,17 +824,9 @@ GetParameters (LPGETPARAMETERS pGetParameters)
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
start scan image start scan image
Parameters:
none
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
StartScan () StartScan ()
@ -887,17 +861,11 @@ StartScan ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/14
Routine Description:
Read the scanner data Read the scanner data
Parameters: Parameters:
pImageRows: the information of the data pImageRows: the information of the data
Return value: Return value:
if the operation is seccuss TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
ReadScannedData (LPIMAGEROWS pImageRows) ReadScannedData (LPIMAGEROWS pImageRows)
@ -1028,16 +996,9 @@ ReadScannedData (LPIMAGEROWS pImageRows)
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/14
Routine Description:
Stop scan Stop scan
Parameters:
none
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
StopScan () StopScan ()
@ -1088,16 +1049,9 @@ StopScan ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/14
Routine Description:
Check the status of TA Check the status of TA
Parameters:
none
Return value: Return value:
if operation is success TRUE if TA is connected, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
IsTAConnected () IsTAConnected ()
@ -1125,16 +1079,11 @@ IsTAConnected ()
#ifdef SANE_UNUSED #ifdef SANE_UNUSED
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/14
Routine Description:
Get the status of the HK Get the status of the HK
Parameters: Parameters:
pKey: the status of key pKey: the status of key
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
GetKeyStatus (SANE_Byte * pKey) GetKeyStatus (SANE_Byte * pKey)
@ -1188,16 +1137,12 @@ GetKeyStatus (SANE_Byte * pKey)
} }
#endif #endif
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/14
Routine Description:
Deal with the image with auto level Deal with the image with auto level
Parameters: Parameters:
lpSource: the data of image lpSource: the data of image
scanMode: the scan mode scanMode: the scan mode
ScanLines: the rows of image ScanLines: the rows of image
BytesPerLine: the bytes of per line BytesPerLine: the bytes of per line
Return value:
none
***********************************************************************/ ***********************************************************************/
static void static void
AutoLevel (SANE_Byte *lpSource, SCANMODE scanMode, unsigned short ScanLines, AutoLevel (SANE_Byte *lpSource, SCANMODE scanMode, unsigned short ScanLines,
@ -1446,15 +1391,11 @@ AutoLevel (SANE_Byte *lpSource, SCANMODE scanMode, unsigned short ScanLines,
#ifdef SANE_UNUSED #ifdef SANE_UNUSED
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/14
Routine Description:
Deal with image with auto level Deal with image with auto level
Parameters: Parameters:
pDIB: the data of image pDIB: the data of image
ImageWidth: the width of image ImageWidth: the width of image
ImageHeight: the height of image ImageHeight: the height of image
Return value:
none
***********************************************************************/ ***********************************************************************/
static void static void
QBETDetectAutoLevel (void *pDIB, unsigned int ImageWidth, unsigned int ImageHeight) QBETDetectAutoLevel (void *pDIB, unsigned int ImageWidth, unsigned int ImageHeight)
@ -1741,16 +1682,12 @@ QBETDetectAutoLevel (void *pDIB, unsigned int ImageWidth, unsigned int ImageHeig
#ifdef SANE_UNUSED #ifdef SANE_UNUSED
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/14
Routine Description:
Change the image data and deal with auto level Change the image data and deal with auto level
Parameters: Parameters:
lpSource: the data of image lpSource: the data of image
scanMode: the scan mode scanMode: the scan mode
ScanLines: the rows of image ScanLines: the rows of image
BytesPerLine: the bytes of per line BytesPerLine: the bytes of per line
Return value:
none
***********************************************************************/ ***********************************************************************/
static void static void
QBetChange (SANE_Byte *lpSource, SCANMODE scanMode, unsigned short ScanLines, QBetChange (SANE_Byte *lpSource, SCANMODE scanMode, unsigned short ScanLines,

Wyświetl plik

@ -1212,7 +1212,6 @@ RGBColor;
#define ES01_2CE_VALID_PIXEL_PARAMETER_OF_SEGMENT15 0x2CE #define ES01_2CE_VALID_PIXEL_PARAMETER_OF_SEGMENT15 0x2CE
#define ES01_2CF_VALID_PIXEL_PARAMETER_OF_SEGMENT16 0x2CF #define ES01_2CF_VALID_PIXEL_PARAMETER_OF_SEGMENT16 0x2CF
/* forward declarations */
static STATUS OpenScanChip (PAsic chip); static STATUS OpenScanChip (PAsic chip);
static STATUS CloseScanChip (PAsic chip); static STATUS CloseScanChip (PAsic chip);
static STATUS SafeInitialChip (PAsic chip); static STATUS SafeInitialChip (PAsic chip);
@ -1237,8 +1236,6 @@ static STATUS SetExtraSetting (PAsic chip, unsigned short wXResolution,
unsigned short wCCD_PixelNumber, SANE_Bool isCaribrate); unsigned short wCCD_PixelNumber, SANE_Bool isCaribrate);
/* Forward declarations */
static STATUS Mustek_SendData (PAsic chip, unsigned short reg, SANE_Byte data); static STATUS Mustek_SendData (PAsic chip, unsigned short reg, SANE_Byte data);
static STATUS Mustek_SendData2Byte (PAsic chip, unsigned short reg, SANE_Byte data); static STATUS Mustek_SendData2Byte (PAsic chip, unsigned short reg, SANE_Byte data);
static STATUS Mustek_ReceiveData (PAsic chip, SANE_Byte * reg); static STATUS Mustek_ReceiveData (PAsic chip, SANE_Byte * reg);

Wyświetl plik

@ -53,8 +53,6 @@
#include "mustek_usb2_high.h" #include "mustek_usb2_high.h"
/* ******************++ spuicall_g.h ****************************/
/*global variable HOLD: these should go to scanner structure */ /*global variable HOLD: these should go to scanner structure */
/*base type*/ /*base type*/
@ -128,7 +126,6 @@ static SANE_Byte * g_lpBefLineImageData = NULL;
static SANE_Bool g_bIsFirstReadBefData = TRUE; static SANE_Bool g_bIsFirstReadBefData = TRUE;
static unsigned int g_dwAlreadyGetLines = 0; static unsigned int g_dwAlreadyGetLines = 0;
/* forward declarations */
static SANE_Bool MustScanner_Init (void); static SANE_Bool MustScanner_Init (void);
static SANE_Bool MustScanner_GetScannerState (void); static SANE_Bool MustScanner_GetScannerState (void);
static SANE_Bool MustScanner_PowerControl (SANE_Bool isLampOn, SANE_Bool isTALampOn); static SANE_Bool MustScanner_PowerControl (SANE_Bool isLampOn, SANE_Bool isTALampOn);
@ -189,15 +186,8 @@ static void ModifyLinePoint (SANE_Byte * lpImageData,
#include "mustek_usb2_transparent.c" #include "mustek_usb2_transparent.c"
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
Parameters:
none
Return value: Return value:
if initialize the scanner success TRUE if initialize the scanner success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_Init () MustScanner_Init ()
@ -243,16 +233,9 @@ MustScanner_Init ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
check the scanner connect status check the scanner connect status
Parameters:
none
Return value: Return value:
if scanner's status is OK TRUE if scanner's status is OK, FALSE otherwise
return TRUE
else
return FASLE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_GetScannerState () MustScanner_GetScannerState ()
@ -271,17 +254,12 @@ MustScanner_GetScannerState ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
Turn the lamp on or off Turn the lamp on or off
Parameters: Parameters:
isLampOn: turn the lamp on or off isLampOn: turn the lamp on or off
isTALampOn: turn the TA lamp on or off isTALampOn: turn the TA lamp on or off
Return value: Return value:
if operation success TRUE if operation success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_PowerControl (SANE_Bool isLampOn, SANE_Bool isTALampOn) MustScanner_PowerControl (SANE_Bool isLampOn, SANE_Bool isTALampOn)
@ -326,16 +304,9 @@ MustScanner_PowerControl (SANE_Bool isLampOn, SANE_Bool isTALampOn)
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
Turn the carriage home Turn the carriage home
Parameters:
none
Return value: Return value:
if the operation success TRUE if the operation success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_BackHome () MustScanner_BackHome ()
@ -369,16 +340,11 @@ MustScanner_BackHome ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
prepare the scan image prepare the scan image
Parameters: Parameters:
bScanSource: the scan source bScanSource: the scan source
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_Prepare (SANE_Byte bScanSource) MustScanner_Prepare (SANE_Byte bScanSource)
@ -458,11 +424,9 @@ MustScanner_Prepare (SANE_Byte bScanSource)
#ifdef SANE_UNUSED #ifdef SANE_UNUSED
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15 Adjust the offset
Routine Description:
Adjuest the offset
Parameters: Parameters:
nTimes: Adjuest offset the times nTimes: Adjust offset the times
bDirection: whether direction bDirection: whether direction
bOffset: the data of offset bOffset: the data of offset
bLastMin: the last min data bLastMin: the last min data
@ -473,10 +437,7 @@ Parameters:
wStdMinLevel: the min level of offset wStdMinLevel: the min level of offset
wStdMaxLevel: the max level of offset wStdMaxLevel: the max level of offset
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_AdjustOffset (int nTimes, SANE_Bool * bDirection, SANE_Byte * bOffset, MustScanner_AdjustOffset (int nTimes, SANE_Bool * bDirection, SANE_Byte * bOffset,
@ -615,12 +576,9 @@ MustScanner_AdjustOffset (int nTimes, SANE_Bool * bDirection, SANE_Byte * bOffse
#ifdef SANE_UNUSED #ifdef SANE_UNUSED
/********************************************************************** /**********************************************************************
Adjust the offset second times
Author: Jack Date: 2005/05/15
Routine Description:
Adjuest the offset second times
Parameters: Parameters:
nTimes: Adjuest offset the times nTimes: Adjust offset the times
bDirection: whether direction bDirection: whether direction
bOffset: the data of offset bOffset: the data of offset
bLastMin: the last min data bLastMin: the last min data
@ -631,10 +589,7 @@ Parameters:
wStdMinLevel: the min level of offset wStdMinLevel: the min level of offset
wStdMaxLevel: the max level of offset wStdMaxLevel: the max level of offset
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_SecondAdjustOffset (int nTimes, SANE_Bool * bDirection, SANE_Byte * bOffset, MustScanner_SecondAdjustOffset (int nTimes, SANE_Bool * bDirection, SANE_Byte * bOffset,
@ -737,8 +692,6 @@ MustScanner_SecondAdjustOffset (int nTimes, SANE_Bool * bDirection, SANE_Byte *
#endif #endif
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Filter the data Filter the data
Parameters: Parameters:
pSort: the sort data pSort: the sort data
@ -778,18 +731,13 @@ MustScanner_FiltLower (unsigned short * pSort, unsigned short TotalCount, unsign
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Repair line when single CCD and color is 48bit Repair line when single CCD and color is 48bit
Parameters: Parameters:
lpLine: point to image be repaired lpLine: point to image be repaired
isOrderInvert: RGB or BGR isOrderInvert: RGB or BGR
wLinesCount: how many line be repaired wLinesCount: how many line be repaired
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_GetRgb48BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, MustScanner_GetRgb48BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
@ -974,18 +922,13 @@ MustScanner_GetRgb48BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Repair line when double CCD and color is 48bit Repair line when double CCD and color is 48bit
Parameters: Parameters:
lpLine: point to image be repaired lpLine: point to image be repaired
isOrderInvert: RGB or BGR isOrderInvert: RGB or BGR
wLinesCount: how many line be repaired wLinesCount: how many line be repaired
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_GetRgb48BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, MustScanner_GetRgb48BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
@ -1419,18 +1362,13 @@ MustScanner_GetRgb48BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Repair line when single CCD and color is 24bit Repair line when single CCD and color is 24bit
Parameters: Parameters:
lpLine: point to image be repaired lpLine: point to image be repaired
isOrderInvert: RGB or BGR isOrderInvert: RGB or BGR
wLinesCount: how many line be repaired wLinesCount: how many line be repaired
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_GetRgb24BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, MustScanner_GetRgb24BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
@ -1672,18 +1610,13 @@ MustScanner_GetRgb24BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Repair line when double CCD and color is 24bit Repair line when double CCD and color is 24bit
Parameters: Parameters:
lpLine: point to image be repaired lpLine: point to image be repaired
isOrderInvert: RGB or BGR isOrderInvert: RGB or BGR
wLinesCount: how many line be repaired wLinesCount: how many line be repaired
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_GetRgb24BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, MustScanner_GetRgb24BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
@ -2105,18 +2038,13 @@ MustScanner_GetRgb24BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Repair line when single CCD and color is 16bit Repair line when single CCD and color is 16bit
Parameters: Parameters:
lpLine: point to image be repaired lpLine: point to image be repaired
isOrderInvert: RGB or BGR isOrderInvert: RGB or BGR
wLinesCount: how many line be repaired wLinesCount: how many line be repaired
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_GetMono16BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, MustScanner_GetMono16BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
@ -2200,18 +2128,13 @@ MustScanner_GetMono16BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Repair line when double CCD and color is 16bit Repair line when double CCD and color is 16bit
Parameters: Parameters:
lpLine: point to image be repaired lpLine: point to image be repaired
isOrderInvert: RGB or BGR isOrderInvert: RGB or BGR
wLinesCount: how many line be repaired wLinesCount: how many line be repaired
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_GetMono16BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, MustScanner_GetMono16BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
@ -2381,18 +2304,13 @@ MustScanner_GetMono16BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Repair line when single CCD and color is 8bit Repair line when single CCD and color is 8bit
Parameters: Parameters:
lpLine: point to image be repaired lpLine: point to image be repaired
isOrderInvert: RGB or BGR isOrderInvert: RGB or BGR
wLinesCount: how many line be repaired wLinesCount: how many line be repaired
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_GetMono8BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, MustScanner_GetMono8BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
@ -2472,18 +2390,13 @@ MustScanner_GetMono8BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Repair line when double CCD and color is 8bit Repair line when double CCD and color is 8bit
Parameters: Parameters:
lpLine: point to image be repaired lpLine: point to image be repaired
isOrderInvert: RGB or BGR isOrderInvert: RGB or BGR
wLinesCount: how many line be repaired wLinesCount: how many line be repaired
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_GetMono8BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, MustScanner_GetMono8BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
@ -2635,18 +2548,13 @@ MustScanner_GetMono8BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Repair line when single CCD and color is 1bit Repair line when single CCD and color is 1bit
Parameters: Parameters:
lpLine: point to image be repaired lpLine: point to image be repaired
isOrderInvert: RGB or BGR isOrderInvert: RGB or BGR
wLinesCount: how many line be repaired wLinesCount: how many line be repaired
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_GetMono1BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, MustScanner_GetMono1BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
@ -2726,18 +2634,13 @@ MustScanner_GetMono1BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Repair line when double CCD and color is 1bit Repair line when double CCD and color is 1bit
Parameters: Parameters:
lpLine: point to image be repaired lpLine: point to image be repaired
isOrderInvert: RGB or BGR isOrderInvert: RGB or BGR
wLinesCount: how many line be repaired wLinesCount: how many line be repaired
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
MustScanner_GetMono1BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, MustScanner_GetMono1BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
@ -2843,13 +2746,9 @@ MustScanner_GetMono1BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/21
Routine Description:
prepare calculate Max and Min value prepare calculate Max and Min value
Parameters: Parameters:
wResolution: the scan resolution wResolution: the scan resolution
Return value:
none
***********************************************************************/ ***********************************************************************/
static void static void
MustScanner_PrepareCalculateMaxMin (unsigned short wResolution) MustScanner_PrepareCalculateMaxMin (unsigned short wResolution)
@ -2898,16 +2797,12 @@ MustScanner_PrepareCalculateMaxMin (unsigned short wResolution)
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/21
Routine Description:
calculate the Max and Min value calculate the Max and Min value
Parameters: Parameters:
pBuffer: the image data pBuffer: the image data
lpMaxValue: the max value lpMaxValue: the max value
lpMinValue: the min value lpMinValue: the min value
wResolution: the scan resolution wResolution: the scan resolution
Return value:
none
***********************************************************************/ ***********************************************************************/
static void static void
MustScanner_CalculateMaxMin (SANE_Byte * pBuffer, unsigned short * lpMaxValue, MustScanner_CalculateMaxMin (SANE_Byte * pBuffer, unsigned short * lpMaxValue,
@ -2975,16 +2870,7 @@ MustScanner_CalculateMaxMin (SANE_Byte * pBuffer, unsigned short * lpMaxValue,
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Read the data from scanner Read the data from scanner
Parameters:
none
Return value:
if operation is success
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static void * static void *
MustScanner_ReadDataFromScanner (void * dummy) MustScanner_ReadDataFromScanner (void * dummy)
@ -3069,13 +2955,7 @@ MustScanner_ReadDataFromScanner (void * dummy)
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/26
Routine Description:
get the lines of scanned get the lines of scanned
Parameters:
none
Return value:
the lines of scanned
***********************************************************************/ ***********************************************************************/
static unsigned int static unsigned int
GetScannedLines () GetScannedLines ()
@ -3090,14 +2970,7 @@ GetScannedLines ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/26
Routine Description:
get lines which pass to superstratum get lines which pass to superstratum
Parameters:
none
Return value:
the lines which pass to superstratum
***********************************************************************/ ***********************************************************************/
static unsigned int static unsigned int
GetReadyLines () GetReadyLines ()
@ -3112,13 +2985,9 @@ GetReadyLines ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/26
Routine Description:
add the scanned total lines add the scanned total lines
Parameters: Parameters:
wAddLines: add the lines wAddLines: add the lines
Return value:
none
***********************************************************************/ ***********************************************************************/
static void static void
AddScannedLines (unsigned short wAddLines) AddScannedLines (unsigned short wAddLines)
@ -3131,13 +3000,7 @@ AddScannedLines (unsigned short wAddLines)
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/26
Routine Description:
add the ready lines add the ready lines
Parameters:
none
Return value:
none
***********************************************************************/ ***********************************************************************/
static void static void
AddReadyLines () AddReadyLines ()
@ -3148,18 +3011,14 @@ AddReadyLines ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/26
Routine Description:
modify the point modify the point
Parameters: Parameters:
lpImageData: the data of image lpImageData: the data of image
lpImageDataBefore: the data of before line image lpImageDataBefore: the data of before line image
dwBytesPerLine: the bytes of per line dwBytesPerLine: the bytes of per line
dwLinesCount: the line count dwLinesCount: the line count
wPixDistance: the pixel distance wPixDistance: the pixel distance
wModPtCount: the modify point count wModPtCount: the modify point count
Return value:
none
***********************************************************************/ ***********************************************************************/
static void static void
ModifyLinePoint (SANE_Byte * lpImageData, ModifyLinePoint (SANE_Byte * lpImageData,
@ -3196,8 +3055,6 @@ ModifyLinePoint (SANE_Byte * lpImageData,
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Modifiy the image data Modifiy the image data
Parameters: Parameters:
A: the input the image data A: the input the image data
@ -3230,4 +3087,4 @@ QBET4 (SANE_Byte A, SANE_Byte B)
A = A & 0x0f; A = A & 0x0f;
B = B & 0x0f; B = B & 0x0f;
return bQBET[A][B]; return bQBET[A][B];
} /* end of the file MustScanner.c */ }

Wyświetl plik

@ -45,8 +45,6 @@
This file implements a SANE backend for the Mustek BearPaw 2448 TA Pro This file implements a SANE backend for the Mustek BearPaw 2448 TA Pro
and similar USB2 scanners. */ and similar USB2 scanners. */
/* forward declarations */
static SANE_Bool Reflective_Reset (void); static SANE_Bool Reflective_Reset (void);
static SANE_Bool Reflective_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest); static SANE_Bool Reflective_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest);
static SANE_Bool Reflective_SetupScan (COLORMODE ColorMode, unsigned short XDpi, unsigned short YDpi, static SANE_Bool Reflective_SetupScan (COLORMODE ColorMode, unsigned short XDpi, unsigned short YDpi,
@ -59,19 +57,10 @@ static SANE_Bool Reflective_FindTopLeft (unsigned short * lpwStartX, unsigned sh
static SANE_Bool Reflective_LineCalibration16Bits (void); static SANE_Bool Reflective_LineCalibration16Bits (void);
static SANE_Bool Reflective_PrepareScan (void); static SANE_Bool Reflective_PrepareScan (void);
/*function description*/
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
reset the scanner status reset the scanner status
Parameters:
none
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
els
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Reflective_Reset () Reflective_Reset ()
@ -133,17 +122,12 @@ Reflective_Reset ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
get the suggest parameter of scaning get the suggest parameter of scaning
Parameters: Parameters:
pTarget: the information of scaning pTarget: the information of scaning
pSuggest: suggest parameter of scaning pSuggest: suggest parameter of scaning
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
els
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Reflective_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest) Reflective_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest)
@ -193,13 +177,6 @@ Reflective_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest)
pTarget->wDpi); pTarget->wDpi);
DBG (DBG_FUNC, "Reflective_ScanSuggest: pSuggest->wXDpi = %d\n", DBG (DBG_FUNC, "Reflective_ScanSuggest: pSuggest->wXDpi = %d\n",
pSuggest->wXDpi); pSuggest->wXDpi);
DBG (DBG_FUNC, "Reflective_ScanSuggest: pSuggest->wYDpi = %d\n", DBG (DBG_FUNC, "Reflective_ScanSuggest: pSuggest->wYDpi = %d\n",
pSuggest->wYDpi); pSuggest->wYDpi);
@ -334,8 +311,6 @@ Reflective_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest)
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
setup scanning process setup scanning process
Parameters: Parameters:
ColorMode: ScanMode of Scanning, CM_RGB48, CM_GRAY and so on ColorMode: ScanMode of Scanning, CM_RGB48, CM_GRAY and so on
@ -347,10 +322,7 @@ Parameters:
Width: Width of Scan Image Width: Width of Scan Image
Height: Height of Scan Image Height: Height of Scan Image
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Reflective_SetupScan (COLORMODE ColorMode, Reflective_SetupScan (COLORMODE ColorMode,
@ -560,16 +532,9 @@ Reflective_SetupScan (COLORMODE ColorMode,
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
To adjust the value of offset gain of R/G/B To adjust the value of offset gain of R/G/B
Parameters:
none
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Reflective_AdjustAD () Reflective_AdjustAD ()
@ -1095,17 +1060,12 @@ Reflective_AdjustAD ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/14
Routine Description:
Find top and left side Find top and left side
Parameters: Parameters:
lpwStartX: the left side lpwStartX: the left side
lpwStartY: the top side lpwStartY: the top side
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Reflective_FindTopLeft (unsigned short * lpwStartX, unsigned short * lpwStartY) Reflective_FindTopLeft (unsigned short * lpwStartX, unsigned short * lpwStartY)
@ -1277,16 +1237,9 @@ Reflective_FindTopLeft (unsigned short * lpwStartX, unsigned short * lpwStartY)
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/14
Routine Description:
Stop scan Stop scan
Parameters:
none
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Reflective_StopScan () Reflective_StopScan ()
@ -1322,16 +1275,9 @@ Reflective_StopScan ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Get the calibration data Get the calibration data
Parameters:
none
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Reflective_LineCalibration16Bits () Reflective_LineCalibration16Bits ()
@ -1742,16 +1688,9 @@ Reflective_LineCalibration16Bits ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/14
Routine Description:
Prepare scan image Prepare scan image
Parameters:
none
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Reflective_PrepareScan () Reflective_PrepareScan ()
@ -1863,19 +1802,13 @@ Reflective_PrepareScan ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Get the data of image Get the data of image
Parameters: Parameters:
lpBlock: the data of image lpBlock: the data of image
Rows: the rows of image Rows: the rows of image
isOrderInvert: the RGB order isOrderInvert: the RGB order
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Reflective_GetRows (SANE_Byte * lpBlock, unsigned short * Rows, SANE_Bool isOrderInvert) Reflective_GetRows (SANE_Byte * lpBlock, unsigned short * Rows, SANE_Bool isOrderInvert)
@ -1934,4 +1867,4 @@ Reflective_GetRows (SANE_Byte * lpBlock, unsigned short * Rows, SANE_Bool isOrde
DBG (DBG_FUNC, "Reflective_GetRows: leave Reflective_GetRows \n"); DBG (DBG_FUNC, "Reflective_GetRows: leave Reflective_GetRows \n");
return FALSE; return FALSE;
} /* end of the file ScannerReflective.c */ }

Wyświetl plik

@ -46,7 +46,6 @@
and similar USB2 scanners. */ and similar USB2 scanners. */
/* forward declarations */
static SANE_Bool Transparent_Reset (void); static SANE_Bool Transparent_Reset (void);
static SANE_Bool Transparent_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest); static SANE_Bool Transparent_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest);
static SANE_Bool Transparent_SetupScan (COLORMODE ColorMode, unsigned short XDpi, unsigned short YDpi, static SANE_Bool Transparent_SetupScan (COLORMODE ColorMode, unsigned short XDpi, unsigned short YDpi,
@ -60,19 +59,10 @@ static SANE_Bool Transparent_LineCalibration16Bits (unsigned short wTAShadingMin
static SANE_Bool Transparent_PrepareScan (void); static SANE_Bool Transparent_PrepareScan (void);
/*function description*/
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
reset the scanner reset the scanner
Parameters:
none
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Transparent_Reset () Transparent_Reset ()
@ -131,17 +121,12 @@ Transparent_Reset ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
get suggest parameter of scaning get suggest parameter of scaning
Parameters: Parameters:
pTarget: the information of scaning pTarget: the information of scaning
pSuggest: the suggest parameter of scaning pSuggest: the suggest parameter of scaning
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Transparent_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest) Transparent_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest)
@ -282,8 +267,6 @@ Transparent_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest)
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
setup scanning process setup scanning process
Parameters: Parameters:
ColorMode: ScanMode of Scanning, CM_RGB48, CM_GRAY and so on ColorMode: ScanMode of Scanning, CM_RGB48, CM_GRAY and so on
@ -295,10 +278,7 @@ Parameters:
Width: Width of Scan Image Width: Width of Scan Image
Height: Height of Scan Image Height: Height of Scan Image
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Transparent_SetupScan (COLORMODE ColorMode, unsigned short XDpi, unsigned short YDpi, Transparent_SetupScan (COLORMODE ColorMode, unsigned short XDpi, unsigned short YDpi,
@ -492,16 +472,9 @@ Transparent_SetupScan (COLORMODE ColorMode, unsigned short XDpi, unsigned short
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/14
Routine Description:
Stop scan Stop scan
Parameters:
none
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Transparent_StopScan () Transparent_StopScan ()
@ -533,18 +506,13 @@ Transparent_StopScan ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Get the data of image Get the data of image
Parameters: Parameters:
lpBlock: the data of image lpBlock: the data of image
Rows: the rows of image Rows: the rows of image
isOrderInvert: the RGB order isOrderInvert: the RGB order
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Transparent_GetRows (SANE_Byte * lpBlock, unsigned short * Rows, SANE_Bool isOrderInvert) Transparent_GetRows (SANE_Byte * lpBlock, unsigned short * Rows, SANE_Bool isOrderInvert)
@ -603,16 +571,9 @@ Transparent_GetRows (SANE_Byte * lpBlock, unsigned short * Rows, SANE_Bool isOrd
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/13
Routine Description:
To adjust the value of offset gain of R/G/B To adjust the value of offset gain of R/G/B
Parameters:
none
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Transparent_AdjustAD () Transparent_AdjustAD ()
@ -1113,17 +1074,12 @@ Transparent_AdjustAD ()
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/14
Routine Description:
Find top and left side Find top and left side
Parameters: Parameters:
lpwStartX: the left side lpwStartX: the left side
lpwStartY: the top side lpwStartY: the top side
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Transparent_FindTopLeft (unsigned short * lpwStartX, unsigned short * lpwStartY) Transparent_FindTopLeft (unsigned short * lpwStartX, unsigned short * lpwStartY)
@ -1265,16 +1221,9 @@ Transparent_FindTopLeft (unsigned short * lpwStartX, unsigned short * lpwStartY)
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/15
Routine Description:
Get the calibration data Get the calibration data
Parameters:
none
Return value: Return value:
if the operation is success TRUE if the operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Transparent_LineCalibration16Bits (unsigned short wTAShadingMinus) Transparent_LineCalibration16Bits (unsigned short wTAShadingMinus)
@ -1649,16 +1598,9 @@ Transparent_LineCalibration16Bits (unsigned short wTAShadingMinus)
} }
/********************************************************************** /**********************************************************************
Author: Jack Date: 2005/05/14
Routine Description:
Prepare scan image Prepare scan image
Parameters:
none
Return value: Return value:
if operation is success TRUE if operation is success, FALSE otherwise
return TRUE
else
return FALSE
***********************************************************************/ ***********************************************************************/
static SANE_Bool static SANE_Bool
Transparent_PrepareScan () Transparent_PrepareScan ()
@ -1742,4 +1684,4 @@ Transparent_PrepareScan ()
DBG (DBG_FUNC, "Transparent_PrepareScan: leave Transparent_PrepareScan\n"); DBG (DBG_FUNC, "Transparent_PrepareScan: leave Transparent_PrepareScan\n");
return TRUE; return TRUE;
} /* end of the file ScannerTransparent.c */ }