Lines Matching defs:table
303 /** @brief computes gamma table
304 * Generates a gamma table of the given length within 0 and the given
306 * @param gamma_table gamma table to fill
307 * @param size size of the table
311 * @return a gamma table filled with the computed values
515 throw SaneException("invalid table number %d", table_nr);
518 std::vector<std::uint8_t> table;
519 table.reserve(slope_table.size() * 2);
521 table.push_back(slope_table[i] & 0xff);
522 table.push_back(slope_table[i] >> 8);
529 table.reserve(max_table_size * 2);
530 while (table.size() < max_table_size * 2) {
531 table.push_back(slope_table.back() & 0xff);
532 table.push_back(slope_table.back() >> 8);
553 dev->interface->write_buffer(0x3c, start_address + table_nr * 0x100, table.data(),
554 table.size());
566 dev->interface->write_buffer(0x3c, start_address + table_nr * 0x200, table.data(),
567 table.size());
571 // slope table addresses are fixed : 0x40000, 0x48000, 0x50000, 0x58000, 0x60000
573 dev->interface->write_gamma(0x28, 0x40000 + 0x8000 * table_nr, table.data(),
574 table.size());
581 // slope table addresses are fixed
582 dev->interface->write_ahb(0x10000000 + 0x4000 * table_nr, table.size(),
583 table.data());
4322 * Set up a default gamma table vector based on device description
4323 * gl646: 12 or 14 bits gamma table depending on ModelFlag::GAMMA_14BIT
4327 * @param option option number of the gamma table to set
4350 { /* other asics have 16 bits words gamma table */
4643 /* custom-gamma table */
4675 /* currently, there are only gamma table options in this group,
4676 * so if the scanner doesn't support gamma table, disable the
5630 SANE_Word* table = nullptr;
5709 table = reinterpret_cast<SANE_Word*>(val);
5722 table[i] = gamma_table[i];
5729 table = reinterpret_cast<SANE_Word*>(val);
5736 table[i] = gamma_table[i];
5743 table = reinterpret_cast<SANE_Word*>(val);
5750 table[i] = gamma_table[i];
5757 table = reinterpret_cast<SANE_Word*>(val);
5764 table[i] = gamma_table[i];
5846 SANE_Word *table;
5939 /* if custom gamma, toggle gamma table options according to the mode */
6010 for (auto& table : dev->gamma_override_tables) {
6011 table.clear();
6018 table = reinterpret_cast<SANE_Word*>(val);
6025 dev->gamma_override_tables[GENESYS_RED][i] = table[i];
6026 dev->gamma_override_tables[GENESYS_GREEN][i] = table[i];
6027 dev->gamma_override_tables[GENESYS_BLUE][i] = table[i];
6032 table = reinterpret_cast<SANE_Word*>(val);
6036 dev->gamma_override_tables[GENESYS_RED][i] = table[i];
6041 table = reinterpret_cast<SANE_Word*>(val);
6045 dev->gamma_override_tables[GENESYS_GREEN][i] = table[i];
6050 table = reinterpret_cast<SANE_Word*>(val);
6054 dev->gamma_override_tables[GENESYS_BLUE][i] = table[i];