Lines Matching defs:channel
1415 /* Calculate channel displacements */
1552 DBG (DBG_FNC, "-> param->channel =%i\n", param->channel);
1571 /* setting color channel for non color scans */
1572 scan.channel = _B0 (param->channel);
1581 if (scan.channel == 3)
1663 if ((scancfg->colormode != CM_COLOR) && (scancfg->channel == 3)) /*channel = 0x00 */
2731 /* sets one channel per color */
2732 data_bitset (&cpRegs[0x12], 0x3f, 0); /* channel */
2733 data_bitset (&cpRegs[0x12], 0xc0, 1); /* 1 channel */
4742 if (scancfg->channel != 3)
4771 /* update gamma pointers for each channel */
5576 SANE_Int channel;
5591 channel = 2;
5604 channel--;
5606 while (channel > 0);
5789 /* Adds 3 color channel values */
6528 if ((scan2.colormode != CM_COLOR) && (scan2.channel == 3))
6616 /* Calculate channel displacements */
7611 if ((scan2.colormode != CM_COLOR) && (scan2.channel == 3)
7719 /* Get channels per dot and channel's size in bytes */
8136 if ((scancfg.colormode != CM_COLOR) && (scancfg.channel == 3))
8251 if ((scancfg.colormode == CM_GRAY) && (scancfg.channel == 3))
8364 if ((scancfg.channel > 0) && (scancfg.channel < 3))
8365 myCalib.WRef[0] = myCalib.WRef[scancfg.channel];
8466 && (scancfg->channel == 3)) ? 3 : scancfg->colormode;
8646 /* generate exposure times for each channel color */
8778 /* set bits per channel in shading correction's register (0x1cf) */
8791 /* 16 bits per channel */
8796 /* 12 bits per channel */
8801 /* 8 bits per channel */
8964 data_bitset (&Regs[0x12], 0x03, dev->sensorcfg->rgb_order[scancfg->channel]); /*------xx*/
8975 if (scancfg->channel == dev->sensorcfg->rgb_order[1])
8985 else if (scancfg->channel == dev->sensorcfg->rgb_order[2])
9002 /* set two channel color order */
9059 if (scancfg->channel == 3)
9110 /* setup channel colors */
9187 /* Sets 16 bits per channel */
9867 if (myvar->channel != 3)
10552 scancfg.channel = CL_RED;
11324 SANE_Byte channel;
11330 channel = 0;
11332 while ((channel < 3) && (ret == OK))
11335 if (fixed_black_shading[channel] == NULL)
11336 fixed_black_shading[channel] =
11339 if (fixed_black_shading[channel] != NULL)
11340 memset (fixed_black_shading[channel], 0, 0x7f8 * sizeof (USHORT));
11345 if (fixed_white_shading[channel] == NULL)
11346 fixed_white_shading[channel] =
11349 if (fixed_white_shading[channel] != NULL)
11350 memset (fixed_white_shading[channel], 0, 0x7f8 * sizeof (USHORT));
11354 channel++;
11364 SANE_Int ebp, ret, channel;
11377 for (channel = 0; channel < 3; channel++)
11379 buffer->white_shading[channel] = fixed_white_shading[channel];
11380 buffer->black_shading[channel] = fixed_black_shading[channel];
11389 channel = 0;
11390 while ((channel < 3) && (ret == OK))
11392 buffer->black_shading[channel] =
11395 buffer->white_shading[channel] =
11398 if ((buffer->black_shading[channel] != NULL)
11399 && (buffer->white_shading[channel] != NULL))
11403 buffer->black_shading[channel][pos] = 0x00;
11404 buffer->white_shading[channel][pos] = 0x4000;
11411 channel++;
11428 SANE_Int channel;
11430 for (channel = 0; channel < 3; channel++)
11432 if (caltables->black_shading[channel] != NULL)
11434 free (caltables->black_shading[channel]);
11435 caltables->black_shading[channel] = NULL;
11438 if (caltables->white_shading[channel] != NULL)
11440 free (caltables->white_shading[channel]);
11441 caltables->white_shading[channel] = NULL;
11800 channel]) *
12168 SANE_Int channel;
12211 for (channel = 0; channel < channels_per_dot; channel++)
12213 avgtarget[channel] = calibcfg->OffsetAvgTarget[channel] << 8;
12214 if (avgtarget[channel] == 0)
12215 avgtarget[channel] = 0x80;
12244 for (channel = 0; channel < channels_per_dot; channel++)
12245 dbValues[channel] =
12246 (40 / (44 - calibdata->gain_offset.vgag2[channel])) * (40 /
12251 [channel]));
12289 /* f0fc = f0e4 = channel */
12298 for (channel = 0; channel < 6; channel++)
12299 is_ready[channel] = FALSE;
12307 for (channel = 0; channel < channels_per_dot; channel++)
12313 mywvalue = &wvalues[channel];
12326 if (ptr_ready[channel] == FALSE)
12346 if (mydcg[channel] != 0x1ff)
12349 mydcg[channel] = 0x1ff;
12353 ptr_ready[channel] = TRUE;
12365 if (colour >= avgtarget[channel])
12367 colour -= avgtarget[channel];
12372 colour = avgtarget[channel] - colour;
12376 d = mydcg[channel];
12391 ptr_ready[channel] = TRUE; /*c7a0 */
12407 ptr_ready[channel] = TRUE;
12414 mydcg[channel] = (d < 0x100) ? 0x100 - d : d;
12433 for (channel = 0; channel < channels_per_dot; channel++)
12434 is_ready[channel] = FALSE;
12442 for (channel = 0; channel < channels_per_dot; channel++)
12444 if (is_ready[channel] == FALSE)
12451 /* Take one channel colour values from offsetnpixel pixels */
12459 if (pedcg[channel] != 0x1ff)
12462 podcg[channel] = 0x1ff;
12463 pedcg[channel] = 0x1ff;
12466 is_ready[channel] = TRUE;
12478 myesi = (colour > avgtarget[channel]) ? 0 : 1;
12479 colour = abs (avgtarget[channel] - colour);
12484 if (wvalues[channel + 3] == 0)
12485 wvalues[channel + 3]++;
12487 if (wvalues[channel] == 0)
12488 wvalues[channel]++;
12490 op3 = max (wvalues[channel], wvalues[channel + 3]);
12494 if (wvalues[channel + 6] == 0)
12495 wvalues[channel + 6]++;
12497 op3 = wvalues[channel + 6];
12501 op1 = (SANE_Int) (colour / (dbValues[channel] * op3));
12503 (pedcg[channel] <
12504 0x100) ? pedcg[channel] - 0xff : pedcg[channel];
12517 is_ready[channel] = TRUE;
12533 is_ready[channel] = TRUE;
12543 pedcg[channel] = op2;
12544 podcg[channel] = op2;
12557 for (channel = 0; channel < 3; channel++)
12559 poffseteven[channel] =
12560 (pedcg[channel] < 0x100) ? 0xff - pedcg[channel] : pedcg[channel];
12561 poffsetodd[channel] =
12562 (podcg[channel] < 0x100) ? 0xff - podcg[channel] : podcg[channel];
12576 /**/ SANE_Int channel[3];
12580 scancfg->resolution_x, scantype, &channel[0],
12581 &channel[1], &channel[2]);
12587 mylong2 = channel[a];
12641 SANE_Int channel; /*f134 */
12760 channel = 0;
12767 channel = position % bytes_per_pixel;
12773 channel = position / lf168;
12899 myCalib->white_shading[channel][lf13c] =
12907 sumatorio /= lf1a4[channel];
12909 sumatorio /= lf1a4[scancfg.channel];
12914 myCalib->black_shading[channel][lf13c] |=
12919 myCalib->white_shading[channel][lf13c] =
12942 channel = 0;
12948 channel = position % bytes_per_pixel;
12953 channel = position / lf168;
13076 myCalib->white_shading[channel][lf13c] =
13084 sumatorio /= lf1a4[channel];
13086 sumatorio /= lf1a4[scancfg.channel];
13091 myCalib->black_shading[channel][lf13c] |=
13096 myCalib->white_shading[channel][lf13c] =
13159 SANE_Int channel;
13247 channel = 0;
13254 channel = (b % lf010) & 0xffff;
13259 channel = (b / leff0) & 0xffff;
13264 e = min (lefd0, mylong * shadingprediff[channel]);
13265 myCalib->black_shading[channel][d] |= (unsigned short) e & 0xffff;
13387 channel = 0;
13395 channel = position % lf010;
13400 channel = position / leff0;
13405 dbvalue[channel] += sumatorio;
13408 sumatorio += shadingprediff[scancfg.channel];
13410 sumatorio += shadingprediff[channel];
13414 dbvalue[channel + 3] = myst;
13421 calibcfg->BRef[channel] * (1 << (scancfg.depth - 8));
13426 myCalib->black_shading[channel][lefdc] = min (myst, lefd0);
13508 channel = 0;
13516 channel = position % lf010;
13522 channel = position / leff0;
13528 dbvalue[channel] += sumatorio;
13531 sumatorio += shadingprediff[scancfg.channel];
13533 sumatorio += shadingprediff[channel];
13543 myst -= dbvalue[channel + 3];
13545 myst = min (myst, shadingprediff[channel + 3]);
13547 my14b4 = -shadingprediff[channel + 3];
13549 myst = min (myst2, shadingprediff[channel + 3]);
13553 myst += dbvalue[channel + 3];
13557 dbvalue[channel + 3] = myst;
13562 myCalib->black_shading[channel][lefdc] |=
13568 calibcfg->BRef[channel] / (1 << (8 - scancfg.depth));
13572 myCalib->black_shading[channel][lefdc] = min (myst, lefd0);
13686 if (calibdata->scancfg.channel > 2)
13687 calibdata->scancfg.channel = 0;
13691 calibcfg.PAG[calibdata->scancfg.channel];
14427 /* get channel color */
15093 Regs[0x1cf] |= 0x20; /* 16 bits per channel */