genesys: Rename {INVERTED->SWAP}_16_BIT_DATA model flag

merge-requests/463/merge
Povilas Kanapickas 2020-05-09 13:29:52 +03:00
rodzic 52cd02d78c
commit ab1d86d74a
4 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -508,7 +508,7 @@ enum class ModelFlag : unsigned
SHADING_REPARK = 1 << 18, SHADING_REPARK = 1 << 18,
// the scanner outputs 16-bit data that is byte-inverted // the scanner outputs 16-bit data that is byte-inverted
INVERTED_16BIT_DATA = 1 << 20, SWAP_16BIT_DATA = 1 << 20,
// the scanner has transparency, but it's implemented using only one motor // the scanner has transparency, but it's implemented using only one motor
UTA_NO_SECONDARY_MOTOR = 1 << 21, UTA_NO_SECONDARY_MOTOR = 1 << 21,

Wyświetl plik

@ -2348,7 +2348,7 @@ static void genesys_shading_calibration_impl(Genesys_Device* dev, const Genesys_
dev->cmd_set->end_scan(dev, &local_reg, true); dev->cmd_set->end_scan(dev, &local_reg, true);
if (has_flag(dev->model->flags, ModelFlag::INVERTED_16BIT_DATA)) { if (has_flag(dev->model->flags, ModelFlag::SWAP_16BIT_DATA)) {
for (std::size_t i = 0; i < size / 2; ++i) { for (std::size_t i = 0; i < size / 2; ++i) {
auto value = calibration_data[i]; auto value = calibration_data[i];
value = ((value >> 8) & 0xff) | ((value << 8) & 0xff00); value = ((value >> 8) & 0xff) | ((value << 8) & 0xff00);

Wyświetl plik

@ -540,7 +540,7 @@ Image read_unshuffled_image_from_scanner(Genesys_Device* dev, const ScanSession&
1, 1); 1, 1);
} }
if (has_flag(dev->model->flags, ModelFlag::INVERTED_16BIT_DATA) && session.params.depth == 16) { if (has_flag(dev->model->flags, ModelFlag::SWAP_16BIT_DATA) && session.params.depth == 16) {
pipeline.push_node<ImagePipelineNodeSwap16BitEndian>(); pipeline.push_node<ImagePipelineNodeSwap16BitEndian>();
} }
@ -1176,7 +1176,7 @@ void build_image_pipeline(Genesys_Device* dev, const ScanSession& session)
"_0_before_swap.pnm"); "_0_before_swap.pnm");
} }
if (has_flag(dev->model->flags, ModelFlag::INVERTED_16BIT_DATA) && depth == 16) { if (has_flag(dev->model->flags, ModelFlag::SWAP_16BIT_DATA) && depth == 16) {
dev->pipeline.push_node<ImagePipelineNodeSwap16BitEndian>(); dev->pipeline.push_node<ImagePipelineNodeSwap16BitEndian>();
} }

Wyświetl plik

@ -2376,7 +2376,7 @@ void genesys_init_usb_device_tables()
ModelFlag::CUSTOM_GAMMA | ModelFlag::CUSTOM_GAMMA |
ModelFlag::DARK_CALIBRATION | ModelFlag::DARK_CALIBRATION |
ModelFlag::SHADING_REPARK | ModelFlag::SHADING_REPARK |
ModelFlag::INVERTED_16BIT_DATA; ModelFlag::SWAP_16BIT_DATA;
model.search_lines = 200; model.search_lines = 200;
s_usb_devices->emplace_back(0x07b3, 0x0c04, model); s_usb_devices->emplace_back(0x07b3, 0x0c04, model);