From 562c301059176f49fcf9425020529fe46438096c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Voltz?= Date: Mon, 2 Jan 2012 22:07:44 +0100 Subject: [PATCH] fix GL646 CCD line number calculation --- backend/genesys_gl646.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/genesys_gl646.c b/backend/genesys_gl646.c index 4e9edf5e8..b49c8f431 100644 --- a/backend/genesys_gl646.c +++ b/backend/genesys_gl646.c @@ -1026,12 +1026,12 @@ gl646_setup_registers (Genesys_Device * dev, regs[reg_0x23].value = motor->fwdbwd; regs[reg_0x24].value = motor->steps1; - /* we adjust linecnt according to real motor dpi */ - linecnt = (linecnt * motor->ydpi) / scan_settings.yres; - /* scanned area height must be enlarged by max color shift needed */ max_shift=sanei_genesys_compute_max_shift(dev,channels,scan_settings.yres,0); + /* we adjust linecnt according to real motor dpi */ + linecnt = (linecnt * motor->ydpi) / scan_settings.yres + max_shift; + /* at QUATER_STEP lines are 'staggered' and need correction */ stagger = 0; if ((!half_ccd) && (dev->model->flags & GENESYS_FLAG_STAGGERED_LINE))