genesys: Fix stagger configuration on 8400F

merge-requests/213/head
Povilas Kanapickas 2019-12-14 09:42:57 +02:00
rodzic 8a2af6d4b2
commit a8df8201e9
2 zmienionych plików z 10 dodań i 4 usunięć

Wyświetl plik

@ -944,9 +944,15 @@ void compute_session_pixel_offsets(const Genesys_Device* dev, ScanSession& s,
s.pixel_endx /= s.hwdpi_divisor;
// in case of stagger we have to start at an odd coordinate
if (s.num_staggered_lines > 0 && (s.pixel_startx & 1) == 0) {
s.pixel_startx++;
s.pixel_endx++;
bool stagger_starts_even = dev->model->model_id == ModelId::CANON_8400F;
if (s.num_staggered_lines > 0) {
if (!stagger_starts_even && (s.pixel_startx & 1) == 0) {
s.pixel_startx++;
s.pixel_endx++;
} else if (stagger_starts_even && (s.pixel_startx & 1) != 0) {
s.pixel_startx++;
s.pixel_endx++;
}
}
} else if (dev->model->asic_type == AsicType::GL845 ||

Wyświetl plik

@ -2263,7 +2263,7 @@ void genesys_init_sensor_tables()
sensor.fau_gain_white_ref = 160;
sensor.gain_white_ref = 160;
sensor.exposure = { 0x9c40, 0x9c40, 0x9c40 };
sensor.stagger_config = StaggerConfig{ 1600, 4 }; // FIXME: may be incorrect
sensor.stagger_config = StaggerConfig{ 3200, 6 };
sensor.custom_regs = {};
sensor.gamma = { 1.0f, 1.0f, 1.0f };
sensor.get_logical_hwdpi_fun = get_sensor_optical_with_ccd_divisor;