Lines Matching refs:lines

631 dev_block_read_start (Mustek_Scanner * s, SANE_Int lines)
633 DBG (4, "dev_block_read_start: entering block for %d lines\n", lines);
640 readlines[2] = (lines >> 16) & 0xff;
641 readlines[3] = (lines >> 8) & 0xff;
642 readlines[4] = (lines >> 0) & 0xff;
651 readlines[2] = (lines >> 16) & 0xff;
652 readlines[3] = (lines >> 8) & 0xff;
653 readlines[4] = (lines >> 0) & 0xff;
681 /* tell scanner how many lines to scan in one block */
684 buffer[2] = (lines >> 16) & 0xff;
685 buffer[3] = (lines >> 8) & 0xff;
686 buffer[4] = (lines >> 0) & 0xff;
695 dev_read_req_enter (Mustek_Scanner * s, SANE_Byte * buf, SANE_Int lines,
699 *lenp = lines * bpl;
708 return sanei_ab306_rdata (s->fd, planes, buf, lines, bpl);
717 return mustek_scsi_pp_rdata (s->fd, planes, buf, lines, bpl);
724 lines *= 3;
729 command[7] = (lines >> 8) & 0xff;
730 command[8] = (lines >> 0) & 0xff;
737 command[2] = ((lines * bpl) >> 16) & 0xff;
738 command[3] = ((lines * bpl) >> 8) & 0xff;
739 command[4] = ((lines * bpl) >> 0) & 0xff;
747 command[2] = (lines >> 16) & 0xff;
748 command[3] = (lines >> 8) & 0xff;
749 command[4] = (lines >> 0) & 0xff;
1994 offset = MAX_LINE_DIST; /* distance r/b lines */
2131 s->hw->cal.lines = result[3] | (result[4] << 8);
2133 DBG (4, "get_calibration_size_pro: bytes=%d, lines=%d\n", s->hw->cal.bytes,
2134 s->hw->cal.lines);
2154 for (line = 0; line < s->hw->cal.lines; line++)
2186 "sending lines\n",
2205 for (line = 0; line < s->hw->cal.lines; line++)
2261 s->hw->cal.lines);
2265 s->hw->cal.bytes * s->hw->cal.lines);
2289 SANE_Word lines, bytes_per_color;
2293 lines = s->hw->cal.lines * 3;
2298 lines = s->hw->cal.lines;
2302 DBG (4, "get_calibration_lines_se: reading %d lines (%d bytes per color)\n",
2303 lines, bytes_per_color);
2307 cmd[7] = (lines >> 8) & 0xff;
2308 cmd[8] = (lines >> 0) & 0xff;
2309 len = lines * bytes_per_color;
2313 || (len != (unsigned int) (lines * bytes_per_color)))
2348 "sending lines\n",
2360 for (line = 0; line < s->hw->cal.lines; line++)
2366 cali_word = 256 * s->hw->cal.lines * 255 / cali_word - 256;
2399 s->hw->cal.lines = MIN (s->hw->cal.lines,
2403 * s->hw->cal.lines);
2407 s->hw->cal.bytes * s->hw->cal.lines);
2957 scan_size = s->hw->bpl * s->hw->lines / 1024;
2961 if (s->total_bytes == s->params.lines * s->params.bytes_per_line)
2963 else if (s->total_bytes < s->params.lines * s->params.bytes_per_line)
2965 s->params.lines * s->params.bytes_per_line);
2968 s->total_bytes, s->params.lines * s->params.bytes_per_line);
3000 if (s->total_bytes < s->params.lines * s->params.bytes_per_line)
3010 (s->total_bytes < s->params.lines * s->params.bytes_per_line))
3034 lines. */
3218 get_image_status (Mustek_Scanner * s, SANE_Int * bpl, SANE_Int * lines)
3258 s->hw->lines = result[3] | (result[4] << 8) | (result[5] << 16);
3273 *lines = s->hw->lines - offset;
3275 DBG (3, "get_image_status: bytes_per_line=%d, lines=%d (offset = %d)\n",
3276 *bpl, *lines, offset);
3282 get_window (Mustek_Scanner * s, SANE_Int * bpl, SANE_Int * lines,
3308 s->hw->cal.lines = (result[10] << 24) | (result[11] << 16) |
3311 DBG (4, "get_window: calibration bpl=%d, lines=%d\n",
3312 s->hw->cal.bytes, s->hw->cal.lines);
3317 s->hw->lines = (result[18] << 24) | (result[19] << 16) |
3320 DBG (4, "get_window: scan bpl=%d, lines=%d\n", s->hw->bpl, s->hw->lines);
3322 if ((s->hw->cal.bytes == 0) || (s->hw->cal.lines == 0)
3323 || (s->hw->bpl == 0) || (s->hw->lines == 0))
3355 *lines = (s->hw->lines - s->ld.dist[2]) * res / s->ld.peak_res;
3368 *lines = s->hw->lines;
3370 DBG (4, "get_window: bpl = %d (hardware: %d), lines = %d (hardware: %d)\n",
3371 *bpl, s->hw->bpl, *lines, s->hw->lines);
3425 /* restore the previously saved lines: */
3436 else if (s->ld.index[c] < s->params.lines)
3458 /* copy away the lines with at least one missing
3465 /* notice the number of lines we processed */
3467 /* return number of complete (r+g+b) lines */
3503 DBG (5, "fix_line_distance_n_1: got %d lines, %d bpl\n", num_lines, bpl);
3507 /* restore the previously saved lines: */
3535 if ((raw >= raw_end) || ((s->ld.index[0] >= s->params.lines) &&
3536 (s->ld.index[1] >= s->params.lines) &&
3537 (s->ld.index[2] >= s->params.lines)))
3546 DBG (4, "fix_line_distance_n_1: lines ready: %d\n", num_lines);
3548 /* copy away the lines with at least one missing
3552 DBG (4, "fix_line_distance_n_1: copied %d lines to "
3555 /* notice the number of lines we processed */
3559 /* return number of complete (r+g+b) lines */
3573 SANE_Int index[3], lines[3], quant[3], dist[3];
3621 distance. So me must count complete (r+g+b) lines already
3623 s->ld.ld_line = s->params.lines;
3634 DBG (5, "fix_line_distance_se: start color: %d; %d lines \n",
3637 /* First scan the lines read and count red, green and blue ones.
3638 Since we will step through the lines a second time we must not
3643 lines[color] = s->ld.saved[color];
3659 ++lines[color];
3670 /* Calculate how many triples of color lines we can output now.
3671 Because the number of available red lines is always greater
3673 num_lines = MIN (lines[1], lines[2]);
3675 DBG (5, "fix_line_distance_se: saved lines: %d/%d/%d\n", s->ld.saved[0],
3678 lines[0], lines[1], lines[2], num_lines);
3680 lines[0] = lines[1] = lines[2] = num_lines;
3682 /* Output the color lines saved in previous call first.
3688 while ((s->ld.saved[color] > 0) && (lines[color] > 0))
3708 s->ld.saved[color], lines[color], color, (u_long) (ptr - ptr_start),
3737 "color: %d\n", s->ld.saved[color], lines[color], color);
3740 --lines[color];
3758 if (lines[s->ld.color] > 0)
3784 lines[s->ld.color], s->ld.color, (u_long) (raw - raw_start),
3814 "%d\n", lines[s->ld.color], s->ld.color);
3816 --lines[s->ld.color];
3839 /* Reduce num_lines if we encounter excess lines. */
3980 DBG (5, "fix_line_distance_normal: %d lines, %d bpl\n", num_lines, bpl);
4051 /* restore the previously saved lines: */
4053 DBG (5, "fix_line_distance_block: copied %d lines from "
4092 if ((s->total_lines + num_lines) > s->params.lines)
4093 num_lines = s->params.lines - s->total_lines;
4096 /* copy away the lines with at least one missing
4108 DBG (5, "fix_line_distance_block: copied %d lines to "
4111 /* notice the number of lines we processed */
4117 "index=(%d,%d,%d), line = %d, lines = %d\n",
4121 /* return number of complete (r+g+b) lines */
4141 DBG (5, "fix_line_distance_none: no ld correction necessary (%d lines)\n",
4146 if (s->ld.ld_line > s->params.lines)
4147 num_lines -= (s->ld.ld_line - s->params.lines);
4151 DBG (5, "fix_line_distance_none: using %d lines (ld_line = %d, "
4152 "s->params.lines = %d)\n", num_lines, s->ld.ld_line, s->params.lines);
4669 extra, s->hw->lines);
4687 DBG (5, "output_data: ADF found, mirroring lines\n");
4715 DBG (5, "output_data: enlarge lines from %d bpl to %d bpl\n",
4799 DBG (5, "output_data: ADF found, mirroring lines\n");
4849 SANE_Int lines; /* # lines in buffer */
4906 "(%d lines)\n", strip_height, max_lines);
4918 DBG (4, "reader_process: %d lines per buffer, %d bytes per line, "
4985 DBG (4, "reader_process: limiting block read to %d buffers (%d lines)\n",
4986 max_buffers, MIN (s->hw->lines, (max_buffers * lines_per_buffer)));
4988 while (s->line < s->hw->lines)
4991 MIN (s->hw->lines - s->line, (max_buffers * lines_per_buffer));
5016 bstat[buffernumber].lines * bpl,
5043 bstat[buffernumber].lines, bpl, extra);
5057 if ((s->line < s->hw->lines) && (buffer_count < max_buffers))
5059 if (s->line + lines_per_buffer >= s->hw->lines)
5061 /* do the last few lines: */
5062 bstat[buffernumber].lines = s->hw->lines - s->line;
5068 bstat[buffernumber].lines = lines_per_buffer;
5075 s->line += bstat[buffernumber].lines;
5083 bstat[buffernumber].lines * bpl, buffer_count);
5086 bstat[buffernumber].lines, bpl,
5098 s->hw->lines, buffer_count);
6167 s->params.lines = height * dots_per_mm;
6219 DBG (4, "sane_get_parameters: lines = %d; ppl = %d; bpl = %d\n",
6220 s->params.lines, s->params.pixels_per_line, s->params.bytes_per_line);
6386 &s->params.lines, &s->params.pixels_per_line);
6446 &s->params.lines);
6515 &s->params.lines);