diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-31 17:00:20 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-31 17:00:20 +0200 |
commit | 3759ce55ba79b8d3b9d8ed247a252273ee7dade3 (patch) | |
tree | d69692a274dd1c7d0672e6bb7155a0fc106f9d49 /backend/plustek-pp_map.c | |
parent | c8bd2513ecba169cff44c09c8058c36987357b18 (diff) | |
parent | 1687222e1b9e74c89cafbb5910e72d8ec7bfd40f (diff) |
Update upstream source from tag 'upstream/1.0.28'
Update to upstream version '1.0.28'
with Debian dir ec5bb298266630fc3801ff6dc0c258f6df7ba979
Diffstat (limited to 'backend/plustek-pp_map.c')
-rw-r--r-- | backend/plustek-pp_map.c | 42 |
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); } |