Lines Matching refs:gain

456   unsigned char gain;		/* static analog gain, 0 - 31 */
469 /* offset/gain calibration file name */
931 /* Read in cal strip at bottom of scanner (to adjust gain/offset
981 /* Compute the offset/gain table from the calibration strip. This is
986 This produces the CAL_FILE_OGN file, the final offset/gain table. */
1080 DBG (1, "Warning: gain/offset compute failed.\n"
1123 /* Finally, compute offset and gain */
1126 int gain, offset;
1141 /* Original gain/offset */
1142 gain = 512 * ((max_range[i / (width / 3)] /
1149 /* Enhanced offset and gain calculation by M.Reinelt <reinelt@eunet.at>
1151 * by changing gain and offset values for every pixel until the desired
1154 * Note that offset is linear, but gain isn't!
1157 gain = (double)3861.0 * exp(-0.0168 * (avg[i + width] - avg[i]));
1160 DBG (14, "%d wht=%f blk=%f diff=%f gain=%d offset=%d\n", i,
1161 avg[i + width], avg[i], avg[i + width] - avg[i], gain, offset);
1162 /* 10-bit gain, 6-bit offset (subtractor) in two bytes */
1163 ogn[0] = (byte) (((offset << 2) + (gain >> 8)) & 0xFF);
1164 ogn[1] = (byte) (gain & 0xFF);
1190 /* Load or fake the offset/gain table */
1199 10-bit gain + 6-bit offset = 2 bytes per pixel, so 10208 bytes */
1210 /* Make up the gain/offset data. */
1276 /* install the offset/gain table */
1357 /* Analog static gain R,G,B (normally 0x01) */
1358 write_byte (fd, 0x3b, opt->gain);
1359 write_byte (fd, 0x3c, opt->gain);
1360 write_byte (fd, 0x3d, opt->gain);
1361 /* Digital gain/offset settings. Greyscale has 0 */
1445 const int gain,
1452 DBG (2, "gain = %d\n", gain);
1472 if ((gain < 0) || (gain > 64))
1484 scan->gain = gain;