1 #include <errno.h> 2 #include <fcntl.h> 3 #include <stdio.h> 4 5 #define RED 0 6 #define GREEN 1 7 #define BLUE 2 8 9 extern int errno; 10 11 /* Command defs for QCR-Z Film Recorder */ 12 13 /* These are for 8 bit Look Up Tables */ 14 15 #define LUT_LOAD 0x00 16 #define LUT_VERIFY 0x01 17 18 #define NEUTRAL_LUT 0x1d 19 #define NEUTRAL_VERIFY 0x1e 20 21 22 /* These commands are for the 12 bit LUTs */ 23 24 #define LOAD_12_LUT 0x4c 25 #define VERIFY_12 0x4e 26 #define LOAD_12_NEUTRAL 0x4d 27 #define VERIFY_12_NEUTRAL 0x4f 28 29 /* Start a color image recording, reading Red, Blue than Green */ 30 31 #define THREE_PASS_PIXEL 0x06 32 33 /* For a three pass RLE image */ 34 #define THREE_PASS_RLE 0x16 35 36 37 /* These are for single passes of data, fully specified (Non-RLE) */ 38 #define NEUTRAL_PIXEL 0x02 39 #define RED_PIXEL 0x03 40 #define GREEN_PIXEL 0x04 41 #define BLUE_PIXEL 0x05 42 43 /* These are for single passes of data, run length format */ 44 #define NEUTRAL_RLE 0x12 45 #define RED_RLE 0x13 46 #define GREEN_RLE 0x14 47 #define BLUE_RLE 0x15 48 49 #define TEST_PAT_0 0x0a 50 #define TEST_PAT_1 0x0b 51 52 #define SET_LINE_DELAY 0x0c 53 #define GET_VERSION_ID 0x0d 54 #define IDLENGTH 14 55 #define SET_DIMENSIONS 0x0e 56 57 #define MIRROR_DISABLE 0x30 58 #define MIRROR_ENABLE 0x31 59 60 #define WARBLE_DISABLE 0x21 61 #define WARBLE_ENABLE 0x22 62 63 #define RED_REPEAT_ON 0x39 64 #define RED_REPEAT_OFF 0x38 65 66 #define AUTO_SHUTTER_OFF 0x0f 67 #define AUTO_SHUTTER_ON 0x10 68 69 #define AUTO_FILTER_OFF 0x18 70 #define AUTO_FILTER_ON 0x19 71 72 #define QCR_BELL 0x11 73 74 #define AUTO_CAL_OFF 0x1f 75 #define AUTO_CAL_ON 0x20 76 77 #define END_WARBLE_OFF 0x21 78 #define END_WARBLE_ON 0x22 79 80 #define LOAD_INTERN_LUT 0x23 81 82 #define LUT_LINEAR 1 /* Canned luts */ 83 #define LUT_Polaroid59 2 84 #define LUT_Ektachrome100 3 85 #define LUT_Ektachrome100_4K 4 86 #define LUT_Polaroid59_4K 5 87 #define LUT_Polaroid809_4K 6 88 89 #define EXTENDED_STATUS 0x24 90 #define MODULE_ID 0x25 91 92 #define START_CAL 0x26 93 #define START_CAL_ALL 0x27 94 95 #define SHUTTER_CLOSE 0x1a 96 #define SHUTTER_OPEN 0x1b 97 98 #define BLACK_JUMP_OFF 0x28 99 #define BLACK_JUMP_ON 0x29 100 101 #define RESOLUTION_2K 0x2a 102 #define RESOLUTION_4K 0x2b 103 104 #define GET_BRIGHTNESS 0x2c 105 #define SET_BRIGHTNESS 0x2d 106 107 #define ROTATE_90_OFF 0x2e 108 #define ROTATE_90_ON 0x2f 109 110 #define RETURN_BRIGHT_LEVELS 0x2c 111 #define LOAD_BRIGHT_LEVELS 0x2d 112 113 #define RETURN_BRIGHT_TABLE 0x3b 114 #define LOAD_BRIGHT_TABLE 0x3a 115 116 /* Special for QCR-Z */ 117 118 #define RETURN_STATUS 0x3c 119 #define SET_FRAME_COUNTER 0x3d 120 #define GET_FRAME_COUNTER 0x3e 121 #define RES_2K_SAME_STATUS 0x3f 122 #define RES_4K_SAME_STATUS 0x40 123 #define REWIND_FILM 0x41 124 #define ADVANCE_FILM 0x42 125 #define MULT_RGB_LUTS 0x43 126 #define MULT_GRAY_LUTS 0x44 127 #define LOAD_FILM 0x45 128 #define UNLOAD_FILM 0x46 129 #define NOTCH_FILM 0x47 130 #define DISABLE_HALF_FRAME 0x48 131 #define ENABLE_HALF_FRAME 0x49 132 #define DISABLE_180_ROTATE 0x4a 133 #define ENABLE_180_ROTATE 0x4b 134