summaryrefslogtreecommitdiff
path: root/backend/plustek-pp_map.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-03-30 21:30:45 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-03-30 21:30:45 +0200
commitee770c2346eb37e0dcb8b6cf3eaacf3d8efd6bbc (patch)
tree58f05092be1a17a939e861f8cadcda1b6ca2ecef /backend/plustek-pp_map.c
parent0da9e21872802cfc6e975b1ebaf9efb9e5934d84 (diff)
parentfef76e17ed4c607ea73b81279f9ef1d7121be900 (diff)
Merge branch 'release/experimental/1.0.29-1_experimental1'experimental/1.0.29-1_experimental1
Diffstat (limited to 'backend/plustek-pp_map.c')
-rw-r--r--backend/plustek-pp_map.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/backend/plustek-pp_map.c b/backend/plustek-pp_map.c
index 8afeb32..00b52a3 100644
--- a/backend/plustek-pp_map.c
+++ b/backend/plustek-pp_map.c
@@ -164,23 +164,23 @@ static void mapInvertDitherMap( pScanData ps )
static void mapBuildLinearMap( pScanData ps )
{
ULong i;
-
+
DBG( DBG_LOW, "mapBuildLinearMap()\n" );
if( _IS_ASIC98(ps->sCaps.AsicID)) {
for( i = 0; i < 4096; i++ ) {
- ps->a_bMapTable[i] = (UChar)(i >> 4);
- ps->a_bMapTable[4096+i] = (UChar)(i >> 4);
- ps->a_bMapTable[8192+i] = (UChar)(i >> 4);
+ ps->a_bMapTable[i] = (UChar)(i >> 4);
+ ps->a_bMapTable[4096+i] = (UChar)(i >> 4);
+ ps->a_bMapTable[8192+i] = (UChar)(i >> 4);
}
} else {
for( i = 0; i < 256; i++ ) {
- ps->a_bMapTable[i] = (UChar)(i & 0xff);
- ps->a_bMapTable[256+i] = (UChar)(i & 0xff);
- ps->a_bMapTable[512+i] = (UChar)(i & 0xff);
+ ps->a_bMapTable[i] = (UChar)(i & 0xff);
+ ps->a_bMapTable[256+i] = (UChar)(i & 0xff);
+ ps->a_bMapTable[512+i] = (UChar)(i & 0xff);
}
}
}
@@ -221,7 +221,7 @@ _LOC void MapAdjust( pScanData ps, int which )
long b, c, tmp;
DBG( DBG_LOW, "MapAdjust(%u)\n", which );
-
+
if( _IS_ASIC98(ps->sCaps.AsicID)) {
tabLen = 4096;
} else {
@@ -257,7 +257,7 @@ _LOC void MapAdjust( pScanData ps, int which )
if( tmp > 255 ) tmp = 255;
ps->a_bMapTable[tabLen+i] = (UChar)tmp;
}
-
+
if((_MAP_MASTER == which) || (_MAP_BLUE == which)) {
tmp = ((((long)ps->a_bMapTable[tabLen*2+i] * 100) + b) * c) / 10000;
if( tmp < 0 ) tmp = 0;
@@ -268,33 +268,33 @@ _LOC void MapAdjust( pScanData ps, int which )
if( ps->DataInf.dwScanFlag & SCANDEF_Negative ) {
DBG( DBG_LOW, "inverting...\n" );
-
+
if((_MAP_MASTER == which) || (_MAP_RED == which)) {
-
+
DBG( DBG_LOW, "inverting RED map\n" );
-
+
pdw = (pULong)ps->a_bMapTable;
-
+
for( dw = tabLen / 4; dw; dw--, pdw++ )
*pdw = ~(*pdw);
}
-
+
if((_MAP_MASTER == which) || (_MAP_GREEN == which)) {
-
+
DBG( DBG_LOW, "inverting GREEN map\n" );
-
+
pdw = (pULong)&ps->a_bMapTable[tabLen];
-
+
for( dw = tabLen / 4; dw; dw--, pdw++ )
*pdw = ~(*pdw);
}
-
+
if((_MAP_MASTER == which) || (_MAP_BLUE == which)) {
-
+
DBG( DBG_LOW, "inverting BLUE map\n" );
-
+
pdw = (pULong)&ps->a_bMapTable[tabLen*2];
-
+
for( dw = tabLen / 4; dw; dw--, pdw++ )
*pdw = ~(*pdw);
}