Lines Matching refs:wCalWidth

619   unsigned short wCalWidth;
667 wCalWidth = 10240;
669 lpCalData = (SANE_Byte *) malloc (sizeof (SANE_Byte) * wCalWidth * 3);
678 0, wCalWidth, 1, FALSE);
685 Asic_ReadCalibrationData (&g_chip, lpCalData, wCalWidth * 3, 24);
698 sprintf (lpBuf, "P6\n%d %d\n255\n", wCalWidth, 3);
700 fwrite (lpCalData, sizeof (SANE_Byte), wCalWidth * 3, stream);
711 Asic_ReadCalibrationData (&g_chip, lpCalData, wCalWidth * 3, 24);
716 MustScanner_CalculateMaxMin (lpCalData + wCalWidth, &wMaxValueG,
718 MustScanner_CalculateMaxMin (lpCalData + wCalWidth * 2, &wMaxValueB,
816 Asic_ReadCalibrationData (&g_chip, lpCalData, wCalWidth * 3, 24);
821 MustScanner_CalculateMaxMin (lpCalData + wCalWidth, &wMaxValueG,
823 MustScanner_CalculateMaxMin (lpCalData + wCalWidth * 2, &wMaxValueB,
1017 Asic_ReadCalibrationData (&g_chip, lpCalData, wCalWidth * 3, 24);
1022 MustScanner_CalculateMaxMin (lpCalData + wCalWidth, &wMaxValueG,
1024 MustScanner_CalculateMaxMin (lpCalData + wCalWidth * 2, &wMaxValueB,
1129 unsigned short wCalWidth = TA_FIND_LEFT_TOP_WIDTH_IN_DIP;
1156 lpCalData = (SANE_Byte *) malloc (sizeof (SANE_Byte) * wCalWidth * wCalHeight);
1163 dwTotalSize = wCalWidth * wCalHeight;
1167 Asic_SetCalibrate (&g_chip, 8, wXResolution, wYResolution, 0, 0, wCalWidth,
1192 sprintf (lpBuf, "P5\n%d %d\n255\n", wCalWidth, wCalHeight);
1194 fwrite (lpCalData, sizeof (SANE_Byte), wCalWidth * wCalHeight, stream);
1203 for (i = (wCalWidth - 1); i > 0; i--)
1206 wLeftSide += *(lpCalData + wCalWidth * 2 + i);
1207 wLeftSide += *(lpCalData + wCalWidth * 4 + i);
1208 wLeftSide += *(lpCalData + wCalWidth * 6 + i);
1209 wLeftSide += *(lpCalData + wCalWidth * 8 + i);
1213 if (i == (wCalWidth - 1))
1225 wTopSide = *(lpCalData + wCalWidth * j + i + 2);
1226 wTopSide += *(lpCalData + wCalWidth * j + i + 4);
1227 wTopSide += *(lpCalData + wCalWidth * j + i + 6);
1228 wTopSide += *(lpCalData + wCalWidth * j + i + 8);
1229 wTopSide += *(lpCalData + wCalWidth * j + i + 10);
1305 unsigned short wCalWidth = g_Width;
1326 dwWhiteTotalSize = wCalWidth * wCalHeight * 3 * 2;
1327 dwDarkTotalSize = wCalWidth * wCalHeight * 3 * 2;
1340 Asic_SetCalibrate (&g_chip, 48, g_XDpi, g_YDpi, g_X, 0, wCalWidth,
1352 Asic_SetCalibrate (&g_chip, 48, g_XDpi, g_YDpi, g_X, 0, wCalWidth,
1376 sprintf (lpBuf, "P6\n%d %d\n65535\n", wCalWidth, wCalHeight);
1378 fwrite (lpWhiteData, sizeof (SANE_Byte), wCalWidth * wCalHeight * 3 * 2, stream);
1383 sprintf (lpBuf, "P6\n%d %d\n65535\n", wCalWidth, wCalHeight);
1385 fwrite (lpDarkData, sizeof (SANE_Byte), wCalWidth * wCalHeight * 3 * 2, stream);
1390 lpWhiteShading = (unsigned short *) malloc (sizeof (unsigned short) * wCalWidth * 3);
1391 lpDarkShading = (unsigned short *) malloc (sizeof (unsigned short) * wCalWidth * 3);
1412 "Transparent_LineCalibration16Bits: wCalWidth = %d, wCalHeight = %d\n",
1413 wCalWidth, wCalHeight);
1423 for (i = 0; i < wCalWidth; i++)
1429 (unsigned short) (*(lpDarkData + j * wCalWidth * 6 + i * 6 + 0));
1431 (unsigned short) (*(lpDarkData + j * wCalWidth * 6 + i * 6 + 1) << 8);
1434 (unsigned short) (*(lpDarkData + j * wCalWidth * 6 + i * 6 + 2));
1436 (unsigned short) (*(lpDarkData + j * wCalWidth * 6 + i * 6 + 3) << 8);
1439 (unsigned short) (*(lpDarkData + j * wCalWidth * 6 + i * 6 + 4));
1441 (unsigned short) (*(lpDarkData + j * wCalWidth * 6 + i * 6 + 5) << 8);
1486 dwRDarkLevel = (unsigned int) (dwRDarkLevel / (wCalWidth / 2)) - 512;
1487 dwGDarkLevel = (unsigned int) (dwGDarkLevel / (wCalWidth / 2)) - 512;
1488 dwBDarkLevel = (unsigned int) (dwBDarkLevel / (wCalWidth / 2)) - 512;
1490 dwREvenDarkLevel = (unsigned int) (dwREvenDarkLevel / (wCalWidth / 2)) - 512;
1491 dwGEvenDarkLevel = (unsigned int) (dwGEvenDarkLevel / (wCalWidth / 2)) - 512;
1492 dwBEvenDarkLevel = (unsigned int) (dwBEvenDarkLevel / (wCalWidth / 2)) - 512;
1496 dwRDarkLevel = (unsigned int) (dwRDarkLevel / wCalWidth) - 512;
1497 dwGDarkLevel = (unsigned int) (dwGDarkLevel / wCalWidth) - 512;
1498 dwBDarkLevel = (unsigned int) (dwBDarkLevel / wCalWidth) - 512;
1502 for (i = 0; i < wCalWidth; i++)
1511 (unsigned short) (*(lpWhiteData + j * wCalWidth * 2 * 3 + i * 6 + 0));
1513 (unsigned short) (*(lpWhiteData + j * wCalWidth * 2 * 3 + i * 6 + 1) << 8);
1516 (unsigned short) (*(lpWhiteData + j * wCalWidth * 2 * 3 + i * 6 + 2));
1518 (unsigned short) (*(lpWhiteData + j * wCalWidth * 2 * 3 + i * 6 + 3) << 8);
1521 (unsigned short) (*(lpWhiteData + j * wCalWidth * 2 * 3 + i * 6 + 4));
1523 (unsigned short) (*(lpWhiteData + j * wCalWidth * 2 * 3 + i * 6 + 5) << 8);
1639 wCalWidth, 0);