summaryrefslogtreecommitdiff
path: root/backend/plustek-pp_map.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 17:00:58 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 17:00:58 +0200
commitd087d778ffb62e2713cb848540bcc819470365bd (patch)
treed69692a274dd1c7d0672e6bb7155a0fc106f9d49 /backend/plustek-pp_map.c
parentc8bd2513ecba169cff44c09c8058c36987357b18 (diff)
parent3759ce55ba79b8d3b9d8ed247a252273ee7dade3 (diff)
Merge branch 'feature/upstream' into develop
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);
}