Lines Matching refs:ps
103 static void mapSetDitherMap( pScanData ps )
107 pUChar pDither = ps->a_bDitherPattern;
109 if( 0 == ps->DataInf.wDither ) {
124 static void mapInvertMap( pScanData ps )
131 if( _IS_ASIC98(ps->sCaps.AsicID)) {
137 for (pdw = (pULong)ps->a_bMapTable, dw = size * 3 / 4; dw; dw--, pdw++) {
144 static void mapInvertDitherMap( pScanData ps )
146 if( ps->DataInf.dwScanFlag & SCANDEF_Inverse ) {
149 pULong pDither = (pULong)ps->a_bDitherPattern;
153 mapInvertMap( ps );
162 static void mapBuildLinearMap( pScanData ps )
168 if( _IS_ASIC98(ps->sCaps.AsicID)) {
171 ps->a_bMapTable[i] = (UChar)(i >> 4);
172 ps->a_bMapTable[4096+i] = (UChar)(i >> 4);
173 ps->a_bMapTable[8192+i] = (UChar)(i >> 4);
179 ps->a_bMapTable[i] = (UChar)(i & 0xff);
180 ps->a_bMapTable[256+i] = (UChar)(i & 0xff);
181 ps->a_bMapTable[512+i] = (UChar)(i & 0xff);
193 _LOC void MapInitialize( pScanData ps )
195 mapBuildLinearMap( ps );
196 MapAdjust( ps, _MAP_MASTER );
201 _LOC void MapSetupDither( pScanData ps )
203 DBG( DBG_LOW, "MapSetupDither() - %u\n", ps->DataInf.wAppDataType );
205 if( COLOR_HALFTONE == ps->DataInf.wAppDataType ) {
207 mapSetDitherMap( ps );
208 if (ps->DataInf.dwScanFlag & SCANDEF_Inverse)
209 mapInvertDitherMap( ps );
215 _LOC void MapAdjust( pScanData ps, int which )
223 if( _IS_ASIC98(ps->sCaps.AsicID)) {
237 b = ps->wBrightness * 192;
238 c = ps->wContrast + 100;
240 DBG( DBG_LOW, "brightness = %i -> %i\n", ps->wBrightness, (UChar)(b/100));
241 DBG( DBG_LOW, "contrast*100 = %i -> %i\n", ps->wContrast, (int)(c));
246 tmp = ((((long)ps->a_bMapTable[i] * 100) + b) *c ) / 10000;
249 ps->a_bMapTable[i] = (UChar)tmp;
253 tmp = ((((long)ps->a_bMapTable[tabLen+i] * 100) + b) * c) / 10000;
256 ps->a_bMapTable[tabLen+i] = (UChar)tmp;
260 tmp = ((((long)ps->a_bMapTable[tabLen*2+i] * 100) + b) * c) / 10000;
263 ps->a_bMapTable[tabLen*2+i] = (UChar)tmp;
267 if( ps->DataInf.dwScanFlag & SCANDEF_Negative ) {
274 pdw = (pULong)ps->a_bMapTable;
284 pdw = (pULong)&ps->a_bMapTable[tabLen];
294 pdw = (pULong)&ps->a_bMapTable[tabLen*2];