Lines Matching defs:depth

59   SANE_Int depth;
192 SANE_Int depth);
193 static void Color_to_Gray (SANE_Byte * buffer, SANE_Int size, SANE_Int depth);
201 SANE_Int depth);
457 SANE_Int *depth = NULL;
465 depth = (SANE_Int *) malloc (sizeof (mydepth));
466 if (depth != NULL)
467 memcpy (depth, &mydepth, sizeof (mydepth));
469 if (depth != NULL)
474 scanner->list_depths = depth;
724 Color_Negative (SANE_Byte * buffer, SANE_Int size, SANE_Int depth)
729 SANE_Int max_value = (1 << depth) - 1;
731 if (depth > 8)
824 Color_to_Gray (SANE_Byte * buffer, SANE_Int size, SANE_Int depth)
826 /* converts 3 color channel into 1 gray channel of specified bit depth */
836 chn_size = (depth > 8) ? 2 : 1;
942 gamma_apply (TScanner * s, SANE_Byte * buffer, SANE_Int size, SANE_Int depth)
947 SANE_Int dot_size = 3 * ((depth > 8) ? 2 : 1);
957 if (depth > 8)
1168 scanner->cnv.depth = -1;
1175 /* setting gamma range (16 bits depth) */
1207 scanner->ScanParams.depth = 8;
1481 pDesc->title = SANE_I18N ("Force real depth");
1484 ("If gamma is enabled, scans are always made in 16 bits depth to improve image quality and then converted to the selected depth. This option avoids depth emulation.");
2243 SANE_Int res, source, depth, colormode, frameformat, bpl;
2254 /* depth */
2255 depth = (colormode == CM_LINEART) ? 1 : s->aValues[opt_depth].w;
2276 bpl = coords.width * ((depth > 8) ? 2 : 1);
2286 p->depth = depth;
2291 DBG (DBG_FNC, " -> Depth : %i\n", depth);
2317 SANE_Int res, source, colormode, depth, channel;
2326 /* Get depth */
2327 depth = s->aValues[opt_depth].w;
2338 depth = 8;
2363 /* set depth emulation */
2409 /* emulating depth? */
2410 if ((s->cnv.real_depth == FALSE) && (depth < 16)
2415 s->cnv.depth = depth;
2416 s->ScanParams.depth = 16;
2420 s->ScanParams.depth = depth;
2421 s->cnv.depth = -1;
2477 if (s->cnv.depth != -1)
2478 emul_maxlen = maxlen * (s->ScanParams.depth / s->cnv.depth);
2487 chn_size = (s->ScanParams.depth > 8) ? 2 : 1;
2498 /* if we are emulating depth, we scan at 16bit when frontend waits
2500 scanner prior to convert to 8 bits depth */
2512 ((s->ScanParams.depth > 8) ? 2 : 1);
2587 gamma_apply (s, buffer, emul_len, s->ScanParams.depth);
2594 s->ScanParams.depth);
2597 Color_Negative (buffer, emul_len, s->ScanParams.depth);
2602 Color_to_Gray (buffer, emul_len, s->ScanParams.depth);
2606 /* emulating depth */
2607 if (s->cnv.depth != -1)
2609 switch (s->cnv.depth)