Lines Matching defs:sensor
565 void sanei_genesys_set_lamp_power(Genesys_Device* dev, const Genesys_Sensor& sensor,
575 sanei_genesys_fixup_exposure(sensor.exposure));
580 regs_set_exposure(dev->model->asic_type, regs, sensor.exposure);
619 bool should_enable_gamma(const ScanSession& session, const Genesys_Sensor& sensor)
631 if (sensor.gamma[0] == 1.0f || sensor.gamma[1] == 1.0f || sensor.gamma[2] == 1.0f) {
638 std::vector<std::uint16_t> get_gamma_table(Genesys_Device* dev, const Genesys_Sensor& sensor,
645 sanei_genesys_create_default_gamma_table(dev, ret, sensor.gamma[color]);
659 const Genesys_Sensor& sensor,
667 std::vector<std::uint16_t> rgamma = get_gamma_table(dev, sensor, GENESYS_RED);
668 std::vector<std::uint16_t> ggamma = get_gamma_table(dev, sensor, GENESYS_GREEN);
669 std::vector<std::uint16_t> bgamma = get_gamma_table(dev, sensor, GENESYS_BLUE);
722 void sanei_genesys_send_gamma_table(Genesys_Device* dev, const Genesys_Sensor& sensor)
730 auto gamma = generate_gamma_buffer(dev, sensor, 16, 65535, size);
760 const Genesys_Sensor& sensor)
763 s.pixel_startx += s.output_startx * sensor.full_resolution / s.params.xres;
789 s.pixel_startx = s.output_startx * sensor.full_resolution / s.params.xres;
799 s.pixel_startx = sensor.pixel_count_ratio.apply(s.pixel_startx);
800 s.pixel_endx = sensor.pixel_count_ratio.apply(s.pixel_endx);
807 s.pixel_startx = align_multiple_floor(s.pixel_startx, sensor.pixel_count_ratio.divisor());
808 s.pixel_endx = align_multiple_floor(s.pixel_endx, sensor.pixel_count_ratio.divisor());
813 const Genesys_Device& dev, const Genesys_Sensor& sensor,
823 auto optical_resolution = sensor.get_optical_resolution();
842 2 * sensor.full_resolution / optical_resolution);
879 // corner case for true lineart for sensor with several segments or when xres is doubled
899 void compute_session(const Genesys_Device* dev, ScanSession& s, const Genesys_Sensor& sensor)
911 s.full_resolution = sensor.full_resolution;
912 s.optical_resolution = sensor.get_optical_resolution();
915 s.pixel_count_ratio = sensor.pixel_count_ratio;
921 s.output_pixels = session_adjust_output_pixels(s.params.pixels, *dev, sensor,
929 if (static_cast<int>(s.params.startx) + sensor.output_pixel_offset < 0)
930 throw SaneException("Invalid sensor.output_pixel_offset");
932 static_cast<int>(s.params.startx) + sensor.output_pixel_offset);
942 s.stagger_x = sensor.stagger_x;
943 s.stagger_y = sensor.stagger_y;
978 s.segment_count = sensor.get_segment_count();
992 s.conseq_pixel_dist = sensor.segment_size;
994 // in case of multi-segments sensor, we have expand the scan area to sensor boundary
1032 (s.optical_pixels_raw * s.output_resolution) / sensor.full_resolution / s.segment_count,
1057 s.conseq_pixel_dist = sensor.segment_size;
1099 compute_session_pixel_offsets(dev, s, sensor);
1101 s.shading_pixel_offset = sensor.shading_pixel_offset;
1111 s.use_host_side_calib = sensor.use_host_side_calib;
1455 const auto& sensor = sanei_genesys_find_sensor_any(dev);
1458 dev->cmd_set->set_fe(dev, sensor, AFE_INIT);
1773 * Parses device entry to find lowest motor or sensor dpi.
1820 // exposure depends on selected sensor and we select the sensor according to yres