Lines Matching refs:wCalWidth

582   unsigned short wCalWidth;
631 wCalWidth = 10240;
633 lpCalData = (SANE_Byte *) malloc (sizeof (SANE_Byte) * wCalWidth * 3);
643 0, wCalWidth, 1, FALSE);
650 Asic_ReadCalibrationData (&g_chip, lpCalData, wCalWidth * 3, 24);
662 sprintf (lpBuf, "P6\n%d %d\n255\n\n", wCalWidth, 1);
664 fwrite (lpCalData, sizeof (SANE_Byte), wCalWidth * 3, stream);
675 Asic_ReadCalibrationData (&g_chip, lpCalData, wCalWidth * 3, 24);
680 MustScanner_CalculateMaxMin (lpCalData + wCalWidth, &wMaxValueG,
682 MustScanner_CalculateMaxMin (lpCalData + wCalWidth * 2, &wMaxValueB,
792 Asic_ReadCalibrationData (&g_chip, lpCalData, wCalWidth * 3, 24);
797 MustScanner_CalculateMaxMin (lpCalData + wCalWidth, &wMaxValueG,
799 MustScanner_CalculateMaxMin (lpCalData + wCalWidth * 2, &wMaxValueB,
994 Asic_ReadCalibrationData (&g_chip, lpCalData, wCalWidth * 3, 24);
999 MustScanner_CalculateMaxMin (lpCalData + wCalWidth, &wMaxValueG,
1001 MustScanner_CalculateMaxMin (lpCalData + wCalWidth * 2, &wMaxValueB,
1117 unsigned short wCalWidth = FIND_LEFT_TOP_WIDTH_IN_DIP;
1142 lpCalData = (SANE_Byte *) malloc (sizeof (SANE_Byte) * wCalWidth * wCalHeight);
1149 dwTotalSize = wCalWidth * wCalHeight;
1153 Asic_SetCalibrate (&g_chip, 8, wXResolution, wYResolution, 0, 0, wCalWidth,
1202 sprintf (lpBuf, "P5\n%d %d\n255\n", wCalWidth, wCalHeight);
1204 fwrite (lpCalData, sizeof (SANE_Byte), wCalWidth * wCalHeight, stream);
1214 for (i = wCalWidth - 1; i > 0; i--)
1217 wLeftSide += *(lpCalData + wCalWidth * 2 + i);
1218 wLeftSide += *(lpCalData + wCalWidth * 4 + i);
1219 wLeftSide += *(lpCalData + wCalWidth * 6 + i);
1220 wLeftSide += *(lpCalData + wCalWidth * 8 + i);
1224 if (i == wCalWidth - 1)
1238 wTopSide = *(lpCalData + wCalWidth * j + i - 2);
1239 wTopSide += *(lpCalData + wCalWidth * j + i - 4);
1240 wTopSide += *(lpCalData + wCalWidth * j + i - 6);
1241 wTopSide += *(lpCalData + wCalWidth * j + i - 8);
1242 wTopSide += *(lpCalData + wCalWidth * j + i - 10);
1349 unsigned short wCalWidth;
1386 wCalWidth = g_Width;
1388 dwWhiteTotalSize = wCalWidth * wCalHeight * 3 * 2;
1389 dwDarkTotalSize = wCalWidth * wCalHeight * 3 * 2;
1404 Asic_SetCalibrate (&g_chip, 48, g_XDpi, g_YDpi, g_X, 0, wCalWidth,
1452 Asic_SetCalibrate (&g_chip, 48, g_XDpi, g_YDpi, g_X, 0, wCalWidth,
1523 sprintf (lpBuf, "P6\n%d %d\n65535\n", wCalWidth, wCalHeight);
1525 fwrite (lpWhiteData, sizeof (SANE_Byte), wCalWidth * wCalHeight * 3 * 2, stream);
1530 sprintf (lpBuf, "P6\n%d %d\n65535\n", wCalWidth, wCalHeight);
1532 fwrite (lpDarkData, sizeof (SANE_Byte), wCalWidth * wCalHeight * 3 * 2, stream);
1539 lpWhiteShading = (unsigned short *) malloc (sizeof (unsigned short) * wCalWidth * 3);
1540 lpDarkShading = (unsigned short *) malloc (sizeof (unsigned short) * wCalWidth * 3);
1569 "Reflective_LineCalibration16Bits: wCalWidth = %d, wCalHeight = %d\n",
1570 wCalWidth, wCalHeight);
1572 for (i = 0; i < wCalWidth; i++)
1577 (unsigned short) (*(lpDarkData + j * wCalWidth * 6 + i * 6 + 0));
1579 (unsigned short) (*(lpDarkData + j * wCalWidth * 6 + i * 6 + 1) << 8);
1582 (unsigned short) (*(lpDarkData + j * wCalWidth * 6 + i * 6 + 2));
1584 (unsigned short) (*(lpDarkData + j * wCalWidth * 6 + i * 6 + 3) << 8);
1587 (unsigned short) (*(lpDarkData + j * wCalWidth * 6 + i * 6 + 4));
1589 (unsigned short) (*(lpDarkData + j * wCalWidth * 6 + i * 6 + 5) << 8);
1636 dwRDarkLevel = (unsigned int) (dwRDarkLevel / (wCalWidth / 2));
1637 dwGDarkLevel = (unsigned int) (dwGDarkLevel / (wCalWidth / 2));
1638 dwBDarkLevel = (unsigned int) (dwBDarkLevel / (wCalWidth / 2));
1639 dwREvenDarkLevel = (unsigned int) (dwREvenDarkLevel / (wCalWidth / 2));
1640 dwGEvenDarkLevel = (unsigned int) (dwGEvenDarkLevel / (wCalWidth / 2));
1641 dwBEvenDarkLevel = (unsigned int) (dwBEvenDarkLevel / (wCalWidth / 2));
1645 dwRDarkLevel = (unsigned int) (dwRDarkLevel / wCalWidth);
1646 dwGDarkLevel = (unsigned int) (dwGDarkLevel / wCalWidth);
1647 dwBDarkLevel = (unsigned int) (dwBDarkLevel / wCalWidth);
1651 for (i = 0; i < wCalWidth; i++)
1660 (unsigned short) (*(lpWhiteData + j * wCalWidth * 2 * 3 + i * 6 + 0));
1662 (unsigned short) (*(lpWhiteData + j * wCalWidth * 2 * 3 + i * 6 + 1) << 8);
1665 (unsigned short) (*(lpWhiteData + j * wCalWidth * 2 * 3 + i * 6 + 2));
1667 (unsigned short) (*(lpWhiteData + j * wCalWidth * 2 * 3 + i * 6 + 3) << 8);
1670 (unsigned short) (*(lpWhiteData + j * wCalWidth * 2 * 3 + i * 6 + 4));
1672 (unsigned short) (*(lpWhiteData + j * wCalWidth * 2 * 3 + i * 6 + 5) << 8);
1738 wCalWidth, 0);