kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Rename {INVERTED->SWAP}_16_BIT_DATA model flag
rodzic
52cd02d78c
commit
ab1d86d74a
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<ImagePipelineNodeSwap16BitEndian>();
|
||||
}
|
||||
|
||||
|
@ -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<ImagePipelineNodeSwap16BitEndian>();
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Ładowanie…
Reference in New Issue