From ab1d86d74a230add6ca328d3f3a769ef29e31634 Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Sat, 9 May 2020 13:29:52 +0300 Subject: [PATCH] genesys: Rename {INVERTED->SWAP}_16_BIT_DATA model flag --- backend/genesys/enums.h | 2 +- backend/genesys/genesys.cpp | 2 +- backend/genesys/low.cpp | 4 ++-- backend/genesys/tables_model.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/genesys/enums.h b/backend/genesys/enums.h index 0191b9223..08d58ab7d 100644 --- a/backend/genesys/enums.h +++ b/backend/genesys/enums.h @@ -508,7 +508,7 @@ enum class ModelFlag : unsigned SHADING_REPARK = 1 << 18, // 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 UTA_NO_SECONDARY_MOTOR = 1 << 21, diff --git a/backend/genesys/genesys.cpp b/backend/genesys/genesys.cpp index adfd164d4..61ad3fcd4 100644 --- a/backend/genesys/genesys.cpp +++ b/backend/genesys/genesys.cpp @@ -2348,7 +2348,7 @@ static void genesys_shading_calibration_impl(Genesys_Device* dev, const Genesys_ 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) { auto value = calibration_data[i]; value = ((value >> 8) & 0xff) | ((value << 8) & 0xff00); diff --git a/backend/genesys/low.cpp b/backend/genesys/low.cpp index 66b0e58df..79dc84b49 100644 --- a/backend/genesys/low.cpp +++ b/backend/genesys/low.cpp @@ -540,7 +540,7 @@ Image read_unshuffled_image_from_scanner(Genesys_Device* dev, const ScanSession& 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(); } @@ -1176,7 +1176,7 @@ void build_image_pipeline(Genesys_Device* dev, const ScanSession& session) "_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(); } diff --git a/backend/genesys/tables_model.cpp b/backend/genesys/tables_model.cpp index 5201d59a4..488f45845 100644 --- a/backend/genesys/tables_model.cpp +++ b/backend/genesys/tables_model.cpp @@ -2376,7 +2376,7 @@ void genesys_init_usb_device_tables() ModelFlag::CUSTOM_GAMMA | ModelFlag::DARK_CALIBRATION | ModelFlag::SHADING_REPARK | - ModelFlag::INVERTED_16BIT_DATA; + ModelFlag::SWAP_16BIT_DATA; model.search_lines = 200; s_usb_devices->emplace_back(0x07b3, 0x0c04, model);