From 94f130cdfa8c56bef77f24cce2a6d587fc426292 Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Mon, 13 Apr 2020 07:19:56 +0300 Subject: [PATCH] genesys: Simplify pixel position calculation on gl841 --- backend/genesys/low.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/genesys/low.cpp b/backend/genesys/low.cpp index b31e743d0..eef8b8e58 100644 --- a/backend/genesys/low.cpp +++ b/backend/genesys/low.cpp @@ -969,8 +969,7 @@ void compute_session(const Genesys_Device* dev, ScanSession& s, const Genesys_Se s.optical_pixels = (s.params.pixels * s.optical_resolution) / s.output_resolution; if (dev->model->asic_type == AsicType::GL841) { - if (s.optical_pixels & 1) - s.optical_pixels++; + s.optical_pixels = align_int_up(s.optical_pixels, 2); } if (dev->model->asic_type == AsicType::GL646 && s.params.xres == 400) {