1141cc406Sopenharmony_ci/* sane - Scanner Access Now Easy. 2141cc406Sopenharmony_ci 3141cc406Sopenharmony_ci Copyright (C) 2019 Povilas Kanapickas <povilas@radix.lt> 4141cc406Sopenharmony_ci 5141cc406Sopenharmony_ci This file is part of the SANE package. 6141cc406Sopenharmony_ci 7141cc406Sopenharmony_ci This program is free software; you can redistribute it and/or 8141cc406Sopenharmony_ci modify it under the terms of the GNU General Public License as 9141cc406Sopenharmony_ci published by the Free Software Foundation; either version 2 of the 10141cc406Sopenharmony_ci License, or (at your option) any later version. 11141cc406Sopenharmony_ci 12141cc406Sopenharmony_ci This program is distributed in the hope that it will be useful, but 13141cc406Sopenharmony_ci WITHOUT ANY WARRANTY; without even the implied warranty of 14141cc406Sopenharmony_ci MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15141cc406Sopenharmony_ci General Public License for more details. 16141cc406Sopenharmony_ci 17141cc406Sopenharmony_ci You should have received a copy of the GNU General Public License 18141cc406Sopenharmony_ci along with this program. If not, see <https://www.gnu.org/licenses/>. 19141cc406Sopenharmony_ci*/ 20141cc406Sopenharmony_ci 21141cc406Sopenharmony_ci#define DEBUG_DECLARE_ONLY 22141cc406Sopenharmony_ci 23141cc406Sopenharmony_ci#include "low.h" 24141cc406Sopenharmony_ci#include <map> 25141cc406Sopenharmony_ci 26141cc406Sopenharmony_cinamespace genesys { 27141cc406Sopenharmony_ci 28141cc406Sopenharmony_ciStaticInit<std::vector<Genesys_Sensor>> s_sensors; 29141cc406Sopenharmony_ci 30141cc406Sopenharmony_civoid genesys_init_sensor_tables() 31141cc406Sopenharmony_ci{ 32141cc406Sopenharmony_ci s_sensors.init(); 33141cc406Sopenharmony_ci 34141cc406Sopenharmony_ci Genesys_Sensor sensor; 35141cc406Sopenharmony_ci 36141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 37141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_UMAX; // gl646 38141cc406Sopenharmony_ci sensor.full_resolution = 1200; 39141cc406Sopenharmony_ci sensor.black_pixels = 48; 40141cc406Sopenharmony_ci sensor.dummy_pixel = 64; 41141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 42141cc406Sopenharmony_ci sensor.gain_white_ref = 230; 43141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 44141cc406Sopenharmony_ci sensor.custom_regs = { 45141cc406Sopenharmony_ci { 0x08, 0x01 }, { 0x09, 0x03 }, { 0x0a, 0x05 }, { 0x0b, 0x07 }, 46141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x05 }, { 0x18, 0x31 }, { 0x19, 0x2a }, 47141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x02 }, 48141cc406Sopenharmony_ci { 0x52, 0x13 }, { 0x53, 0x17 }, { 0x54, 0x03 }, { 0x55, 0x07 }, 49141cc406Sopenharmony_ci { 0x56, 0x0b }, { 0x57, 0x0f }, { 0x58, 0x23 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 50141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 }, 51141cc406Sopenharmony_ci }; 52141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 53141cc406Sopenharmony_ci { 54141cc406Sopenharmony_ci struct CustomSensorSettings 55141cc406Sopenharmony_ci { 56141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 57141cc406Sopenharmony_ci unsigned register_dpiset; 58141cc406Sopenharmony_ci int output_pixel_offset; 59141cc406Sopenharmony_ci }; 60141cc406Sopenharmony_ci 61141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 62141cc406Sopenharmony_ci { { 75 }, 150, 4 }, 63141cc406Sopenharmony_ci { { 150 }, 300, 8 }, 64141cc406Sopenharmony_ci { { 300 }, 600, 16 }, 65141cc406Sopenharmony_ci { { 600 }, 1200, 32 }, 66141cc406Sopenharmony_ci { { 1200 }, 2400, 64 }, 67141cc406Sopenharmony_ci }; 68141cc406Sopenharmony_ci 69141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 70141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 71141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 72141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 73141cc406Sopenharmony_ci s_sensors->push_back(sensor); 74141cc406Sopenharmony_ci } 75141cc406Sopenharmony_ci } 76141cc406Sopenharmony_ci 77141cc406Sopenharmony_ci 78141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 79141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_ST12; // gl646 80141cc406Sopenharmony_ci sensor.full_resolution = 600; 81141cc406Sopenharmony_ci sensor.black_pixels = 48; 82141cc406Sopenharmony_ci sensor.dummy_pixel = 85; 83141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 84141cc406Sopenharmony_ci sensor.gain_white_ref = 230; 85141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 86141cc406Sopenharmony_ci sensor.custom_regs = { 87141cc406Sopenharmony_ci { 0x08, 0x02 }, { 0x09, 0x00 }, { 0x0a, 0x06 }, { 0x0b, 0x04 }, 88141cc406Sopenharmony_ci { 0x16, 0x2b }, { 0x17, 0x08 }, { 0x18, 0x20 }, { 0x19, 0x2a }, 89141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x0c }, { 0x1d, 0x03 }, 90141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 91141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 92141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 }, 93141cc406Sopenharmony_ci }; 94141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 95141cc406Sopenharmony_ci { 96141cc406Sopenharmony_ci struct CustomSensorSettings 97141cc406Sopenharmony_ci { 98141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 99141cc406Sopenharmony_ci int output_pixel_offset; 100141cc406Sopenharmony_ci }; 101141cc406Sopenharmony_ci 102141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 103141cc406Sopenharmony_ci { { 75 }, 10 }, 104141cc406Sopenharmony_ci { { 150 }, 21 }, 105141cc406Sopenharmony_ci { { 300 }, 42 }, 106141cc406Sopenharmony_ci { { 600 }, 85 }, 107141cc406Sopenharmony_ci }; 108141cc406Sopenharmony_ci 109141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 110141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 111141cc406Sopenharmony_ci sensor.register_dpiset = setting.resolutions.values()[0]; 112141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 113141cc406Sopenharmony_ci s_sensors->push_back(sensor); 114141cc406Sopenharmony_ci } 115141cc406Sopenharmony_ci } 116141cc406Sopenharmony_ci 117141cc406Sopenharmony_ci 118141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 119141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_ST24; // gl646 120141cc406Sopenharmony_ci sensor.full_resolution = 1200; 121141cc406Sopenharmony_ci sensor.black_pixels = 48; 122141cc406Sopenharmony_ci sensor.dummy_pixel = 64; 123141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 124141cc406Sopenharmony_ci sensor.gain_white_ref = 230; 125141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 126141cc406Sopenharmony_ci sensor.custom_regs = { 127141cc406Sopenharmony_ci { 0x08, 0x0e }, { 0x09, 0x0c }, { 0x0a, 0x00 }, { 0x0b, 0x0c }, 128141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x08 }, { 0x18, 0x31 }, { 0x19, 0x2a }, 129141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x02 }, 130141cc406Sopenharmony_ci { 0x52, 0x17 }, { 0x53, 0x03 }, { 0x54, 0x07 }, { 0x55, 0x0b }, 131141cc406Sopenharmony_ci { 0x56, 0x0f }, { 0x57, 0x13 }, { 0x58, 0x03 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 132141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 }, 133141cc406Sopenharmony_ci }; 134141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 135141cc406Sopenharmony_ci { 136141cc406Sopenharmony_ci struct CustomSensorSettings 137141cc406Sopenharmony_ci { 138141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 139141cc406Sopenharmony_ci unsigned register_dpiset; 140141cc406Sopenharmony_ci int output_pixel_offset; 141141cc406Sopenharmony_ci }; 142141cc406Sopenharmony_ci 143141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 144141cc406Sopenharmony_ci { { 75 }, 150, 4 }, 145141cc406Sopenharmony_ci { { 150 }, 300, 8 }, 146141cc406Sopenharmony_ci { { 300 }, 600, 16 }, 147141cc406Sopenharmony_ci { { 600 }, 1200, 32 }, 148141cc406Sopenharmony_ci { { 1200 }, 2400, 64 }, 149141cc406Sopenharmony_ci }; 150141cc406Sopenharmony_ci 151141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 152141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 153141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 154141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 155141cc406Sopenharmony_ci s_sensors->push_back(sensor); 156141cc406Sopenharmony_ci } 157141cc406Sopenharmony_ci } 158141cc406Sopenharmony_ci 159141cc406Sopenharmony_ci 160141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 161141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_5345; // gl646 162141cc406Sopenharmony_ci sensor.full_resolution = 1200; 163141cc406Sopenharmony_ci sensor.black_pixels = 48; 164141cc406Sopenharmony_ci sensor.dummy_pixel = 16; 165141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 190; 166141cc406Sopenharmony_ci sensor.gain_white_ref = 190; 167141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 168141cc406Sopenharmony_ci sensor.gamma = { 2.38f, 2.35f, 2.34f }; 169141cc406Sopenharmony_ci 170141cc406Sopenharmony_ci { 171141cc406Sopenharmony_ci struct CustomSensorSettings { 172141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 173141cc406Sopenharmony_ci unsigned optical_resolution; 174141cc406Sopenharmony_ci unsigned register_dpiset; 175141cc406Sopenharmony_ci unsigned exposure_lperiod; 176141cc406Sopenharmony_ci Ratio pixel_count_ratio; 177141cc406Sopenharmony_ci int output_pixel_offset; 178141cc406Sopenharmony_ci StaggerConfig stagger_y; // FIXME: may be incorrect 179141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_regs; 180141cc406Sopenharmony_ci }; 181141cc406Sopenharmony_ci 182141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 183141cc406Sopenharmony_ci { { 50 }, 600, 100, 12000, Ratio{1, 2}, 0, StaggerConfig{}, { 184141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x05 }, { 0x0a, 0x06 }, { 0x0b, 0x08 }, 185141cc406Sopenharmony_ci { 0x16, 0x0b }, { 0x17, 0x0a }, { 0x18, 0x28 }, { 0x19, 0x2a }, 186141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x03 }, 187141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 188141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 189141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 190141cc406Sopenharmony_ci } 191141cc406Sopenharmony_ci }, 192141cc406Sopenharmony_ci { { 75 }, 600, 150, 11000, Ratio{1, 2}, 1, StaggerConfig{}, { 193141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x05 }, { 0x0a, 0x06 }, { 0x0b, 0x08 }, 194141cc406Sopenharmony_ci { 0x16, 0x0b }, { 0x17, 0x0a }, { 0x18, 0x28 }, { 0x19, 0x2a }, 195141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x03 }, 196141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 197141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 198141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 199141cc406Sopenharmony_ci } 200141cc406Sopenharmony_ci }, 201141cc406Sopenharmony_ci { { 100 }, 600, 200, 11000, Ratio{1, 2}, 1, StaggerConfig{}, { 202141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x05 }, { 0x0a, 0x06 }, { 0x0b, 0x08 }, 203141cc406Sopenharmony_ci { 0x16, 0x0b }, { 0x17, 0x0a }, { 0x18, 0x28 }, { 0x19, 0x2a }, 204141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x03 }, 205141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 206141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 207141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 208141cc406Sopenharmony_ci } 209141cc406Sopenharmony_ci }, 210141cc406Sopenharmony_ci { { 150 }, 600, 300, 11000, Ratio{1, 2}, 2, StaggerConfig{}, { 211141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x05 }, { 0x0a, 0x06 }, { 0x0b, 0x08 }, 212141cc406Sopenharmony_ci { 0x16, 0x0b }, { 0x17, 0x0a }, { 0x18, 0x28 }, { 0x19, 0x2a }, 213141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x03 }, 214141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 215141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 216141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 217141cc406Sopenharmony_ci } 218141cc406Sopenharmony_ci }, 219141cc406Sopenharmony_ci { { 200 }, 600, 400, 11000, Ratio{1, 2}, 2, StaggerConfig{}, { 220141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x05 }, { 0x0a, 0x06 }, { 0x0b, 0x08 }, 221141cc406Sopenharmony_ci { 0x16, 0x0b }, { 0x17, 0x0a }, { 0x18, 0x28 }, { 0x19, 0x2a }, 222141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x03 }, 223141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 224141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 225141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 226141cc406Sopenharmony_ci } 227141cc406Sopenharmony_ci }, 228141cc406Sopenharmony_ci { { 300 }, 600, 600, 11000, Ratio{1, 2}, 4, StaggerConfig{}, { 229141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x05 }, { 0x0a, 0x06 }, { 0x0b, 0x08 }, 230141cc406Sopenharmony_ci { 0x16, 0x0b }, { 0x17, 0x0a }, { 0x18, 0x28 }, { 0x19, 0x2a }, 231141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x03 }, 232141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 233141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 234141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 235141cc406Sopenharmony_ci } 236141cc406Sopenharmony_ci }, 237141cc406Sopenharmony_ci { { 400 }, 600, 800, 11000, Ratio{1, 2}, 5, StaggerConfig{}, { 238141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x05 }, { 0x0a, 0x06 }, { 0x0b, 0x08 }, 239141cc406Sopenharmony_ci { 0x16, 0x0b }, { 0x17, 0x0a }, { 0x18, 0x28 }, { 0x19, 0x2a }, 240141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x03 }, 241141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 242141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 243141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 244141cc406Sopenharmony_ci } 245141cc406Sopenharmony_ci }, 246141cc406Sopenharmony_ci { { 600 }, 600, 1200, 11000, Ratio{1, 2}, 8, StaggerConfig{}, { 247141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x05 }, { 0x0a, 0x06 }, { 0x0b, 0x08 }, 248141cc406Sopenharmony_ci { 0x16, 0x0b }, { 0x17, 0x0a }, { 0x18, 0x28 }, { 0x19, 0x2a }, 249141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x03 }, 250141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 251141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 252141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 253141cc406Sopenharmony_ci } 254141cc406Sopenharmony_ci }, 255141cc406Sopenharmony_ci { { 1200 }, 1200, 1200, 11000, Ratio{1, 1}, 16, StaggerConfig{4, 0}, { 256141cc406Sopenharmony_ci { 0x08, 0x0d }, { 0x09, 0x0f }, { 0x0a, 0x11 }, { 0x0b, 0x13 }, 257141cc406Sopenharmony_ci { 0x16, 0x0b }, { 0x17, 0x0a }, { 0x18, 0x30 }, { 0x19, 0x2a }, 258141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x03 }, 259141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x0b }, { 0x55, 0x0f }, 260141cc406Sopenharmony_ci { 0x56, 0x13 }, { 0x57, 0x17 }, { 0x58, 0x23 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 261141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 262141cc406Sopenharmony_ci } 263141cc406Sopenharmony_ci }, 264141cc406Sopenharmony_ci }; 265141cc406Sopenharmony_ci 266141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) 267141cc406Sopenharmony_ci { 268141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 269141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 270141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 271141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 272141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 273141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 274141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 275141cc406Sopenharmony_ci sensor.custom_regs = setting.custom_regs; 276141cc406Sopenharmony_ci s_sensors->push_back(sensor); 277141cc406Sopenharmony_ci } 278141cc406Sopenharmony_ci } 279141cc406Sopenharmony_ci 280141cc406Sopenharmony_ci 281141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 282141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_HP2400; // gl646 283141cc406Sopenharmony_ci sensor.full_resolution = 1200; 284141cc406Sopenharmony_ci sensor.black_pixels = 48; 285141cc406Sopenharmony_ci sensor.dummy_pixel = 15; 286141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 287141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 288141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 289141cc406Sopenharmony_ci sensor.gamma = { 2.1f, 2.1f, 2.1f }; 290141cc406Sopenharmony_ci 291141cc406Sopenharmony_ci { 292141cc406Sopenharmony_ci struct CustomSensorSettings { 293141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 294141cc406Sopenharmony_ci unsigned register_dpiset; 295141cc406Sopenharmony_ci unsigned exposure_lperiod; 296141cc406Sopenharmony_ci Ratio pixel_count_ratio; 297141cc406Sopenharmony_ci int output_pixel_offset; 298141cc406Sopenharmony_ci StaggerConfig stagger_y; 299141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_regs; 300141cc406Sopenharmony_ci }; 301141cc406Sopenharmony_ci 302141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 303141cc406Sopenharmony_ci { { 50 }, 200, 7211, Ratio{1, 4}, 0, StaggerConfig{}, { 304141cc406Sopenharmony_ci { 0x08, 0x14 }, { 0x09, 0x15 }, { 0x0a, 0x00 }, { 0x0b, 0x00 }, 305141cc406Sopenharmony_ci { 0x16, 0xbf }, { 0x17, 0x08 }, { 0x18, 0x3f }, { 0x19, 0x2a }, 306141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x02 }, 307141cc406Sopenharmony_ci { 0x52, 0x0b }, { 0x53, 0x0f }, { 0x54, 0x13 }, { 0x55, 0x17 }, 308141cc406Sopenharmony_ci { 0x56, 0x03 }, { 0x57, 0x07 }, { 0x58, 0x63 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 309141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 310141cc406Sopenharmony_ci } 311141cc406Sopenharmony_ci }, 312141cc406Sopenharmony_ci { { 100 }, 400, 7211, Ratio{1, 4}, 1, StaggerConfig{}, { 313141cc406Sopenharmony_ci { 0x08, 0x14 }, { 0x09, 0x15 }, { 0x0a, 0x00 }, { 0x0b, 0x00 }, 314141cc406Sopenharmony_ci { 0x16, 0xbf }, { 0x17, 0x08 }, { 0x18, 0x3f }, { 0x19, 0x2a }, 315141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x02 }, 316141cc406Sopenharmony_ci { 0x52, 0x0b }, { 0x53, 0x0f }, { 0x54, 0x13 }, { 0x55, 0x17 }, 317141cc406Sopenharmony_ci { 0x56, 0x03 }, { 0x57, 0x07 }, { 0x58, 0x63 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 318141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 319141cc406Sopenharmony_ci } 320141cc406Sopenharmony_ci }, 321141cc406Sopenharmony_ci { { 150 }, 600, 7211, Ratio{1, 4}, 1, StaggerConfig{}, { 322141cc406Sopenharmony_ci { 0x08, 0x14 }, { 0x09, 0x15 }, { 0x0a, 0x00 }, { 0x0b, 0x00 }, 323141cc406Sopenharmony_ci { 0x16, 0xbf }, { 0x17, 0x08 }, { 0x18, 0x3f }, { 0x19, 0x2a }, 324141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x02 }, 325141cc406Sopenharmony_ci { 0x52, 0x0b }, { 0x53, 0x0f }, { 0x54, 0x13 }, { 0x55, 0x17 }, 326141cc406Sopenharmony_ci { 0x56, 0x03 }, { 0x57, 0x07 }, { 0x58, 0x63 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 327141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 328141cc406Sopenharmony_ci } 329141cc406Sopenharmony_ci }, 330141cc406Sopenharmony_ci { { 300 }, 1200, 8751, Ratio{1, 4}, 3, StaggerConfig{}, { 331141cc406Sopenharmony_ci { 0x08, 0x14 }, { 0x09, 0x15 }, { 0x0a, 0x00 }, { 0x0b, 0x00 }, 332141cc406Sopenharmony_ci { 0x16, 0xbf }, { 0x17, 0x08 }, { 0x18, 0x3f }, { 0x19, 0x2a }, 333141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x02 }, 334141cc406Sopenharmony_ci { 0x52, 0x0b }, { 0x53, 0x0f }, { 0x54, 0x13 }, { 0x55, 0x17 }, 335141cc406Sopenharmony_ci { 0x56, 0x03 }, { 0x57, 0x07 }, { 0x58, 0x63 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 336141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 337141cc406Sopenharmony_ci } 338141cc406Sopenharmony_ci }, 339141cc406Sopenharmony_ci { { 600 }, 1200, 18760, Ratio{1, 2}, 7, StaggerConfig{}, { 340141cc406Sopenharmony_ci { 0x08, 0x0e }, { 0x09, 0x0f }, { 0x0a, 0x00 }, { 0x0b, 0x00 }, 341141cc406Sopenharmony_ci { 0x16, 0xbf }, { 0x17, 0x08 }, { 0x18, 0x31 }, { 0x19, 0x2a }, 342141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x02 }, 343141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x0b }, { 0x55, 0x0f }, 344141cc406Sopenharmony_ci { 0x56, 0x13 }, { 0x57, 0x17 }, { 0x58, 0x23 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 345141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 346141cc406Sopenharmony_ci } 347141cc406Sopenharmony_ci }, 348141cc406Sopenharmony_ci { { 1200 }, 1200, 21749, Ratio{1, 1}, 15, StaggerConfig{4, 0}, { 349141cc406Sopenharmony_ci { 0x08, 0x02 }, { 0x09, 0x04 }, { 0x0a, 0x00 }, { 0x0b, 0x00 }, 350141cc406Sopenharmony_ci { 0x16, 0xbf }, { 0x17, 0x08 }, { 0x18, 0x30 }, { 0x19, 0x2a }, 351141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0xc0 }, { 0x1d, 0x42 }, 352141cc406Sopenharmony_ci { 0x52, 0x0b }, { 0x53, 0x0f }, { 0x54, 0x13 }, { 0x55, 0x17 }, 353141cc406Sopenharmony_ci { 0x56, 0x03 }, { 0x57, 0x07 }, { 0x58, 0x63 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 354141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x0e }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 355141cc406Sopenharmony_ci } 356141cc406Sopenharmony_ci }, 357141cc406Sopenharmony_ci }; 358141cc406Sopenharmony_ci 359141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) 360141cc406Sopenharmony_ci { 361141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 362141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 363141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 364141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 365141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 366141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 367141cc406Sopenharmony_ci sensor.custom_regs = setting.custom_regs; 368141cc406Sopenharmony_ci s_sensors->push_back(sensor); 369141cc406Sopenharmony_ci } 370141cc406Sopenharmony_ci } 371141cc406Sopenharmony_ci 372141cc406Sopenharmony_ci 373141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 374141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_HP2300; // gl646 375141cc406Sopenharmony_ci sensor.full_resolution = 600; 376141cc406Sopenharmony_ci sensor.black_pixels = 48; 377141cc406Sopenharmony_ci sensor.dummy_pixel = 20; 378141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 180; 379141cc406Sopenharmony_ci sensor.gain_white_ref = 180; 380141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 381141cc406Sopenharmony_ci sensor.gamma = { 2.1f, 2.1f, 2.1f }; 382141cc406Sopenharmony_ci 383141cc406Sopenharmony_ci { 384141cc406Sopenharmony_ci struct CustomSensorSettings { 385141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 386141cc406Sopenharmony_ci unsigned optical_resolution; 387141cc406Sopenharmony_ci unsigned register_dpiset; 388141cc406Sopenharmony_ci unsigned exposure_lperiod; 389141cc406Sopenharmony_ci Ratio pixel_count_ratio; 390141cc406Sopenharmony_ci int output_pixel_offset; 391141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_regs; 392141cc406Sopenharmony_ci }; 393141cc406Sopenharmony_ci 394141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 395141cc406Sopenharmony_ci { { 75 }, 300, 150, 4480, Ratio{1, 2}, 2, { 396141cc406Sopenharmony_ci { 0x08, 0x16 }, { 0x09, 0x00 }, { 0x0a, 0x01 }, { 0x0b, 0x03 }, 397141cc406Sopenharmony_ci { 0x16, 0xb7 }, { 0x17, 0x0a }, { 0x18, 0x20 }, { 0x19, 0x2a }, 398141cc406Sopenharmony_ci { 0x1a, 0x6a }, { 0x1b, 0x8a }, { 0x1c, 0x00 }, { 0x1d, 0x85 }, 399141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 400141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 401141cc406Sopenharmony_ci { 0x5b, 0x06 }, { 0x5c, 0x0b }, { 0x5d, 0x10 }, { 0x5e, 0x16 } 402141cc406Sopenharmony_ci } 403141cc406Sopenharmony_ci }, 404141cc406Sopenharmony_ci { { 150 }, 300, 300, 4350, Ratio{1, 2}, 5, { 405141cc406Sopenharmony_ci { 0x08, 0x16 }, { 0x09, 0x00 }, { 0x0a, 0x01 }, { 0x0b, 0x03 }, 406141cc406Sopenharmony_ci { 0x16, 0xb7 }, { 0x17, 0x0a }, { 0x18, 0x20 }, { 0x19, 0x2a }, 407141cc406Sopenharmony_ci { 0x1a, 0x6a }, { 0x1b, 0x8a }, { 0x1c, 0x00 }, { 0x1d, 0x85 }, 408141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 409141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 410141cc406Sopenharmony_ci { 0x5b, 0x06 }, { 0x5c, 0x0b }, { 0x5d, 0x10 }, { 0x5e, 0x16 } 411141cc406Sopenharmony_ci } 412141cc406Sopenharmony_ci }, 413141cc406Sopenharmony_ci { { 300 }, 300, 600, 4350, Ratio{1, 2}, 10, { 414141cc406Sopenharmony_ci { 0x08, 0x16 }, { 0x09, 0x00 }, { 0x0a, 0x01 }, { 0x0b, 0x03 }, 415141cc406Sopenharmony_ci { 0x16, 0xb7 }, { 0x17, 0x0a }, { 0x18, 0x20 }, { 0x19, 0x2a }, 416141cc406Sopenharmony_ci { 0x1a, 0x6a }, { 0x1b, 0x8a }, { 0x1c, 0x00 }, { 0x1d, 0x85 }, 417141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 418141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 419141cc406Sopenharmony_ci { 0x5b, 0x06 }, { 0x5c, 0x0b }, { 0x5d, 0x10 }, { 0x5e, 0x16 } 420141cc406Sopenharmony_ci } 421141cc406Sopenharmony_ci }, 422141cc406Sopenharmony_ci { { 600 }, 600, 600, 8700, Ratio{1, 1}, 20, { 423141cc406Sopenharmony_ci { 0x08, 0x01 }, { 0x09, 0x03 }, { 0x0a, 0x04 }, { 0x0b, 0x06 }, 424141cc406Sopenharmony_ci { 0x16, 0xb7 }, { 0x17, 0x0a }, { 0x18, 0x20 }, { 0x19, 0x2a }, 425141cc406Sopenharmony_ci { 0x1a, 0x6a }, { 0x1b, 0x8a }, { 0x1c, 0x00 }, { 0x1d, 0x05 }, 426141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 427141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 428141cc406Sopenharmony_ci { 0x5b, 0x06 }, { 0x5c, 0x0b }, { 0x5d, 0x10 }, { 0x5e, 0x16 } 429141cc406Sopenharmony_ci } 430141cc406Sopenharmony_ci }, 431141cc406Sopenharmony_ci }; 432141cc406Sopenharmony_ci 433141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) 434141cc406Sopenharmony_ci { 435141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 436141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 437141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 438141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 439141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 440141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 441141cc406Sopenharmony_ci sensor.custom_regs = setting.custom_regs; 442141cc406Sopenharmony_ci s_sensors->push_back(sensor); 443141cc406Sopenharmony_ci } 444141cc406Sopenharmony_ci } 445141cc406Sopenharmony_ci 446141cc406Sopenharmony_ci 447141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 448141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CIS_CANON_LIDE_35; // gl841 449141cc406Sopenharmony_ci sensor.full_resolution = 1200; 450141cc406Sopenharmony_ci sensor.register_dpihw = 1200; 451141cc406Sopenharmony_ci sensor.black_pixels = 87; 452141cc406Sopenharmony_ci sensor.dummy_pixel = 87; 453141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 100; 454141cc406Sopenharmony_ci sensor.gain_white_ref = 100; 455141cc406Sopenharmony_ci sensor.exposure = { 0x0400, 0x0400, 0x0400 }; 456141cc406Sopenharmony_ci sensor.custom_regs = { 457141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x02 }, { 0x18, 0x00 }, { 0x19, 0x50 }, 458141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x02 }, 459141cc406Sopenharmony_ci { 0x52, 0x05 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 460141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x3a }, { 0x59, 0x03 }, { 0x5a, 0x40 }, 461141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x00 }, { 0x72, 0x00 }, { 0x73, 0x00 }, 462141cc406Sopenharmony_ci }; 463141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 464141cc406Sopenharmony_ci { 465141cc406Sopenharmony_ci struct CustomSensorSettings 466141cc406Sopenharmony_ci { 467141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 468141cc406Sopenharmony_ci unsigned optical_resolution; 469141cc406Sopenharmony_ci unsigned register_dpiset; 470141cc406Sopenharmony_ci unsigned shading_resolution; 471141cc406Sopenharmony_ci int output_pixel_offset; 472141cc406Sopenharmony_ci }; 473141cc406Sopenharmony_ci 474141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 475141cc406Sopenharmony_ci { { 75 }, 600, 150, 600, 11 }, 476141cc406Sopenharmony_ci { { 100 }, 600, 200, 600, 14 }, 477141cc406Sopenharmony_ci { { 150 }, 600, 300, 600, 22 }, 478141cc406Sopenharmony_ci { { 200 }, 600, 400, 600, 29 }, 479141cc406Sopenharmony_ci { { 300 }, 600, 600, 600, 44 }, 480141cc406Sopenharmony_ci { { 600 }, 600, 1200, 600, 88 }, 481141cc406Sopenharmony_ci { { 1200 }, 1200, 1200, 1200, 88 }, 482141cc406Sopenharmony_ci }; 483141cc406Sopenharmony_ci 484141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 485141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 486141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 487141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 488141cc406Sopenharmony_ci sensor.shading_resolution = setting.shading_resolution; 489141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 490141cc406Sopenharmony_ci s_sensors->push_back(sensor); 491141cc406Sopenharmony_ci } 492141cc406Sopenharmony_ci } 493141cc406Sopenharmony_ci 494141cc406Sopenharmony_ci 495141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 496141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CIS_CANON_LIDE_60; // gl841 497141cc406Sopenharmony_ci sensor.full_resolution = 1200; 498141cc406Sopenharmony_ci sensor.register_dpihw = 1200; 499141cc406Sopenharmony_ci sensor.black_pixels = 87; 500141cc406Sopenharmony_ci sensor.dummy_pixel = 87; 501141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 100; 502141cc406Sopenharmony_ci sensor.gain_white_ref = 100; 503141cc406Sopenharmony_ci sensor.exposure = { 0x0400, 0x0400, 0x0400 }; 504141cc406Sopenharmony_ci sensor.custom_regs = { 505141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x01 }, { 0x18, 0x00 }, { 0x19, 0x50 }, 506141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x02 }, 507141cc406Sopenharmony_ci { 0x52, 0x05 }, { 0x53, 0x07 }, { 0x54, 0x03 }, { 0x55, 0x05 }, 508141cc406Sopenharmony_ci { 0x56, 0x02 }, { 0x57, 0x05 }, { 0x58, 0x3a }, { 0x59, 0x03 }, { 0x5a, 0x40 }, 509141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x00 }, { 0x72, 0x00 }, { 0x73, 0x00 }, 510141cc406Sopenharmony_ci }; 511141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 512141cc406Sopenharmony_ci { 513141cc406Sopenharmony_ci struct CustomSensorSettings 514141cc406Sopenharmony_ci { 515141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 516141cc406Sopenharmony_ci unsigned optical_resolution; 517141cc406Sopenharmony_ci unsigned register_dpiset; 518141cc406Sopenharmony_ci unsigned shading_resolution; 519141cc406Sopenharmony_ci int output_pixel_offset; 520141cc406Sopenharmony_ci }; 521141cc406Sopenharmony_ci 522141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 523141cc406Sopenharmony_ci { { 75 }, 600, 150, 600, 11 }, 524141cc406Sopenharmony_ci { { 100 }, 600, 200, 600, 14 }, 525141cc406Sopenharmony_ci { { 150 }, 600, 300, 600, 22 }, 526141cc406Sopenharmony_ci { { 200 }, 600, 400, 600, 29 }, 527141cc406Sopenharmony_ci { { 300 }, 600, 600, 600, 44 }, 528141cc406Sopenharmony_ci { { 600 }, 600, 1200, 600, 88 }, 529141cc406Sopenharmony_ci { { 1200 }, 1200, 1200, 1200, 88 }, 530141cc406Sopenharmony_ci }; 531141cc406Sopenharmony_ci 532141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 533141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 534141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 535141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 536141cc406Sopenharmony_ci sensor.shading_resolution = setting.shading_resolution; 537141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 538141cc406Sopenharmony_ci s_sensors->push_back(sensor); 539141cc406Sopenharmony_ci } 540141cc406Sopenharmony_ci } 541141cc406Sopenharmony_ci 542141cc406Sopenharmony_ci 543141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 544141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CIS_CANON_LIDE_90; // gl842 545141cc406Sopenharmony_ci sensor.full_resolution = 2400; 546141cc406Sopenharmony_ci sensor.black_pixels = 20; 547141cc406Sopenharmony_ci sensor.dummy_pixel = 253; 548141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 150; 549141cc406Sopenharmony_ci sensor.gain_white_ref = 150; 550141cc406Sopenharmony_ci sensor.use_host_side_calib = true; 551141cc406Sopenharmony_ci sensor.custom_regs = { 552141cc406Sopenharmony_ci { 0x16, 0x20 }, { 0x17, 0x06 }, { 0x18, 0x00 }, { 0x19, 0xff }, 553141cc406Sopenharmony_ci { 0x1a, 0x24 }, { 0x1c, 0x00 }, { 0x1d, 0x04 }, 554141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x04 }, { 0x54, 0x02 }, { 0x55, 0x04 }, 555141cc406Sopenharmony_ci { 0x56, 0x02 }, { 0x57, 0x04 }, { 0x58, 0x0a }, { 0x59, 0x71 }, { 0x5a, 0x55 }, 556141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x05 }, { 0x72, 0x07 }, { 0x73, 0x09 }, 557141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x01 }, { 0x76, 0xff }, 558141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x3f }, 559141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x1e }, { 0x7d, 0x11 }, { 0x7f, 0x50 } 560141cc406Sopenharmony_ci }; 561141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 562141cc406Sopenharmony_ci { 563141cc406Sopenharmony_ci struct CustomSensorSettings 564141cc406Sopenharmony_ci { 565141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 566141cc406Sopenharmony_ci unsigned optical_resolution; 567141cc406Sopenharmony_ci unsigned register_dpihw; 568141cc406Sopenharmony_ci unsigned register_dpiset; 569141cc406Sopenharmony_ci unsigned shading_resolution; 570141cc406Sopenharmony_ci unsigned shading_factor; 571141cc406Sopenharmony_ci int output_pixel_offset; 572141cc406Sopenharmony_ci SensorExposure exposure; 573141cc406Sopenharmony_ci unsigned exposure_lperiod; 574141cc406Sopenharmony_ci unsigned segment_size; 575141cc406Sopenharmony_ci std::vector<unsigned> segment_order; 576141cc406Sopenharmony_ci }; 577141cc406Sopenharmony_ci 578141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 579141cc406Sopenharmony_ci { { 300 }, 300, 600, 600, 300, 2, 280, { 955, 1235, 675 }, 6500, 5152, 580141cc406Sopenharmony_ci std::vector<unsigned>{} }, 581141cc406Sopenharmony_ci { { 600 }, 600, 600, 600, 600, 1, 250, { 1655, 2075, 1095 }, 6536, 5152, 582141cc406Sopenharmony_ci std::vector<unsigned>{} }, 583141cc406Sopenharmony_ci { { 1200 }, 1200, 1200, 1200, 1200, 1, 500, { 3055, 4175, 1935 }, 12688, 5152, 584141cc406Sopenharmony_ci {0, 1} }, 585141cc406Sopenharmony_ci { { 2400 }, 2400, 2400, 2400, 2400, 1, 1000, { 5855, 7535, 3615 }, 21500, 5152, 586141cc406Sopenharmony_ci {0, 1, 2, 3} }, 587141cc406Sopenharmony_ci }; 588141cc406Sopenharmony_ci 589141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 590141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 591141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 592141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 593141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 594141cc406Sopenharmony_ci sensor.shading_resolution = setting.shading_resolution; 595141cc406Sopenharmony_ci sensor.shading_factor = setting.shading_factor; 596141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 597141cc406Sopenharmony_ci sensor.exposure = setting.exposure; 598141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 599141cc406Sopenharmony_ci sensor.segment_size = setting.segment_size; 600141cc406Sopenharmony_ci sensor.segment_order = setting.segment_order; 601141cc406Sopenharmony_ci s_sensors->push_back(sensor); 602141cc406Sopenharmony_ci } 603141cc406Sopenharmony_ci } 604141cc406Sopenharmony_ci 605141cc406Sopenharmony_ci 606141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 607141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CIS_XP200; // gl646 608141cc406Sopenharmony_ci sensor.full_resolution = 600; 609141cc406Sopenharmony_ci sensor.black_pixels = 5; 610141cc406Sopenharmony_ci sensor.dummy_pixel = 38; 611141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 200; 612141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 613141cc406Sopenharmony_ci sensor.exposure = { 0x1450, 0x0c80, 0x0a28 }; 614141cc406Sopenharmony_ci sensor.custom_regs = { 615141cc406Sopenharmony_ci { 0x08, 0x06 }, { 0x09, 0x07 }, { 0x0a, 0x0a }, { 0x0b, 0x04 }, 616141cc406Sopenharmony_ci { 0x16, 0x24 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x2a }, 617141cc406Sopenharmony_ci { 0x1a, 0x0a }, { 0x1b, 0x0a }, { 0x1c, 0x00 }, { 0x1d, 0x11 }, 618141cc406Sopenharmony_ci { 0x52, 0x08 }, { 0x53, 0x02 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 619141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x1a }, { 0x59, 0x51 }, { 0x5a, 0x00 }, 620141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 621141cc406Sopenharmony_ci }; 622141cc406Sopenharmony_ci sensor.gamma = { 2.1f, 2.1f, 2.1f }; 623141cc406Sopenharmony_ci 624141cc406Sopenharmony_ci { 625141cc406Sopenharmony_ci struct CustomSensorSettings { 626141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 627141cc406Sopenharmony_ci std::vector<unsigned> channels; 628141cc406Sopenharmony_ci unsigned exposure_lperiod; 629141cc406Sopenharmony_ci SensorExposure exposure; 630141cc406Sopenharmony_ci int output_pixel_offset; 631141cc406Sopenharmony_ci }; 632141cc406Sopenharmony_ci 633141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 634141cc406Sopenharmony_ci { { 75 }, { 3 }, 5700, { 0x1644, 0x0c80, 0x092e }, 4 }, 635141cc406Sopenharmony_ci { { 100 }, { 3 }, 5700, { 0x1644, 0x0c80, 0x092e }, 6 }, 636141cc406Sopenharmony_ci { { 200 }, { 3 }, 5700, { 0x1644, 0x0c80, 0x092e }, 12 }, 637141cc406Sopenharmony_ci { { 300 }, { 3 }, 9000, { 0x1644, 0x0c80, 0x092e }, 19 }, 638141cc406Sopenharmony_ci { { 600 }, { 3 }, 16000, { 0x1644, 0x0c80, 0x092e }, 38 }, 639141cc406Sopenharmony_ci { { 75 }, { 1 }, 16000, { 0x050a, 0x0fa0, 0x1010 }, 4 }, 640141cc406Sopenharmony_ci { { 100 }, { 1 }, 7800, { 0x050a, 0x0fa0, 0x1010 }, 6 }, 641141cc406Sopenharmony_ci { { 200 }, { 1 }, 11000, { 0x050a, 0x0fa0, 0x1010 }, 12 }, 642141cc406Sopenharmony_ci { { 300 }, { 1 }, 13000, { 0x050a, 0x0fa0, 0x1010 }, 19 }, 643141cc406Sopenharmony_ci { { 600 }, { 1 }, 24000, { 0x050a, 0x0fa0, 0x1010 }, 38 }, 644141cc406Sopenharmony_ci }; 645141cc406Sopenharmony_ci 646141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) 647141cc406Sopenharmony_ci { 648141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 649141cc406Sopenharmony_ci sensor.channels = setting.channels; 650141cc406Sopenharmony_ci sensor.register_dpiset = setting.resolutions.values()[0]; 651141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 652141cc406Sopenharmony_ci sensor.exposure = setting.exposure; 653141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 654141cc406Sopenharmony_ci s_sensors->push_back(sensor); 655141cc406Sopenharmony_ci } 656141cc406Sopenharmony_ci } 657141cc406Sopenharmony_ci 658141cc406Sopenharmony_ci 659141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 660141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_HP3670; // gl646 661141cc406Sopenharmony_ci sensor.full_resolution = 1200; 662141cc406Sopenharmony_ci sensor.black_pixels = 48; 663141cc406Sopenharmony_ci sensor.dummy_pixel = 16; 664141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 665141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 666141cc406Sopenharmony_ci sensor.exposure = { 0, 0, 0 }; 667141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 668141cc406Sopenharmony_ci 669141cc406Sopenharmony_ci { 670141cc406Sopenharmony_ci struct CustomSensorSettings { 671141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 672141cc406Sopenharmony_ci unsigned register_dpiset; 673141cc406Sopenharmony_ci unsigned exposure_lperiod; 674141cc406Sopenharmony_ci Ratio pixel_count_ratio; 675141cc406Sopenharmony_ci int output_pixel_offset; 676141cc406Sopenharmony_ci StaggerConfig stagger_y; 677141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_regs; 678141cc406Sopenharmony_ci }; 679141cc406Sopenharmony_ci 680141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 681141cc406Sopenharmony_ci { { 50 }, 200, 5758, Ratio{1, 4}, 0, StaggerConfig{}, { 682141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x0a }, { 0x0a, 0x0b }, { 0x0b, 0x0d }, 683141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x07 }, { 0x18, 0x33 }, { 0x19, 0x2a }, 684141cc406Sopenharmony_ci { 0x1a, 0x02 }, { 0x1b, 0x13 }, { 0x1c, 0xc0 }, { 0x1d, 0x43 }, 685141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 686141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x15 }, { 0x5a, 0xc1 }, 687141cc406Sopenharmony_ci { 0x5b, 0x05 }, { 0x5c, 0x0a }, { 0x5d, 0x0f }, { 0x5e, 0x00 } 688141cc406Sopenharmony_ci } 689141cc406Sopenharmony_ci }, 690141cc406Sopenharmony_ci { { 75 }, 300, 4879, Ratio{1, 4}, 1, StaggerConfig{}, { 691141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x0a }, { 0x0a, 0x0b }, { 0x0b, 0x0d }, 692141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x07 }, { 0x18, 0x33 }, { 0x19, 0x2a }, 693141cc406Sopenharmony_ci { 0x1a, 0x02 }, { 0x1b, 0x13 }, { 0x1c, 0xc0 }, { 0x1d, 0x43 }, 694141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 695141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x15 }, { 0x5a, 0xc1 }, 696141cc406Sopenharmony_ci { 0x5b, 0x05 }, { 0x5c, 0x0a }, { 0x5d, 0x0f }, { 0x5e, 0x00 } 697141cc406Sopenharmony_ci } 698141cc406Sopenharmony_ci }, 699141cc406Sopenharmony_ci { { 100 }, 400, 4487, Ratio{1, 4}, 1, StaggerConfig{}, { 700141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x0a }, { 0x0a, 0x0b }, { 0x0b, 0x0d }, 701141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x07 }, { 0x18, 0x33 }, { 0x19, 0x2a }, 702141cc406Sopenharmony_ci { 0x1a, 0x02 }, { 0x1b, 0x13 }, { 0x1c, 0xc0 }, { 0x1d, 0x43 }, 703141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 704141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x15 }, { 0x5a, 0xc1 }, 705141cc406Sopenharmony_ci { 0x5b, 0x05 }, { 0x5c, 0x0a }, { 0x5d, 0x0f }, { 0x5e, 0x00 } 706141cc406Sopenharmony_ci } 707141cc406Sopenharmony_ci }, 708141cc406Sopenharmony_ci { { 150 }, 600, 4879, Ratio{1, 4}, 2, StaggerConfig{}, { 709141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x0a }, { 0x0a, 0x0b }, { 0x0b, 0x0d }, 710141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x07 }, { 0x18, 0x33 }, { 0x19, 0x2a }, 711141cc406Sopenharmony_ci { 0x1a, 0x02 }, { 0x1b, 0x13 }, { 0x1c, 0xc0 }, { 0x1d, 0x43 }, 712141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 713141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x15 }, { 0x5a, 0xc1 }, 714141cc406Sopenharmony_ci { 0x5b, 0x05 }, { 0x5c, 0x0a }, { 0x5d, 0x0f }, { 0x5e, 0x00 } 715141cc406Sopenharmony_ci } 716141cc406Sopenharmony_ci }, 717141cc406Sopenharmony_ci { { 300 }, 1200, 4503, Ratio{1, 4}, 4, StaggerConfig{}, { 718141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x0a }, { 0x0a, 0x0b }, { 0x0b, 0x0d }, 719141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x07 }, { 0x18, 0x33 }, { 0x19, 0x2a }, 720141cc406Sopenharmony_ci { 0x1a, 0x02 }, { 0x1b, 0x13 }, { 0x1c, 0xc0 }, { 0x1d, 0x43 }, 721141cc406Sopenharmony_ci { 0x52, 0x0f }, { 0x53, 0x13 }, { 0x54, 0x17 }, { 0x55, 0x03 }, 722141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0b }, { 0x58, 0x83 }, { 0x59, 0x15 }, { 0x5a, 0xc1 }, 723141cc406Sopenharmony_ci { 0x5b, 0x05 }, { 0x5c, 0x0a }, { 0x5d, 0x0f }, { 0x5e, 0x00 } 724141cc406Sopenharmony_ci } 725141cc406Sopenharmony_ci }, 726141cc406Sopenharmony_ci { { 600 }, 1200, 10251, Ratio{1, 2}, 8, StaggerConfig{}, { 727141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x05 }, { 0x0a, 0x06 }, { 0x0b, 0x08 }, 728141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x07 }, { 0x18, 0x31 }, { 0x19, 0x2a }, 729141cc406Sopenharmony_ci { 0x1a, 0x02 }, { 0x1b, 0x0e }, { 0x1c, 0xc0 }, { 0x1d, 0x43 }, 730141cc406Sopenharmony_ci { 0x52, 0x0b }, { 0x53, 0x0f }, { 0x54, 0x13 }, { 0x55, 0x17 }, 731141cc406Sopenharmony_ci { 0x56, 0x03 }, { 0x57, 0x07 }, { 0x58, 0x63 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 732141cc406Sopenharmony_ci { 0x5b, 0x02 }, { 0x5c, 0x0e }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 733141cc406Sopenharmony_ci } 734141cc406Sopenharmony_ci }, 735141cc406Sopenharmony_ci { { 1200 }, 1200, 12750, Ratio{1, 1}, 16, StaggerConfig{4, 0}, { 736141cc406Sopenharmony_ci { 0x08, 0x0d }, { 0x09, 0x0f }, { 0x0a, 0x11 }, { 0x0b, 0x13 }, 737141cc406Sopenharmony_ci { 0x16, 0x2b }, { 0x17, 0x07 }, { 0x18, 0x30 }, { 0x19, 0x2a }, 738141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0xc0 }, { 0x1d, 0x43 }, 739141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x0b }, { 0x55, 0x0f }, 740141cc406Sopenharmony_ci { 0x56, 0x13 }, { 0x57, 0x17 }, { 0x58, 0x23 }, { 0x59, 0x00 }, { 0x5a, 0xc1 }, 741141cc406Sopenharmony_ci { 0x5b, 0x00 }, { 0x5c, 0x00 }, { 0x5d, 0x00 }, { 0x5e, 0x00 } 742141cc406Sopenharmony_ci } 743141cc406Sopenharmony_ci }, 744141cc406Sopenharmony_ci }; 745141cc406Sopenharmony_ci 746141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) 747141cc406Sopenharmony_ci { 748141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 749141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 750141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 751141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 752141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 753141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 754141cc406Sopenharmony_ci sensor.custom_regs = setting.custom_regs; 755141cc406Sopenharmony_ci s_sensors->push_back(sensor); 756141cc406Sopenharmony_ci } 757141cc406Sopenharmony_ci } 758141cc406Sopenharmony_ci 759141cc406Sopenharmony_ci 760141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 761141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_DP665; // gl841 762141cc406Sopenharmony_ci sensor.full_resolution = 600; 763141cc406Sopenharmony_ci sensor.register_dpihw = 600; 764141cc406Sopenharmony_ci sensor.shading_resolution = 600; 765141cc406Sopenharmony_ci sensor.black_pixels = 27; 766141cc406Sopenharmony_ci sensor.dummy_pixel = 27; 767141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 768141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 769141cc406Sopenharmony_ci sensor.exposure = { 0x1100, 0x1100, 0x1100 }; 770141cc406Sopenharmony_ci sensor.custom_regs = { 771141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x02 }, { 0x18, 0x04 }, { 0x19, 0x50 }, 772141cc406Sopenharmony_ci { 0x1a, 0x10 }, { 0x1b, 0x00 }, { 0x1c, 0x20 }, { 0x1d, 0x02 }, 773141cc406Sopenharmony_ci { 0x52, 0x04 }, { 0x53, 0x05 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 774141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x54 }, { 0x59, 0x03 }, { 0x5a, 0x00 }, 775141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x00 }, { 0x72, 0x00 }, { 0x73, 0x00 }, 776141cc406Sopenharmony_ci }; 777141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 778141cc406Sopenharmony_ci { 779141cc406Sopenharmony_ci struct CustomSensorSettings 780141cc406Sopenharmony_ci { 781141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 782141cc406Sopenharmony_ci unsigned register_dpiset; 783141cc406Sopenharmony_ci int output_pixel_offset; 784141cc406Sopenharmony_ci }; 785141cc406Sopenharmony_ci 786141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 787141cc406Sopenharmony_ci { { 75 }, 75, 1 }, 788141cc406Sopenharmony_ci { { 150 }, 150, 3 }, 789141cc406Sopenharmony_ci { { 300 }, 300, 7 }, 790141cc406Sopenharmony_ci { { 600 }, 600, 14 }, 791141cc406Sopenharmony_ci { { 1200 }, 1200, 28 }, 792141cc406Sopenharmony_ci }; 793141cc406Sopenharmony_ci 794141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 795141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 796141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 797141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 798141cc406Sopenharmony_ci s_sensors->push_back(sensor); 799141cc406Sopenharmony_ci } 800141cc406Sopenharmony_ci } 801141cc406Sopenharmony_ci 802141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 803141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_ROADWARRIOR; // gl841 804141cc406Sopenharmony_ci sensor.full_resolution = 600; 805141cc406Sopenharmony_ci sensor.register_dpihw = 600; 806141cc406Sopenharmony_ci sensor.shading_resolution = 600; 807141cc406Sopenharmony_ci sensor.black_pixels = 27; 808141cc406Sopenharmony_ci sensor.dummy_pixel = 27; 809141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 810141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 811141cc406Sopenharmony_ci sensor.exposure = { 0x1100, 0x1100, 0x1100 }; 812141cc406Sopenharmony_ci sensor.custom_regs = { 813141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x02 }, { 0x18, 0x04 }, { 0x19, 0x50 }, 814141cc406Sopenharmony_ci { 0x1a, 0x10 }, { 0x1b, 0x00 }, { 0x1c, 0x20 }, { 0x1d, 0x02 }, 815141cc406Sopenharmony_ci { 0x52, 0x04 }, { 0x53, 0x05 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 816141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x54 }, { 0x59, 0x03 }, { 0x5a, 0x00 }, 817141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x00 }, { 0x72, 0x00 }, { 0x73, 0x00 }, 818141cc406Sopenharmony_ci }; 819141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 820141cc406Sopenharmony_ci { 821141cc406Sopenharmony_ci struct CustomSensorSettings 822141cc406Sopenharmony_ci { 823141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 824141cc406Sopenharmony_ci unsigned register_dpiset; 825141cc406Sopenharmony_ci int output_pixel_offset; 826141cc406Sopenharmony_ci }; 827141cc406Sopenharmony_ci 828141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 829141cc406Sopenharmony_ci { { 75 }, 75, 1 }, 830141cc406Sopenharmony_ci { { 150 }, 150, 3 }, 831141cc406Sopenharmony_ci { { 300 }, 300, 7 }, 832141cc406Sopenharmony_ci { { 600 }, 600, 14 }, 833141cc406Sopenharmony_ci { { 1200 }, 1200, 28 }, 834141cc406Sopenharmony_ci }; 835141cc406Sopenharmony_ci 836141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 837141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 838141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 839141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 840141cc406Sopenharmony_ci s_sensors->push_back(sensor); 841141cc406Sopenharmony_ci } 842141cc406Sopenharmony_ci } 843141cc406Sopenharmony_ci 844141cc406Sopenharmony_ci 845141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 846141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_DSMOBILE600; // gl841 847141cc406Sopenharmony_ci sensor.full_resolution = 600; 848141cc406Sopenharmony_ci sensor.register_dpihw = 600; 849141cc406Sopenharmony_ci sensor.shading_resolution = 600; 850141cc406Sopenharmony_ci sensor.black_pixels = 28; 851141cc406Sopenharmony_ci sensor.dummy_pixel = 28; 852141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 853141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 854141cc406Sopenharmony_ci sensor.exposure = { 0x1544, 0x1544, 0x1544 }; 855141cc406Sopenharmony_ci sensor.custom_regs = { 856141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x02 }, { 0x18, 0x04 }, { 0x19, 0x50 }, 857141cc406Sopenharmony_ci { 0x1a, 0x10 }, { 0x1b, 0x00 }, { 0x1c, 0x20 }, { 0x1d, 0x02 }, 858141cc406Sopenharmony_ci { 0x52, 0x04 }, { 0x53, 0x05 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 859141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x54 }, { 0x59, 0x03 }, { 0x5a, 0x00 }, 860141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x00 }, { 0x72, 0x00 }, { 0x73, 0x00 }, 861141cc406Sopenharmony_ci }; 862141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 863141cc406Sopenharmony_ci { 864141cc406Sopenharmony_ci struct CustomSensorSettings 865141cc406Sopenharmony_ci { 866141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 867141cc406Sopenharmony_ci unsigned register_dpiset; 868141cc406Sopenharmony_ci int output_pixel_offset; 869141cc406Sopenharmony_ci }; 870141cc406Sopenharmony_ci 871141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 872141cc406Sopenharmony_ci { { 75 }, 75, 3 }, 873141cc406Sopenharmony_ci { { 150 }, 150, 7 }, 874141cc406Sopenharmony_ci { { 300 }, 300, 14 }, 875141cc406Sopenharmony_ci { { 600 }, 600, 29 }, 876141cc406Sopenharmony_ci }; 877141cc406Sopenharmony_ci 878141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 879141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 880141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 881141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 882141cc406Sopenharmony_ci s_sensors->push_back(sensor); 883141cc406Sopenharmony_ci } 884141cc406Sopenharmony_ci } 885141cc406Sopenharmony_ci 886141cc406Sopenharmony_ci 887141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 888141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_XP300; // gl841 889141cc406Sopenharmony_ci sensor.full_resolution = 600; 890141cc406Sopenharmony_ci sensor.register_dpihw = 1200; // FIXME: could be incorrect, but previous code used this value 891141cc406Sopenharmony_ci sensor.shading_resolution = 600; 892141cc406Sopenharmony_ci sensor.black_pixels = 27; 893141cc406Sopenharmony_ci sensor.dummy_pixel = 27; 894141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 895141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 896141cc406Sopenharmony_ci sensor.exposure = { 0x1100, 0x1100, 0x1100 }; 897141cc406Sopenharmony_ci sensor.custom_regs = { 898141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x02 }, { 0x18, 0x04 }, { 0x19, 0x50 }, 899141cc406Sopenharmony_ci { 0x1a, 0x10 }, { 0x1b, 0x00 }, { 0x1c, 0x20 }, { 0x1d, 0x02 }, 900141cc406Sopenharmony_ci { 0x52, 0x04 }, { 0x53, 0x05 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 901141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x54 }, { 0x59, 0x03 }, { 0x5a, 0x00 }, 902141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x00 }, { 0x72, 0x00 }, { 0x73, 0x00 }, 903141cc406Sopenharmony_ci }; 904141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 905141cc406Sopenharmony_ci { 906141cc406Sopenharmony_ci struct CustomSensorSettings 907141cc406Sopenharmony_ci { 908141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 909141cc406Sopenharmony_ci unsigned register_dpiset; 910141cc406Sopenharmony_ci int output_pixel_offset; 911141cc406Sopenharmony_ci }; 912141cc406Sopenharmony_ci 913141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 914141cc406Sopenharmony_ci { { 75 }, 150, 3 }, 915141cc406Sopenharmony_ci { { 150 }, 300, 7 }, 916141cc406Sopenharmony_ci { { 300 }, 600, 14 }, 917141cc406Sopenharmony_ci { { 600 }, 1200, 28 }, 918141cc406Sopenharmony_ci }; 919141cc406Sopenharmony_ci 920141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 921141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 922141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 923141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 924141cc406Sopenharmony_ci s_sensors->push_back(sensor); 925141cc406Sopenharmony_ci } 926141cc406Sopenharmony_ci } 927141cc406Sopenharmony_ci 928141cc406Sopenharmony_ci 929141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 930141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_DOCKETPORT_487; // gl841 931141cc406Sopenharmony_ci sensor.full_resolution = 600; 932141cc406Sopenharmony_ci sensor.register_dpihw = 600; 933141cc406Sopenharmony_ci sensor.shading_resolution = 600; 934141cc406Sopenharmony_ci sensor.black_pixels = 27; 935141cc406Sopenharmony_ci sensor.dummy_pixel = 27; 936141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 937141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 938141cc406Sopenharmony_ci sensor.exposure = { 0x1100, 0x1100, 0x1100 }; 939141cc406Sopenharmony_ci sensor.custom_regs = { 940141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x02 }, { 0x18, 0x04 }, { 0x19, 0x50 }, 941141cc406Sopenharmony_ci { 0x1a, 0x10 }, { 0x1b, 0x00 }, { 0x1c, 0x20 }, { 0x1d, 0x02 }, 942141cc406Sopenharmony_ci { 0x52, 0x04 }, { 0x53, 0x05 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 943141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x54 }, { 0x59, 0x03 }, { 0x5a, 0x00 }, 944141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x00 }, { 0x72, 0x00 }, { 0x73, 0x00 }, 945141cc406Sopenharmony_ci }; 946141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 947141cc406Sopenharmony_ci { 948141cc406Sopenharmony_ci struct CustomSensorSettings 949141cc406Sopenharmony_ci { 950141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 951141cc406Sopenharmony_ci unsigned register_dpiset; 952141cc406Sopenharmony_ci int output_pixel_offset; 953141cc406Sopenharmony_ci }; 954141cc406Sopenharmony_ci 955141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 956141cc406Sopenharmony_ci { { 75 }, 150, 3 }, 957141cc406Sopenharmony_ci { { 150 }, 300, 7 }, 958141cc406Sopenharmony_ci { { 300 }, 600, 14 }, 959141cc406Sopenharmony_ci { { 600 }, 600, 28 }, 960141cc406Sopenharmony_ci }; 961141cc406Sopenharmony_ci 962141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 963141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 964141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 965141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 966141cc406Sopenharmony_ci s_sensors->push_back(sensor); 967141cc406Sopenharmony_ci } 968141cc406Sopenharmony_ci } 969141cc406Sopenharmony_ci 970141cc406Sopenharmony_ci 971141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 972141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_DP685; // gl841 973141cc406Sopenharmony_ci sensor.full_resolution = 600; 974141cc406Sopenharmony_ci sensor.register_dpihw = 600; 975141cc406Sopenharmony_ci sensor.shading_resolution = 600; 976141cc406Sopenharmony_ci sensor.full_resolution = 600; 977141cc406Sopenharmony_ci sensor.black_pixels = 27; 978141cc406Sopenharmony_ci sensor.dummy_pixel = 27; 979141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 980141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 981141cc406Sopenharmony_ci sensor.exposure = { 0x1100, 0x1100, 0x1100 }; 982141cc406Sopenharmony_ci sensor.custom_regs = { 983141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x02 }, { 0x18, 0x04 }, { 0x19, 0x50 }, 984141cc406Sopenharmony_ci { 0x1a, 0x10 }, { 0x1b, 0x00 }, { 0x1c, 0x20 }, { 0x1d, 0x02 }, 985141cc406Sopenharmony_ci { 0x52, 0x04 }, { 0x53, 0x05 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 986141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x54 }, { 0x59, 0x03 }, { 0x5a, 0x00 }, 987141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x00 }, { 0x72, 0x00 }, { 0x73, 0x00 }, 988141cc406Sopenharmony_ci }; 989141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 990141cc406Sopenharmony_ci { 991141cc406Sopenharmony_ci struct CustomSensorSettings 992141cc406Sopenharmony_ci { 993141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 994141cc406Sopenharmony_ci unsigned register_dpiset; 995141cc406Sopenharmony_ci int output_pixel_offset; 996141cc406Sopenharmony_ci }; 997141cc406Sopenharmony_ci 998141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 999141cc406Sopenharmony_ci { { 75 }, 75, 3 }, 1000141cc406Sopenharmony_ci { { 150 }, 150, 6 }, 1001141cc406Sopenharmony_ci { { 300 }, 300, 13 }, 1002141cc406Sopenharmony_ci { { 600 }, 600, 27 }, 1003141cc406Sopenharmony_ci }; 1004141cc406Sopenharmony_ci 1005141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 1006141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 1007141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 1008141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 1009141cc406Sopenharmony_ci s_sensors->push_back(sensor); 1010141cc406Sopenharmony_ci } 1011141cc406Sopenharmony_ci } 1012141cc406Sopenharmony_ci 1013141cc406Sopenharmony_ci 1014141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 1015141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CIS_CANON_LIDE_200; // gl847 1016141cc406Sopenharmony_ci sensor.full_resolution = 4800; 1017141cc406Sopenharmony_ci sensor.black_pixels = 87*4; 1018141cc406Sopenharmony_ci sensor.dummy_pixel = 16*4; 1019141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 1020141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 1021141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 1022141cc406Sopenharmony_ci sensor.gamma = { 2.2f, 2.2f, 2.2f }; 1023141cc406Sopenharmony_ci 1024141cc406Sopenharmony_ci { 1025141cc406Sopenharmony_ci struct CustomSensorSettings { 1026141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 1027141cc406Sopenharmony_ci unsigned register_dpihw; 1028141cc406Sopenharmony_ci int exposure_lperiod; 1029141cc406Sopenharmony_ci SensorExposure exposure; 1030141cc406Sopenharmony_ci Ratio pixel_count_ratio; 1031141cc406Sopenharmony_ci unsigned shading_factor; 1032141cc406Sopenharmony_ci int output_pixel_offset; 1033141cc406Sopenharmony_ci unsigned segment_size; 1034141cc406Sopenharmony_ci std::vector<unsigned> segment_order; 1035141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_regs; 1036141cc406Sopenharmony_ci }; 1037141cc406Sopenharmony_ci 1038141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 1039141cc406Sopenharmony_ci // Note: Windows driver uses 1424 lperiod and enables dummy line (0x17) 1040141cc406Sopenharmony_ci { { 150 }, 600, 2848, { 304, 203, 180 }, Ratio{1, 8}, 4, 80, 5136, 1041141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1042141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff }, 1043141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1044141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1045141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1046141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1047141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1048141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1049141cc406Sopenharmony_ci } 1050141cc406Sopenharmony_ci }, 1051141cc406Sopenharmony_ci // Note: Windows driver uses 1424 lperiod and enables dummy line (0x17) 1052141cc406Sopenharmony_ci { { 200 }, 600, 2848, { 304, 203, 180 }, Ratio{1, 8}, 3, 106, 5136, 1053141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1054141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff }, 1055141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1056141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1057141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1058141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1059141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1060141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1061141cc406Sopenharmony_ci } 1062141cc406Sopenharmony_ci }, 1063141cc406Sopenharmony_ci // Note: Windows driver uses 788 lperiod and enables dummy line (0x17) 1064141cc406Sopenharmony_ci { { 300 }, 600, 1424, { 304, 203, 180 }, Ratio{1, 8}, 2, 160, 5136, 1065141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1066141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff }, 1067141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1068141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1069141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1070141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1071141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1072141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1073141cc406Sopenharmony_ci } 1074141cc406Sopenharmony_ci }, 1075141cc406Sopenharmony_ci // Note: Windows driver uses 788 lperiod and enables dummy line (0x17) 1076141cc406Sopenharmony_ci { { 400 }, 600, 1424, { 304, 203, 180 }, Ratio{1, 8}, 1, 213, 5136, 1077141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1078141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff }, 1079141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1080141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1081141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1082141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1083141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1084141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1085141cc406Sopenharmony_ci } 1086141cc406Sopenharmony_ci }, 1087141cc406Sopenharmony_ci { { 600 }, 600, 1432, { 492, 326, 296 }, Ratio{1, 8}, 1, 320, 5136, 1088141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1089141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff }, 1090141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1091141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1092141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1093141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1094141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1095141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1096141cc406Sopenharmony_ci } 1097141cc406Sopenharmony_ci }, 1098141cc406Sopenharmony_ci { { 1200 }, 1200, 2712, { 935, 592, 538 }, Ratio{1, 8}, 1, 640, 5136, 1099141cc406Sopenharmony_ci { 0, 1 }, { 1100141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x08 }, { 0x18, 0x00 }, { 0x19, 0xff }, 1101141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1102141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1103141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1104141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1105141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1106141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1107141cc406Sopenharmony_ci } 1108141cc406Sopenharmony_ci }, 1109141cc406Sopenharmony_ci { { 2400 }, 2400, 5280, { 1777, 1125, 979 }, Ratio{1, 8}, 1, 1280, 5136, 1110141cc406Sopenharmony_ci { 0, 2, 1, 3 }, { 1111141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x06 }, { 0x18, 0x00 }, { 0x19, 0xff }, 1112141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1113141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1114141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1115141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1116141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1117141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1118141cc406Sopenharmony_ci } 1119141cc406Sopenharmony_ci }, 1120141cc406Sopenharmony_ci { { 4800 }, 4800, 10416, { 3377, 2138, 1780 }, Ratio{1, 8}, 1, 2560, 5136, 1121141cc406Sopenharmony_ci { 0, 2, 4, 6, 1, 3, 5, 7 }, { 1122141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0xff }, 1123141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1124141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1125141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1126141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1127141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1128141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1129141cc406Sopenharmony_ci } 1130141cc406Sopenharmony_ci } 1131141cc406Sopenharmony_ci }; 1132141cc406Sopenharmony_ci 1133141cc406Sopenharmony_ci for (const auto& setting : custom_settings) { 1134141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 1135141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 1136141cc406Sopenharmony_ci sensor.register_dpiset = setting.resolutions.values()[0]; 1137141cc406Sopenharmony_ci sensor.shading_resolution = setting.register_dpihw; 1138141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 1139141cc406Sopenharmony_ci sensor.exposure = setting.exposure; 1140141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 1141141cc406Sopenharmony_ci sensor.shading_factor = setting.shading_factor; 1142141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 1143141cc406Sopenharmony_ci sensor.segment_size = setting.segment_size; 1144141cc406Sopenharmony_ci sensor.segment_order = setting.segment_order; 1145141cc406Sopenharmony_ci sensor.custom_regs = setting.custom_regs; 1146141cc406Sopenharmony_ci s_sensors->push_back(sensor); 1147141cc406Sopenharmony_ci } 1148141cc406Sopenharmony_ci } 1149141cc406Sopenharmony_ci 1150141cc406Sopenharmony_ci 1151141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 1152141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CIS_CANON_LIDE_700F; // gl847 1153141cc406Sopenharmony_ci sensor.full_resolution = 4800; 1154141cc406Sopenharmony_ci sensor.black_pixels = 73*8; // black pixels 73 at 600 dpi 1155141cc406Sopenharmony_ci sensor.dummy_pixel = 16*8; 1156141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 1157141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 1158141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 1159141cc406Sopenharmony_ci 1160141cc406Sopenharmony_ci { 1161141cc406Sopenharmony_ci struct CustomSensorSettings { 1162141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 1163141cc406Sopenharmony_ci unsigned register_dpihw; 1164141cc406Sopenharmony_ci int exposure_lperiod; 1165141cc406Sopenharmony_ci SensorExposure exposure; 1166141cc406Sopenharmony_ci Ratio pixel_count_ratio; 1167141cc406Sopenharmony_ci unsigned shading_factor; 1168141cc406Sopenharmony_ci int output_pixel_offset; 1169141cc406Sopenharmony_ci unsigned segment_size; 1170141cc406Sopenharmony_ci std::vector<unsigned> segment_order; 1171141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_regs; 1172141cc406Sopenharmony_ci }; 1173141cc406Sopenharmony_ci 1174141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 1175141cc406Sopenharmony_ci { { 75 }, 600, 2848, { 465, 310, 239 }, Ratio{1, 8}, 8, 48, 5187, 1176141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1177141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0xff }, 1178141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1179141cc406Sopenharmony_ci { 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1180141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1181141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x87 }, 1182141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0xf9 }, 1183141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1184141cc406Sopenharmony_ci } 1185141cc406Sopenharmony_ci }, 1186141cc406Sopenharmony_ci { { 100 }, 600, 2848, { 465, 310, 239 }, Ratio{1, 8}, 6, 64, 5187, 1187141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1188141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0xff }, 1189141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1190141cc406Sopenharmony_ci { 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1191141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1192141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x87 }, 1193141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0xf9 }, 1194141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1195141cc406Sopenharmony_ci } 1196141cc406Sopenharmony_ci }, 1197141cc406Sopenharmony_ci { { 150 }, 600, 2848, { 465, 310, 239 }, Ratio{1, 8}, 4, 96, 5187, 1198141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1199141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0xff }, 1200141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1201141cc406Sopenharmony_ci { 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1202141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1203141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x87 }, 1204141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0xf9 }, 1205141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1206141cc406Sopenharmony_ci } 1207141cc406Sopenharmony_ci }, 1208141cc406Sopenharmony_ci { { 200 }, 600, 2848, { 465, 310, 239 }, Ratio{1, 8}, 3, 128, 5187, 1209141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1210141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0xff }, 1211141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1212141cc406Sopenharmony_ci { 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1213141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1214141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x87 }, 1215141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0xf9 }, 1216141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1217141cc406Sopenharmony_ci } 1218141cc406Sopenharmony_ci }, 1219141cc406Sopenharmony_ci { { 300 }, 600, 1424, { 465, 310, 239 }, Ratio{1, 8}, 2, 192, 5187, 1220141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1221141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0xff }, 1222141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1223141cc406Sopenharmony_ci { 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1224141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1225141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x87 }, 1226141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0xf9 }, 1227141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1228141cc406Sopenharmony_ci } 1229141cc406Sopenharmony_ci }, 1230141cc406Sopenharmony_ci { { 600 }, 600, 1504, { 465, 310, 239 }, Ratio{1, 8}, 1, 384, 5187, 1231141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1232141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0xff }, 1233141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1234141cc406Sopenharmony_ci { 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1235141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1236141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x87 }, 1237141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0xf9 }, 1238141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1239141cc406Sopenharmony_ci } 1240141cc406Sopenharmony_ci }, 1241141cc406Sopenharmony_ci { { 1200 }, 1200, 2696, { 1464, 844, 555 }, Ratio{1, 8}, 1, 768, 5187, 1242141cc406Sopenharmony_ci { 0, 1 }, { 1243141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff }, 1244141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1245141cc406Sopenharmony_ci { 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1246141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1247141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x87 }, 1248141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0xf9 }, 1249141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1250141cc406Sopenharmony_ci } 1251141cc406Sopenharmony_ci }, 1252141cc406Sopenharmony_ci { { 2400 }, 2400, 10576, { 2798, 1558, 972 }, Ratio{1, 8}, 1, 1536, 5187, 1253141cc406Sopenharmony_ci { 0, 1, 2, 3 }, { 1254141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x08 }, { 0x18, 0x00 }, { 0x19, 0xff }, 1255141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1256141cc406Sopenharmony_ci { 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1257141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1258141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x87 }, 1259141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0xf9 }, 1260141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1261141cc406Sopenharmony_ci } 1262141cc406Sopenharmony_ci }, 1263141cc406Sopenharmony_ci { { 4800 }, 4800, 10576, { 2798, 1558, 972 }, Ratio{1, 8}, 1, 3072, 5187, 1264141cc406Sopenharmony_ci { 0, 1, 4, 5, 2, 3, 6, 7 }, { 1265141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x06 }, { 0x18, 0x00 }, { 0x19, 0xff }, 1266141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1267141cc406Sopenharmony_ci { 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1268141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1269141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x87 }, 1270141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0xf9 }, 1271141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1272141cc406Sopenharmony_ci } 1273141cc406Sopenharmony_ci } 1274141cc406Sopenharmony_ci }; 1275141cc406Sopenharmony_ci 1276141cc406Sopenharmony_ci for (const auto& setting : custom_settings) { 1277141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 1278141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 1279141cc406Sopenharmony_ci sensor.register_dpiset = setting.resolutions.values()[0]; 1280141cc406Sopenharmony_ci sensor.shading_resolution = setting.register_dpihw; 1281141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 1282141cc406Sopenharmony_ci sensor.exposure = setting.exposure; 1283141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 1284141cc406Sopenharmony_ci sensor.shading_factor = setting.shading_factor; 1285141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 1286141cc406Sopenharmony_ci sensor.segment_size = setting.segment_size; 1287141cc406Sopenharmony_ci sensor.segment_order = setting.segment_order; 1288141cc406Sopenharmony_ci sensor.custom_regs = setting.custom_regs; 1289141cc406Sopenharmony_ci s_sensors->push_back(sensor); 1290141cc406Sopenharmony_ci } 1291141cc406Sopenharmony_ci } 1292141cc406Sopenharmony_ci 1293141cc406Sopenharmony_ci 1294141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 1295141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CIS_CANON_LIDE_100; // gl847 1296141cc406Sopenharmony_ci sensor.full_resolution = 2400; 1297141cc406Sopenharmony_ci sensor.black_pixels = 87*4; 1298141cc406Sopenharmony_ci sensor.dummy_pixel = 16*4; 1299141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 1300141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 1301141cc406Sopenharmony_ci sensor.exposure = { 0x01c1, 0x0126, 0x00e5 }; 1302141cc406Sopenharmony_ci sensor.gamma = { 2.2f, 2.2f, 2.2f }; 1303141cc406Sopenharmony_ci 1304141cc406Sopenharmony_ci { 1305141cc406Sopenharmony_ci struct CustomSensorSettings { 1306141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 1307141cc406Sopenharmony_ci unsigned register_dpihw; 1308141cc406Sopenharmony_ci int exposure_lperiod; 1309141cc406Sopenharmony_ci SensorExposure exposure; 1310141cc406Sopenharmony_ci Ratio pixel_count_ratio; 1311141cc406Sopenharmony_ci unsigned shading_factor; 1312141cc406Sopenharmony_ci int output_pixel_offset; 1313141cc406Sopenharmony_ci unsigned segment_size; 1314141cc406Sopenharmony_ci std::vector<unsigned> segment_order; 1315141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_regs; 1316141cc406Sopenharmony_ci }; 1317141cc406Sopenharmony_ci 1318141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 1319141cc406Sopenharmony_ci { { 150 }, 600, 2304, { 423, 294, 242 }, Ratio{1, 4}, 4, 80, 5136, 1320141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1321141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff }, 1322141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1323141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1324141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1325141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1326141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1327141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1328141cc406Sopenharmony_ci } 1329141cc406Sopenharmony_ci }, 1330141cc406Sopenharmony_ci { { 200 }, 600, 2304, { 423, 294, 242 }, Ratio{1, 4}, 3, 106, 5136, 1331141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1332141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff }, 1333141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1334141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1335141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1336141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1337141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1338141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1339141cc406Sopenharmony_ci } 1340141cc406Sopenharmony_ci }, 1341141cc406Sopenharmony_ci { { 300 }, 600, 1728, { 423, 294, 242 }, Ratio{1, 4}, 2, 160, 5136, 1342141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1343141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff }, 1344141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1345141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1346141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1347141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1348141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1349141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1350141cc406Sopenharmony_ci } 1351141cc406Sopenharmony_ci }, 1352141cc406Sopenharmony_ci { { 600 }, 600, 1432, { 423, 294, 242 }, Ratio{1, 4}, 1, 320, 5136, 1353141cc406Sopenharmony_ci std::vector<unsigned>{}, { 1354141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff }, 1355141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1356141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1357141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1358141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1359141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1360141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1361141cc406Sopenharmony_ci }, 1362141cc406Sopenharmony_ci }, 1363141cc406Sopenharmony_ci { { 1200 }, 1200, 2712, { 791, 542, 403 }, Ratio{1, 4}, 1, 640, 5136, {0, 1}, { 1364141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x08 }, { 0x18, 0x00 }, { 0x19, 0xff }, 1365141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1366141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1367141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1368141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1369141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1370141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1371141cc406Sopenharmony_ci } 1372141cc406Sopenharmony_ci }, 1373141cc406Sopenharmony_ci { { 2400 }, 2400, 5280, { 1504, 1030, 766 }, Ratio{1, 4}, 1, 1280, 5136, {0, 2, 1, 3}, { 1374141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x06 }, { 0x18, 0x00 }, { 0x19, 0xff }, 1375141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 }, 1376141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 1377141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 }, 1378141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 1379141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 1380141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 1381141cc406Sopenharmony_ci } 1382141cc406Sopenharmony_ci } 1383141cc406Sopenharmony_ci }; 1384141cc406Sopenharmony_ci 1385141cc406Sopenharmony_ci for (const auto& setting : custom_settings) { 1386141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 1387141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 1388141cc406Sopenharmony_ci sensor.register_dpiset = setting.resolutions.values()[0]; 1389141cc406Sopenharmony_ci sensor.shading_resolution = setting.register_dpihw; 1390141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 1391141cc406Sopenharmony_ci sensor.exposure = setting.exposure; 1392141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 1393141cc406Sopenharmony_ci sensor.shading_factor = setting.shading_factor; 1394141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 1395141cc406Sopenharmony_ci sensor.segment_size = setting.segment_size; 1396141cc406Sopenharmony_ci sensor.segment_order = setting.segment_order; 1397141cc406Sopenharmony_ci sensor.custom_regs = setting.custom_regs; 1398141cc406Sopenharmony_ci s_sensors->push_back(sensor); 1399141cc406Sopenharmony_ci } 1400141cc406Sopenharmony_ci } 1401141cc406Sopenharmony_ci 1402141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 1403141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_KVSS080; // gl843 1404141cc406Sopenharmony_ci sensor.full_resolution = 600; 1405141cc406Sopenharmony_ci sensor.register_dpihw = 600; 1406141cc406Sopenharmony_ci sensor.shading_resolution = 600; 1407141cc406Sopenharmony_ci sensor.black_pixels = 38; 1408141cc406Sopenharmony_ci sensor.dummy_pixel = 38; 1409141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 160; 1410141cc406Sopenharmony_ci sensor.gain_white_ref = 160; 1411141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 1412141cc406Sopenharmony_ci sensor.exposure_lperiod = 8000; 1413141cc406Sopenharmony_ci sensor.custom_regs = { 1414141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x00 }, 1415141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0xff }, { 0x79, 0xff }, 1416141cc406Sopenharmony_ci { 0x7a, 0x03 }, { 0x7b, 0xff }, { 0x7c, 0xff }, 1417141cc406Sopenharmony_ci { 0x0c, 0x00 }, 1418141cc406Sopenharmony_ci { 0x70, 0x01 }, 1419141cc406Sopenharmony_ci { 0x71, 0x03 }, 1420141cc406Sopenharmony_ci { 0x9e, 0x00 }, 1421141cc406Sopenharmony_ci { 0xaa, 0x00 }, 1422141cc406Sopenharmony_ci { 0x16, 0x33 }, 1423141cc406Sopenharmony_ci { 0x17, 0x1c }, 1424141cc406Sopenharmony_ci { 0x18, 0x00 }, 1425141cc406Sopenharmony_ci { 0x19, 0x2a }, 1426141cc406Sopenharmony_ci { 0x1a, 0x2c }, 1427141cc406Sopenharmony_ci { 0x1b, 0x00 }, 1428141cc406Sopenharmony_ci { 0x1c, 0x20 }, 1429141cc406Sopenharmony_ci { 0x1d, 0x04 }, 1430141cc406Sopenharmony_ci { 0x52, 0x0c }, 1431141cc406Sopenharmony_ci { 0x53, 0x0f }, 1432141cc406Sopenharmony_ci { 0x54, 0x00 }, 1433141cc406Sopenharmony_ci { 0x55, 0x03 }, 1434141cc406Sopenharmony_ci { 0x56, 0x06 }, 1435141cc406Sopenharmony_ci { 0x57, 0x09 }, 1436141cc406Sopenharmony_ci { 0x58, 0x6b }, 1437141cc406Sopenharmony_ci { 0x59, 0x00 }, 1438141cc406Sopenharmony_ci { 0x5a, 0xc0 }, 1439141cc406Sopenharmony_ci { 0x7d, 0x90 }, 1440141cc406Sopenharmony_ci }; 1441141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 1442141cc406Sopenharmony_ci { 1443141cc406Sopenharmony_ci struct CustomSensorSettings 1444141cc406Sopenharmony_ci { 1445141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 1446141cc406Sopenharmony_ci unsigned register_dpiset; 1447141cc406Sopenharmony_ci Ratio pixel_count_ratio; 1448141cc406Sopenharmony_ci int output_pixel_offset; 1449141cc406Sopenharmony_ci }; 1450141cc406Sopenharmony_ci 1451141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 1452141cc406Sopenharmony_ci { { 75 }, 75, Ratio{1, 1}, 4 }, 1453141cc406Sopenharmony_ci { { 100 }, 100, Ratio{1, 1}, 6 }, 1454141cc406Sopenharmony_ci { { 150 }, 150, Ratio{1, 1}, 9 }, 1455141cc406Sopenharmony_ci { { 200 }, 200, Ratio{1, 1}, 12 }, 1456141cc406Sopenharmony_ci { { 300 }, 300, Ratio{1, 1}, 19 }, 1457141cc406Sopenharmony_ci { { 600 }, 600, Ratio{1, 1}, 38 }, 1458141cc406Sopenharmony_ci }; 1459141cc406Sopenharmony_ci 1460141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 1461141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 1462141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 1463141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 1464141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 1465141cc406Sopenharmony_ci s_sensors->push_back(sensor); 1466141cc406Sopenharmony_ci } 1467141cc406Sopenharmony_ci } 1468141cc406Sopenharmony_ci 1469141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 1470141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_G4050; // gl843 1471141cc406Sopenharmony_ci sensor.full_resolution = 4800; 1472141cc406Sopenharmony_ci sensor.black_pixels = 50*8; 1473141cc406Sopenharmony_ci // 31 at 600 dpi dummy_pixels 58 at 1200 1474141cc406Sopenharmony_ci sensor.dummy_pixel = 58; 1475141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 160; 1476141cc406Sopenharmony_ci sensor.gain_white_ref = 160; 1477141cc406Sopenharmony_ci sensor.exposure = { 0x2c09, 0x22b8, 0x10f0 }; 1478141cc406Sopenharmony_ci sensor.custom_regs = {}; 1479141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 1480141cc406Sopenharmony_ci 1481141cc406Sopenharmony_ci { 1482141cc406Sopenharmony_ci struct CustomSensorSettings { 1483141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 1484141cc406Sopenharmony_ci unsigned register_dpihw; 1485141cc406Sopenharmony_ci unsigned register_dpiset; 1486141cc406Sopenharmony_ci int exposure_lperiod; 1487141cc406Sopenharmony_ci ScanMethod method; 1488141cc406Sopenharmony_ci Ratio pixel_count_ratio; 1489141cc406Sopenharmony_ci int output_pixel_offset; 1490141cc406Sopenharmony_ci StaggerConfig stagger_y; // FIXME: may be incorrect 1491141cc406Sopenharmony_ci GenesysRegisterSettingSet extra_custom_regs; 1492141cc406Sopenharmony_ci }; 1493141cc406Sopenharmony_ci 1494141cc406Sopenharmony_ci GenesysRegisterSettingSet regs_100_to_600 = { 1495141cc406Sopenharmony_ci { 0x0c, 0x00 }, 1496141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0x2a }, 1497141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x08 }, 1498141cc406Sopenharmony_ci { 0x52, 0x0b }, { 0x53, 0x0e }, { 0x54, 0x11 }, { 0x55, 0x02 }, { 0x56, 0x05 }, 1499141cc406Sopenharmony_ci { 0x57, 0x08 }, { 0x58, 0x63 }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1500141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, 1501141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x01 }, { 0x76, 0xff }, 1502141cc406Sopenharmony_ci { 0x77, 0x03 }, { 0x78, 0xff }, { 0x79, 0xff }, 1503141cc406Sopenharmony_ci { 0x7a, 0x03 }, { 0x7b, 0xff }, { 0x7c, 0xff }, { 0x7d, 0x90 }, 1504141cc406Sopenharmony_ci { 0x9e, 0x00 }, 1505141cc406Sopenharmony_ci { 0xaa, 0x00 }, 1506141cc406Sopenharmony_ci }; 1507141cc406Sopenharmony_ci 1508141cc406Sopenharmony_ci GenesysRegisterSettingSet regs_1200 = { 1509141cc406Sopenharmony_ci { 0x0c, 0x20 }, 1510141cc406Sopenharmony_ci { 0x16, 0x3b }, { 0x17, 0x0c }, { 0x18, 0x10 }, { 0x19, 0x2a }, 1511141cc406Sopenharmony_ci { 0x1a, 0x38 }, { 0x1b, 0x10 }, { 0x1c, 0x00 }, { 0x1d, 0x08 }, 1512141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x05 }, { 0x54, 0x08 }, { 0x55, 0x0b }, { 0x56, 0x0e }, 1513141cc406Sopenharmony_ci { 0x57, 0x11 }, { 0x58, 0x1b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1514141cc406Sopenharmony_ci { 0x70, 0x08 }, { 0x71, 0x0c }, 1515141cc406Sopenharmony_ci { 0x74, 0x0f }, { 0x75, 0xff }, { 0x76, 0xff }, 1516141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x01 }, { 0x79, 0xff }, 1517141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x01 }, { 0x7c, 0xff }, { 0x7d, 0x90 }, 1518141cc406Sopenharmony_ci { 0x9e, 0xc0 }, 1519141cc406Sopenharmony_ci { 0xaa, 0x05 }, 1520141cc406Sopenharmony_ci }; 1521141cc406Sopenharmony_ci 1522141cc406Sopenharmony_ci GenesysRegisterSettingSet regs_2400 = { 1523141cc406Sopenharmony_ci { 0x0c, 0x20 }, 1524141cc406Sopenharmony_ci { 0x16, 0x3b }, { 0x17, 0x0c }, { 0x18, 0x10 }, { 0x19, 0x2a }, 1525141cc406Sopenharmony_ci { 0x1a, 0x38 }, { 0x1b, 0x10 }, { 0x1c, 0xc0 }, { 0x1d, 0x08 }, 1526141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x05 }, { 0x54, 0x08 }, { 0x55, 0x0b }, { 0x56, 0x0e }, 1527141cc406Sopenharmony_ci { 0x57, 0x11 }, { 0x58, 0x1b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1528141cc406Sopenharmony_ci { 0x70, 0x08 }, { 0x71, 0x0a }, 1529141cc406Sopenharmony_ci { 0x74, 0x0f }, { 0x75, 0xff }, { 0x76, 0xff }, 1530141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 1531141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 }, { 0x7d, 0x90 }, 1532141cc406Sopenharmony_ci { 0x9e, 0xc0 }, 1533141cc406Sopenharmony_ci { 0xaa, 0x05 }, 1534141cc406Sopenharmony_ci }; 1535141cc406Sopenharmony_ci 1536141cc406Sopenharmony_ci GenesysRegisterSettingSet regs_4800 = { 1537141cc406Sopenharmony_ci { 0x0c, 0x21 }, 1538141cc406Sopenharmony_ci { 0x16, 0x3b }, { 0x17, 0x0c }, { 0x18, 0x10 }, { 0x19, 0x2a }, 1539141cc406Sopenharmony_ci { 0x1a, 0x38 }, { 0x1b, 0x10 }, { 0x1c, 0xc1 }, { 0x1d, 0x08 }, 1540141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x05 }, { 0x54, 0x08 }, { 0x55, 0x0b }, { 0x56, 0x0e }, 1541141cc406Sopenharmony_ci { 0x57, 0x11 }, { 0x58, 0x1b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1542141cc406Sopenharmony_ci { 0x70, 0x08 }, { 0x71, 0x0a }, 1543141cc406Sopenharmony_ci { 0x74, 0x0f }, { 0x75, 0xff }, { 0x76, 0xff }, 1544141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 1545141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 }, { 0x7d, 0x90 }, 1546141cc406Sopenharmony_ci { 0x9e, 0xc0 }, 1547141cc406Sopenharmony_ci { 0xaa, 0x07 }, 1548141cc406Sopenharmony_ci }; 1549141cc406Sopenharmony_ci 1550141cc406Sopenharmony_ci GenesysRegisterSettingSet regs_ta_any = { 1551141cc406Sopenharmony_ci { 0x0c, 0x00 }, 1552141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x4c }, { 0x18, 0x01 }, { 0x19, 0x2a }, 1553141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x08 }, 1554141cc406Sopenharmony_ci { 0x52, 0x0e }, { 0x53, 0x11 }, { 0x54, 0x02 }, { 0x55, 0x05 }, { 0x56, 0x08 }, 1555141cc406Sopenharmony_ci { 0x57, 0x0b }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0xc0 }, 1556141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, 1557141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x1c }, { 0x76, 0x7f }, 1558141cc406Sopenharmony_ci { 0x77, 0x03 }, { 0x78, 0xff }, { 0x79, 0xff }, 1559141cc406Sopenharmony_ci { 0x7a, 0x03 }, { 0x7b, 0xff }, { 0x7c, 0xff }, { 0x7d, 0x90 }, 1560141cc406Sopenharmony_ci { 0x9e, 0x00 }, 1561141cc406Sopenharmony_ci { 0xaa, 0x00 }, 1562141cc406Sopenharmony_ci }; 1563141cc406Sopenharmony_ci 1564141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 1565141cc406Sopenharmony_ci { { 100 }, 600, 100, 8016, ScanMethod::FLATBED, Ratio{1, 8}, 1, 1566141cc406Sopenharmony_ci StaggerConfig{}, regs_100_to_600 }, 1567141cc406Sopenharmony_ci { { 150 }, 600, 150, 8016, ScanMethod::FLATBED, Ratio{1, 8}, 1, 1568141cc406Sopenharmony_ci StaggerConfig{}, regs_100_to_600 }, 1569141cc406Sopenharmony_ci { { 200 }, 600, 200, 8016, ScanMethod::FLATBED, Ratio{1, 8}, 2, 1570141cc406Sopenharmony_ci StaggerConfig{}, regs_100_to_600 }, 1571141cc406Sopenharmony_ci { { 300 }, 600, 300, 8016, ScanMethod::FLATBED, Ratio{1, 8}, 3, 1572141cc406Sopenharmony_ci StaggerConfig{}, regs_100_to_600 }, 1573141cc406Sopenharmony_ci { { 400 }, 600, 400, 8016, ScanMethod::FLATBED, Ratio{1, 8}, 4, 1574141cc406Sopenharmony_ci StaggerConfig{}, regs_100_to_600 }, 1575141cc406Sopenharmony_ci { { 600 }, 600, 600, 8016, ScanMethod::FLATBED, Ratio{1, 8}, 7, 1576141cc406Sopenharmony_ci StaggerConfig{}, regs_100_to_600 }, 1577141cc406Sopenharmony_ci { { 1200 }, 1200, 1200, 56064, ScanMethod::FLATBED, Ratio{1, 4}, 14, 1578141cc406Sopenharmony_ci StaggerConfig{}, regs_1200 }, 1579141cc406Sopenharmony_ci { { 2400 }, 2400, 2400, 56064, ScanMethod::FLATBED, Ratio{1, 2}, 29, 1580141cc406Sopenharmony_ci StaggerConfig{4, 0}, regs_2400 }, 1581141cc406Sopenharmony_ci { { 4800 }, 4800, 4800, 42752, ScanMethod::FLATBED, Ratio{1, 1}, 58, 1582141cc406Sopenharmony_ci StaggerConfig{8, 0}, regs_4800 }, 1583141cc406Sopenharmony_ci { { 100, 150, 200, 300, 400, 600, 1200 }, 600, 600, 15624, ScanMethod::TRANSPARENCY, 1584141cc406Sopenharmony_ci Ratio{1, 1}, 58, StaggerConfig{}, regs_ta_any }, // FIXME: may be incorrect 1585141cc406Sopenharmony_ci { { 2400 }, 600, 600, 15624, ScanMethod::TRANSPARENCY, 1586141cc406Sopenharmony_ci Ratio{1, 1}, 58, StaggerConfig{4, 0}, regs_ta_any }, // FIXME: may be incorrect 1587141cc406Sopenharmony_ci { { 4800 }, 600, 600, 15624, ScanMethod::TRANSPARENCY, 1588141cc406Sopenharmony_ci Ratio{1, 1}, 58, StaggerConfig{8, 0}, regs_ta_any }, // FIXME: may be incorrect 1589141cc406Sopenharmony_ci }; 1590141cc406Sopenharmony_ci 1591141cc406Sopenharmony_ci auto base_custom_regs = sensor.custom_regs; 1592141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) 1593141cc406Sopenharmony_ci { 1594141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 1595141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 1596141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 1597141cc406Sopenharmony_ci sensor.shading_resolution = setting.register_dpihw; 1598141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 1599141cc406Sopenharmony_ci sensor.method = setting.method; 1600141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 1601141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 1602141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 1603141cc406Sopenharmony_ci sensor.custom_regs = base_custom_regs; 1604141cc406Sopenharmony_ci sensor.custom_regs.merge(setting.extra_custom_regs); 1605141cc406Sopenharmony_ci s_sensors->push_back(sensor); 1606141cc406Sopenharmony_ci } 1607141cc406Sopenharmony_ci } 1608141cc406Sopenharmony_ci 1609141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 1610141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_HP_4850C; // gl843 1611141cc406Sopenharmony_ci sensor.full_resolution = 4800; 1612141cc406Sopenharmony_ci sensor.black_pixels = 100; 1613141cc406Sopenharmony_ci sensor.dummy_pixel = 58; 1614141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 160; 1615141cc406Sopenharmony_ci sensor.gain_white_ref = 160; 1616141cc406Sopenharmony_ci sensor.exposure = { 0x2c09, 0x22b8, 0x10f0 }; 1617141cc406Sopenharmony_ci sensor.custom_regs = {}; 1618141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 1619141cc406Sopenharmony_ci 1620141cc406Sopenharmony_ci { 1621141cc406Sopenharmony_ci struct CustomSensorSettings { 1622141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 1623141cc406Sopenharmony_ci unsigned register_dpihw; 1624141cc406Sopenharmony_ci unsigned register_dpiset; 1625141cc406Sopenharmony_ci int exposure_lperiod; 1626141cc406Sopenharmony_ci ScanMethod method; 1627141cc406Sopenharmony_ci Ratio pixel_count_ratio; 1628141cc406Sopenharmony_ci int output_pixel_offset; 1629141cc406Sopenharmony_ci int shading_pixel_offset; 1630141cc406Sopenharmony_ci StaggerConfig stagger_y; // FIXME: review, may be incorrect 1631141cc406Sopenharmony_ci GenesysRegisterSettingSet extra_custom_regs; 1632141cc406Sopenharmony_ci }; 1633141cc406Sopenharmony_ci 1634141cc406Sopenharmony_ci GenesysRegisterSettingSet regs_100_to_600 = { 1635141cc406Sopenharmony_ci { 0x0c, 0x00 }, 1636141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0x2a }, 1637141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x08 }, 1638141cc406Sopenharmony_ci { 0x52, 0x0b }, { 0x53, 0x0e }, { 0x54, 0x11 }, { 0x55, 0x02 }, 1639141cc406Sopenharmony_ci { 0x56, 0x05 }, { 0x57, 0x08 }, { 0x58, 0x63 }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1640141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, 1641141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x01 }, { 0x76, 0xff }, 1642141cc406Sopenharmony_ci { 0x77, 0x03 }, { 0x78, 0xff }, { 0x79, 0xff }, 1643141cc406Sopenharmony_ci { 0x7a, 0x03 }, { 0x7b, 0xff }, { 0x7c, 0xff }, { 0x7d, 0x90 }, 1644141cc406Sopenharmony_ci { 0x9e, 0x00 }, 1645141cc406Sopenharmony_ci { 0xaa, 0x00 }, 1646141cc406Sopenharmony_ci }; 1647141cc406Sopenharmony_ci GenesysRegisterSettingSet regs_1200 = { 1648141cc406Sopenharmony_ci { 0x0c, 0x20 }, 1649141cc406Sopenharmony_ci { 0x16, 0x3b }, { 0x17, 0x0c }, { 0x18, 0x10 }, { 0x19, 0x2a }, 1650141cc406Sopenharmony_ci { 0x1a, 0x38 }, { 0x1b, 0x10 }, { 0x1c, 0x00 }, { 0x1d, 0x08 }, 1651141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x05 }, { 0x54, 0x08 }, { 0x55, 0x0b }, 1652141cc406Sopenharmony_ci { 0x56, 0x0e }, { 0x57, 0x11 }, { 0x58, 0x1b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1653141cc406Sopenharmony_ci { 0x70, 0x08 }, { 0x71, 0x0c }, 1654141cc406Sopenharmony_ci { 0x74, 0x0f }, { 0x75, 0xff }, { 0x76, 0xff }, 1655141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x01 }, { 0x79, 0xff }, 1656141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x01 }, { 0x7c, 0xff }, { 0x7d, 0x90 }, 1657141cc406Sopenharmony_ci { 0x9e, 0xc0 }, 1658141cc406Sopenharmony_ci { 0xaa, 0x05 }, 1659141cc406Sopenharmony_ci }; 1660141cc406Sopenharmony_ci GenesysRegisterSettingSet regs_2400 = { 1661141cc406Sopenharmony_ci { 0x0c, 0x20 }, 1662141cc406Sopenharmony_ci { 0x16, 0x3b }, { 0x17, 0x0c }, { 0x18, 0x10 }, { 0x19, 0x2a }, 1663141cc406Sopenharmony_ci { 0x1a, 0x38 }, { 0x1b, 0x10 }, { 0x1c, 0xc0 }, { 0x1d, 0x08 }, 1664141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x05 }, { 0x54, 0x08 }, { 0x55, 0x0b }, 1665141cc406Sopenharmony_ci { 0x56, 0x0e }, { 0x57, 0x11 }, { 0x58, 0x1b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1666141cc406Sopenharmony_ci { 0x70, 0x08 }, { 0x71, 0x0a }, 1667141cc406Sopenharmony_ci { 0x74, 0x0f }, { 0x75, 0xff }, { 0x76, 0xff }, 1668141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 1669141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 }, { 0x7d, 0x90 }, 1670141cc406Sopenharmony_ci { 0x9e, 0xc0 }, 1671141cc406Sopenharmony_ci { 0xaa, 0x05 }, 1672141cc406Sopenharmony_ci }; 1673141cc406Sopenharmony_ci GenesysRegisterSettingSet regs_4800 = { 1674141cc406Sopenharmony_ci { 0x0c, 0x21 }, 1675141cc406Sopenharmony_ci { 0x16, 0x3b }, { 0x17, 0x0c }, { 0x18, 0x10 }, { 0x19, 0x2a }, 1676141cc406Sopenharmony_ci { 0x1a, 0x38 }, { 0x1b, 0x10 }, { 0x1c, 0xc1 }, { 0x1d, 0x08 }, 1677141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x05 }, { 0x54, 0x08 }, { 0x55, 0x0b }, 1678141cc406Sopenharmony_ci { 0x56, 0x0e }, { 0x57, 0x11 }, { 0x58, 0x1b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1679141cc406Sopenharmony_ci { 0x70, 0x08 }, { 0x71, 0x0a }, 1680141cc406Sopenharmony_ci { 0x74, 0x0f }, { 0x75, 0xff }, { 0x76, 0xff }, 1681141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 1682141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 }, { 0x7d, 0x90 }, 1683141cc406Sopenharmony_ci { 0x9e, 0xc0 }, 1684141cc406Sopenharmony_ci { 0xaa, 0x07 }, 1685141cc406Sopenharmony_ci }; 1686141cc406Sopenharmony_ci GenesysRegisterSettingSet regs_ta_any = { 1687141cc406Sopenharmony_ci { 0x0c, 0x00 }, 1688141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x4c }, { 0x18, 0x01 }, { 0x19, 0x2a }, 1689141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x08 }, 1690141cc406Sopenharmony_ci { 0x52, 0x0e }, { 0x53, 0x11 }, { 0x54, 0x02 }, { 0x55, 0x05 }, 1691141cc406Sopenharmony_ci { 0x56, 0x08 }, { 0x57, 0x0b }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0xc0 }, 1692141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, 1693141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x1c }, { 0x76, 0x7f }, 1694141cc406Sopenharmony_ci { 0x77, 0x03 }, { 0x78, 0xff }, { 0x79, 0xff }, 1695141cc406Sopenharmony_ci { 0x7a, 0x03 }, { 0x7b, 0xff }, { 0x7c, 0xff }, { 0x7d, 0x90 }, 1696141cc406Sopenharmony_ci { 0x9e, 0x00 }, 1697141cc406Sopenharmony_ci { 0xaa, 0x00 }, 1698141cc406Sopenharmony_ci }; 1699141cc406Sopenharmony_ci 1700141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 1701141cc406Sopenharmony_ci { { 100 }, 600, 100, 8016, ScanMethod::FLATBED, Ratio{1, 8}, 1, 50, StaggerConfig{}, 1702141cc406Sopenharmony_ci regs_100_to_600 }, 1703141cc406Sopenharmony_ci { { 150 }, 600, 150, 8016, ScanMethod::FLATBED, Ratio{1, 8}, 1, 50, StaggerConfig{}, 1704141cc406Sopenharmony_ci regs_100_to_600 }, 1705141cc406Sopenharmony_ci { { 200 }, 600, 200, 8016, ScanMethod::FLATBED, Ratio{1, 8}, 2, 50, StaggerConfig{}, 1706141cc406Sopenharmony_ci regs_100_to_600 }, 1707141cc406Sopenharmony_ci { { 300 }, 600, 300, 8016, ScanMethod::FLATBED, Ratio{1, 8}, 3, 50, StaggerConfig{}, 1708141cc406Sopenharmony_ci regs_100_to_600 }, 1709141cc406Sopenharmony_ci { { 400 }, 600, 400, 8016, ScanMethod::FLATBED, Ratio{1, 8}, 4, 50, StaggerConfig{}, 1710141cc406Sopenharmony_ci regs_100_to_600 }, 1711141cc406Sopenharmony_ci { { 600 }, 600, 600, 8016, ScanMethod::FLATBED, Ratio{1, 8}, 7, 50, StaggerConfig{}, 1712141cc406Sopenharmony_ci regs_100_to_600 }, 1713141cc406Sopenharmony_ci { { 1200 }, 1200, 1200, 56064, ScanMethod::FLATBED, Ratio{1, 4}, 14, 0, 1714141cc406Sopenharmony_ci StaggerConfig{}, regs_1200 }, 1715141cc406Sopenharmony_ci { { 2400 }, 2400, 2400, 56064, ScanMethod::FLATBED, Ratio{1, 2}, 29, 0, 1716141cc406Sopenharmony_ci StaggerConfig{0, 4}, regs_2400 }, 1717141cc406Sopenharmony_ci { { 4800 }, 4800, 4800, 42752, ScanMethod::FLATBED, Ratio{1, 1}, 58, 0, 1718141cc406Sopenharmony_ci StaggerConfig{0, 8}, regs_4800 }, 1719141cc406Sopenharmony_ci { { 100, 150, 200, 300, 400, 600, 1200}, 600, 600, 15624, ScanMethod::TRANSPARENCY, 1720141cc406Sopenharmony_ci Ratio{1, 1}, 58, 0, StaggerConfig{}, regs_ta_any }, // FIXME: review 1721141cc406Sopenharmony_ci { { 2400 }, 600, 600, 15624, ScanMethod::TRANSPARENCY, 1722141cc406Sopenharmony_ci Ratio{1, 1}, 58, 0, StaggerConfig{0, 4}, regs_ta_any }, // FIXME: review 1723141cc406Sopenharmony_ci { { 4800 }, 600, 600, 15624, ScanMethod::TRANSPARENCY, 1724141cc406Sopenharmony_ci Ratio{1, 1}, 58, 0, StaggerConfig{0, 8}, regs_ta_any }, // FIXME: review 1725141cc406Sopenharmony_ci }; 1726141cc406Sopenharmony_ci 1727141cc406Sopenharmony_ci auto base_custom_regs = sensor.custom_regs; 1728141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) 1729141cc406Sopenharmony_ci { 1730141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 1731141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 1732141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 1733141cc406Sopenharmony_ci sensor.shading_resolution = setting.register_dpihw; 1734141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 1735141cc406Sopenharmony_ci sensor.method = setting.method; 1736141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 1737141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 1738141cc406Sopenharmony_ci sensor.shading_pixel_offset = setting.shading_pixel_offset; 1739141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 1740141cc406Sopenharmony_ci sensor.custom_regs = base_custom_regs; 1741141cc406Sopenharmony_ci sensor.custom_regs.merge(setting.extra_custom_regs); 1742141cc406Sopenharmony_ci s_sensors->push_back(sensor); 1743141cc406Sopenharmony_ci } 1744141cc406Sopenharmony_ci } 1745141cc406Sopenharmony_ci 1746141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 1747141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_CANON_4400F; // gl843 1748141cc406Sopenharmony_ci sensor.full_resolution = 4800; 1749141cc406Sopenharmony_ci sensor.register_dpihw = 4800; 1750141cc406Sopenharmony_ci sensor.black_pixels = 50*8; 1751141cc406Sopenharmony_ci // 31 at 600 dpi, 58 at 1200 dpi 1752141cc406Sopenharmony_ci sensor.dummy_pixel = 20; 1753141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 160; 1754141cc406Sopenharmony_ci sensor.gain_white_ref = 160; 1755141cc406Sopenharmony_ci sensor.exposure = { 0x9c40, 0x9c40, 0x9c40 }; 1756141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 1757141cc406Sopenharmony_ci 1758141cc406Sopenharmony_ci { 1759141cc406Sopenharmony_ci struct CustomSensorSettings { 1760141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 1761141cc406Sopenharmony_ci unsigned optical_resolution; 1762141cc406Sopenharmony_ci unsigned register_dpiset; 1763141cc406Sopenharmony_ci int exposure_lperiod; 1764141cc406Sopenharmony_ci bool use_host_side_calib; 1765141cc406Sopenharmony_ci int output_pixel_offset; 1766141cc406Sopenharmony_ci std::vector<ScanMethod> methods; 1767141cc406Sopenharmony_ci StaggerConfig stagger_y; 1768141cc406Sopenharmony_ci GenesysRegisterSettingSet extra_custom_regs; 1769141cc406Sopenharmony_ci GenesysRegisterSettingSet extra_custom_fe_regs; 1770141cc406Sopenharmony_ci }; 1771141cc406Sopenharmony_ci 1772141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 1773141cc406Sopenharmony_ci { { 300 }, 1200, 1200, 11640, false, 197, { ScanMethod::FLATBED }, StaggerConfig{}, { 1774141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x0a }, { 0x18, 0x10 }, { 0x19, 0x2a }, 1775141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x6b }, 1776141cc406Sopenharmony_ci { 0x52, 0x0a }, { 0x53, 0x0d }, { 0x54, 0x00 }, { 0x55, 0x03 }, 1777141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x08 }, { 0x58, 0x5b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1778141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, { 0x72, 0x01 }, { 0x73, 0x03 }, 1779141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0xf8 }, { 0x76, 0x38 }, 1780141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0xfc }, { 0x79, 0x00 }, 1781141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0xa4 }, 1782141cc406Sopenharmony_ci { 0x9e, 0x2d }, 1783141cc406Sopenharmony_ci }, {} 1784141cc406Sopenharmony_ci }, 1785141cc406Sopenharmony_ci { { 600 }, 1200, 2400, 11640, false, 392, { ScanMethod::FLATBED }, StaggerConfig{}, { 1786141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x0a }, { 0x18, 0x10 }, { 0x19, 0x2a }, 1787141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x6b }, 1788141cc406Sopenharmony_ci { 0x52, 0x0a }, { 0x53, 0x0d }, { 0x54, 0x00 }, { 0x55, 0x03 }, 1789141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x08 }, { 0x58, 0x5b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1790141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, { 0x72, 0x01 }, { 0x73, 0x03 }, 1791141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0xf8 }, { 0x76, 0x38 }, 1792141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0xfc }, { 0x79, 0x00 }, 1793141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0xa4 }, 1794141cc406Sopenharmony_ci { 0x9e, 0x2d }, 1795141cc406Sopenharmony_ci }, {} 1796141cc406Sopenharmony_ci }, 1797141cc406Sopenharmony_ci { { 1200 }, 1200, 4800, 11640, false, 794, { ScanMethod::FLATBED }, StaggerConfig{}, { 1798141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x0a }, { 0x18, 0x10 }, { 0x19, 0x2a }, 1799141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x6b }, 1800141cc406Sopenharmony_ci { 0x52, 0x0a }, { 0x53, 0x0d }, { 0x54, 0x00 }, { 0x55, 0x03 }, 1801141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x08 }, { 0x58, 0x5b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1802141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, { 0x72, 0x01 }, { 0x73, 0x03 }, 1803141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0xf8 }, { 0x76, 0x38 }, 1804141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0xfc }, { 0x79, 0x00 }, 1805141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0xa4 }, 1806141cc406Sopenharmony_ci { 0x9e, 0x2d }, 1807141cc406Sopenharmony_ci }, {} 1808141cc406Sopenharmony_ci }, 1809141cc406Sopenharmony_ci { { 1200 }, 1200, 4800, 33300, true, 5, { ScanMethod::TRANSPARENCY }, 1810141cc406Sopenharmony_ci StaggerConfig{}, { 1811141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x0a }, { 0x18, 0x10 }, { 0x19, 0x2a }, 1812141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x6b }, 1813141cc406Sopenharmony_ci { 0x52, 0x0a }, { 0x53, 0x0d }, { 0x54, 0x00 }, { 0x55, 0x03 }, 1814141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x08 }, { 0x58, 0x5b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1815141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, { 0x72, 0x00 }, { 0x73, 0x02 }, 1816141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0xf8 }, { 0x76, 0x38 }, 1817141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0xfc }, { 0x79, 0x00 }, 1818141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0xa4 }, 1819141cc406Sopenharmony_ci { 0x9e, 0x2d }, 1820141cc406Sopenharmony_ci }, {} 1821141cc406Sopenharmony_ci }, 1822141cc406Sopenharmony_ci { { 2400 }, 2400, 4800, 33300, true, 10, { ScanMethod::TRANSPARENCY }, 1823141cc406Sopenharmony_ci StaggerConfig{}, { 1824141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x15 }, { 0x18, 0x10 }, { 0x19, 0x2a }, 1825141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x01 }, { 0x1d, 0x75 }, 1826141cc406Sopenharmony_ci { 0x52, 0x0b }, { 0x53, 0x0d }, { 0x54, 0x00 }, { 0x55, 0x03 }, 1827141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x09 }, { 0x58, 0x53 }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1828141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, { 0x72, 0x02 }, { 0x73, 0x04 }, 1829141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0xff }, { 0x76, 0x00 }, 1830141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0xff }, { 0x79, 0x00 }, 1831141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x54 }, { 0x7c, 0x92 }, 1832141cc406Sopenharmony_ci { 0x9e, 0x2d }, 1833141cc406Sopenharmony_ci }, { 1834141cc406Sopenharmony_ci { 0x03, 0x1f }, 1835141cc406Sopenharmony_ci } 1836141cc406Sopenharmony_ci }, 1837141cc406Sopenharmony_ci { { 4800 }, 4800, 4800, 33300, true, -2063, { ScanMethod::TRANSPARENCY }, 1838141cc406Sopenharmony_ci StaggerConfig{0, 8}, { 1839141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x15 }, { 0x18, 0x10 }, { 0x19, 0x2a }, 1840141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x61 }, { 0x1d, 0x75 }, 1841141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x05 }, { 0x54, 0x08 }, { 0x55, 0x0b }, 1842141cc406Sopenharmony_ci { 0x56, 0x0d }, { 0x57, 0x0f }, { 0x58, 0x1b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 1843141cc406Sopenharmony_ci { 0x70, 0x08 }, { 0x71, 0x0a }, { 0x72, 0x0a }, { 0x73, 0x0c }, 1844141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0xff }, { 0x76, 0xff }, 1845141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0xff }, { 0x79, 0xff }, 1846141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x54 }, { 0x7c, 0x92 }, 1847141cc406Sopenharmony_ci { 0x9e, 0x2d }, 1848141cc406Sopenharmony_ci }, {} 1849141cc406Sopenharmony_ci } 1850141cc406Sopenharmony_ci }; 1851141cc406Sopenharmony_ci 1852141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) 1853141cc406Sopenharmony_ci { 1854141cc406Sopenharmony_ci for (auto method : setting.methods) { 1855141cc406Sopenharmony_ci for (auto resolution : setting.resolutions.values()) { 1856141cc406Sopenharmony_ci sensor.resolutions = { resolution }; 1857141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 1858141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 1859141cc406Sopenharmony_ci sensor.shading_resolution = resolution; 1860141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 1861141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 1862141cc406Sopenharmony_ci sensor.use_host_side_calib = setting.use_host_side_calib; 1863141cc406Sopenharmony_ci sensor.method = method; 1864141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 1865141cc406Sopenharmony_ci sensor.custom_regs = setting.extra_custom_regs; 1866141cc406Sopenharmony_ci sensor.custom_fe_regs = setting.extra_custom_fe_regs; 1867141cc406Sopenharmony_ci s_sensors->push_back(sensor); 1868141cc406Sopenharmony_ci } 1869141cc406Sopenharmony_ci } 1870141cc406Sopenharmony_ci } 1871141cc406Sopenharmony_ci } 1872141cc406Sopenharmony_ci 1873141cc406Sopenharmony_ci 1874141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 1875141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_CANON_5600F; // gl847 1876141cc406Sopenharmony_ci sensor.full_resolution = 4800; 1877141cc406Sopenharmony_ci sensor.register_dpihw = 4800; 1878141cc406Sopenharmony_ci sensor.black_pixels = 50*8; 1879141cc406Sopenharmony_ci sensor.dummy_pixel = 10; 1880141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 160; 1881141cc406Sopenharmony_ci sensor.gain_white_ref = 160; 1882141cc406Sopenharmony_ci sensor.exposure = { 0x9c40, 0x9c40, 0x9c40 }; 1883141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 1884141cc406Sopenharmony_ci sensor.use_host_side_calib = true; 1885141cc406Sopenharmony_ci { 1886141cc406Sopenharmony_ci struct CustomSensorSettings { 1887141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 1888141cc406Sopenharmony_ci unsigned optical_resolution; 1889141cc406Sopenharmony_ci unsigned register_dpihw; 1890141cc406Sopenharmony_ci unsigned register_dpiset; 1891141cc406Sopenharmony_ci int exposure_lperiod; 1892141cc406Sopenharmony_ci SensorExposure exposure; 1893141cc406Sopenharmony_ci Ratio pixel_count_ratio; 1894141cc406Sopenharmony_ci int output_pixel_offset; 1895141cc406Sopenharmony_ci unsigned segment_size; 1896141cc406Sopenharmony_ci std::vector<unsigned> segment_order; 1897141cc406Sopenharmony_ci StaggerConfig stagger_x; 1898141cc406Sopenharmony_ci StaggerConfig stagger_y; 1899141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_regs; 1900141cc406Sopenharmony_ci }; 1901141cc406Sopenharmony_ci 1902141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 1903141cc406Sopenharmony_ci { { 150 }, 2400, 600, 300, 4288, { 3983/2, 3983/2, 3983/2 }, Ratio{1, 8}, 10, 1904141cc406Sopenharmony_ci 5418, std::vector<unsigned>{}, StaggerConfig{}, StaggerConfig{}, { 1905141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x06 }, { 0x18, 0x00 }, { 0x19, 0x2a }, 1906141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x10 }, { 0x1c, 0x08 }, { 0x1d, 0x02 }, 1907141cc406Sopenharmony_ci { 0x52, 0x0e }, { 0x53, 0x00 }, { 0x54, 0x02 }, { 0x55, 0x04 }, 1908141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x08 }, { 0x58, 0x52 }, { 0x59, 0x3a }, { 0x5a, 0x40 }, 1909141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x33 }, { 0x76, 0x33 }, 1910141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 1911141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, { 0x87, 0x00 }, 1912141cc406Sopenharmony_ci } 1913141cc406Sopenharmony_ci }, 1914141cc406Sopenharmony_ci { { 300 }, 2400, 600, 600, 5472, { 4558/2, 4558/2, 4558/2 }, Ratio{1, 8}, 110, 1915141cc406Sopenharmony_ci 5418, std::vector<unsigned>{}, StaggerConfig{}, StaggerConfig{}, { 1916141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x06 }, { 0x18, 0x00 }, { 0x19, 0x2a }, 1917141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x10 }, { 0x1c, 0x08 }, { 0x1d, 0x02 }, 1918141cc406Sopenharmony_ci { 0x52, 0x0e }, { 0x53, 0x00 }, { 0x54, 0x02 }, { 0x55, 0x04 }, 1919141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x08 }, { 0x58, 0x52 }, { 0x59, 0x3a }, { 0x5a, 0x40 }, 1920141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x33 }, { 0x76, 0x33 }, 1921141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 1922141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, { 0x87, 0x00 }, 1923141cc406Sopenharmony_ci } 1924141cc406Sopenharmony_ci }, 1925141cc406Sopenharmony_ci { { 600 }, 2400, 600, 600, 10944, { 8701/2, 8701/2, 8701/2 }, Ratio{1, 4}, 155, 1926141cc406Sopenharmony_ci 5418, std::vector<unsigned>{}, StaggerConfig{}, StaggerConfig{}, { 1927141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x06 }, { 0x18, 0x00 }, { 0x19, 0x2a }, 1928141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x10 }, { 0x1c, 0x08 }, { 0x1d, 0x02 }, 1929141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x04 }, { 0x54, 0x06 }, { 0x55, 0x08 }, 1930141cc406Sopenharmony_ci { 0x56, 0x0a }, { 0x57, 0x0c }, { 0x58, 0x72 }, { 0x59, 0x5a }, { 0x5a, 0x40 }, 1931141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x33 }, { 0x76, 0x33 }, 1932141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 1933141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, { 0x87, 0x00 }, 1934141cc406Sopenharmony_ci } 1935141cc406Sopenharmony_ci }, 1936141cc406Sopenharmony_ci { { 1200 }, 2400, 1200, 1200, 29120, { 17120/2, 17120/2, 17120/2 }, Ratio{1, 2}, 295, 1937141cc406Sopenharmony_ci 5418, { 1, 0 }, StaggerConfig{}, StaggerConfig{}, { 1938141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x06 }, { 0x18, 0x00 }, { 0x19, 0x2a }, 1939141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x10 }, { 0x1c, 0x08 }, { 0x1d, 0x02 }, 1940141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x04 }, { 0x54, 0x06 }, { 0x55, 0x08 }, 1941141cc406Sopenharmony_ci { 0x56, 0x0a }, { 0x57, 0x0c }, { 0x58, 0x72 }, { 0x59, 0x5a }, { 0x5a, 0x40 }, 1942141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x33 }, { 0x76, 0x33 }, 1943141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 1944141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, { 0x87, 0x00 }, 1945141cc406Sopenharmony_ci } 1946141cc406Sopenharmony_ci }, 1947141cc406Sopenharmony_ci { { 2400 }, 2400, 2400, 2400, 43776, { 36725/2, 36725/2, 36725/2 }, Ratio{1, 1}, 600, 1948141cc406Sopenharmony_ci 5418, { 0, 1, 2, 3 }, 1949141cc406Sopenharmony_ci StaggerConfig{10, 15, 4, 9, 14, 19, 8, 13}, StaggerConfig{}, { 1950141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x06 }, { 0x18, 0x00 }, { 0x19, 0x2a }, 1951141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x10 }, { 0x1c, 0x08 }, { 0x1d, 0x02 }, 1952141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x04 }, { 0x54, 0x06 }, { 0x55, 0x08 }, 1953141cc406Sopenharmony_ci { 0x56, 0x0a }, { 0x57, 0x0c }, { 0x58, 0x72 }, { 0x59, 0x5a }, { 0x5a, 0x40 }, 1954141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x33 }, { 0x76, 0x33 }, 1955141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 1956141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, { 0x87, 0x00 }, 1957141cc406Sopenharmony_ci } 1958141cc406Sopenharmony_ci }, 1959141cc406Sopenharmony_ci { { 4800 }, 4800, 4800, 4800, 43776, { 36725/2, 36725/2, 36725/2 }, Ratio{1, 1}, 1000, 1960141cc406Sopenharmony_ci 10784, { 0, 1, 2, 3 }, 1961141cc406Sopenharmony_ci StaggerConfig{5, 9, 6, 10, 3, 7, 16, 20, 13, 17, 14, 18, 11, 15, 24, 28}, 1962141cc406Sopenharmony_ci StaggerConfig{6, 0}, { 1963141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x06 }, { 0x18, 0x00 }, { 0x19, 0x2a }, 1964141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x10 }, { 0x1c, 0x08 }, { 0x1d, 0x02 }, 1965141cc406Sopenharmony_ci { 0x52, 0x0a }, { 0x53, 0x0c }, { 0x54, 0x0e }, { 0x55, 0x00 }, 1966141cc406Sopenharmony_ci { 0x56, 0x02 }, { 0x57, 0x04 }, { 0x58, 0x32 }, { 0x59, 0x1a }, { 0x5a, 0x40 }, 1967141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x33 }, { 0x76, 0x33 }, 1968141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 1969141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, { 0x87, 0x00 }, 1970141cc406Sopenharmony_ci } 1971141cc406Sopenharmony_ci } 1972141cc406Sopenharmony_ci }; 1973141cc406Sopenharmony_ci 1974141cc406Sopenharmony_ci for (const auto& setting : custom_settings) { 1975141cc406Sopenharmony_ci for (auto method : { ScanMethod::FLATBED, ScanMethod::TRANSPARENCY }) { 1976141cc406Sopenharmony_ci sensor.method = method; 1977141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 1978141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 1979141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 1980141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 1981141cc406Sopenharmony_ci sensor.shading_resolution = setting.resolutions.values().front(); 1982141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 1983141cc406Sopenharmony_ci sensor.exposure = setting.exposure; 1984141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 1985141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 1986141cc406Sopenharmony_ci sensor.segment_size = setting.segment_size; 1987141cc406Sopenharmony_ci sensor.segment_order = setting.segment_order; 1988141cc406Sopenharmony_ci sensor.stagger_x = setting.stagger_x; 1989141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 1990141cc406Sopenharmony_ci sensor.custom_regs = setting.custom_regs; 1991141cc406Sopenharmony_ci s_sensors->push_back(sensor); 1992141cc406Sopenharmony_ci } 1993141cc406Sopenharmony_ci } 1994141cc406Sopenharmony_ci } 1995141cc406Sopenharmony_ci 1996141cc406Sopenharmony_ci 1997141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 1998141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_CANON_8400F; // gl843 1999141cc406Sopenharmony_ci sensor.full_resolution = 3200; 2000141cc406Sopenharmony_ci sensor.register_dpihw = 4800; 2001141cc406Sopenharmony_ci sensor.black_pixels = 50*8; 2002141cc406Sopenharmony_ci // 31 at 600 dpi, 58 at 1200 dpi 2003141cc406Sopenharmony_ci sensor.dummy_pixel = 20; 2004141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 160; 2005141cc406Sopenharmony_ci sensor.gain_white_ref = 160; 2006141cc406Sopenharmony_ci sensor.exposure = { 0x9c40, 0x9c40, 0x9c40 }; 2007141cc406Sopenharmony_ci sensor.custom_regs = {}; 2008141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 2009141cc406Sopenharmony_ci 2010141cc406Sopenharmony_ci { 2011141cc406Sopenharmony_ci struct CustomSensorSettings { 2012141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 2013141cc406Sopenharmony_ci unsigned register_dpiset; 2014141cc406Sopenharmony_ci Ratio pixel_count_ratio; 2015141cc406Sopenharmony_ci int exposure_lperiod; 2016141cc406Sopenharmony_ci int output_pixel_offset; 2017141cc406Sopenharmony_ci int shading_pixel_offset; 2018141cc406Sopenharmony_ci std::vector<ScanMethod> methods; 2019141cc406Sopenharmony_ci StaggerConfig stagger_y; 2020141cc406Sopenharmony_ci GenesysRegisterSettingSet extra_custom_regs; 2021141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_fe_regs; 2022141cc406Sopenharmony_ci }; 2023141cc406Sopenharmony_ci 2024141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 2025141cc406Sopenharmony_ci { { 400 }, 2400, Ratio{1, 4}, 7200, 2, 0, { ScanMethod::FLATBED }, 2026141cc406Sopenharmony_ci StaggerConfig{}, { 2027141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x0c }, { 0x18, 0x13 }, { 0x19, 0x2a }, 2028141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x84 }, { 0x1e, 0xa0 }, 2029141cc406Sopenharmony_ci { 0x52, 0x0d }, { 0x53, 0x10 }, { 0x54, 0x01 }, { 0x55, 0x04 }, 2030141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0a }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2031141cc406Sopenharmony_ci { 0x70, 0x01 }, { 0x71, 0x02 }, { 0x72, 0x03 }, { 0x73, 0x04 }, 2032141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x0e }, { 0x76, 0x3f }, 2033141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2034141cc406Sopenharmony_ci { 0x7a, 0x01 }, { 0x7b, 0xb6 }, { 0x7c, 0xdb }, 2035141cc406Sopenharmony_ci { 0x80, 0x2a }, 2036141cc406Sopenharmony_ci }, {} 2037141cc406Sopenharmony_ci }, 2038141cc406Sopenharmony_ci { { 800 }, 4800, Ratio{1, 4}, 7200, 5, 13, { ScanMethod::FLATBED }, 2039141cc406Sopenharmony_ci StaggerConfig{}, { 2040141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x0c }, { 0x18, 0x13 }, { 0x19, 0x2a }, 2041141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x84 }, { 0x1e, 0xa0 }, 2042141cc406Sopenharmony_ci { 0x52, 0x0d }, { 0x53, 0x10 }, { 0x54, 0x01 }, { 0x55, 0x04 }, 2043141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0a }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2044141cc406Sopenharmony_ci { 0x70, 0x01 }, { 0x71, 0x02 }, { 0x72, 0x03 }, { 0x73, 0x04 }, 2045141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x0e }, { 0x76, 0x3f }, 2046141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2047141cc406Sopenharmony_ci { 0x7a, 0x01 }, { 0x7b, 0xb6 }, { 0x7c, 0xdb }, 2048141cc406Sopenharmony_ci { 0x80, 0x20 }, 2049141cc406Sopenharmony_ci }, {} 2050141cc406Sopenharmony_ci }, 2051141cc406Sopenharmony_ci { { 1600 }, 4800, Ratio{1, 2}, 14400, 10, 8, { ScanMethod::FLATBED }, 2052141cc406Sopenharmony_ci StaggerConfig{}, { 2053141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x0c }, { 0x18, 0x11 }, { 0x19, 0x2a }, 2054141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x84 }, { 0x1e, 0xa1 }, 2055141cc406Sopenharmony_ci { 0x52, 0x0b }, { 0x53, 0x0e }, { 0x54, 0x11 }, { 0x55, 0x02 }, 2056141cc406Sopenharmony_ci { 0x56, 0x05 }, { 0x57, 0x08 }, { 0x58, 0x63 }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2057141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x01 }, { 0x72, 0x02 }, { 0x73, 0x03 }, 2058141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x01 }, { 0x76, 0xff }, 2059141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2060141cc406Sopenharmony_ci { 0x7a, 0x02 }, { 0x7b, 0x49 }, { 0x7c, 0x24 }, 2061141cc406Sopenharmony_ci { 0x80, 0x28 }, 2062141cc406Sopenharmony_ci }, { 2063141cc406Sopenharmony_ci { 0x03, 0x1f }, 2064141cc406Sopenharmony_ci } 2065141cc406Sopenharmony_ci }, 2066141cc406Sopenharmony_ci { { 3200 }, 4800, Ratio{1, 1}, 28800, 20, -2, { ScanMethod::FLATBED }, 2067141cc406Sopenharmony_ci StaggerConfig{0, 6}, { 2068141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x0c }, { 0x18, 0x10 }, { 0x19, 0x2a }, 2069141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x20 }, { 0x1d, 0x84 }, { 0x1e, 0xa1 }, 2070141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x05 }, { 0x54, 0x08 }, { 0x55, 0x0b }, 2071141cc406Sopenharmony_ci { 0x56, 0x0e }, { 0x57, 0x11 }, { 0x58, 0x1b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2072141cc406Sopenharmony_ci { 0x70, 0x09 }, { 0x71, 0x0a }, { 0x72, 0x0b }, { 0x73, 0x0c }, 2073141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x00 }, 2074141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2075141cc406Sopenharmony_ci { 0x7a, 0x02 }, { 0x7b, 0x49 }, { 0x7c, 0x24 }, 2076141cc406Sopenharmony_ci { 0x80, 0x2b }, 2077141cc406Sopenharmony_ci }, { 2078141cc406Sopenharmony_ci { 0x03, 0x1f }, 2079141cc406Sopenharmony_ci }, 2080141cc406Sopenharmony_ci }, 2081141cc406Sopenharmony_ci { { 400 }, 2400, Ratio{1, 4}, 14400, 2, 0, { ScanMethod::TRANSPARENCY, 2082141cc406Sopenharmony_ci ScanMethod::TRANSPARENCY_INFRARED }, 2083141cc406Sopenharmony_ci StaggerConfig{}, { 2084141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x0c }, { 0x18, 0x13 }, { 0x19, 0x2a }, 2085141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x84 }, { 0x1e, 0xa0 }, 2086141cc406Sopenharmony_ci { 0x52, 0x0d }, { 0x53, 0x10 }, { 0x54, 0x01 }, { 0x55, 0x04 }, 2087141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0a }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2088141cc406Sopenharmony_ci { 0x70, 0x01 }, { 0x71, 0x02 }, { 0x72, 0x03 }, { 0x73, 0x04 }, 2089141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x0e }, { 0x76, 0x3f }, 2090141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2091141cc406Sopenharmony_ci { 0x7a, 0x01 }, { 0x7b, 0xb6 }, { 0x7c, 0xdb }, 2092141cc406Sopenharmony_ci { 0x80, 0x20 }, 2093141cc406Sopenharmony_ci }, {} 2094141cc406Sopenharmony_ci }, 2095141cc406Sopenharmony_ci { { 800 }, 4800, Ratio{1, 4}, 14400, 5, 13, { ScanMethod::TRANSPARENCY, 2096141cc406Sopenharmony_ci ScanMethod::TRANSPARENCY_INFRARED }, 2097141cc406Sopenharmony_ci StaggerConfig{}, { 2098141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x0c }, { 0x18, 0x13 }, { 0x19, 0x2a }, 2099141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x84 }, { 0x1e, 0xa0 }, 2100141cc406Sopenharmony_ci { 0x52, 0x0d }, { 0x53, 0x10 }, { 0x54, 0x01 }, { 0x55, 0x04 }, 2101141cc406Sopenharmony_ci { 0x56, 0x07 }, { 0x57, 0x0a }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2102141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x01 }, { 0x72, 0x02 }, { 0x73, 0x03 }, 2103141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x0e }, { 0x76, 0x3f }, 2104141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2105141cc406Sopenharmony_ci { 0x7a, 0x01 }, { 0x7b, 0xb6 }, { 0x7c, 0xdb }, 2106141cc406Sopenharmony_ci { 0x80, 0x20 }, 2107141cc406Sopenharmony_ci }, {} 2108141cc406Sopenharmony_ci }, 2109141cc406Sopenharmony_ci { { 1600 }, 4800, Ratio{1, 2}, 28800, 10, 8, { ScanMethod::TRANSPARENCY, 2110141cc406Sopenharmony_ci ScanMethod::TRANSPARENCY_INFRARED }, 2111141cc406Sopenharmony_ci StaggerConfig{}, { 2112141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x0c }, { 0x18, 0x11 }, { 0x19, 0x2a }, 2113141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x84 }, { 0x1e, 0xa0 }, 2114141cc406Sopenharmony_ci { 0x52, 0x0b }, { 0x53, 0x0e }, { 0x54, 0x11 }, { 0x55, 0x02 }, 2115141cc406Sopenharmony_ci { 0x56, 0x05 }, { 0x57, 0x08 }, { 0x58, 0x63 }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2116141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x01 }, { 0x72, 0x02 }, { 0x73, 0x03 }, 2117141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x01 }, { 0x76, 0xff }, 2118141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2119141cc406Sopenharmony_ci { 0x7a, 0x02 }, { 0x7b, 0x49 }, { 0x7c, 0x24 }, 2120141cc406Sopenharmony_ci { 0x80, 0x29 }, 2121141cc406Sopenharmony_ci }, { 2122141cc406Sopenharmony_ci { 0x03, 0x1f }, 2123141cc406Sopenharmony_ci }, 2124141cc406Sopenharmony_ci }, 2125141cc406Sopenharmony_ci { { 3200 }, 4800, Ratio{1, 1}, 28800, 20, 10, { ScanMethod::TRANSPARENCY, 2126141cc406Sopenharmony_ci ScanMethod::TRANSPARENCY_INFRARED }, 2127141cc406Sopenharmony_ci StaggerConfig{0, 6}, { 2128141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x0c }, { 0x18, 0x10 }, { 0x19, 0x2a }, 2129141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x20 }, { 0x1d, 0x84 }, { 0x1e, 0xa0 }, 2130141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x05 }, { 0x54, 0x08 }, { 0x55, 0x0b }, 2131141cc406Sopenharmony_ci { 0x56, 0x0e }, { 0x57, 0x11 }, { 0x58, 0x1b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2132141cc406Sopenharmony_ci { 0x70, 0x09 }, { 0x71, 0x0a }, { 0x72, 0x0b }, { 0x73, 0x0c }, 2133141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x00 }, 2134141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2135141cc406Sopenharmony_ci { 0x7a, 0x02 }, { 0x7b, 0x49 }, { 0x7c, 0x24 }, 2136141cc406Sopenharmony_ci { 0x80, 0x2b }, 2137141cc406Sopenharmony_ci }, { 2138141cc406Sopenharmony_ci { 0x03, 0x1f }, 2139141cc406Sopenharmony_ci }, 2140141cc406Sopenharmony_ci }, 2141141cc406Sopenharmony_ci }; 2142141cc406Sopenharmony_ci 2143141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) 2144141cc406Sopenharmony_ci { 2145141cc406Sopenharmony_ci for (auto method : setting.methods) 2146141cc406Sopenharmony_ci {for (auto resolution : setting.resolutions.values()) { 2147141cc406Sopenharmony_ci sensor.resolutions = { resolution }; 2148141cc406Sopenharmony_ci sensor.shading_resolution = resolution; 2149141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 2150141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 2151141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 2152141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 2153141cc406Sopenharmony_ci sensor.shading_pixel_offset = setting.shading_pixel_offset; 2154141cc406Sopenharmony_ci sensor.method = method; 2155141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 2156141cc406Sopenharmony_ci sensor.custom_regs = setting.extra_custom_regs; 2157141cc406Sopenharmony_ci sensor.custom_fe_regs = setting.custom_fe_regs; 2158141cc406Sopenharmony_ci s_sensors->push_back(sensor); 2159141cc406Sopenharmony_ci } 2160141cc406Sopenharmony_ci } 2161141cc406Sopenharmony_ci } 2162141cc406Sopenharmony_ci } 2163141cc406Sopenharmony_ci 2164141cc406Sopenharmony_ci 2165141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 2166141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_CANON_8600F; // gl843 2167141cc406Sopenharmony_ci sensor.full_resolution = 4800; 2168141cc406Sopenharmony_ci sensor.register_dpihw = 4800; 2169141cc406Sopenharmony_ci sensor.black_pixels = 31; 2170141cc406Sopenharmony_ci sensor.dummy_pixel = 20; 2171141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 160; 2172141cc406Sopenharmony_ci sensor.gain_white_ref = 160; 2173141cc406Sopenharmony_ci sensor.exposure = { 0x9c40, 0x9c40, 0x9c40 }; 2174141cc406Sopenharmony_ci sensor.custom_regs = {}; 2175141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 2176141cc406Sopenharmony_ci 2177141cc406Sopenharmony_ci { 2178141cc406Sopenharmony_ci struct CustomSensorSettings { 2179141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 2180141cc406Sopenharmony_ci unsigned optical_resolution; 2181141cc406Sopenharmony_ci unsigned register_dpiset; 2182141cc406Sopenharmony_ci int exposure_lperiod; 2183141cc406Sopenharmony_ci int output_pixel_offset; 2184141cc406Sopenharmony_ci std::vector<ScanMethod> methods; 2185141cc406Sopenharmony_ci StaggerConfig stagger_y; 2186141cc406Sopenharmony_ci GenesysRegisterSettingSet extra_custom_regs; 2187141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_fe_regs; 2188141cc406Sopenharmony_ci }; 2189141cc406Sopenharmony_ci 2190141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 2191141cc406Sopenharmony_ci { { 300 }, 1200, 1200, 24000, 1, { ScanMethod::FLATBED }, StaggerConfig{}, { 2192141cc406Sopenharmony_ci { 0x0c, 0x00 }, 2193141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x0a }, { 0x18, 0x10 }, { 0x19, 0x2a }, 2194141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x6b }, 2195141cc406Sopenharmony_ci { 0x52, 0x0c }, { 0x53, 0x0f }, { 0x54, 0x00 }, { 0x55, 0x03 }, 2196141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, { 0x72, 0x02 }, { 0x73, 0x04 }, 2197141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x09 }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2198141cc406Sopenharmony_ci { 0x74, 0x03 }, { 0x75, 0xf0 }, { 0x76, 0xf0 }, 2199141cc406Sopenharmony_ci { 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 }, 2200141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 }, 2201141cc406Sopenharmony_ci { 0x9e, 0x2d }, 2202141cc406Sopenharmony_ci { 0xaa, 0x00 }, 2203141cc406Sopenharmony_ci }, 2204141cc406Sopenharmony_ci {}, 2205141cc406Sopenharmony_ci }, 2206141cc406Sopenharmony_ci { { 600 }, 1200, 2400, 24000, 2, { ScanMethod::FLATBED }, StaggerConfig{}, { 2207141cc406Sopenharmony_ci { 0x0c, 0x00 }, 2208141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x0a }, { 0x18, 0x10 }, { 0x19, 0x2a }, 2209141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x6b }, 2210141cc406Sopenharmony_ci { 0x52, 0x0c }, { 0x53, 0x0f }, { 0x54, 0x00 }, { 0x55, 0x03 }, 2211141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, { 0x72, 0x02 }, { 0x73, 0x04 }, 2212141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x09 }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2213141cc406Sopenharmony_ci { 0x74, 0x03 }, { 0x75, 0xf0 }, { 0x76, 0xf0 }, 2214141cc406Sopenharmony_ci { 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 }, 2215141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 }, 2216141cc406Sopenharmony_ci { 0x9e, 0x2d }, 2217141cc406Sopenharmony_ci { 0xaa, 0x00 }, 2218141cc406Sopenharmony_ci }, 2219141cc406Sopenharmony_ci {}, 2220141cc406Sopenharmony_ci }, 2221141cc406Sopenharmony_ci { { 1200 }, 1200, 4800, 24000, 5, { ScanMethod::FLATBED }, StaggerConfig{}, { 2222141cc406Sopenharmony_ci { 0x0c, 0x00 }, 2223141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x0a }, { 0x18, 0x10 }, { 0x19, 0x2a }, 2224141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x6b }, 2225141cc406Sopenharmony_ci { 0x52, 0x0c }, { 0x53, 0x0f }, { 0x54, 0x00 }, { 0x55, 0x03 }, 2226141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, { 0x72, 0x02 }, { 0x73, 0x04 }, 2227141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x09 }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2228141cc406Sopenharmony_ci { 0x74, 0x03 }, { 0x75, 0xf0 }, { 0x76, 0xf0 }, 2229141cc406Sopenharmony_ci { 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 }, 2230141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 }, 2231141cc406Sopenharmony_ci { 0x9e, 0x2d }, 2232141cc406Sopenharmony_ci { 0xaa, 0x00 }, 2233141cc406Sopenharmony_ci }, 2234141cc406Sopenharmony_ci {}, 2235141cc406Sopenharmony_ci }, 2236141cc406Sopenharmony_ci { { 300 }, 1200, 1200, 45000, 6, { ScanMethod::TRANSPARENCY, 2237141cc406Sopenharmony_ci ScanMethod::TRANSPARENCY_INFRARED }, 2238141cc406Sopenharmony_ci StaggerConfig{}, { 2239141cc406Sopenharmony_ci { 0x0c, 0x00 }, 2240141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x0a }, { 0x18, 0x10 }, { 0x19, 0x2a }, 2241141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x6b }, 2242141cc406Sopenharmony_ci { 0x52, 0x0c }, { 0x53, 0x0f }, { 0x54, 0x00 }, { 0x55, 0x03 }, 2243141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x09 }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2244141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, { 0x72, 0x02 }, { 0x73, 0x04 }, 2245141cc406Sopenharmony_ci { 0x74, 0x03 }, { 0x75, 0xf0 }, { 0x76, 0xf0 }, 2246141cc406Sopenharmony_ci { 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 }, 2247141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 }, 2248141cc406Sopenharmony_ci { 0x9e, 0x2d }, 2249141cc406Sopenharmony_ci { 0xaa, 0x00 }, 2250141cc406Sopenharmony_ci }, 2251141cc406Sopenharmony_ci {}, 2252141cc406Sopenharmony_ci }, 2253141cc406Sopenharmony_ci { { 600 }, 1200, 2400, 45000, 11, { ScanMethod::TRANSPARENCY, 2254141cc406Sopenharmony_ci ScanMethod::TRANSPARENCY_INFRARED }, 2255141cc406Sopenharmony_ci StaggerConfig{}, { 2256141cc406Sopenharmony_ci { 0x0c, 0x00 }, 2257141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x0a }, { 0x18, 0x10 }, { 0x19, 0x2a }, 2258141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x6b }, 2259141cc406Sopenharmony_ci { 0x52, 0x0c }, { 0x53, 0x0f }, { 0x54, 0x00 }, { 0x55, 0x03 }, 2260141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x09 }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2261141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, { 0x72, 0x02 }, { 0x73, 0x04 }, 2262141cc406Sopenharmony_ci { 0x74, 0x03 }, { 0x75, 0xf0 }, { 0x76, 0xf0 }, 2263141cc406Sopenharmony_ci { 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 }, 2264141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 }, 2265141cc406Sopenharmony_ci { 0x9e, 0x2d }, 2266141cc406Sopenharmony_ci { 0xaa, 0x00 }, 2267141cc406Sopenharmony_ci }, 2268141cc406Sopenharmony_ci {}, 2269141cc406Sopenharmony_ci }, 2270141cc406Sopenharmony_ci { { 1200 }, 1200, 4800, 45000, 23, { ScanMethod::TRANSPARENCY, 2271141cc406Sopenharmony_ci ScanMethod::TRANSPARENCY_INFRARED }, 2272141cc406Sopenharmony_ci StaggerConfig{}, { 2273141cc406Sopenharmony_ci { 0x0c, 0x00 }, 2274141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x0a }, { 0x18, 0x10 }, { 0x19, 0x2a }, 2275141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x6b }, 2276141cc406Sopenharmony_ci { 0x52, 0x0c }, { 0x53, 0x0f }, { 0x54, 0x00 }, { 0x55, 0x03 }, 2277141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x09 }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2278141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, { 0x72, 0x02 }, { 0x73, 0x04 }, 2279141cc406Sopenharmony_ci { 0x74, 0x03 }, { 0x75, 0xf0 }, { 0x76, 0xf0 }, 2280141cc406Sopenharmony_ci { 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 }, 2281141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 }, 2282141cc406Sopenharmony_ci { 0x9e, 0x2d }, 2283141cc406Sopenharmony_ci { 0xaa, 0x00 }, 2284141cc406Sopenharmony_ci }, 2285141cc406Sopenharmony_ci {}, 2286141cc406Sopenharmony_ci }, 2287141cc406Sopenharmony_ci { { 2400 }, 2400, 4800, 45000, 10, { ScanMethod::TRANSPARENCY, 2288141cc406Sopenharmony_ci ScanMethod::TRANSPARENCY_INFRARED }, 2289141cc406Sopenharmony_ci StaggerConfig{}, { 2290141cc406Sopenharmony_ci { 0x0c, 0x00 }, 2291141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x15 }, { 0x18, 0x10 }, { 0x19, 0x2a }, 2292141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x01 }, { 0x1d, 0x75 }, 2293141cc406Sopenharmony_ci { 0x52, 0x0c }, { 0x53, 0x0f }, { 0x54, 0x00 }, { 0x55, 0x03 }, 2294141cc406Sopenharmony_ci { 0x56, 0x06 }, { 0x57, 0x09 }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2295141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x02 }, { 0x72, 0x02 }, { 0x73, 0x04 }, 2296141cc406Sopenharmony_ci { 0x74, 0x03 }, { 0x75, 0xfe }, { 0x76, 0x00 }, 2297141cc406Sopenharmony_ci { 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 }, 2298141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 }, 2299141cc406Sopenharmony_ci { 0x9e, 0x2d }, 2300141cc406Sopenharmony_ci { 0xaa, 0x00 }, 2301141cc406Sopenharmony_ci }, 2302141cc406Sopenharmony_ci {}, 2303141cc406Sopenharmony_ci }, 2304141cc406Sopenharmony_ci { { 4800 }, 4800, 4800, 45000, -1982, { ScanMethod::TRANSPARENCY, 2305141cc406Sopenharmony_ci ScanMethod::TRANSPARENCY_INFRARED }, 2306141cc406Sopenharmony_ci StaggerConfig{8, 0}, { 2307141cc406Sopenharmony_ci { 0x0c, 0x00 }, 2308141cc406Sopenharmony_ci { 0x16, 0x13 }, { 0x17, 0x15 }, { 0x18, 0x10 }, { 0x19, 0x2a }, 2309141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x61 }, { 0x1d, 0x75 }, 2310141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x06 }, { 0x54, 0x09 }, { 0x55, 0x0c }, 2311141cc406Sopenharmony_ci { 0x56, 0x0f }, { 0x57, 0x00 }, { 0x58, 0x23 }, { 0x59, 0x00 }, { 0x5a, 0x40 }, 2312141cc406Sopenharmony_ci { 0x70, 0x0a }, { 0x71, 0x0c }, { 0x72, 0x0c }, { 0x73, 0x0e }, 2313141cc406Sopenharmony_ci { 0x74, 0x03 }, { 0x75, 0xff }, { 0x76, 0xff }, 2314141cc406Sopenharmony_ci { 0x77, 0x03 }, { 0x78, 0xff }, { 0x79, 0xff }, 2315141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 }, 2316141cc406Sopenharmony_ci { 0x9e, 0x2d }, 2317141cc406Sopenharmony_ci { 0xaa, 0x00 }, 2318141cc406Sopenharmony_ci }, 2319141cc406Sopenharmony_ci { { 0x03, 0x1f }, 2320141cc406Sopenharmony_ci }, 2321141cc406Sopenharmony_ci }, 2322141cc406Sopenharmony_ci }; 2323141cc406Sopenharmony_ci 2324141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 2325141cc406Sopenharmony_ci for (auto method : setting.methods) { 2326141cc406Sopenharmony_ci for (auto resolution : setting.resolutions.values()) { 2327141cc406Sopenharmony_ci sensor.resolutions = { resolution }; 2328141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 2329141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 2330141cc406Sopenharmony_ci sensor.shading_resolution = resolution; 2331141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 2332141cc406Sopenharmony_ci sensor.method = method; 2333141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 2334141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 2335141cc406Sopenharmony_ci sensor.custom_regs = setting.extra_custom_regs; 2336141cc406Sopenharmony_ci sensor.custom_fe_regs = setting.custom_fe_regs; 2337141cc406Sopenharmony_ci s_sensors->push_back(sensor); 2338141cc406Sopenharmony_ci } 2339141cc406Sopenharmony_ci } 2340141cc406Sopenharmony_ci } 2341141cc406Sopenharmony_ci } 2342141cc406Sopenharmony_ci 2343141cc406Sopenharmony_ci 2344141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 2345141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_HP_N6310; // gl847 2346141cc406Sopenharmony_ci sensor.full_resolution = 2400; 2347141cc406Sopenharmony_ci sensor.black_pixels = 96; 2348141cc406Sopenharmony_ci sensor.dummy_pixel = 26; 2349141cc406Sopenharmony_ci sensor.pixel_count_ratio = Ratio{1, 4}; 2350141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 2351141cc406Sopenharmony_ci sensor.gain_white_ref = 230; 2352141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 2353141cc406Sopenharmony_ci sensor.custom_regs = { 2354141cc406Sopenharmony_ci { 0x16, 0x33 }, 2355141cc406Sopenharmony_ci { 0x17, 0x0c }, 2356141cc406Sopenharmony_ci { 0x18, 0x02 }, 2357141cc406Sopenharmony_ci { 0x19, 0x2a }, 2358141cc406Sopenharmony_ci { 0x1a, 0x30 }, 2359141cc406Sopenharmony_ci { 0x1b, 0x00 }, 2360141cc406Sopenharmony_ci { 0x1c, 0x00 }, 2361141cc406Sopenharmony_ci { 0x1d, 0x08 }, 2362141cc406Sopenharmony_ci { 0x52, 0x0b }, 2363141cc406Sopenharmony_ci { 0x53, 0x0e }, 2364141cc406Sopenharmony_ci { 0x54, 0x11 }, 2365141cc406Sopenharmony_ci { 0x55, 0x02 }, 2366141cc406Sopenharmony_ci { 0x56, 0x05 }, 2367141cc406Sopenharmony_ci { 0x57, 0x08 }, 2368141cc406Sopenharmony_ci { 0x58, 0x63 }, 2369141cc406Sopenharmony_ci { 0x59, 0x00 }, 2370141cc406Sopenharmony_ci { 0x5a, 0x40 }, 2371141cc406Sopenharmony_ci }; 2372141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 2373141cc406Sopenharmony_ci { 2374141cc406Sopenharmony_ci struct CustomSensorSettings 2375141cc406Sopenharmony_ci { 2376141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 2377141cc406Sopenharmony_ci unsigned register_dpihw; 2378141cc406Sopenharmony_ci unsigned shading_factor; 2379141cc406Sopenharmony_ci int output_pixel_offset; 2380141cc406Sopenharmony_ci }; 2381141cc406Sopenharmony_ci 2382141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 2383141cc406Sopenharmony_ci { { 75 }, 600, 8, 4 }, 2384141cc406Sopenharmony_ci { { 100 }, 600, 6, 5 }, 2385141cc406Sopenharmony_ci { { 150 }, 600, 4, 8 }, 2386141cc406Sopenharmony_ci { { 200 }, 600, 3, 10 }, 2387141cc406Sopenharmony_ci { { 300 }, 600, 2, 16 }, 2388141cc406Sopenharmony_ci { { 600 }, 600, 1, 32 }, 2389141cc406Sopenharmony_ci { { 1200 }, 1200, 1, 64 }, 2390141cc406Sopenharmony_ci { { 2400 }, 2400, 1, 128 }, 2391141cc406Sopenharmony_ci }; 2392141cc406Sopenharmony_ci 2393141cc406Sopenharmony_ci auto base_custom_regs = sensor.custom_regs; 2394141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 2395141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 2396141cc406Sopenharmony_ci sensor.register_dpiset = setting.resolutions.values()[0]; 2397141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 2398141cc406Sopenharmony_ci sensor.shading_resolution = setting.register_dpihw; 2399141cc406Sopenharmony_ci sensor.shading_factor = setting.shading_factor; 2400141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 2401141cc406Sopenharmony_ci s_sensors->push_back(sensor); 2402141cc406Sopenharmony_ci } 2403141cc406Sopenharmony_ci } 2404141cc406Sopenharmony_ci 2405141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 2406141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CIS_CANON_LIDE_110; // gl124 2407141cc406Sopenharmony_ci sensor.full_resolution = 2400; 2408141cc406Sopenharmony_ci sensor.black_pixels = 87; 2409141cc406Sopenharmony_ci sensor.dummy_pixel = 16; 2410141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 2411141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 2412141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 2413141cc406Sopenharmony_ci sensor.gamma = { 2.2f, 2.2f, 2.2f }; 2414141cc406Sopenharmony_ci 2415141cc406Sopenharmony_ci { 2416141cc406Sopenharmony_ci struct CustomSensorSettings { 2417141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 2418141cc406Sopenharmony_ci unsigned optical_resolution; 2419141cc406Sopenharmony_ci unsigned register_dpihw; 2420141cc406Sopenharmony_ci unsigned register_dpiset; 2421141cc406Sopenharmony_ci unsigned shading_resolution; 2422141cc406Sopenharmony_ci int exposure_lperiod; 2423141cc406Sopenharmony_ci SensorExposure exposure; 2424141cc406Sopenharmony_ci Ratio pixel_count_ratio; 2425141cc406Sopenharmony_ci unsigned shading_factor; 2426141cc406Sopenharmony_ci std::vector<unsigned> segment_order; 2427141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_regs; 2428141cc406Sopenharmony_ci }; 2429141cc406Sopenharmony_ci 2430141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 2431141cc406Sopenharmony_ci { { 75 }, 1200, 600, 150, 300, 4608, { 462, 609, 453 }, Ratio{1, 4}, 4, 2432141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2433141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2434141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x0c }, 2435141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2436141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2437141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2438141cc406Sopenharmony_ci { 0x61, 0x20 }, 2439141cc406Sopenharmony_ci { 0x70, 0x06 }, { 0x71, 0x08 }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2440141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2441141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2442141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2443141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 2444141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x0a }, { 0x95, 0x18 }, 2445141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x9a }, 2446141cc406Sopenharmony_ci { 0x98, 0x21 }, 2447141cc406Sopenharmony_ci } 2448141cc406Sopenharmony_ci }, 2449141cc406Sopenharmony_ci { { 100 }, 1200, 600, 200, 300, 4608, { 462, 609, 453 }, Ratio{1, 4}, 3, 2450141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2451141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2452141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x0c }, 2453141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2454141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2455141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2456141cc406Sopenharmony_ci { 0x61, 0x20 }, 2457141cc406Sopenharmony_ci { 0x70, 0x06 }, { 0x71, 0x08 }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2458141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2459141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2460141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2461141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 2462141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x0a }, { 0x95, 0x18 }, 2463141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x9a }, 2464141cc406Sopenharmony_ci { 0x98, 0x21 }, 2465141cc406Sopenharmony_ci } 2466141cc406Sopenharmony_ci }, 2467141cc406Sopenharmony_ci { { 150 }, 1200, 600, 300, 300, 4608, { 462, 609, 453 }, Ratio{1, 4}, 2, 2468141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2469141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2470141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x0c }, 2471141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2472141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2473141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2474141cc406Sopenharmony_ci { 0x61, 0x20 }, 2475141cc406Sopenharmony_ci { 0x70, 0x06 }, { 0x71, 0x08 }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2476141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2477141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2478141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2479141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 2480141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x0a }, { 0x95, 0x18 }, 2481141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x9a }, 2482141cc406Sopenharmony_ci { 0x98, 0x21 }, 2483141cc406Sopenharmony_ci } 2484141cc406Sopenharmony_ci }, 2485141cc406Sopenharmony_ci { { 300 }, 1200, 600, 600, 300, 4608, { 462, 609, 453 }, Ratio{1, 4}, 1, 2486141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2487141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2488141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x00 }, { 0x20, 0x0c }, 2489141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2490141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2491141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2492141cc406Sopenharmony_ci { 0x61, 0x20 }, 2493141cc406Sopenharmony_ci { 0x70, 0x06 }, { 0x71, 0x08 }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2494141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2495141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2496141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2497141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 2498141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x0a }, { 0x95, 0x18 }, 2499141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x9a }, 2500141cc406Sopenharmony_ci { 0x98, 0x21 }, 2501141cc406Sopenharmony_ci } 2502141cc406Sopenharmony_ci }, 2503141cc406Sopenharmony_ci { { 600 }, 2400, 600, 600, 600, 5360, { 823, 1117, 805 }, Ratio{1, 4}, 1, 2504141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2505141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2506141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x00 }, { 0x20, 0x0a }, 2507141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2508141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2509141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2510141cc406Sopenharmony_ci { 0x61, 0x20 }, 2511141cc406Sopenharmony_ci { 0x70, 0x06 }, { 0x71, 0x08 }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2512141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2513141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2514141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2515141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 2516141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x14 }, { 0x95, 0x30 }, 2517141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0xa3 }, 2518141cc406Sopenharmony_ci { 0x98, 0x21 }, 2519141cc406Sopenharmony_ci }, 2520141cc406Sopenharmony_ci }, 2521141cc406Sopenharmony_ci { { 1200 }, 2400, 1200, 1200, 1200, 10528, { 6071, 6670, 6042 }, Ratio{1, 4}, 1, 2522141cc406Sopenharmony_ci { 0, 1 }, { 2523141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2524141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x00 },{ 0x20, 0x08 }, 2525141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2526141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2527141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2528141cc406Sopenharmony_ci { 0x61, 0x20 }, 2529141cc406Sopenharmony_ci { 0x70, 0x06 }, { 0x71, 0x08 }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2530141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2531141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2532141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2533141cc406Sopenharmony_ci { 0x88, 0x12 }, { 0x89, 0x47 }, 2534141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x14 }, { 0x95, 0x30 }, 2535141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0xa3 }, 2536141cc406Sopenharmony_ci { 0x98, 0x22 }, 2537141cc406Sopenharmony_ci } 2538141cc406Sopenharmony_ci }, 2539141cc406Sopenharmony_ci { { 2400 }, 2400, 2400, 2400, 2400, 20864, { 7451, 8661, 7405 }, Ratio{1, 4}, 1, 2540141cc406Sopenharmony_ci { 0, 2, 1, 3 }, { 2541141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2542141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x00 }, { 0x20, 0x06 }, 2543141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2544141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2545141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2546141cc406Sopenharmony_ci { 0x61, 0x20 }, 2547141cc406Sopenharmony_ci { 0x70, 0x06 }, { 0x71, 0x08 }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2548141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2549141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2550141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2551141cc406Sopenharmony_ci { 0x88, 0x12 }, { 0x89, 0x47 }, 2552141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x14 }, { 0x95, 0x30 }, 2553141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0xa3 }, 2554141cc406Sopenharmony_ci { 0x98, 0x24 }, 2555141cc406Sopenharmony_ci } 2556141cc406Sopenharmony_ci } 2557141cc406Sopenharmony_ci }; 2558141cc406Sopenharmony_ci 2559141cc406Sopenharmony_ci for (const auto& setting : custom_settings) { 2560141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 2561141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 2562141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 2563141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 2564141cc406Sopenharmony_ci sensor.shading_resolution = setting.shading_resolution; 2565141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 2566141cc406Sopenharmony_ci sensor.exposure = setting.exposure; 2567141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 2568141cc406Sopenharmony_ci sensor.shading_factor = setting.shading_factor; 2569141cc406Sopenharmony_ci sensor.segment_order = setting.segment_order; 2570141cc406Sopenharmony_ci sensor.custom_regs = setting.custom_regs; 2571141cc406Sopenharmony_ci 2572141cc406Sopenharmony_ci sensor.channels = { 1 }; 2573141cc406Sopenharmony_ci sensor.custom_regs.set_value(0x0c, 0x10); 2574141cc406Sopenharmony_ci s_sensors->push_back(sensor); 2575141cc406Sopenharmony_ci 2576141cc406Sopenharmony_ci sensor.channels = { 3 }; 2577141cc406Sopenharmony_ci sensor.custom_regs.set_value(0x0c, 0x12); 2578141cc406Sopenharmony_ci s_sensors->push_back(sensor); 2579141cc406Sopenharmony_ci } 2580141cc406Sopenharmony_ci } 2581141cc406Sopenharmony_ci 2582141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 2583141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CIS_CANON_LIDE_120; // gl124 2584141cc406Sopenharmony_ci sensor.full_resolution = 2400; 2585141cc406Sopenharmony_ci sensor.black_pixels = 87; 2586141cc406Sopenharmony_ci sensor.dummy_pixel = 16; 2587141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 2588141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 2589141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 2590141cc406Sopenharmony_ci sensor.gamma = { 2.2f, 2.2f, 2.2f }; 2591141cc406Sopenharmony_ci 2592141cc406Sopenharmony_ci { 2593141cc406Sopenharmony_ci struct CustomSensorSettings { 2594141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 2595141cc406Sopenharmony_ci unsigned optical_resolution; 2596141cc406Sopenharmony_ci unsigned register_dpihw; 2597141cc406Sopenharmony_ci unsigned register_dpiset; 2598141cc406Sopenharmony_ci unsigned shading_resolution; 2599141cc406Sopenharmony_ci int exposure_lperiod; 2600141cc406Sopenharmony_ci SensorExposure exposure; 2601141cc406Sopenharmony_ci Ratio pixel_count_ratio; 2602141cc406Sopenharmony_ci unsigned shading_factor; 2603141cc406Sopenharmony_ci std::vector<unsigned> segment_order; 2604141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_regs; 2605141cc406Sopenharmony_ci }; 2606141cc406Sopenharmony_ci 2607141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 2608141cc406Sopenharmony_ci { { 75 }, 1200, 600, 150, 300, 4608, { 1244, 1294, 1144 }, Ratio{1, 4}, 4, 2609141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2610141cc406Sopenharmony_ci { 0x16, 0x15 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2611141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x00 }, { 0x20, 0x02 }, 2612141cc406Sopenharmony_ci { 0x52, 0x04 }, { 0x53, 0x06 }, { 0x54, 0x00 }, { 0x55, 0x02 }, 2613141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2614141cc406Sopenharmony_ci { 0x5a, 0x3a }, { 0x5b, 0x00 }, { 0x5c, 0x00 }, 2615141cc406Sopenharmony_ci { 0x61, 0x20 }, 2616141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x1f }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2617141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 2618141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2619141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2620141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x5e }, 2621141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x09 }, { 0x95, 0xf8 }, 2622141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x70 }, 2623141cc406Sopenharmony_ci { 0x98, 0x21 }, 2624141cc406Sopenharmony_ci }, 2625141cc406Sopenharmony_ci }, 2626141cc406Sopenharmony_ci { { 100 }, 1200, 600, 200, 300, 4608, { 1244, 1294, 1144 }, Ratio{1, 4}, 3, 2627141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2628141cc406Sopenharmony_ci { 0x16, 0x15 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2629141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x00 }, { 0x20, 0x02 }, 2630141cc406Sopenharmony_ci { 0x52, 0x04 }, { 0x53, 0x06 }, { 0x54, 0x00 }, { 0x55, 0x02 }, 2631141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2632141cc406Sopenharmony_ci { 0x5a, 0x3a }, { 0x5b, 0x00 }, { 0x5c, 0x00 }, 2633141cc406Sopenharmony_ci { 0x61, 0x20 }, 2634141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x1f }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2635141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 2636141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2637141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2638141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x5e }, 2639141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x09 }, { 0x95, 0xf8 }, 2640141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x70 }, 2641141cc406Sopenharmony_ci { 0x98, 0x21 }, 2642141cc406Sopenharmony_ci }, 2643141cc406Sopenharmony_ci }, 2644141cc406Sopenharmony_ci { { 150 }, 1200, 600, 300, 300, 4608, { 1244, 1294, 1144 }, Ratio{1, 4}, 2, 2645141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2646141cc406Sopenharmony_ci { 0x16, 0x15 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2647141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x00 }, { 0x20, 0x02 }, 2648141cc406Sopenharmony_ci { 0x52, 0x04 }, { 0x53, 0x06 }, { 0x54, 0x00 }, { 0x55, 0x02 }, 2649141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2650141cc406Sopenharmony_ci { 0x5a, 0x3a }, { 0x5b, 0x00 }, { 0x5c, 0x00 }, 2651141cc406Sopenharmony_ci { 0x61, 0x20 }, 2652141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x1f }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2653141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 2654141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2655141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2656141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x5e }, 2657141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x09 }, { 0x95, 0xf8 }, 2658141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x70 }, 2659141cc406Sopenharmony_ci { 0x98, 0x21 }, 2660141cc406Sopenharmony_ci }, 2661141cc406Sopenharmony_ci }, 2662141cc406Sopenharmony_ci { { 300 }, 1200, 600, 600, 300, 4608, { 1244, 1294, 1144 }, Ratio{1, 4}, 1, 2663141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2664141cc406Sopenharmony_ci { 0x16, 0x15 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2665141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x00 }, { 0x20, 0x02 }, 2666141cc406Sopenharmony_ci { 0x52, 0x04 }, { 0x53, 0x06 }, { 0x54, 0x00 }, { 0x55, 0x02 }, 2667141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2668141cc406Sopenharmony_ci { 0x5a, 0x3a }, { 0x5b, 0x00 }, { 0x5c, 0x00 }, 2669141cc406Sopenharmony_ci { 0x61, 0x20 }, 2670141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x1f }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2671141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 2672141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2673141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2674141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x5e }, 2675141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x09 }, { 0x95, 0xf8 }, 2676141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x70 }, 2677141cc406Sopenharmony_ci { 0x98, 0x21 }, 2678141cc406Sopenharmony_ci }, 2679141cc406Sopenharmony_ci }, 2680141cc406Sopenharmony_ci { { 600 }, 2400, 600, 600, 600, 5360, { 2394, 2444, 2144 }, Ratio{1, 4}, 1, 2681141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2682141cc406Sopenharmony_ci { 0x16, 0x11 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2683141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x00 }, { 0x20, 0x02 }, 2684141cc406Sopenharmony_ci { 0x52, 0x04 }, { 0x53, 0x06 }, { 0x54, 0x00 }, { 0x55, 0x02 }, 2685141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2686141cc406Sopenharmony_ci { 0x5a, 0x3a }, { 0x5b, 0x00 }, { 0x5c, 0x00 }, 2687141cc406Sopenharmony_ci { 0x61, 0x20 }, 2688141cc406Sopenharmony_ci { 0x70, 0x1f }, { 0x71, 0x1f }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2689141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 2690141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2691141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2692141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x5e }, 2693141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x13 }, { 0x95, 0xf0 }, 2694141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x8b }, 2695141cc406Sopenharmony_ci { 0x98, 0x21 }, 2696141cc406Sopenharmony_ci }, 2697141cc406Sopenharmony_ci }, 2698141cc406Sopenharmony_ci { { 1200 }, 2400, 1200, 1200, 1200, 10528, { 4694, 4644, 4094 }, Ratio{1, 2}, 1, 2699141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2700141cc406Sopenharmony_ci { 0x16, 0x15 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2701141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x00 }, { 0x20, 0x02 }, 2702141cc406Sopenharmony_ci { 0x52, 0x04 }, { 0x53, 0x06 }, { 0x54, 0x00 }, { 0x55, 0x02 }, 2703141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2704141cc406Sopenharmony_ci { 0x5a, 0x3a }, { 0x5b, 0x00 }, { 0x5c, 0x00 }, 2705141cc406Sopenharmony_ci { 0x61, 0x20 }, 2706141cc406Sopenharmony_ci { 0x70, 0x1f }, { 0x71, 0x1f }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2707141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 2708141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2709141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2710141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x5e }, 2711141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x27 }, { 0x95, 0xe0 }, 2712141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0xc0 }, 2713141cc406Sopenharmony_ci { 0x98, 0x21 }, 2714141cc406Sopenharmony_ci }, 2715141cc406Sopenharmony_ci }, 2716141cc406Sopenharmony_ci { { 2400 }, 2400, 2400, 2400, 2400, 20864, { 8944, 8144, 7994 }, Ratio{1, 1}, 1, 2717141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2718141cc406Sopenharmony_ci { 0x16, 0x11 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2719141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x00 }, { 0x20, 0x02 }, 2720141cc406Sopenharmony_ci { 0x52, 0x04 }, { 0x53, 0x06 }, { 0x54, 0x00 }, { 0x55, 0x02 }, 2721141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2722141cc406Sopenharmony_ci { 0x5a, 0x3a }, { 0x5b, 0x00 }, { 0x5c, 0x00 }, 2723141cc406Sopenharmony_ci { 0x61, 0x20 }, 2724141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x1f }, { 0x72, 0x08 }, { 0x73, 0x0a }, 2725141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 2726141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 2727141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2728141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x5e }, 2729141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x4f }, { 0x95, 0xc0 }, 2730141cc406Sopenharmony_ci { 0x96, 0x01 }, { 0x97, 0x2a }, 2731141cc406Sopenharmony_ci { 0x98, 0x21 }, 2732141cc406Sopenharmony_ci } 2733141cc406Sopenharmony_ci }, 2734141cc406Sopenharmony_ci }; 2735141cc406Sopenharmony_ci 2736141cc406Sopenharmony_ci for (const auto& setting : custom_settings) { 2737141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 2738141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 2739141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 2740141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 2741141cc406Sopenharmony_ci sensor.shading_resolution = setting.shading_resolution; 2742141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 2743141cc406Sopenharmony_ci sensor.exposure = setting.exposure; 2744141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 2745141cc406Sopenharmony_ci sensor.shading_factor = setting.shading_factor; 2746141cc406Sopenharmony_ci sensor.segment_order = setting.segment_order; 2747141cc406Sopenharmony_ci sensor.custom_regs = setting.custom_regs; 2748141cc406Sopenharmony_ci 2749141cc406Sopenharmony_ci sensor.channels = { 1 }; 2750141cc406Sopenharmony_ci sensor.custom_regs.set_value(0x0c, 0x10); 2751141cc406Sopenharmony_ci s_sensors->push_back(sensor); 2752141cc406Sopenharmony_ci 2753141cc406Sopenharmony_ci sensor.channels = { 3 }; 2754141cc406Sopenharmony_ci sensor.custom_regs.set_value(0x0c, 0x12); 2755141cc406Sopenharmony_ci s_sensors->push_back(sensor); 2756141cc406Sopenharmony_ci } 2757141cc406Sopenharmony_ci } 2758141cc406Sopenharmony_ci 2759141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 2760141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CIS_CANON_LIDE_210; // gl124 2761141cc406Sopenharmony_ci sensor.full_resolution = 4800; 2762141cc406Sopenharmony_ci sensor.black_pixels = 87; 2763141cc406Sopenharmony_ci sensor.dummy_pixel = 16; 2764141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 2765141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 2766141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 2767141cc406Sopenharmony_ci sensor.gamma = { 2.2f, 2.2f, 2.2f }; 2768141cc406Sopenharmony_ci 2769141cc406Sopenharmony_ci { 2770141cc406Sopenharmony_ci struct CustomSensorSettings { 2771141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 2772141cc406Sopenharmony_ci unsigned optical_resolution; 2773141cc406Sopenharmony_ci unsigned register_dpihw; 2774141cc406Sopenharmony_ci unsigned register_dpiset; 2775141cc406Sopenharmony_ci unsigned shading_resolution; 2776141cc406Sopenharmony_ci int exposure_lperiod; 2777141cc406Sopenharmony_ci SensorExposure exposure; 2778141cc406Sopenharmony_ci Ratio pixel_count_ratio; 2779141cc406Sopenharmony_ci unsigned shading_factor; 2780141cc406Sopenharmony_ci std::vector<unsigned> segment_order; 2781141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_regs; 2782141cc406Sopenharmony_ci }; 2783141cc406Sopenharmony_ci 2784141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 2785141cc406Sopenharmony_ci { { 75 }, 2400, 600, 150, 300, 2768, { 388, 574, 393 }, Ratio{1, 8}, 4, 2786141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2787141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 2788141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2789141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x0c }, 2790141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2791141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2792141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2793141cc406Sopenharmony_ci { 0x61, 0x20 }, 2794141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 2795141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2796141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2797141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2798141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 2799141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x0a }, { 0x95, 0x18 }, 2800141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x9a }, 2801141cc406Sopenharmony_ci { 0x98, 0x21 }, 2802141cc406Sopenharmony_ci } 2803141cc406Sopenharmony_ci }, 2804141cc406Sopenharmony_ci { { 100 }, 2400, 600, 200, 300, 2768, { 388, 574, 393 }, Ratio{1, 8}, 3, 2805141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2806141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 2807141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2808141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x0c }, 2809141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2810141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2811141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2812141cc406Sopenharmony_ci { 0x61, 0x20 }, 2813141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 2814141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2815141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2816141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2817141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 2818141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x0a }, { 0x95, 0x18 }, 2819141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x9a }, 2820141cc406Sopenharmony_ci { 0x98, 0x21 }, 2821141cc406Sopenharmony_ci } 2822141cc406Sopenharmony_ci }, 2823141cc406Sopenharmony_ci { { 150 }, 2400, 600, 300, 300, 2768, { 388, 574, 393 }, Ratio{1, 8}, 2, 2824141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2825141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 2826141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2827141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x0c }, 2828141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2829141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2830141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2831141cc406Sopenharmony_ci { 0x61, 0x20 }, 2832141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 2833141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2834141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2835141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2836141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 2837141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x0a }, { 0x95, 0x18 }, 2838141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x9a }, 2839141cc406Sopenharmony_ci { 0x98, 0x21 }, 2840141cc406Sopenharmony_ci } 2841141cc406Sopenharmony_ci }, 2842141cc406Sopenharmony_ci { { 300 }, 2400, 600, 600, 300, 2768, { 388, 574, 393 }, Ratio{1, 8}, 1, 2843141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2844141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 2845141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2846141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x0c }, 2847141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2848141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2849141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2850141cc406Sopenharmony_ci { 0x61, 0x20 }, 2851141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 2852141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2853141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2854141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2855141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 2856141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x0a }, { 0x95, 0x18 }, 2857141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x9a }, 2858141cc406Sopenharmony_ci { 0x98, 0x21 }, 2859141cc406Sopenharmony_ci } 2860141cc406Sopenharmony_ci }, 2861141cc406Sopenharmony_ci { { 600 }, 4800, 600, 600, 600, 5360, { 388, 574, 393 }, Ratio{1, 8}, 1, 2862141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2863141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 2864141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2865141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x0a }, 2866141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2867141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2868141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2869141cc406Sopenharmony_ci { 0x61, 0x20 }, 2870141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 2871141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2872141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2873141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2874141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 2875141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x14 }, { 0x95, 0x30 }, 2876141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0xa3 }, 2877141cc406Sopenharmony_ci { 0x98, 0x21 }, 2878141cc406Sopenharmony_ci } 2879141cc406Sopenharmony_ci }, 2880141cc406Sopenharmony_ci { { 1200 }, 4800, 1200, 1200, 1200, 10528, { 388, 574, 393 }, Ratio{1, 8}, 1, {0, 1}, { 2881141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 2882141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2883141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x08 }, 2884141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2885141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2886141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2887141cc406Sopenharmony_ci { 0x61, 0x20 }, 2888141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 2889141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2890141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2891141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2892141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 2893141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x14 }, { 0x95, 0x30 }, 2894141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0xa3 }, 2895141cc406Sopenharmony_ci { 0x98, 0x22 }, 2896141cc406Sopenharmony_ci }, 2897141cc406Sopenharmony_ci }, 2898141cc406Sopenharmony_ci { { 2400 }, 4800, 2400, 2400, 2400, 20864, { 6839, 8401, 6859 }, Ratio{1, 8}, 1, 2899141cc406Sopenharmony_ci {0, 2, 1, 3}, { 2900141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 2901141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2902141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x06 }, 2903141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2904141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2905141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2906141cc406Sopenharmony_ci { 0x61, 0x20 }, 2907141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 2908141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2909141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2910141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2911141cc406Sopenharmony_ci { 0x88, 0x12 }, { 0x89, 0x47 }, 2912141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x14 }, { 0x95, 0x30 }, 2913141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0xa3 }, 2914141cc406Sopenharmony_ci { 0x98, 0x24 }, 2915141cc406Sopenharmony_ci }, 2916141cc406Sopenharmony_ci }, 2917141cc406Sopenharmony_ci { { 4800 }, 4800, 4800, 4800, 4800, 41536, { 9735, 14661, 11345 }, Ratio{1, 8}, 1, 2918141cc406Sopenharmony_ci { 0, 2, 4, 6, 1, 3, 5, 7 }, { 2919141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 2920141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2921141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x04 }, 2922141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2923141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2924141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2925141cc406Sopenharmony_ci { 0x61, 0x20 }, 2926141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 2927141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x1e }, 2928141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2929141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 2930141cc406Sopenharmony_ci { 0x88, 0x12 }, { 0x89, 0x47 }, 2931141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x14 }, { 0x95, 0x30 }, 2932141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0xa5 }, 2933141cc406Sopenharmony_ci { 0x98, 0x28 }, 2934141cc406Sopenharmony_ci }, 2935141cc406Sopenharmony_ci } 2936141cc406Sopenharmony_ci }; 2937141cc406Sopenharmony_ci 2938141cc406Sopenharmony_ci for (const auto& setting : custom_settings) { 2939141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 2940141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 2941141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 2942141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 2943141cc406Sopenharmony_ci sensor.shading_resolution = setting.shading_resolution; 2944141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 2945141cc406Sopenharmony_ci sensor.exposure = setting.exposure; 2946141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 2947141cc406Sopenharmony_ci sensor.shading_factor = setting.shading_factor; 2948141cc406Sopenharmony_ci sensor.segment_order = setting.segment_order; 2949141cc406Sopenharmony_ci sensor.custom_regs = setting.custom_regs; 2950141cc406Sopenharmony_ci 2951141cc406Sopenharmony_ci sensor.channels = { 1 }; 2952141cc406Sopenharmony_ci sensor.custom_regs.set_value(0x0c, 0x10); 2953141cc406Sopenharmony_ci s_sensors->push_back(sensor); 2954141cc406Sopenharmony_ci 2955141cc406Sopenharmony_ci sensor.channels = { 3 }; 2956141cc406Sopenharmony_ci sensor.custom_regs.set_value(0x0c, 0x12); 2957141cc406Sopenharmony_ci s_sensors->push_back(sensor); 2958141cc406Sopenharmony_ci } 2959141cc406Sopenharmony_ci } 2960141cc406Sopenharmony_ci 2961141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 2962141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CIS_CANON_LIDE_220; // gl124 2963141cc406Sopenharmony_ci sensor.full_resolution = 4800; 2964141cc406Sopenharmony_ci sensor.black_pixels = 87; 2965141cc406Sopenharmony_ci sensor.dummy_pixel = 16; 2966141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 2967141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 2968141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 2969141cc406Sopenharmony_ci sensor.gamma = { 2.2f, 2.2f, 2.2f }; 2970141cc406Sopenharmony_ci 2971141cc406Sopenharmony_ci { 2972141cc406Sopenharmony_ci struct CustomSensorSettings { 2973141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 2974141cc406Sopenharmony_ci unsigned optical_resolution; 2975141cc406Sopenharmony_ci unsigned register_dpihw; 2976141cc406Sopenharmony_ci unsigned register_dpiset; 2977141cc406Sopenharmony_ci unsigned shading_resolution; 2978141cc406Sopenharmony_ci int exposure_lperiod; 2979141cc406Sopenharmony_ci SensorExposure exposure; 2980141cc406Sopenharmony_ci Ratio pixel_count_ratio; 2981141cc406Sopenharmony_ci unsigned shading_factor; 2982141cc406Sopenharmony_ci std::vector<unsigned> segment_order; 2983141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_regs; 2984141cc406Sopenharmony_ci }; 2985141cc406Sopenharmony_ci 2986141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 2987141cc406Sopenharmony_ci { { 75 }, 2400, 600, 150, 300, 2768, { 388, 574, 393 }, Ratio{1, 8}, 4, 2988141cc406Sopenharmony_ci std::vector<unsigned>{}, { 2989141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 2990141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 2991141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x0c }, 2992141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 2993141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 2994141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 2995141cc406Sopenharmony_ci { 0x61, 0x20 }, 2996141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 2997141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 2998141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 2999141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 3000141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 3001141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x0a }, { 0x95, 0x18 }, 3002141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x9a }, 3003141cc406Sopenharmony_ci { 0x98, 0x21 }, 3004141cc406Sopenharmony_ci } 3005141cc406Sopenharmony_ci }, 3006141cc406Sopenharmony_ci { { 100 }, 2400, 600, 200, 300, 2768, { 388, 574, 393 }, Ratio{1, 8}, 3, 3007141cc406Sopenharmony_ci std::vector<unsigned>{}, { 3008141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 3009141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 3010141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x0c }, 3011141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 3012141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 3013141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 3014141cc406Sopenharmony_ci { 0x61, 0x20 }, 3015141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 3016141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 3017141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 3018141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 3019141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 3020141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x0a }, { 0x95, 0x18 }, 3021141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x9a }, 3022141cc406Sopenharmony_ci { 0x98, 0x21 }, 3023141cc406Sopenharmony_ci } 3024141cc406Sopenharmony_ci }, 3025141cc406Sopenharmony_ci { { 150 }, 2400, 600, 300, 300, 2768, { 388, 574, 393 }, Ratio{1, 8}, 2, 3026141cc406Sopenharmony_ci std::vector<unsigned>{}, { 3027141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 3028141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 3029141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x0c }, 3030141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 3031141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 3032141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 3033141cc406Sopenharmony_ci { 0x61, 0x20 }, 3034141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 3035141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 3036141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 3037141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 3038141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 3039141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x0a }, { 0x95, 0x18 }, 3040141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x9a }, 3041141cc406Sopenharmony_ci { 0x98, 0x21 }, 3042141cc406Sopenharmony_ci } 3043141cc406Sopenharmony_ci }, 3044141cc406Sopenharmony_ci { { 300 }, 2400, 600, 600, 300, 2768, { 388, 574, 393 }, Ratio{1, 8}, 1, 3045141cc406Sopenharmony_ci std::vector<unsigned>{}, { 3046141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 3047141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 3048141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x0c }, 3049141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 3050141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 3051141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 3052141cc406Sopenharmony_ci { 0x61, 0x20 }, 3053141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 3054141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 3055141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 3056141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 3057141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 3058141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x0a }, { 0x95, 0x18 }, 3059141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0x9a }, 3060141cc406Sopenharmony_ci { 0x98, 0x21 }, 3061141cc406Sopenharmony_ci } 3062141cc406Sopenharmony_ci }, 3063141cc406Sopenharmony_ci { { 600 }, 4800, 600, 600, 600, 5360, { 388, 574, 393 }, Ratio{1, 8}, 1, 3064141cc406Sopenharmony_ci std::vector<unsigned>{}, { 3065141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 3066141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 3067141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x0a }, 3068141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 3069141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 3070141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 3071141cc406Sopenharmony_ci { 0x61, 0x20 }, 3072141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 3073141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 3074141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 3075141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 3076141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 3077141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x14 }, { 0x95, 0x30 }, 3078141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0xa3 }, 3079141cc406Sopenharmony_ci { 0x98, 0x21 }, 3080141cc406Sopenharmony_ci } 3081141cc406Sopenharmony_ci }, 3082141cc406Sopenharmony_ci { { 1200 }, 4800, 1200, 1200, 1200, 10528, { 388, 574, 393 }, Ratio{1, 8}, 1, 3083141cc406Sopenharmony_ci {0, 1}, { 3084141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 3085141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 3086141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x08 }, 3087141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 3088141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 3089141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 3090141cc406Sopenharmony_ci { 0x61, 0x20 }, 3091141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 3092141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 3093141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 3094141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 3095141cc406Sopenharmony_ci { 0x88, 0x00 }, { 0x89, 0x65 }, 3096141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x14 }, { 0x95, 0x30 }, 3097141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0xa3 }, 3098141cc406Sopenharmony_ci { 0x98, 0x22 }, 3099141cc406Sopenharmony_ci } 3100141cc406Sopenharmony_ci }, 3101141cc406Sopenharmony_ci { { 2400 }, 4800, 2400, 2400, 2400, 20864, { 6839, 8401, 6859 }, Ratio{1, 8}, 1, 3102141cc406Sopenharmony_ci {0, 2, 1, 3}, { 3103141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 3104141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 3105141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x06 }, 3106141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 3107141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 3108141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 3109141cc406Sopenharmony_ci { 0x61, 0x20 }, 3110141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 3111141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 3112141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 3113141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 3114141cc406Sopenharmony_ci { 0x88, 0x12 }, { 0x89, 0x47 }, 3115141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x14 }, { 0x95, 0x30 }, 3116141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0xa3 }, 3117141cc406Sopenharmony_ci { 0x98, 0x24 }, 3118141cc406Sopenharmony_ci }, 3119141cc406Sopenharmony_ci }, 3120141cc406Sopenharmony_ci { { 4800 }, 4800, 4800, 4800, 4800, 41536, { 9735, 14661, 11345 }, Ratio{1, 8}, 1, 3121141cc406Sopenharmony_ci { 0, 2, 4, 6, 1, 3, 5, 7 }, { 3122141cc406Sopenharmony_ci // { 0x16, 0x00 }, // FIXME: check if default value is different 3123141cc406Sopenharmony_ci { 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0x01 }, 3124141cc406Sopenharmony_ci { 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x01 }, { 0x20, 0x04 }, 3125141cc406Sopenharmony_ci { 0x52, 0x00 }, { 0x53, 0x02 }, { 0x54, 0x04 }, { 0x55, 0x06 }, 3126141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x04 }, { 0x58, 0x04 }, { 0x59, 0x04 }, 3127141cc406Sopenharmony_ci { 0x5a, 0x1a }, { 0x5b, 0x00 }, { 0x5c, 0xc0 }, 3128141cc406Sopenharmony_ci { 0x61, 0x20 }, 3129141cc406Sopenharmony_ci // { 0x70, 0x00 }, // FIXME: check if default value is different 3130141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x0f }, 3131141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 3132141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 3133141cc406Sopenharmony_ci { 0x88, 0x12 }, { 0x89, 0x47 }, 3134141cc406Sopenharmony_ci { 0x93, 0x00 }, { 0x94, 0x14 }, { 0x95, 0x30 }, 3135141cc406Sopenharmony_ci { 0x96, 0x00 }, { 0x97, 0xa5 }, 3136141cc406Sopenharmony_ci { 0x98, 0x28 }, 3137141cc406Sopenharmony_ci }, 3138141cc406Sopenharmony_ci } 3139141cc406Sopenharmony_ci }; 3140141cc406Sopenharmony_ci 3141141cc406Sopenharmony_ci for (const auto& setting : custom_settings) { 3142141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 3143141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 3144141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 3145141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 3146141cc406Sopenharmony_ci sensor.shading_resolution = setting.shading_resolution; 3147141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 3148141cc406Sopenharmony_ci sensor.exposure = setting.exposure; 3149141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 3150141cc406Sopenharmony_ci sensor.shading_factor = setting.shading_factor; 3151141cc406Sopenharmony_ci sensor.segment_order = setting.segment_order; 3152141cc406Sopenharmony_ci sensor.custom_regs = setting.custom_regs; 3153141cc406Sopenharmony_ci 3154141cc406Sopenharmony_ci sensor.channels = { 1 }; 3155141cc406Sopenharmony_ci sensor.custom_regs.set_value(0x0c, 0x10); 3156141cc406Sopenharmony_ci s_sensors->push_back(sensor); 3157141cc406Sopenharmony_ci 3158141cc406Sopenharmony_ci sensor.channels = { 3 }; 3159141cc406Sopenharmony_ci sensor.custom_regs.set_value(0x0c, 0x12); 3160141cc406Sopenharmony_ci s_sensors->push_back(sensor); 3161141cc406Sopenharmony_ci } 3162141cc406Sopenharmony_ci } 3163141cc406Sopenharmony_ci 3164141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 3165141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_PLUSTEK_OPTICPRO_3600; // gl841 3166141cc406Sopenharmony_ci sensor.full_resolution = 1200; 3167141cc406Sopenharmony_ci sensor.black_pixels = 87; 3168141cc406Sopenharmony_ci sensor.dummy_pixel = 87; 3169141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 3170141cc406Sopenharmony_ci sensor.gain_white_ref = 230; 3171141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 3172141cc406Sopenharmony_ci sensor.custom_regs = { 3173141cc406Sopenharmony_ci { 0x16, 0x33 }, { 0x17, 0x0b }, { 0x18, 0x11 }, { 0x19, 0x2a }, 3174141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0xc4 }, 3175141cc406Sopenharmony_ci { 0x52, 0x07 }, { 0x53, 0x0a }, { 0x54, 0x0c }, { 0x55, 0x00 }, 3176141cc406Sopenharmony_ci { 0x56, 0x02 }, { 0x57, 0x06 }, { 0x58, 0x22 }, { 0x59, 0x69 }, { 0x5a, 0x40 }, 3177141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x00 }, { 0x72, 0x00 }, { 0x73, 0x00 }, 3178141cc406Sopenharmony_ci }; 3179141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 3180141cc406Sopenharmony_ci { 3181141cc406Sopenharmony_ci struct CustomSensorSettings 3182141cc406Sopenharmony_ci { 3183141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 3184141cc406Sopenharmony_ci unsigned optical_resolution; 3185141cc406Sopenharmony_ci unsigned register_dpihw; 3186141cc406Sopenharmony_ci unsigned register_dpiset; 3187141cc406Sopenharmony_ci int output_pixel_offset; 3188141cc406Sopenharmony_ci }; 3189141cc406Sopenharmony_ci 3190141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 3191141cc406Sopenharmony_ci { { 75 }, 600, 600, 150, 11 }, 3192141cc406Sopenharmony_ci { { 100 }, 600, 600, 200, 14 }, 3193141cc406Sopenharmony_ci { { 150 }, 600, 600, 300, 22 }, 3194141cc406Sopenharmony_ci { { 200 }, 600, 600, 400, 29 }, 3195141cc406Sopenharmony_ci { { 300 }, 600, 600, 600, 44 }, 3196141cc406Sopenharmony_ci { { 600 }, 600, 600, 1200, 88 }, 3197141cc406Sopenharmony_ci { { 1200 }, 1200, 1200, 1200, 88 }, 3198141cc406Sopenharmony_ci }; 3199141cc406Sopenharmony_ci 3200141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 3201141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 3202141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 3203141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 3204141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 3205141cc406Sopenharmony_ci sensor.shading_resolution = setting.register_dpihw; 3206141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 3207141cc406Sopenharmony_ci s_sensors->push_back(sensor); 3208141cc406Sopenharmony_ci } 3209141cc406Sopenharmony_ci } 3210141cc406Sopenharmony_ci 3211141cc406Sopenharmony_ci 3212141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 3213141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_PLUSTEK_OPTICFILM_7200; // gl842 3214141cc406Sopenharmony_ci sensor.full_resolution = 7200; 3215141cc406Sopenharmony_ci sensor.register_dpihw = 1200; 3216141cc406Sopenharmony_ci sensor.black_pixels = 88; // TODO 3217141cc406Sopenharmony_ci sensor.dummy_pixel = 19; 3218141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 3219141cc406Sopenharmony_ci sensor.gain_white_ref = 230; 3220141cc406Sopenharmony_ci sensor.exposure = { 0x2b00, 0x2b00, 0x2b00 }; 3221141cc406Sopenharmony_ci sensor.exposure_lperiod = 0x694e; 3222141cc406Sopenharmony_ci sensor.use_host_side_calib = true; 3223141cc406Sopenharmony_ci sensor.custom_regs = { 3224141cc406Sopenharmony_ci { 0x16, 0x3b }, { 0x17, 0x4b }, { 0x18, 0x10 }, { 0x19, 0x00 }, 3225141cc406Sopenharmony_ci { 0x1a, 0x24 }, { 0x1b, 0x00 }, { 0x1c, 0x40 }, { 0x1d, 0x84 }, 3226141cc406Sopenharmony_ci { 0x52, 0x09 }, { 0x53, 0x0c }, { 0x54, 0x0e }, { 0x55, 0x02 }, 3227141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x07 }, { 0x58, 0x22 }, { 0x59, 0x69 }, { 0x5a, 0xc0 }, 3228141cc406Sopenharmony_ci { 0x70, 0x08 }, { 0x71, 0x09 }, { 0x72, 0x0b }, { 0x73, 0x0c }, 3229141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x00 }, 3230141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x7f }, { 0x79, 0xff }, 3231141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 }, { 0x7d, 0x00 }, { 0x7f, 0x01 } 3232141cc406Sopenharmony_ci }; 3233141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 3234141cc406Sopenharmony_ci { 3235141cc406Sopenharmony_ci struct CustomSensorSettings 3236141cc406Sopenharmony_ci { 3237141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 3238141cc406Sopenharmony_ci ScanMethod method; 3239141cc406Sopenharmony_ci Ratio pixel_count_ratio; 3240141cc406Sopenharmony_ci int output_pixel_offset; 3241141cc406Sopenharmony_ci unsigned register_dpiset; 3242141cc406Sopenharmony_ci StaggerConfig stagger_y; 3243141cc406Sopenharmony_ci }; 3244141cc406Sopenharmony_ci 3245141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 3246141cc406Sopenharmony_ci { { 900 }, ScanMethod::TRANSPARENCY, Ratio{8, 8}, 2, 150, StaggerConfig{} }, 3247141cc406Sopenharmony_ci { { 1800 }, ScanMethod::TRANSPARENCY, Ratio{4, 4}, 10, 300, StaggerConfig{} }, 3248141cc406Sopenharmony_ci { { 3600 }, ScanMethod::TRANSPARENCY, Ratio{2, 2}, 10, 600, StaggerConfig{} }, 3249141cc406Sopenharmony_ci { { 7200 }, ScanMethod::TRANSPARENCY, Ratio{1, 1}, 20, 1200, StaggerConfig{0, 4} }, 3250141cc406Sopenharmony_ci }; 3251141cc406Sopenharmony_ci 3252141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 3253141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 3254141cc406Sopenharmony_ci sensor.method = setting.method; 3255141cc406Sopenharmony_ci sensor.shading_resolution = setting.resolutions.values().front(); 3256141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 3257141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 3258141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 3259141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 3260141cc406Sopenharmony_ci s_sensors->push_back(sensor); 3261141cc406Sopenharmony_ci } 3262141cc406Sopenharmony_ci } 3263141cc406Sopenharmony_ci 3264141cc406Sopenharmony_ci 3265141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 3266141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_PLUSTEK_OPTICFILM_7200I; // gl843 3267141cc406Sopenharmony_ci sensor.full_resolution = 7200; 3268141cc406Sopenharmony_ci sensor.register_dpihw = 1200; 3269141cc406Sopenharmony_ci sensor.black_pixels = 88; // TODO 3270141cc406Sopenharmony_ci sensor.dummy_pixel = 20; 3271141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 3272141cc406Sopenharmony_ci sensor.gain_white_ref = 230; 3273141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 3274141cc406Sopenharmony_ci sensor.use_host_side_calib = true; 3275141cc406Sopenharmony_ci sensor.custom_regs = { 3276141cc406Sopenharmony_ci { 0x08, 0x00 }, 3277141cc406Sopenharmony_ci { 0x09, 0x00 }, 3278141cc406Sopenharmony_ci { 0x0a, 0x00 }, 3279141cc406Sopenharmony_ci { 0x16, 0x23 }, 3280141cc406Sopenharmony_ci { 0x17, 0x0c }, 3281141cc406Sopenharmony_ci { 0x18, 0x10 }, 3282141cc406Sopenharmony_ci { 0x19, 0x2a }, 3283141cc406Sopenharmony_ci { 0x1a, 0x00 }, 3284141cc406Sopenharmony_ci { 0x1b, 0x00 }, 3285141cc406Sopenharmony_ci { 0x1c, 0x21 }, 3286141cc406Sopenharmony_ci { 0x1d, 0x84 }, 3287141cc406Sopenharmony_ci { 0x52, 0x0a }, 3288141cc406Sopenharmony_ci { 0x53, 0x0d }, 3289141cc406Sopenharmony_ci { 0x54, 0x10 }, 3290141cc406Sopenharmony_ci { 0x55, 0x01 }, 3291141cc406Sopenharmony_ci { 0x56, 0x04 }, 3292141cc406Sopenharmony_ci { 0x57, 0x07 }, 3293141cc406Sopenharmony_ci { 0x58, 0x3a }, 3294141cc406Sopenharmony_ci { 0x59, 0x81 }, 3295141cc406Sopenharmony_ci { 0x5a, 0xc0 }, 3296141cc406Sopenharmony_ci { 0x70, 0x0a }, 3297141cc406Sopenharmony_ci { 0x71, 0x0b }, 3298141cc406Sopenharmony_ci { 0x72, 0x0c }, 3299141cc406Sopenharmony_ci { 0x73, 0x0d }, 3300141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x00 }, 3301141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 3302141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 }, 3303141cc406Sopenharmony_ci }; 3304141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 3305141cc406Sopenharmony_ci { 3306141cc406Sopenharmony_ci struct CustomSensorSettings 3307141cc406Sopenharmony_ci { 3308141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 3309141cc406Sopenharmony_ci ScanMethod method; 3310141cc406Sopenharmony_ci unsigned shading_resolution; 3311141cc406Sopenharmony_ci Ratio pixel_count_ratio; 3312141cc406Sopenharmony_ci int output_pixel_offset; 3313141cc406Sopenharmony_ci unsigned exposure_lperiod; 3314141cc406Sopenharmony_ci unsigned register_dpiset; 3315141cc406Sopenharmony_ci StaggerConfig stagger_y; 3316141cc406Sopenharmony_ci GenesysRegisterSettingSet custom_fe_regs; 3317141cc406Sopenharmony_ci }; 3318141cc406Sopenharmony_ci 3319141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 3320141cc406Sopenharmony_ci { { 900 }, ScanMethod::TRANSPARENCY, 900, Ratio{8, 8}, 2, 0x2538, 150, 3321141cc406Sopenharmony_ci StaggerConfig{}, {} }, 3322141cc406Sopenharmony_ci { { 1800 }, ScanMethod::TRANSPARENCY, 1800, Ratio{4, 4}, 5, 0x2538, 300, 3323141cc406Sopenharmony_ci StaggerConfig{}, {} }, 3324141cc406Sopenharmony_ci { { 3600 }, ScanMethod::TRANSPARENCY, 3600, Ratio{2, 2}, 10, 0x2538, 600, 3325141cc406Sopenharmony_ci StaggerConfig{}, {} }, 3326141cc406Sopenharmony_ci { { 7200 }, ScanMethod::TRANSPARENCY, 7200, Ratio{1, 1}, 20, 0x19c8, 1200, 3327141cc406Sopenharmony_ci StaggerConfig{4, 0}, { 3328141cc406Sopenharmony_ci { 0x02, 0x1b }, 3329141cc406Sopenharmony_ci { 0x03, 0x14 }, 3330141cc406Sopenharmony_ci { 0x04, 0x20 }, 3331141cc406Sopenharmony_ci } 3332141cc406Sopenharmony_ci }, 3333141cc406Sopenharmony_ci { { 900 }, ScanMethod::TRANSPARENCY_INFRARED, 900, Ratio{8, 8}, 2, 0x1f54, 150, 3334141cc406Sopenharmony_ci StaggerConfig{}, {} }, 3335141cc406Sopenharmony_ci { { 1800 }, ScanMethod::TRANSPARENCY_INFRARED, 1800, Ratio{4, 4}, 5, 0x1f54, 300, 3336141cc406Sopenharmony_ci StaggerConfig{}, {} }, 3337141cc406Sopenharmony_ci { { 3600 }, ScanMethod::TRANSPARENCY_INFRARED, 3600, Ratio{2, 2}, 10, 0x1f54, 600, 3338141cc406Sopenharmony_ci StaggerConfig{}, {}}, 3339141cc406Sopenharmony_ci { { 7200 }, ScanMethod::TRANSPARENCY_INFRARED, 7200, Ratio{1, 1}, 20, 0x1f54, 1200, 3340141cc406Sopenharmony_ci StaggerConfig{4, 0}, {} }, 3341141cc406Sopenharmony_ci }; 3342141cc406Sopenharmony_ci 3343141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 3344141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 3345141cc406Sopenharmony_ci sensor.method = setting.method; 3346141cc406Sopenharmony_ci sensor.shading_resolution = setting.shading_resolution; 3347141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 3348141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 3349141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 3350141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 3351141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 3352141cc406Sopenharmony_ci sensor.custom_fe_regs = setting.custom_fe_regs; 3353141cc406Sopenharmony_ci s_sensors->push_back(sensor); 3354141cc406Sopenharmony_ci } 3355141cc406Sopenharmony_ci } 3356141cc406Sopenharmony_ci 3357141cc406Sopenharmony_ci 3358141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 3359141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_PLUSTEK_OPTICFILM_7300; // gl843 3360141cc406Sopenharmony_ci sensor.full_resolution = 7200; 3361141cc406Sopenharmony_ci sensor.method = ScanMethod::TRANSPARENCY; 3362141cc406Sopenharmony_ci sensor.register_dpihw = 1200; 3363141cc406Sopenharmony_ci sensor.black_pixels = 88; // TODO 3364141cc406Sopenharmony_ci sensor.dummy_pixel = 20; 3365141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 3366141cc406Sopenharmony_ci sensor.gain_white_ref = 230; 3367141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 3368141cc406Sopenharmony_ci sensor.exposure_lperiod = 0x2f44; 3369141cc406Sopenharmony_ci sensor.use_host_side_calib = true; 3370141cc406Sopenharmony_ci sensor.custom_regs = { 3371141cc406Sopenharmony_ci { 0x08, 0x00 }, 3372141cc406Sopenharmony_ci { 0x09, 0x00 }, 3373141cc406Sopenharmony_ci { 0x0a, 0x00 }, 3374141cc406Sopenharmony_ci { 0x16, 0x27 }, 3375141cc406Sopenharmony_ci { 0x17, 0x0c }, 3376141cc406Sopenharmony_ci { 0x18, 0x10 }, 3377141cc406Sopenharmony_ci { 0x19, 0x2a }, 3378141cc406Sopenharmony_ci { 0x1a, 0x00 }, 3379141cc406Sopenharmony_ci { 0x1b, 0x00 }, 3380141cc406Sopenharmony_ci { 0x1c, 0x20 }, 3381141cc406Sopenharmony_ci { 0x1d, 0x84 }, 3382141cc406Sopenharmony_ci { 0x52, 0x0a }, 3383141cc406Sopenharmony_ci { 0x53, 0x0d }, 3384141cc406Sopenharmony_ci { 0x54, 0x0f }, 3385141cc406Sopenharmony_ci { 0x55, 0x01 }, 3386141cc406Sopenharmony_ci { 0x56, 0x04 }, 3387141cc406Sopenharmony_ci { 0x57, 0x07 }, 3388141cc406Sopenharmony_ci { 0x58, 0x31 }, 3389141cc406Sopenharmony_ci { 0x59, 0x79 }, 3390141cc406Sopenharmony_ci { 0x5a, 0xc0 }, 3391141cc406Sopenharmony_ci { 0x70, 0x0c }, 3392141cc406Sopenharmony_ci { 0x71, 0x0d }, 3393141cc406Sopenharmony_ci { 0x72, 0x0e }, 3394141cc406Sopenharmony_ci { 0x73, 0x0f }, 3395141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x00 }, 3396141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 3397141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 }, 3398141cc406Sopenharmony_ci }; 3399141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 3400141cc406Sopenharmony_ci { 3401141cc406Sopenharmony_ci struct CustomSensorSettings 3402141cc406Sopenharmony_ci { 3403141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 3404141cc406Sopenharmony_ci unsigned shading_resolution; 3405141cc406Sopenharmony_ci Ratio pixel_count_ratio; 3406141cc406Sopenharmony_ci int output_pixel_offset; 3407141cc406Sopenharmony_ci unsigned register_dpiset; 3408141cc406Sopenharmony_ci StaggerConfig stagger_y; 3409141cc406Sopenharmony_ci }; 3410141cc406Sopenharmony_ci 3411141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 3412141cc406Sopenharmony_ci { { 900 }, 900, Ratio{8, 8}, 2, 150, StaggerConfig{} }, 3413141cc406Sopenharmony_ci { { 1800 }, 1800, Ratio{4, 4}, 5, 300, StaggerConfig{} }, 3414141cc406Sopenharmony_ci { { 3600 }, 3600, Ratio{2, 2}, 10, 600, StaggerConfig{} }, 3415141cc406Sopenharmony_ci { { 7200 }, 7200, Ratio{1, 1}, 20, 1200, StaggerConfig{4, 0} }, 3416141cc406Sopenharmony_ci }; 3417141cc406Sopenharmony_ci 3418141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 3419141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 3420141cc406Sopenharmony_ci sensor.shading_resolution = setting.shading_resolution; 3421141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 3422141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 3423141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 3424141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 3425141cc406Sopenharmony_ci s_sensors->push_back(sensor); 3426141cc406Sopenharmony_ci } 3427141cc406Sopenharmony_ci } 3428141cc406Sopenharmony_ci 3429141cc406Sopenharmony_ci 3430141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 3431141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_PLUSTEK_OPTICFILM_7400; // gl845 3432141cc406Sopenharmony_ci sensor.full_resolution = 7200; 3433141cc406Sopenharmony_ci sensor.method = ScanMethod::TRANSPARENCY; 3434141cc406Sopenharmony_ci sensor.register_dpihw = 1200; 3435141cc406Sopenharmony_ci sensor.black_pixels = 88; // TODO 3436141cc406Sopenharmony_ci sensor.dummy_pixel = 20; 3437141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 3438141cc406Sopenharmony_ci sensor.gain_white_ref = 230; 3439141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 3440141cc406Sopenharmony_ci sensor.exposure_lperiod = 14000; 3441141cc406Sopenharmony_ci sensor.use_host_side_calib = true; 3442141cc406Sopenharmony_ci sensor.custom_regs = { 3443141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x00 }, { 0x0a, 0x00 }, 3444141cc406Sopenharmony_ci { 0x16, 0x27 }, { 0x17, 0x0c }, { 0x18, 0x10 }, { 0x19, 0x2a }, 3445141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x20 }, { 0x1d, 0x84 }, 3446141cc406Sopenharmony_ci { 0x52, 0x09 }, { 0x53, 0x0d }, { 0x54, 0x0f }, { 0x55, 0x01 }, 3447141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x07 }, { 0x58, 0x31 }, { 0x59, 0x79 }, { 0x5a, 0xc0 }, 3448141cc406Sopenharmony_ci { 0x70, 0x0a }, { 0x71, 0x0b }, { 0x72, 0x0c }, { 0x73, 0x0d }, 3449141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x00 }, 3450141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 3451141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 }, { 0x7d, 0x00 }, 3452141cc406Sopenharmony_ci { 0x87, 0x00 }, 3453141cc406Sopenharmony_ci }; 3454141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 3455141cc406Sopenharmony_ci { 3456141cc406Sopenharmony_ci struct CustomSensorSettings 3457141cc406Sopenharmony_ci { 3458141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 3459141cc406Sopenharmony_ci unsigned register_dpiset; 3460141cc406Sopenharmony_ci int output_pixel_offset; 3461141cc406Sopenharmony_ci StaggerConfig stagger_y; 3462141cc406Sopenharmony_ci }; 3463141cc406Sopenharmony_ci 3464141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 3465141cc406Sopenharmony_ci { { 600 }, 100, 10, StaggerConfig{} }, 3466141cc406Sopenharmony_ci { { 1200 }, 200, 20, StaggerConfig{} }, 3467141cc406Sopenharmony_ci { { 2400 }, 400, 40, StaggerConfig{} }, 3468141cc406Sopenharmony_ci { { 3600 }, 600, 60, StaggerConfig{} }, 3469141cc406Sopenharmony_ci { { 7200 }, 1200, 120, StaggerConfig{4, 0} }, 3470141cc406Sopenharmony_ci }; 3471141cc406Sopenharmony_ci 3472141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 3473141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 3474141cc406Sopenharmony_ci sensor.shading_resolution = setting.resolutions.values()[0]; 3475141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 3476141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 3477141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 3478141cc406Sopenharmony_ci s_sensors->push_back(sensor); 3479141cc406Sopenharmony_ci } 3480141cc406Sopenharmony_ci } 3481141cc406Sopenharmony_ci 3482141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 3483141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_PLUSTEK_OPTICFILM_7500I; // gl843 3484141cc406Sopenharmony_ci sensor.full_resolution = 7200; 3485141cc406Sopenharmony_ci sensor.register_dpihw = 1200; 3486141cc406Sopenharmony_ci sensor.black_pixels = 88; // TODO 3487141cc406Sopenharmony_ci sensor.dummy_pixel = 20; 3488141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 3489141cc406Sopenharmony_ci sensor.gain_white_ref = 230; 3490141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 3491141cc406Sopenharmony_ci sensor.use_host_side_calib = true; 3492141cc406Sopenharmony_ci sensor.custom_regs = { 3493141cc406Sopenharmony_ci { 0x08, 0x00 }, 3494141cc406Sopenharmony_ci { 0x09, 0x00 }, 3495141cc406Sopenharmony_ci { 0x0a, 0x00 }, 3496141cc406Sopenharmony_ci { 0x16, 0x27 }, 3497141cc406Sopenharmony_ci { 0x17, 0x0c }, 3498141cc406Sopenharmony_ci { 0x18, 0x10 }, 3499141cc406Sopenharmony_ci { 0x19, 0x2a }, 3500141cc406Sopenharmony_ci { 0x1a, 0x00 }, 3501141cc406Sopenharmony_ci { 0x1b, 0x00 }, 3502141cc406Sopenharmony_ci { 0x1c, 0x20 }, 3503141cc406Sopenharmony_ci { 0x1d, 0x84 }, 3504141cc406Sopenharmony_ci { 0x52, 0x0a }, 3505141cc406Sopenharmony_ci { 0x53, 0x0d }, 3506141cc406Sopenharmony_ci { 0x54, 0x0f }, 3507141cc406Sopenharmony_ci { 0x55, 0x01 }, 3508141cc406Sopenharmony_ci { 0x56, 0x04 }, 3509141cc406Sopenharmony_ci { 0x57, 0x07 }, 3510141cc406Sopenharmony_ci { 0x58, 0x31 }, 3511141cc406Sopenharmony_ci { 0x59, 0x79 }, 3512141cc406Sopenharmony_ci { 0x5a, 0xc0 }, 3513141cc406Sopenharmony_ci { 0x70, 0x0c }, 3514141cc406Sopenharmony_ci { 0x71, 0x0d }, 3515141cc406Sopenharmony_ci { 0x72, 0x0e }, 3516141cc406Sopenharmony_ci { 0x73, 0x0f }, 3517141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x00 }, 3518141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 3519141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 }, 3520141cc406Sopenharmony_ci }; 3521141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 3522141cc406Sopenharmony_ci { 3523141cc406Sopenharmony_ci struct CustomSensorSettings 3524141cc406Sopenharmony_ci { 3525141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 3526141cc406Sopenharmony_ci ScanMethod method; 3527141cc406Sopenharmony_ci unsigned shading_resolution; 3528141cc406Sopenharmony_ci Ratio pixel_count_ratio; 3529141cc406Sopenharmony_ci int output_pixel_offset; 3530141cc406Sopenharmony_ci unsigned exposure_lperiod; 3531141cc406Sopenharmony_ci unsigned register_dpiset; 3532141cc406Sopenharmony_ci StaggerConfig stagger_y; 3533141cc406Sopenharmony_ci }; 3534141cc406Sopenharmony_ci 3535141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 3536141cc406Sopenharmony_ci { { 900 }, ScanMethod::TRANSPARENCY, 900, Ratio{8, 8}, 2, 0x2f44, 150, 3537141cc406Sopenharmony_ci StaggerConfig{} }, 3538141cc406Sopenharmony_ci { { 1800 }, ScanMethod::TRANSPARENCY, 1800, Ratio{4, 4}, 5, 0x2f44, 300, 3539141cc406Sopenharmony_ci StaggerConfig{} }, 3540141cc406Sopenharmony_ci { { 3600 }, ScanMethod::TRANSPARENCY, 3600, Ratio{2, 2}, 10, 0x2f44, 600, 3541141cc406Sopenharmony_ci StaggerConfig{} }, 3542141cc406Sopenharmony_ci { { 7200 }, ScanMethod::TRANSPARENCY, 7200, Ratio{1, 1}, 20, 0x2f44, 1200, 3543141cc406Sopenharmony_ci StaggerConfig{4, 0} }, 3544141cc406Sopenharmony_ci { { 900 }, ScanMethod::TRANSPARENCY_INFRARED, 900, Ratio{8, 8}, 2, 0x2af8, 150, 3545141cc406Sopenharmony_ci StaggerConfig{} }, 3546141cc406Sopenharmony_ci { { 1800 }, ScanMethod::TRANSPARENCY_INFRARED, 1800, Ratio{4, 4}, 5, 0x2af8, 300, 3547141cc406Sopenharmony_ci StaggerConfig{} }, 3548141cc406Sopenharmony_ci { { 3600 }, ScanMethod::TRANSPARENCY_INFRARED, 3600, Ratio{2, 2}, 10, 0x2af8, 600, 3549141cc406Sopenharmony_ci StaggerConfig{} }, 3550141cc406Sopenharmony_ci { { 7200 }, ScanMethod::TRANSPARENCY_INFRARED, 7200, Ratio{1, 1}, 20, 0x2af8, 1200, 3551141cc406Sopenharmony_ci StaggerConfig{4, 0} }, 3552141cc406Sopenharmony_ci }; 3553141cc406Sopenharmony_ci 3554141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 3555141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 3556141cc406Sopenharmony_ci sensor.method = setting.method; 3557141cc406Sopenharmony_ci sensor.shading_resolution = setting.shading_resolution; 3558141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 3559141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 3560141cc406Sopenharmony_ci sensor.exposure_lperiod = setting.exposure_lperiod; 3561141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 3562141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 3563141cc406Sopenharmony_ci s_sensors->push_back(sensor); 3564141cc406Sopenharmony_ci } 3565141cc406Sopenharmony_ci } 3566141cc406Sopenharmony_ci 3567141cc406Sopenharmony_ci 3568141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 3569141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_PLUSTEK_OPTICFILM_8200I; // gl845 3570141cc406Sopenharmony_ci sensor.full_resolution = 7200; 3571141cc406Sopenharmony_ci sensor.method = ScanMethod::TRANSPARENCY; 3572141cc406Sopenharmony_ci sensor.register_dpihw = 1200; 3573141cc406Sopenharmony_ci sensor.black_pixels = 88; // TODO 3574141cc406Sopenharmony_ci sensor.dummy_pixel = 20; 3575141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 3576141cc406Sopenharmony_ci sensor.gain_white_ref = 230; 3577141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 3578141cc406Sopenharmony_ci sensor.exposure_lperiod = 14000; 3579141cc406Sopenharmony_ci sensor.use_host_side_calib = true; 3580141cc406Sopenharmony_ci sensor.custom_regs = { 3581141cc406Sopenharmony_ci { 0x08, 0x00 }, { 0x09, 0x00 }, { 0x0a, 0x00 }, 3582141cc406Sopenharmony_ci { 0x16, 0x27 }, { 0x17, 0x0c }, { 0x18, 0x10 }, { 0x19, 0x2a }, 3583141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x20 }, { 0x1d, 0x84 }, 3584141cc406Sopenharmony_ci { 0x52, 0x09 }, { 0x53, 0x0d }, { 0x54, 0x0f }, { 0x55, 0x01 }, 3585141cc406Sopenharmony_ci { 0x56, 0x04 }, { 0x57, 0x07 }, { 0x58, 0x31 }, { 0x59, 0x79 }, { 0x5a, 0xc0 }, 3586141cc406Sopenharmony_ci { 0x70, 0x0a }, { 0x71, 0x0b }, { 0x72, 0x0c }, { 0x73, 0x0d }, 3587141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x00 }, 3588141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 }, 3589141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 }, { 0x7d, 0x00 }, 3590141cc406Sopenharmony_ci { 0x87, 0x00 }, 3591141cc406Sopenharmony_ci }; 3592141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 3593141cc406Sopenharmony_ci { 3594141cc406Sopenharmony_ci struct CustomSensorSettings 3595141cc406Sopenharmony_ci { 3596141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 3597141cc406Sopenharmony_ci ScanMethod method; 3598141cc406Sopenharmony_ci unsigned register_dpiset; 3599141cc406Sopenharmony_ci int output_pixel_offset; 3600141cc406Sopenharmony_ci StaggerConfig stagger_y; 3601141cc406Sopenharmony_ci }; 3602141cc406Sopenharmony_ci 3603141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 3604141cc406Sopenharmony_ci { { 900 }, ScanMethod::TRANSPARENCY, 150, 15, StaggerConfig{} }, 3605141cc406Sopenharmony_ci { { 1800 }, ScanMethod::TRANSPARENCY, 300, 30, StaggerConfig{} }, 3606141cc406Sopenharmony_ci { { 3600 }, ScanMethod::TRANSPARENCY, 600, 60, StaggerConfig{} }, 3607141cc406Sopenharmony_ci { { 7200 }, ScanMethod::TRANSPARENCY, 1200, 120, StaggerConfig{4, 0} }, 3608141cc406Sopenharmony_ci { { 900 }, ScanMethod::TRANSPARENCY_INFRARED, 150, 15, StaggerConfig{} }, 3609141cc406Sopenharmony_ci { { 1800 }, ScanMethod::TRANSPARENCY_INFRARED, 300, 30, StaggerConfig{} }, 3610141cc406Sopenharmony_ci { { 3600 }, ScanMethod::TRANSPARENCY_INFRARED, 600, 60, StaggerConfig{} }, 3611141cc406Sopenharmony_ci { { 7200 }, ScanMethod::TRANSPARENCY_INFRARED, 1200, 120, StaggerConfig{4, 0} }, 3612141cc406Sopenharmony_ci }; 3613141cc406Sopenharmony_ci 3614141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 3615141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 3616141cc406Sopenharmony_ci sensor.method = setting.method; 3617141cc406Sopenharmony_ci sensor.shading_resolution = setting.resolutions.values()[0]; 3618141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 3619141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 3620141cc406Sopenharmony_ci sensor.stagger_y = setting.stagger_y; 3621141cc406Sopenharmony_ci s_sensors->push_back(sensor); 3622141cc406Sopenharmony_ci } 3623141cc406Sopenharmony_ci } 3624141cc406Sopenharmony_ci 3625141cc406Sopenharmony_ci 3626141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 3627141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_IMG101; // gl846 3628141cc406Sopenharmony_ci sensor.resolutions = { 75, 100, 150, 300, 600, 1200 }; 3629141cc406Sopenharmony_ci sensor.exposure_lperiod = 11000; 3630141cc406Sopenharmony_ci sensor.segment_size = 5136; 3631141cc406Sopenharmony_ci sensor.segment_order = {0, 1}; 3632141cc406Sopenharmony_ci sensor.full_resolution = 1200; 3633141cc406Sopenharmony_ci sensor.black_pixels = 31; 3634141cc406Sopenharmony_ci sensor.dummy_pixel = 31; 3635141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 3636141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 3637141cc406Sopenharmony_ci sensor.exposure = { 0x0000, 0x0000, 0x0000 }; 3638141cc406Sopenharmony_ci sensor.custom_regs = { 3639141cc406Sopenharmony_ci { 0x16, 0xbb }, { 0x17, 0x13 }, { 0x18, 0x10 }, { 0x19, 0xff }, 3640141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x20 }, { 0x1d, 0x06 }, 3641141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x04 }, { 0x54, 0x06 }, { 0x55, 0x08 }, 3642141cc406Sopenharmony_ci { 0x56, 0x0a }, { 0x57, 0x00 }, { 0x58, 0x59 }, { 0x59, 0x31 }, { 0x5a, 0x40 }, 3643141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 3644141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 3645141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, 3646141cc406Sopenharmony_ci }; 3647141cc406Sopenharmony_ci sensor.gamma = { 1.7f, 1.7f, 1.7f }; 3648141cc406Sopenharmony_ci { 3649141cc406Sopenharmony_ci struct CustomSensorSettings 3650141cc406Sopenharmony_ci { 3651141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 3652141cc406Sopenharmony_ci unsigned register_dpihw; 3653141cc406Sopenharmony_ci Ratio pixel_count_ratio; 3654141cc406Sopenharmony_ci unsigned shading_factor; 3655141cc406Sopenharmony_ci GenesysRegisterSettingSet extra_custom_regs; 3656141cc406Sopenharmony_ci }; 3657141cc406Sopenharmony_ci 3658141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 3659141cc406Sopenharmony_ci { { 75 }, 600, Ratio{1, 4}, 8, { { 0x7e, 0x00 } } }, 3660141cc406Sopenharmony_ci { { 100 }, 600, Ratio{1, 4}, 6, { { 0x7e, 0x00 } } }, 3661141cc406Sopenharmony_ci { { 150 }, 600, Ratio{1, 4}, 4, { { 0x7e, 0x00 } } }, 3662141cc406Sopenharmony_ci { { 300 }, 600, Ratio{1, 4}, 2, { { 0x7e, 0x00 } } }, 3663141cc406Sopenharmony_ci { { 600 }, 600, Ratio{1, 4}, 1, { { 0x7e, 0x01 } } }, 3664141cc406Sopenharmony_ci { { 1200 }, 1200, Ratio{1, 2}, 1, { { 0x7e, 0x01 } } }, 3665141cc406Sopenharmony_ci }; 3666141cc406Sopenharmony_ci 3667141cc406Sopenharmony_ci auto base_custom_regs = sensor.custom_regs; 3668141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 3669141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 3670141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 3671141cc406Sopenharmony_ci sensor.register_dpiset = setting.resolutions.values()[0]; 3672141cc406Sopenharmony_ci sensor.shading_resolution = setting.register_dpihw; 3673141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 3674141cc406Sopenharmony_ci sensor.shading_factor = setting.shading_factor; 3675141cc406Sopenharmony_ci sensor.custom_regs = base_custom_regs; 3676141cc406Sopenharmony_ci sensor.custom_regs.merge(setting.extra_custom_regs); 3677141cc406Sopenharmony_ci s_sensors->push_back(sensor); 3678141cc406Sopenharmony_ci } 3679141cc406Sopenharmony_ci } 3680141cc406Sopenharmony_ci 3681141cc406Sopenharmony_ci 3682141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 3683141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CCD_PLUSTEK_OPTICBOOK_3800; // gl845 3684141cc406Sopenharmony_ci sensor.resolutions = { 75, 100, 150, 300, 600, 1200 }; 3685141cc406Sopenharmony_ci sensor.exposure_lperiod = 11000; 3686141cc406Sopenharmony_ci sensor.full_resolution = 1200; 3687141cc406Sopenharmony_ci sensor.black_pixels = 31; 3688141cc406Sopenharmony_ci sensor.dummy_pixel = 31; 3689141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 210; 3690141cc406Sopenharmony_ci sensor.gain_white_ref = 200; 3691141cc406Sopenharmony_ci sensor.exposure = { 0, 0, 0 }; 3692141cc406Sopenharmony_ci sensor.custom_regs = { 3693141cc406Sopenharmony_ci { 0x16, 0xbb }, { 0x17, 0x13 }, { 0x18, 0x10 }, { 0x19, 0xff }, 3694141cc406Sopenharmony_ci { 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x20 }, { 0x1d, 0x06 }, 3695141cc406Sopenharmony_ci { 0x52, 0x02 }, { 0x53, 0x04 }, { 0x54, 0x06 }, { 0x55, 0x08 }, 3696141cc406Sopenharmony_ci { 0x56, 0x0a }, { 0x57, 0x00 }, { 0x58, 0x59 }, { 0x59, 0x31 }, { 0x5a, 0x40 }, 3697141cc406Sopenharmony_ci { 0x70, 0x01 }, { 0x71, 0x00 }, { 0x72, 0x02 }, { 0x73, 0x01 }, 3698141cc406Sopenharmony_ci { 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c }, 3699141cc406Sopenharmony_ci { 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f }, 3700141cc406Sopenharmony_ci { 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 }, { 0x7d, 0x20 }, 3701141cc406Sopenharmony_ci { 0x87, 0x02 }, 3702141cc406Sopenharmony_ci }; 3703141cc406Sopenharmony_ci sensor.gamma = { 1.7f, 1.7f, 1.7f }; 3704141cc406Sopenharmony_ci { 3705141cc406Sopenharmony_ci struct CustomSensorSettings 3706141cc406Sopenharmony_ci { 3707141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 3708141cc406Sopenharmony_ci unsigned register_dpihw; 3709141cc406Sopenharmony_ci Ratio pixel_count_ratio; 3710141cc406Sopenharmony_ci unsigned shading_factor; 3711141cc406Sopenharmony_ci }; 3712141cc406Sopenharmony_ci 3713141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 3714141cc406Sopenharmony_ci { { 75 }, 600, Ratio{1, 2}, 8 }, 3715141cc406Sopenharmony_ci { { 100 }, 600, Ratio{1, 2}, 6 }, 3716141cc406Sopenharmony_ci { { 150 }, 600, Ratio{1, 2}, 4 }, 3717141cc406Sopenharmony_ci { { 300 }, 600, Ratio{1, 2}, 2 }, 3718141cc406Sopenharmony_ci { { 600 }, 600, Ratio{1, 2}, 1 }, 3719141cc406Sopenharmony_ci { { 1200 }, 1200, Ratio{1, 1}, 1 }, 3720141cc406Sopenharmony_ci }; 3721141cc406Sopenharmony_ci 3722141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 3723141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 3724141cc406Sopenharmony_ci sensor.register_dpihw = setting.register_dpihw; 3725141cc406Sopenharmony_ci sensor.register_dpiset = setting.resolutions.values()[0]; 3726141cc406Sopenharmony_ci sensor.shading_resolution = setting.register_dpihw; 3727141cc406Sopenharmony_ci sensor.pixel_count_ratio = setting.pixel_count_ratio; 3728141cc406Sopenharmony_ci sensor.shading_factor = setting.shading_factor; 3729141cc406Sopenharmony_ci s_sensors->push_back(sensor); 3730141cc406Sopenharmony_ci } 3731141cc406Sopenharmony_ci } 3732141cc406Sopenharmony_ci 3733141cc406Sopenharmony_ci sensor = Genesys_Sensor(); 3734141cc406Sopenharmony_ci sensor.sensor_id = SensorId::CIS_CANON_LIDE_80; // gl841 3735141cc406Sopenharmony_ci sensor.full_resolution = 1200; // real hardware limit is 2400 3736141cc406Sopenharmony_ci sensor.register_dpihw = 1200; 3737141cc406Sopenharmony_ci sensor.black_pixels = 20; 3738141cc406Sopenharmony_ci sensor.dummy_pixel = 6; 3739141cc406Sopenharmony_ci sensor.fau_gain_white_ref = 150; 3740141cc406Sopenharmony_ci sensor.gain_white_ref = 150; 3741141cc406Sopenharmony_ci // maps to 0x70-0x73 for GL841 3742141cc406Sopenharmony_ci sensor.exposure = { 0x1000, 0x1000, 0x0500 }; 3743141cc406Sopenharmony_ci sensor.custom_regs = { 3744141cc406Sopenharmony_ci { 0x16, 0x00 }, { 0x17, 0x01 }, { 0x18, 0x00 }, { 0x19, 0x06 }, 3745141cc406Sopenharmony_ci { 0x1a, 0x00 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x04 }, 3746141cc406Sopenharmony_ci { 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 }, 3747141cc406Sopenharmony_ci { 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x29 }, { 0x59, 0x69 }, { 0x5a, 0x55 }, 3748141cc406Sopenharmony_ci { 0x70, 0x00 }, { 0x71, 0x05 }, { 0x72, 0x07 }, { 0x73, 0x09 }, 3749141cc406Sopenharmony_ci }; 3750141cc406Sopenharmony_ci sensor.gamma = { 1.0f, 1.0f, 1.0f }; 3751141cc406Sopenharmony_ci { 3752141cc406Sopenharmony_ci struct CustomSensorSettings 3753141cc406Sopenharmony_ci { 3754141cc406Sopenharmony_ci ValueFilterAny<unsigned> resolutions; 3755141cc406Sopenharmony_ci unsigned optical_resolution; 3756141cc406Sopenharmony_ci unsigned register_dpiset; 3757141cc406Sopenharmony_ci unsigned shading_resolution; 3758141cc406Sopenharmony_ci unsigned shading_factor; 3759141cc406Sopenharmony_ci int output_pixel_offset; 3760141cc406Sopenharmony_ci }; 3761141cc406Sopenharmony_ci 3762141cc406Sopenharmony_ci CustomSensorSettings custom_settings[] = { 3763141cc406Sopenharmony_ci { { 75 }, 600, 150, 600, 8, 2 }, 3764141cc406Sopenharmony_ci { { 100 }, 600, 200, 600, 6, 3 }, 3765141cc406Sopenharmony_ci { { 150 }, 600, 300, 600, 4, 4 }, 3766141cc406Sopenharmony_ci { { 200 }, 600, 400, 600, 3, 6 }, 3767141cc406Sopenharmony_ci { { 300 }, 600, 600, 600, 2, 9 }, 3768141cc406Sopenharmony_ci { { 600 }, 600, 1200, 600, 1, 17 }, 3769141cc406Sopenharmony_ci { { 1200 }, 1200, 1200, 1200, 1, 35 }, 3770141cc406Sopenharmony_ci }; 3771141cc406Sopenharmony_ci 3772141cc406Sopenharmony_ci for (const CustomSensorSettings& setting : custom_settings) { 3773141cc406Sopenharmony_ci sensor.resolutions = setting.resolutions; 3774141cc406Sopenharmony_ci sensor.optical_resolution = setting.optical_resolution; 3775141cc406Sopenharmony_ci sensor.register_dpiset = setting.register_dpiset; 3776141cc406Sopenharmony_ci sensor.shading_resolution = setting.shading_resolution; 3777141cc406Sopenharmony_ci sensor.shading_factor = setting.shading_factor; 3778141cc406Sopenharmony_ci sensor.output_pixel_offset = setting.output_pixel_offset; 3779141cc406Sopenharmony_ci s_sensors->push_back(sensor); 3780141cc406Sopenharmony_ci } 3781141cc406Sopenharmony_ci } 3782141cc406Sopenharmony_ci} 3783141cc406Sopenharmony_ci 3784141cc406Sopenharmony_civoid verify_sensor_tables() 3785141cc406Sopenharmony_ci{ 3786141cc406Sopenharmony_ci std::map<SensorId, AsicType> sensor_to_asic; 3787141cc406Sopenharmony_ci for (const auto& device : *s_usb_devices) { 3788141cc406Sopenharmony_ci sensor_to_asic[device.model().sensor_id] = device.model().asic_type; 3789141cc406Sopenharmony_ci } 3790141cc406Sopenharmony_ci for (const auto& sensor : *s_sensors) { 3791141cc406Sopenharmony_ci if (sensor_to_asic.count(sensor.sensor_id) == 0) { 3792141cc406Sopenharmony_ci throw SaneException("Unknown asic for sensor"); 3793141cc406Sopenharmony_ci } 3794141cc406Sopenharmony_ci auto asic_type = sensor_to_asic[sensor.sensor_id]; 3795141cc406Sopenharmony_ci 3796141cc406Sopenharmony_ci if (sensor.full_resolution == 0) { 3797141cc406Sopenharmony_ci throw SaneException("full_resolution is not defined"); 3798141cc406Sopenharmony_ci } 3799141cc406Sopenharmony_ci 3800141cc406Sopenharmony_ci if (sensor.register_dpiset == 0) { 3801141cc406Sopenharmony_ci throw SaneException("register_dpiset is not defined"); 3802141cc406Sopenharmony_ci } 3803141cc406Sopenharmony_ci 3804141cc406Sopenharmony_ci if (asic_type != AsicType::GL646) { 3805141cc406Sopenharmony_ci if (sensor.register_dpihw == 0) { 3806141cc406Sopenharmony_ci throw SaneException("register_dpihw is not defined"); 3807141cc406Sopenharmony_ci } 3808141cc406Sopenharmony_ci if (sensor.shading_resolution == 0) { 3809141cc406Sopenharmony_ci throw SaneException("shading_resolution is not defined"); 3810141cc406Sopenharmony_ci } 3811141cc406Sopenharmony_ci } 3812141cc406Sopenharmony_ci 3813141cc406Sopenharmony_ci if (asic_type == AsicType::GL841) { 3814141cc406Sopenharmony_ci auto required_registers = { 3815141cc406Sopenharmony_ci 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 3816141cc406Sopenharmony_ci 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 3817141cc406Sopenharmony_ci 0x70, 0x71, 0x72, 0x73, 3818141cc406Sopenharmony_ci }; 3819141cc406Sopenharmony_ci for (auto address : required_registers) { 3820141cc406Sopenharmony_ci if (!sensor.custom_regs.has_reg(address)) { 3821141cc406Sopenharmony_ci throw SaneException("Required register is not present"); 3822141cc406Sopenharmony_ci } 3823141cc406Sopenharmony_ci } 3824141cc406Sopenharmony_ci } 3825141cc406Sopenharmony_ci 3826141cc406Sopenharmony_ci if (asic_type == AsicType::GL842) { 3827141cc406Sopenharmony_ci auto required_registers = { 3828141cc406Sopenharmony_ci 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1c, 0x1d, 3829141cc406Sopenharmony_ci 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 3830141cc406Sopenharmony_ci 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 3831141cc406Sopenharmony_ci 0x7f 3832141cc406Sopenharmony_ci }; 3833141cc406Sopenharmony_ci for (auto address : required_registers) { 3834141cc406Sopenharmony_ci if (!sensor.custom_regs.has_reg(address)) { 3835141cc406Sopenharmony_ci throw SaneException("Required register is not present"); 3836141cc406Sopenharmony_ci } 3837141cc406Sopenharmony_ci } 3838141cc406Sopenharmony_ci } 3839141cc406Sopenharmony_ci } 3840141cc406Sopenharmony_ci} 3841141cc406Sopenharmony_ci 3842141cc406Sopenharmony_ci 3843141cc406Sopenharmony_ci} // namespace genesys 3844