Lines Matching refs:dwSum
923 u_long dwMax = 0, dwSum; in usb_AdjustGain() local
929 dwSum = 0; in usb_AdjustGain()
931 dwSum += (u_long)((u_short*)scanbuf)[dw]; in usb_AdjustGain()
933 if((fNegative == 1) || (dwSum < 0x6000 * 20)) { in usb_AdjustGain()
934 if( dwMax < dwSum ) in usb_AdjustGain()
935 dwMax = dwSum; in usb_AdjustGain()
1255 u_long dwDiff[3], dwSum[3]; in usb_AdjustOffset() local
1361 dwSum[0] = dwSum[1] = dwSum[2] = 0; in usb_AdjustOffset()
1365 dwSum[0] += (u_long)_HILO2WORD(((ColorWordDef*)scanbuf)[dw].HiLo[0]); in usb_AdjustOffset()
1366 dwSum[1] += (u_long)_HILO2WORD(((ColorWordDef*)scanbuf)[dw].HiLo[1]); in usb_AdjustOffset()
1367 dwSum[2] += (u_long)_HILO2WORD(((ColorWordDef*)scanbuf)[dw].HiLo[2]); in usb_AdjustOffset()
1369 dwSum[0] += ((RGBUShortDef*)scanbuf)[dw].Red; in usb_AdjustOffset()
1370 dwSum[1] += ((RGBUShortDef*)scanbuf)[dw].Green; in usb_AdjustOffset()
1371 dwSum[2] += ((RGBUShortDef*)scanbuf)[dw].Blue; in usb_AdjustOffset()
1376 dwSum[0], dwSum[0] /dwPixels ); in usb_AdjustOffset()
1378 dwSum[1], dwSum[1] /dwPixels ); in usb_AdjustOffset()
1380 dwSum[2], dwSum[2] /dwPixels ); in usb_AdjustOffset()
1383 dwSum[0] /= dwPixels; in usb_AdjustOffset()
1384 dwSum[1] /= dwPixels; in usb_AdjustOffset()
1385 dwSum[2] /= dwPixels; in usb_AdjustOffset()
1387 usb_GetNewOffset( dev, dwSum, dwDiff, cOffset, bExpect, 0, cAdjust ); in usb_AdjustOffset()
1388 usb_GetNewOffset( dev, dwSum, dwDiff, cOffset, bExpect, 1, cAdjust ); in usb_AdjustOffset()
1389 usb_GetNewOffset( dev, dwSum, dwDiff, cOffset, bExpect, 2, cAdjust ); in usb_AdjustOffset()
1396 dwSum[0] = 0; in usb_AdjustOffset()
1400 dwSum[0] += (u_long)_HILO2WORD(((HiLoDef*)scanbuf)[dw]); in usb_AdjustOffset()
1402 dwSum[0] += ((u_short*)scanbuf)[dw]; in usb_AdjustOffset()
1405 dwSum [0] /= dwPixels; in usb_AdjustOffset()
1406 usb_GetNewOffset( dev, dwSum, dwDiff, cOffset, bExpect, 0, cAdjust ); in usb_AdjustOffset()
1409 DBG(_DBG_INFO2,"Sum = %lu, ave = %lu\n",dwSum[0],dwSum[0]/dwPixels); in usb_AdjustOffset()
1454 u_long dwSum[2]; in usb_GetDarkShading() local
1488 dwSum[0] = dwSum[1] = 0; in usb_GetDarkShading()
1494 dwSum[dw & 1] += (u_long)_PHILO2WORD(pSrce); in usb_GetDarkShading()
1496 dwSum[dw & 1] += (u_long)_PLOHI2WORD(pSrce); in usb_GetDarkShading()
1499 dwSum[0] /= ((dwPixels + 1UL) >> 1); in usb_GetDarkShading()
1500 dwSum[1] /= (dwPixels >> 1); in usb_GetDarkShading()
1504 dwSum[0] = dwSum[1] = (dwSum[0] + dwSum[1]) / 2; in usb_GetDarkShading()
1507 dwSum[0] = (int)dwSum[0] + iOffset; in usb_GetDarkShading()
1508 dwSum[1] = (int)dwSum[1] + iOffset; in usb_GetDarkShading()
1510 if((int)dwSum[0] < 0) in usb_GetDarkShading()
1511 dwSum[0] = 0; in usb_GetDarkShading()
1513 if((int)dwSum[1] < 0) in usb_GetDarkShading()
1514 dwSum[1] = 0; in usb_GetDarkShading()
1516 dwSum[0] = (u_long)_LOBYTE(_LOWORD(dwSum[0])) * 256UL + in usb_GetDarkShading()
1517 _HIBYTE(_LOWORD(dwSum[0])); in usb_GetDarkShading()
1518 dwSum[1] = (u_long)_LOBYTE(_LOWORD(dwSum[1])) * 256UL + in usb_GetDarkShading()
1519 _HIBYTE(_LOWORD(dwSum[1])); in usb_GetDarkShading()
1521 dwSum[0] = (u_long)_LOWORD(dwSum[0]); in usb_GetDarkShading()
1522 dwSum[1] = (u_long)_LOWORD(dwSum[1]); in usb_GetDarkShading()
1526 pwDest[dw] = (u_short)dwSum[dw & 1]; in usb_GetDarkShading()
1534 dwSum[0] += (u_long)_PHILO2WORD(pSrce); in usb_GetDarkShading()
1536 dwSum[0] += (u_long)_PLOHI2WORD(pSrce); in usb_GetDarkShading()
1540 dwSum[0] /= dwPixels; in usb_GetDarkShading()
1543 dwSum[0] = (int)dwSum[0] + iOffset; in usb_GetDarkShading()
1544 if((int)dwSum[0] < 0) in usb_GetDarkShading()
1545 dwSum[0] = 0; in usb_GetDarkShading()
1547 dwSum[0] = (u_long)_LOBYTE(_LOWORD(dwSum[0])) * 256UL + in usb_GetDarkShading()
1548 _HIBYTE(_LOWORD(dwSum[0])); in usb_GetDarkShading()
1550 dwSum[0] = (u_long)_LOWORD(dwSum[0]); in usb_GetDarkShading()
1555 pwDest[dw] = (u_short)dwSum[0]; in usb_GetDarkShading()