Changed AVISION_FILTER_* defs to use final values

Changed the AVISION_FILTER_* defines to their final values rather than
bit-shifting them prior to use.  This make reading the code much easier
since no mental calculation is necessary to determine what the final
bit-pattern/value will be.
merge-requests/1/head
Mike Kelly 2010-12-21 11:02:20 +09:00
rodzic ce8b353950
commit 7999eeb19d
2 zmienionych plików z 11 dodań i 10 usunięć

Wyświetl plik

@ -5686,13 +5686,13 @@ set_window (Avision_Scanner* s)
}
if (color_mode_is_color (s->c_mode)) {
cmd.window.avision.bitset1 |= AVISION_FILTER_RGB << 3;
cmd.window.avision.bitset1 |= AVISION_FILTER_RGB;
}
else {
if (dev->hw->feature_type & AV_FASTER_WITH_FILTER)
cmd.window.avision.bitset1 |= AVISION_FILTER_GREEN << 3;
cmd.window.avision.bitset1 |= AVISION_FILTER_GREEN;
else
cmd.window.avision.bitset1 |= AVISION_FILTER_NONE << 3;
cmd.window.avision.bitset1 |= AVISION_FILTER_NONE;
}
debug_print_window_descriptor (5, "set_window", &(cmd.window));

Wyświetl plik

@ -491,13 +491,14 @@ typedef struct Avision_Scanner
#define AVISION_SCSI_OP_TRANS_CALIB_GRAY 0x04
#define AVISION_SCSI_OP_TRANS_CALIB_COLOR 0x05
#define AVISION_FILTER_NONE 0
#define AVISION_FILTER_RED 1
#define AVISION_FILTER_GREEN 2
#define AVISION_FILTER_BLUE 3
#define AVISION_FILTER_RGB 4
#define AVISION_FILTER_CMYK 5
#define AVISION_FILTER_GRAY 6
/* These apply to bitset1. The values are 0 to 6, shifted 3 bits to the left */
#define AVISION_FILTER_NONE 0x00
#define AVISION_FILTER_RED 0x08
#define AVISION_FILTER_GREEN 0x10
#define AVISION_FILTER_BLUE 0x18
#define AVISION_FILTER_RGB 0x20
#define AVISION_FILTER_CMYK 0x28
#define AVISION_FILTER_GRAY 0x30
/* The SCSI structures that we have to send to an avision to get it to
do various stuff... */