Lines Matching refs:size

307  * @param size size of the table
313 void sanei_genesys_create_gamma_table(std::vector<std::uint16_t>& gamma_table, int size,
317 gamma_table.resize(size, 0);
322 DBG(DBG_proc, "%s: size = %d, ""maximum = %g, gamma_max = %g, gamma = %g\n", __func__, size,
324 for (i = 0; i < size; i++)
326 value = static_cast<float>(gamma_max * std::pow(static_cast<double>(i) / size, 1.0 / gamma));
338 int size = 0;
342 size = 16384;
344 size = 4096;
346 max = size - 1;
351 size = 257;
354 size = 256;
357 sanei_genesys_create_gamma_table(gamma_table, size, max, max, gamma);
396 The data needs to be of size "size", and in little endian byte order.
399 std::uint8_t* data, int size)
401 DBG_HELPER_ARGS(dbg, "(size = %d)", size);
408 dev->cmd_set->send_shading_data(dev, sensor, data, size);
414 dev->interface->write_buffer(0x3c, start_address, data, size);
492 DBG_HELPER_ARGS(dbg, "table_nr = %d, steps = %zu", table_nr, slope_table.size());
519 table.reserve(slope_table.size() * 2);
520 for (std::size_t i = 0; i < slope_table.size(); i++) {
530 while (table.size() < max_table_size * 2) {
554 table.size());
567 table.size());
574 table.size());
582 dev->interface->write_ahb(0x10000000 + 0x4000 * table_nr, table.size(),
1450 float size = dev.model->x_size_ta;
1451 target_pixels = static_cast<int>((size * calib_sensor->get_optical_resolution()) / MM_PER_INCH);
1669 debug_image_info.size());
1881 curr_output = static_cast<float>(values[unsigned((values.size() - 1) * 0.95)]);
2235 size_t size;
2267 // but this needs checking. Note the extra line when computing size.
2272 size = dev->calib_session.output_total_bytes_raw;
2274 size = channels * 2 * pixels_per_line * (dev->calib_session.params.lines + 1);
2277 std::vector<std::uint16_t> calibration_data(size / 2);
2311 size);
2316 for (std::size_t i = 0; i < size / 2; ++i) {
2324 for (std::size_t i = 0; i < size / 2; ++i) {
2581 std::size_t size;
2612 size = dev->calib_session.output_total_bytes_raw;
2616 size = channels * 2 * pixels_per_line * dev->calib_session.params.lines;
2619 std::vector<std::uint8_t> calibration_data(size);
2635 sanei_genesys_read_data_from_scanner(dev, calibration_data.data(), size);
3249 /* allocate computed size */
4163 size_t size, max_size = 0;
4168 size = strlen (strings[i]) + 1;
4169 if (size > max_size)
4170 max_size = size;
4317 s->bpp_list[0] = bpp.size();
4340 scanner->opt[option].size = 16384 * sizeof (SANE_Word);
4345 scanner->opt[option].size = 4096 * sizeof (SANE_Word);
4351 scanner->opt[option].size = 256 * sizeof (SANE_Word);
4358 * @param size maximum size of the range
4361 static SANE_Range create_range(float size)
4365 range.max = float_to_fixed(size);
4415 if(s_devices->size() > 1) {
4440 int size = std::snprintf(&ret.front(), ret.size(), "%s", filename);
4441 ret.resize(size);
4445 int size = 0;
4448 size = std::snprintf(&ret.front(), ret.size(), "%s%c.sane", ptr, PATH_SEP);
4449 ret.resize(size);
4454 size = std::snprintf(&ret.front(), ret.size(), "%s%c.sane%c%s",
4456 ret.resize(size);
4468 s.opt_resolution_values.resize(resolutions.size() + 1, 0);
4469 s.opt_resolution_values[0] = resolutions.size();
4513 s->opt[option].size = sizeof (SANE_Word);
4527 s->opt[OPT_MODE_GROUP].size = 0;
4537 s->opt[OPT_MODE].size = max_string_size (mode_list);
4555 s->opt[OPT_SOURCE].size = max_string_size(s->opt_source_values);
4557 if (s->opt_source_values.size() < 2) {
4577 s->opt[OPT_BIT_DEPTH].size = sizeof (SANE_Word);
4597 s->opt[OPT_GEOMETRY_GROUP].size = 0;
4640 s->opt[OPT_ENHANCEMENT_GROUP].size = 0;
4717 s->opt[OPT_EXTRAS_GROUP].size = 0;
4730 s->opt[OPT_COLOR_FILTER].size = max_string_size (color_filter_list);
4736 s->opt[OPT_COLOR_FILTER].size = max_string_size (cis_color_filter_list);
4753 s->opt[OPT_CALIBRATION_FILE].size = PATH_MAX;
4803 s->opt[OPT_SENSOR_GROUP].size = 0;
4976 s->opt[OPT_BUTTON_GROUP].size = 0;
4999 s->opt[OPT_CLEAR_CALIBRATION].size = 0;
5010 s->opt[OPT_FORCE_CALIBRATION].size = 0;
5022 s->opt[OPT_IGNORE_OFFSETS].size = 0;
5176 DBG(DBG_info, "%s: %zu devices currently attached\n", __func__, s_devices->size());
5182 changes that don't change size -- at least for now, as we store most
5348 s_sane_devices->reserve(s_devices->size());
5349 s_sane_devices_data->reserve(s_devices->size());
5350 s_sane_devices_ptrs->reserve(s_devices->size() + 1);
5717 option_size = s->opt[option].size / sizeof (SANE_Word);
5718 if (gamma_table.size() != option_size) {
5719 throw std::runtime_error("The size of the gamma tables does not match");
5731 option_size = s->opt[option].size / sizeof (SANE_Word);
5732 if (gamma_table.size() != option_size) {
5733 throw std::runtime_error("The size of the gamma tables does not match");
5745 option_size = s->opt[option].size / sizeof (SANE_Word);
5746 if (gamma_table.size() != option_size) {
5747 throw std::runtime_error("The size of the gamma tables does not match");
5759 option_size = s->opt[option].size / sizeof (SANE_Word);
5760 if (gamma_table.size() != option_size) {
5761 throw std::runtime_error("The size of the gamma tables does not match");
6019 option_size = s->opt[option].size / sizeof (SANE_Word);
6033 option_size = s->opt[option].size / sizeof (SANE_Word);
6042 option_size = s->opt[option].size / sizeof (SANE_Word);
6051 option_size = s->opt[option].size / sizeof (SANE_Word);