kopia lustrzana https://gitlab.com/sane-project/backends
Merge branch 'genesys-misc-cleanup' into 'master'
genesys: Miscellaneous cleanup See merge request sane-project/backends!177merge-requests/179/head
commit
dc52dc84f0
|
@ -281,6 +281,7 @@ sanei_genesys_init_structs (Genesys_Device * dev)
|
||||||
for (const auto& frontend : *s_frontends) {
|
for (const auto& frontend : *s_frontends) {
|
||||||
if (dev->model->dac_type == frontend.fe_id) {
|
if (dev->model->dac_type == frontend.fe_id) {
|
||||||
dev->frontend_initial = frontend;
|
dev->frontend_initial = frontend;
|
||||||
|
dev->frontend = frontend;
|
||||||
fe_ok = true;
|
fe_ok = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3410,53 +3411,6 @@ static void accurate_line_read(Genesys_Device* dev, Genesys_Buffer& buffer)
|
||||||
buffer.produce(buffer.size());
|
buffer.produce(buffer.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @brief fill buffer while reducing vertical resolution
|
|
||||||
* This function fills a read buffer with scanned data from a sensor
|
|
||||||
* which puts odd and even pixels in 2 different data segment. So a complete
|
|
||||||
* must be read and bytes interleaved to get usable by the other stages
|
|
||||||
* of the backend
|
|
||||||
*/
|
|
||||||
static void genesys_fill_line_interp_buffer(Genesys_Device* dev, uint8_t* work_buffer_dst,
|
|
||||||
size_t size)
|
|
||||||
{
|
|
||||||
DBG_HELPER(dbg);
|
|
||||||
size_t count;
|
|
||||||
/* fill buffer if needed */
|
|
||||||
if (dev->oe_buffer.avail() == 0)
|
|
||||||
{
|
|
||||||
accurate_line_read(dev, dev->oe_buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* copy size bytes of data, copying from a line when line count matches */
|
|
||||||
count = 0;
|
|
||||||
while (count < size)
|
|
||||||
{
|
|
||||||
/* line counter */
|
|
||||||
// dev->line_interp holds the number of lines scanned for one line of data sent
|
|
||||||
if (((dev->line_count / dev->session.params.channels) % dev->line_interp) == 0) {
|
|
||||||
/* copy pixel when line matches */
|
|
||||||
work_buffer_dst[count] = dev->oe_buffer.get_read_pos()[dev->deseg_curr_byte];
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// always update pointer so we skip uncopied data
|
|
||||||
dev->deseg_curr_byte++;
|
|
||||||
|
|
||||||
/* go to next line if needed */
|
|
||||||
if (dev->deseg_curr_byte == dev->session.output_segment_pixel_group_count) {
|
|
||||||
dev->oe_buffer.set_pos(dev->oe_buffer.pos() + dev->session.output_line_bytes_raw);
|
|
||||||
dev->deseg_curr_byte = 0;
|
|
||||||
dev->line_count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* read a new buffer if needed */
|
|
||||||
if (dev->oe_buffer.pos() >= dev->oe_buffer.avail())
|
|
||||||
{
|
|
||||||
accurate_line_read(dev, dev->oe_buffer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @brief fill buffer for segmented sensors
|
/** @brief fill buffer for segmented sensors
|
||||||
* This function fills a read buffer with scanned data from a sensor segmented
|
* This function fills a read buffer with scanned data from a sensor segmented
|
||||||
* in several parts (multi-lines sensors). Data of the same valid area is read
|
* in several parts (multi-lines sensors). Data of the same valid area is read
|
||||||
|
@ -3610,12 +3564,7 @@ static void genesys_fill_read_buffer(Genesys_Device* dev)
|
||||||
*
|
*
|
||||||
* This is also the place where full duplex data will be handled.
|
* This is also the place where full duplex data will be handled.
|
||||||
*/
|
*/
|
||||||
if (dev->line_interp>0)
|
if (dev->session.segment_count > 1) {
|
||||||
{
|
|
||||||
// line interpolation
|
|
||||||
genesys_fill_line_interp_buffer(dev, work_buffer_dst, size);
|
|
||||||
}
|
|
||||||
else if (dev->session.segment_count > 1) {
|
|
||||||
// multi-segment sensors processing
|
// multi-segment sensors processing
|
||||||
genesys_fill_segmented_buffer(dev, work_buffer_dst, size);
|
genesys_fill_segmented_buffer(dev, work_buffer_dst, size);
|
||||||
}
|
}
|
||||||
|
@ -3648,10 +3597,6 @@ static void genesys_read_ordered_data(Genesys_Device* dev, SANE_Byte* destinatio
|
||||||
uint8_t *work_buffer_dst;
|
uint8_t *work_buffer_dst;
|
||||||
unsigned int dst_lines;
|
unsigned int dst_lines;
|
||||||
unsigned int step_1_mode;
|
unsigned int step_1_mode;
|
||||||
unsigned int needs_reorder;
|
|
||||||
unsigned int needs_ccd;
|
|
||||||
unsigned int needs_shrink;
|
|
||||||
unsigned int needs_reverse;
|
|
||||||
Genesys_Buffer *src_buffer;
|
Genesys_Buffer *src_buffer;
|
||||||
Genesys_Buffer *dst_buffer;
|
Genesys_Buffer *dst_buffer;
|
||||||
|
|
||||||
|
@ -3670,30 +3615,6 @@ static void genesys_read_ordered_data(Genesys_Device* dev, SANE_Byte* destinatio
|
||||||
|
|
||||||
src_pixels = dev->current_setup.pixels;
|
src_pixels = dev->current_setup.pixels;
|
||||||
|
|
||||||
needs_reorder = 1;
|
|
||||||
if (channels != 3 && depth != 16)
|
|
||||||
needs_reorder = 0;
|
|
||||||
#ifndef WORDS_BIGENDIAN
|
|
||||||
if (channels != 3 && depth == 16)
|
|
||||||
needs_reorder = 0;
|
|
||||||
if (channels == 3 && depth == 16 && !dev->model->is_cis &&
|
|
||||||
dev->model->line_mode_color_order == COLOR_ORDER_RGB)
|
|
||||||
needs_reorder = 0;
|
|
||||||
#endif
|
|
||||||
if (channels == 3 && depth == 8 && !dev->model->is_cis &&
|
|
||||||
dev->model->line_mode_color_order == COLOR_ORDER_RGB)
|
|
||||||
needs_reorder = 0;
|
|
||||||
|
|
||||||
needs_ccd = dev->current_setup.max_shift > 0;
|
|
||||||
needs_shrink = dev->settings.requested_pixels != src_pixels;
|
|
||||||
needs_reverse = depth == 1;
|
|
||||||
|
|
||||||
DBG(DBG_info, "%s: using filters:%s%s%s%s\n", __func__,
|
|
||||||
needs_reorder ? " reorder" : "",
|
|
||||||
needs_ccd ? " ccd" : "",
|
|
||||||
needs_shrink ? " shrink" : "",
|
|
||||||
needs_reverse ? " reverse" : "");
|
|
||||||
|
|
||||||
DBG(DBG_info, "%s: frontend requested %lu bytes\n", __func__, (u_long) * len);
|
DBG(DBG_info, "%s: frontend requested %lu bytes\n", __func__, (u_long) * len);
|
||||||
|
|
||||||
DBG(DBG_info, "%s: bytes_to_read=%lu, total_bytes_read=%lu\n", __func__,
|
DBG(DBG_info, "%s: bytes_to_read=%lu, total_bytes_read=%lu\n", __func__,
|
||||||
|
@ -3778,8 +3699,7 @@ Problems with the first approach:
|
||||||
src_buffer = &(dev->read_buffer);
|
src_buffer = &(dev->read_buffer);
|
||||||
|
|
||||||
/* maybe reorder components/bytes */
|
/* maybe reorder components/bytes */
|
||||||
if (needs_reorder)
|
if (dev->session.pipeline_needs_reorder) {
|
||||||
{
|
|
||||||
if (depth == 1) {
|
if (depth == 1) {
|
||||||
throw SaneException("Can't reorder single bit data\n");
|
throw SaneException("Can't reorder single bit data\n");
|
||||||
}
|
}
|
||||||
|
@ -3808,14 +3728,17 @@ Problems with the first approach:
|
||||||
{
|
{
|
||||||
step_1_mode = 0;
|
step_1_mode = 0;
|
||||||
|
|
||||||
if (depth == 16)
|
if (depth == 16) {
|
||||||
step_1_mode |= 1;
|
step_1_mode |= 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (dev->model->is_cis)
|
if (dev->model->is_cis) {
|
||||||
step_1_mode |= 2;
|
step_1_mode |= 2;
|
||||||
|
}
|
||||||
|
|
||||||
if (dev->model->line_mode_color_order == COLOR_ORDER_BGR)
|
if (dev->model->line_mode_color_order == ColorOrder::BGR) {
|
||||||
step_1_mode |= 4;
|
step_1_mode |= 4;
|
||||||
|
}
|
||||||
|
|
||||||
switch (step_1_mode)
|
switch (step_1_mode)
|
||||||
{
|
{
|
||||||
|
@ -3870,8 +3793,8 @@ Problems with the first approach:
|
||||||
src_buffer = dst_buffer;
|
src_buffer = dst_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* maybe reverse effects of ccd layout */
|
// maybe reverse effects of ccd layout
|
||||||
if (needs_ccd)
|
if (dev->session.pipeline_needs_ccd)
|
||||||
{
|
{
|
||||||
// should not happen with depth == 1.
|
// should not happen with depth == 1.
|
||||||
if (depth == 1) {
|
if (depth == 1) {
|
||||||
|
@ -3920,9 +3843,8 @@ Problems with the first approach:
|
||||||
src_buffer = dst_buffer;
|
src_buffer = dst_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* maybe shrink(or enlarge) lines */
|
// maybe shrink(or enlarge) lines
|
||||||
if (needs_shrink)
|
if (dev->session.pipeline_needs_shrink) {
|
||||||
{
|
|
||||||
|
|
||||||
dst_buffer = &(dev->out_buffer);
|
dst_buffer = &(dev->out_buffer);
|
||||||
|
|
||||||
|
@ -3975,8 +3897,7 @@ Problems with the first approach:
|
||||||
bytes = *len;
|
bytes = *len;
|
||||||
work_buffer_src = src_buffer->get_read_pos();
|
work_buffer_src = src_buffer->get_read_pos();
|
||||||
|
|
||||||
if (needs_reverse)
|
if (dev->session.pipeline_needs_reverse) {
|
||||||
{
|
|
||||||
genesys_reverse_bits(work_buffer_src, destination, bytes);
|
genesys_reverse_bits(work_buffer_src, destination, bytes);
|
||||||
*len = bytes;
|
*len = bytes;
|
||||||
}
|
}
|
||||||
|
@ -5549,7 +5470,6 @@ sane_open_impl(SANE_String_Const devicename, SANE_Handle * handle)
|
||||||
s->dev->parking = SANE_FALSE;
|
s->dev->parking = SANE_FALSE;
|
||||||
s->dev->read_active = SANE_FALSE;
|
s->dev->read_active = SANE_FALSE;
|
||||||
s->dev->force_calibration = 0;
|
s->dev->force_calibration = 0;
|
||||||
s->dev->line_interp = 0;
|
|
||||||
s->dev->line_count = 0;
|
s->dev->line_count = 0;
|
||||||
s->dev->binary=NULL;
|
s->dev->binary=NULL;
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ struct Genesys_Model
|
||||||
SANE_Int ld_shift_b = 0;
|
SANE_Int ld_shift_b = 0;
|
||||||
|
|
||||||
// Order of the CCD/CIS colors
|
// Order of the CCD/CIS colors
|
||||||
Genesys_Color_Order line_mode_color_order = COLOR_ORDER_RGB;
|
ColorOrder line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
// Is this a CIS or CCD scanner?
|
// Is this a CIS or CCD scanner?
|
||||||
SANE_Bool is_cis = false;
|
SANE_Bool is_cis = false;
|
||||||
|
@ -238,6 +238,11 @@ struct Genesys_Device
|
||||||
Genesys_Register_Set calib_reg;
|
Genesys_Register_Set calib_reg;
|
||||||
Genesys_Settings settings;
|
Genesys_Settings settings;
|
||||||
Genesys_Frontend frontend, frontend_initial;
|
Genesys_Frontend frontend, frontend_initial;
|
||||||
|
|
||||||
|
// whether the frontend is initialized. This is currently used just to preserve historical
|
||||||
|
// behavior
|
||||||
|
bool frontend_is_init = false;
|
||||||
|
|
||||||
Genesys_Gpo gpo;
|
Genesys_Gpo gpo;
|
||||||
Genesys_Motor motor;
|
Genesys_Motor motor;
|
||||||
uint8_t control[6] = {};
|
uint8_t control[6] = {};
|
||||||
|
@ -314,8 +319,7 @@ struct Genesys_Device
|
||||||
SANE_Int ld_shift_g = 0;
|
SANE_Int ld_shift_g = 0;
|
||||||
// used blue line-distance shift
|
// used blue line-distance shift
|
||||||
SANE_Int ld_shift_b = 0;
|
SANE_Int ld_shift_b = 0;
|
||||||
// number of lines used in line interpolation
|
|
||||||
int line_interp = 0;
|
|
||||||
// number of scan lines used during scan
|
// number of scan lines used during scan
|
||||||
int line_count = 0;
|
int line_count = 0;
|
||||||
|
|
||||||
|
|
|
@ -110,12 +110,6 @@ inline void serialize(std::ostream& str, ColorFilter& x)
|
||||||
serialize(str, value);
|
serialize(str, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Genesys_Color_Order
|
|
||||||
{
|
|
||||||
COLOR_ORDER_RGB,
|
|
||||||
COLOR_ORDER_BGR
|
|
||||||
};
|
|
||||||
|
|
||||||
enum class ColorOrder
|
enum class ColorOrder
|
||||||
{
|
{
|
||||||
RGB,
|
RGB,
|
||||||
|
|
|
@ -947,15 +947,11 @@ static void gl124_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
|
||||||
|
|
||||||
dev->deseg_curr_byte = 0;
|
dev->deseg_curr_byte = 0;
|
||||||
dev->line_count = 0;
|
dev->line_count = 0;
|
||||||
dev->line_interp = 0;
|
|
||||||
|
|
||||||
DBG (DBG_io2, "%s: pixels =%d\n", __func__, session.optical_pixels);
|
DBG (DBG_io2, "%s: pixels =%d\n", __func__, session.optical_pixels);
|
||||||
DBG (DBG_io2, "%s: depth =%d\n", __func__, session.params.depth);
|
DBG (DBG_io2, "%s: depth =%d\n", __func__, session.params.depth);
|
||||||
DBG (DBG_io2, "%s: dev->line_interp=%lu\n", __func__, (unsigned long)dev->line_interp);
|
|
||||||
|
|
||||||
// BUG: we shouldn't multiply by channels here
|
build_image_pipeline(dev, session);
|
||||||
dev->oe_buffer.clear();
|
|
||||||
dev->oe_buffer.alloc(session.output_line_bytes_raw * session.params.channels);
|
|
||||||
|
|
||||||
// MAXWD is expressed in 2 words unit
|
// MAXWD is expressed in 2 words unit
|
||||||
|
|
||||||
|
|
|
@ -751,6 +751,7 @@ static void gl843_set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor, uint
|
||||||
{
|
{
|
||||||
DBG(DBG_proc, "%s(): setting DAC %u\n", __func__, dev->model->dac_type);
|
DBG(DBG_proc, "%s(): setting DAC %u\n", __func__, dev->model->dac_type);
|
||||||
dev->frontend = dev->frontend_initial;
|
dev->frontend = dev->frontend_initial;
|
||||||
|
dev->frontend_is_init = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check analog frontend type
|
// check analog frontend type
|
||||||
|
@ -767,9 +768,8 @@ static void gl843_set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor, uint
|
||||||
|
|
||||||
for (i = 1; i <= 3; i++)
|
for (i = 1; i <= 3; i++)
|
||||||
{
|
{
|
||||||
// FIXME: BUG: we should initialize dev->frontend before first use. Right now it's
|
// FIXME: the check below is just historical artifact, we can remove it when convenient
|
||||||
// initialized during genesys_coarse_calibration()
|
if (!dev->frontend_is_init) {
|
||||||
if (dev->frontend.regs.empty()) {
|
|
||||||
sanei_genesys_fe_write_data(dev, i, 0x00);
|
sanei_genesys_fe_write_data(dev, i, 0x00);
|
||||||
} else {
|
} else {
|
||||||
sanei_genesys_fe_write_data(dev, i, dev->frontend.regs.get_value(0x00 + i));
|
sanei_genesys_fe_write_data(dev, i, dev->frontend.regs.get_value(0x00 + i));
|
||||||
|
@ -781,8 +781,8 @@ static void gl843_set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor, uint
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
// FIXME: BUG: see above
|
// FIXME: the check below is just historical artifact, we can remove it when convenient
|
||||||
if (dev->frontend.regs.empty()) {
|
if (!dev->frontend_is_init) {
|
||||||
sanei_genesys_fe_write_data(dev, 0x20 + i, 0x00);
|
sanei_genesys_fe_write_data(dev, 0x20 + i, 0x00);
|
||||||
} else {
|
} else {
|
||||||
sanei_genesys_fe_write_data(dev, 0x20 + i, dev->frontend.get_offset(i));
|
sanei_genesys_fe_write_data(dev, 0x20 + i, dev->frontend.get_offset(i));
|
||||||
|
@ -793,8 +793,8 @@ static void gl843_set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor, uint
|
||||||
{
|
{
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
// FIXME: BUG: see above
|
// FIXME: the check below is just historical artifact, we can remove it when convenient
|
||||||
if (dev->frontend.regs.empty()) {
|
if (!dev->frontend_is_init) {
|
||||||
sanei_genesys_fe_write_data(dev, 0x24 + i, 0x00);
|
sanei_genesys_fe_write_data(dev, 0x24 + i, 0x00);
|
||||||
} else {
|
} else {
|
||||||
sanei_genesys_fe_write_data(dev, 0x24 + i, dev->frontend.regs.get_value(0x24 + i));
|
sanei_genesys_fe_write_data(dev, 0x24 + i, dev->frontend.regs.get_value(0x24 + i));
|
||||||
|
@ -804,8 +804,8 @@ static void gl843_set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor, uint
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
// FIXME: BUG: see above
|
// FIXME: the check below is just historical artifact, we can remove it when convenient
|
||||||
if (dev->frontend.regs.empty()) {
|
if (!dev->frontend_is_init) {
|
||||||
sanei_genesys_fe_write_data(dev, 0x28 + i, 0x00);
|
sanei_genesys_fe_write_data(dev, 0x28 + i, 0x00);
|
||||||
} else {
|
} else {
|
||||||
sanei_genesys_fe_write_data(dev, 0x28 + i, dev->frontend.get_gain(i));
|
sanei_genesys_fe_write_data(dev, 0x28 + i, dev->frontend.get_gain(i));
|
||||||
|
@ -1301,8 +1301,7 @@ static void gl843_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens
|
||||||
dev->out_buffer.clear();
|
dev->out_buffer.clear();
|
||||||
dev->out_buffer.alloc(session.buffer_size_out);
|
dev->out_buffer.alloc(session.buffer_size_out);
|
||||||
|
|
||||||
dev->oe_buffer.clear();
|
build_image_pipeline(dev, session);
|
||||||
dev->oe_buffer.alloc(session.output_line_bytes_raw * 2);
|
|
||||||
|
|
||||||
dev->read_bytes_left_after_deseg = session.output_line_bytes * session.output_line_count;
|
dev->read_bytes_left_after_deseg = session.output_line_bytes * session.output_line_count;
|
||||||
|
|
||||||
|
|
|
@ -808,7 +808,6 @@ static void gl846_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
|
||||||
}
|
}
|
||||||
|
|
||||||
dev->deseg_curr_byte = 0;
|
dev->deseg_curr_byte = 0;
|
||||||
dev->line_interp = 0;
|
|
||||||
|
|
||||||
unsigned dpiset = session.params.xres * ccd_pixels_per_system_pixel;
|
unsigned dpiset = session.params.xres * ccd_pixels_per_system_pixel;
|
||||||
reg->set16(REG_DPISET, dpiset);
|
reg->set16(REG_DPISET, dpiset);
|
||||||
|
@ -822,9 +821,7 @@ static void gl846_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
|
||||||
DBG (DBG_io2, "%s: pixels =%d\n", __func__, session.optical_pixels);
|
DBG (DBG_io2, "%s: pixels =%d\n", __func__, session.optical_pixels);
|
||||||
DBG (DBG_io2, "%s: depth =%d\n", __func__, session.params.depth);
|
DBG (DBG_io2, "%s: depth =%d\n", __func__, session.params.depth);
|
||||||
|
|
||||||
// BUG: we shouldn't multiply by channels here
|
build_image_pipeline(dev, session);
|
||||||
dev->oe_buffer.clear();
|
|
||||||
dev->oe_buffer.alloc(session.output_line_bytes_raw * session.params.channels);
|
|
||||||
|
|
||||||
/* MAXWD is expressed in 4 words unit */
|
/* MAXWD is expressed in 4 words unit */
|
||||||
// BUG: we shouldn't multiply by channels here
|
// BUG: we shouldn't multiply by channels here
|
||||||
|
|
|
@ -825,7 +825,6 @@ static void gl847_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
|
||||||
}
|
}
|
||||||
|
|
||||||
dev->deseg_curr_byte = 0;
|
dev->deseg_curr_byte = 0;
|
||||||
dev->line_interp = 0;
|
|
||||||
|
|
||||||
unsigned dpiset = session.params.xres * ccd_pixels_per_system_pixel;
|
unsigned dpiset = session.params.xres * ccd_pixels_per_system_pixel;
|
||||||
reg->set16(REG_DPISET, dpiset);
|
reg->set16(REG_DPISET, dpiset);
|
||||||
|
@ -839,9 +838,7 @@ static void gl847_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
|
||||||
DBG (DBG_io2, "%s: pixels =%d\n", __func__, session.optical_pixels);
|
DBG (DBG_io2, "%s: pixels =%d\n", __func__, session.optical_pixels);
|
||||||
DBG (DBG_io2, "%s: depth =%d\n", __func__, session.params.depth);
|
DBG (DBG_io2, "%s: depth =%d\n", __func__, session.params.depth);
|
||||||
|
|
||||||
// BUG: we shouldn't multiply by channels here
|
build_image_pipeline(dev, session);
|
||||||
dev->oe_buffer.clear();
|
|
||||||
dev->oe_buffer.alloc(session.output_line_bytes_raw * session.params.channels);
|
|
||||||
|
|
||||||
/* MAXWD is expressed in 4 words unit */
|
/* MAXWD is expressed in 4 words unit */
|
||||||
// BUG: we shouldn't multiply by channels here
|
// BUG: we shouldn't multiply by channels here
|
||||||
|
|
|
@ -1204,6 +1204,35 @@ void compute_session_buffer_sizes(AsicType asic, ScanSession& s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void compute_session_pipeline(const Genesys_Device* dev, ScanSession& s)
|
||||||
|
{
|
||||||
|
auto channels = s.params.channels;
|
||||||
|
auto depth = s.params.depth;
|
||||||
|
|
||||||
|
s.pipeline_needs_reorder = true;
|
||||||
|
if (channels != 3 && depth != 16) {
|
||||||
|
s.pipeline_needs_reorder = false;
|
||||||
|
}
|
||||||
|
#ifndef WORDS_BIGENDIAN
|
||||||
|
if (channels != 3 && depth == 16) {
|
||||||
|
s.pipeline_needs_reorder = false;
|
||||||
|
}
|
||||||
|
if (channels == 3 && depth == 16 && !dev->model->is_cis &&
|
||||||
|
dev->model->line_mode_color_order == ColorOrder::RGB)
|
||||||
|
{
|
||||||
|
s.pipeline_needs_reorder = false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (channels == 3 && depth == 8 && !dev->model->is_cis &&
|
||||||
|
dev->model->line_mode_color_order == ColorOrder::RGB)
|
||||||
|
{
|
||||||
|
s.pipeline_needs_reorder = false;
|
||||||
|
}
|
||||||
|
s.pipeline_needs_ccd = s.max_color_shift_lines + s.num_staggered_lines > 0;
|
||||||
|
s.pipeline_needs_shrink = dev->settings.requested_pixels != s.output_pixels;
|
||||||
|
s.pipeline_needs_reverse = depth == 1;
|
||||||
|
}
|
||||||
|
|
||||||
void compute_session(Genesys_Device* dev, ScanSession& s, const Genesys_Sensor& sensor)
|
void compute_session(Genesys_Device* dev, ScanSession& s, const Genesys_Sensor& sensor)
|
||||||
{
|
{
|
||||||
DBG_HELPER(dbg);
|
DBG_HELPER(dbg);
|
||||||
|
@ -1385,6 +1414,34 @@ void compute_session(Genesys_Device* dev, ScanSession& s, const Genesys_Sensor&
|
||||||
}
|
}
|
||||||
|
|
||||||
compute_session_buffer_sizes(dev->model->asic_type, s);
|
compute_session_buffer_sizes(dev->model->asic_type, s);
|
||||||
|
compute_session_pipeline(dev, s);
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::size_t get_usb_buffer_read_size(AsicType asic, const ScanSession& session)
|
||||||
|
{
|
||||||
|
switch (asic) {
|
||||||
|
case AsicType::GL646:
|
||||||
|
// buffer not used on this chip set
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case AsicType::GL124:
|
||||||
|
case AsicType::GL846:
|
||||||
|
case AsicType::GL847:
|
||||||
|
// BUG: we shouldn't multiply by channels here
|
||||||
|
return session.output_line_bytes_raw * session.params.channels;
|
||||||
|
|
||||||
|
case AsicType::GL843:
|
||||||
|
return session.output_line_bytes_raw * 2;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw SaneException("Unknown asic type");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void build_image_pipeline(Genesys_Device* dev, const ScanSession& session)
|
||||||
|
{
|
||||||
|
dev->oe_buffer.clear();
|
||||||
|
dev->oe_buffer.alloc(get_usb_buffer_read_size(dev->model->asic_type, session));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::uint8_t compute_frontend_gain_wolfson(float value, float target_value)
|
std::uint8_t compute_frontend_gain_wolfson(float value, float target_value)
|
||||||
|
@ -2138,6 +2195,11 @@ void debug_dump(unsigned level, const ScanSession& session)
|
||||||
DBG(level, " buffer_size_read : %zu\n", session.buffer_size_lines);
|
DBG(level, " buffer_size_read : %zu\n", session.buffer_size_lines);
|
||||||
DBG(level, " buffer_size_shrink : %zu\n", session.buffer_size_shrink);
|
DBG(level, " buffer_size_shrink : %zu\n", session.buffer_size_shrink);
|
||||||
DBG(level, " buffer_size_out : %zu\n", session.buffer_size_out);
|
DBG(level, " buffer_size_out : %zu\n", session.buffer_size_out);
|
||||||
|
DBG(level, " filters:%s%s%s%s\n",
|
||||||
|
session.pipeline_needs_reorder ? " reorder" : "",
|
||||||
|
session.pipeline_needs_ccd ? " ccd" : "",
|
||||||
|
session.pipeline_needs_shrink ? " shrink" : "",
|
||||||
|
session.pipeline_needs_reverse ? " reverse" : "");
|
||||||
debug_dump(level, session.params);
|
debug_dump(level, session.params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -638,6 +638,8 @@ extern void sanei_genesys_generate_gamma_buffer(Genesys_Device* dev,
|
||||||
|
|
||||||
void compute_session(Genesys_Device* dev, ScanSession& s, const Genesys_Sensor& sensor);
|
void compute_session(Genesys_Device* dev, ScanSession& s, const Genesys_Sensor& sensor);
|
||||||
|
|
||||||
|
void build_image_pipeline(Genesys_Device* dev, const ScanSession& session);
|
||||||
|
|
||||||
void genesys_fill_segmented_buffer(Genesys_Device* dev, uint8_t* work_buffer_dst, size_t size);
|
void genesys_fill_segmented_buffer(Genesys_Device* dev, uint8_t* work_buffer_dst, size_t size);
|
||||||
|
|
||||||
std::uint8_t compute_frontend_gain(float value, float target_value,
|
std::uint8_t compute_frontend_gain(float value, float target_value,
|
||||||
|
|
|
@ -294,6 +294,12 @@ struct ScanSession {
|
||||||
// whether to enable ledadd functionality
|
// whether to enable ledadd functionality
|
||||||
bool enable_ledadd = false;
|
bool enable_ledadd = false;
|
||||||
|
|
||||||
|
// what pipeline modifications are needed
|
||||||
|
bool pipeline_needs_reorder = false;
|
||||||
|
bool pipeline_needs_ccd = false;
|
||||||
|
bool pipeline_needs_shrink = false;
|
||||||
|
bool pipeline_needs_reverse = false;
|
||||||
|
|
||||||
void assert_computed() const
|
void assert_computed() const
|
||||||
{
|
{
|
||||||
if (!computed) {
|
if (!computed) {
|
||||||
|
|
|
@ -97,7 +97,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 8;
|
model.ld_shift_g = 8;
|
||||||
model.ld_shift_b = 16;
|
model.ld_shift_b = 16;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_BGR;
|
model.line_mode_color_order = ColorOrder::BGR;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -149,7 +149,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -208,7 +208,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 8;
|
model.ld_shift_g = 8;
|
||||||
model.ld_shift_b = 16;
|
model.ld_shift_b = 16;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -263,7 +263,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 24;
|
model.ld_shift_g = 24;
|
||||||
model.ld_shift_b = 48;
|
model.ld_shift_b = 48;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -318,7 +318,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_r = 0;
|
model.ld_shift_r = 0;
|
||||||
model.ld_shift_g = 24;
|
model.ld_shift_g = 24;
|
||||||
model.ld_shift_b = 48;
|
model.ld_shift_b = 48;
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -375,7 +375,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 24;
|
model.ld_shift_g = 24;
|
||||||
model.ld_shift_b = 48;
|
model.ld_shift_b = 48;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -432,7 +432,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 24;
|
model.ld_shift_g = 24;
|
||||||
model.ld_shift_b = 48;
|
model.ld_shift_b = 48;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -491,7 +491,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 24;
|
model.ld_shift_g = 24;
|
||||||
model.ld_shift_b = 48;
|
model.ld_shift_b = 48;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -552,7 +552,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 48;
|
model.ld_shift_g = 48;
|
||||||
model.ld_shift_b = 96;
|
model.ld_shift_b = 96;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -613,7 +613,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -672,7 +672,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_r = 0;
|
model.ld_shift_r = 0;
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -730,7 +730,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_r = 0;
|
model.ld_shift_r = 0;
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
model.ccd_type = CIS_CANONLIDE120;
|
model.ccd_type = CIS_CANONLIDE120;
|
||||||
|
@ -788,7 +788,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -848,7 +848,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
model.ccd_type = CIS_CANONLIDE220;
|
model.ccd_type = CIS_CANONLIDE220;
|
||||||
|
@ -907,7 +907,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -966,7 +966,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -1026,7 +1026,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
model.ccd_type = CIS_CANONLIDE200;
|
model.ccd_type = CIS_CANONLIDE200;
|
||||||
|
@ -1084,7 +1084,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_r = 0;
|
model.ld_shift_r = 0;
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -1143,7 +1143,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -1205,7 +1205,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 8;
|
model.ld_shift_g = 8;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
model.ccd_type = CCD_HP2300;
|
model.ccd_type = CCD_HP2300;
|
||||||
|
@ -1262,7 +1262,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 24;
|
model.ld_shift_g = 24;
|
||||||
model.ld_shift_b = 48;
|
model.ld_shift_b = 48;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -1320,7 +1320,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_TRUE;
|
model.is_sheetfed = SANE_TRUE;
|
||||||
|
@ -1377,7 +1377,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 24;
|
model.ld_shift_g = 24;
|
||||||
model.ld_shift_b = 48;
|
model.ld_shift_b = 48;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -1435,7 +1435,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 8;
|
model.ld_shift_g = 8;
|
||||||
model.ld_shift_b = 16;
|
model.ld_shift_b = 16;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_BGR;
|
model.line_mode_color_order = ColorOrder::BGR;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -1486,7 +1486,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 8;
|
model.ld_shift_g = 8;
|
||||||
model.ld_shift_b = 16;
|
model.ld_shift_b = 16;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_BGR;
|
model.line_mode_color_order = ColorOrder::BGR;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -1541,7 +1541,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_r = 48;
|
model.ld_shift_r = 48;
|
||||||
model.ld_shift_g = 24;
|
model.ld_shift_g = 24;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -1603,7 +1603,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_TRUE;
|
model.is_sheetfed = SANE_TRUE;
|
||||||
|
@ -1658,7 +1658,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_TRUE;
|
model.is_sheetfed = SANE_TRUE;
|
||||||
|
@ -1713,7 +1713,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_TRUE;
|
model.is_sheetfed = SANE_TRUE;
|
||||||
|
@ -1768,7 +1768,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_TRUE;
|
model.is_sheetfed = SANE_TRUE;
|
||||||
|
@ -1824,7 +1824,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_TRUE;
|
model.is_sheetfed = SANE_TRUE;
|
||||||
|
@ -1879,7 +1879,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_TRUE;
|
model.is_sheetfed = SANE_TRUE;
|
||||||
|
@ -1935,7 +1935,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_r = 0;
|
model.ld_shift_r = 0;
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_TRUE;
|
model.is_sheetfed = SANE_TRUE;
|
||||||
|
@ -1990,7 +1990,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_TRUE;
|
model.is_sheetfed = SANE_TRUE;
|
||||||
|
@ -2047,7 +2047,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_TRUE;
|
model.is_sheetfed = SANE_TRUE;
|
||||||
|
@ -2103,7 +2103,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_TRUE;
|
model.is_sheetfed = SANE_TRUE;
|
||||||
|
@ -2159,7 +2159,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_r = 48;
|
model.ld_shift_r = 48;
|
||||||
model.ld_shift_g = 24;
|
model.ld_shift_g = 24;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -2220,7 +2220,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_r = 48;
|
model.ld_shift_r = 48;
|
||||||
model.ld_shift_g = 24;
|
model.ld_shift_g = 24;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -2282,7 +2282,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_TRUE;
|
model.is_cis = SANE_TRUE;
|
||||||
model.is_sheetfed = SANE_TRUE;
|
model.is_sheetfed = SANE_TRUE;
|
||||||
|
@ -2337,7 +2337,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 24;
|
model.ld_shift_g = 24;
|
||||||
model.ld_shift_b = 48;
|
model.ld_shift_b = 48;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -2395,7 +2395,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 0;
|
model.ld_shift_g = 0;
|
||||||
model.ld_shift_b = 0;
|
model.ld_shift_b = 0;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -2455,7 +2455,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 24;
|
model.ld_shift_g = 24;
|
||||||
model.ld_shift_b = 48;
|
model.ld_shift_b = 48;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
@ -2510,7 +2510,7 @@ void genesys_init_usb_device_tables()
|
||||||
model.ld_shift_g = 24;
|
model.ld_shift_g = 24;
|
||||||
model.ld_shift_b = 48;
|
model.ld_shift_b = 48;
|
||||||
|
|
||||||
model.line_mode_color_order = COLOR_ORDER_RGB;
|
model.line_mode_color_order = ColorOrder::RGB;
|
||||||
|
|
||||||
model.is_cis = SANE_FALSE;
|
model.is_cis = SANE_FALSE;
|
||||||
model.is_sheetfed = SANE_FALSE;
|
model.is_sheetfed = SANE_FALSE;
|
||||||
|
|
Ładowanie…
Reference in New Issue