diff options
Diffstat (limited to 'baseline/source/cjpeg_transupp/jpeglib.h')
| -rw-r--r-- | baseline/source/cjpeg_transupp/jpeglib.h | 757 |
1 files changed, 0 insertions, 757 deletions
diff --git a/baseline/source/cjpeg_transupp/jpeglib.h b/baseline/source/cjpeg_transupp/jpeglib.h deleted file mode 100644 index bb4c940..0000000 --- a/baseline/source/cjpeg_transupp/jpeglib.h +++ /dev/null | |||
| @@ -1,757 +0,0 @@ | |||
| 1 | /* | ||
| 2 | |||
| 3 | This program is part of the TACLeBench benchmark suite. | ||
| 4 | Version V 2.0 | ||
| 5 | |||
| 6 | Name: jpeglib | ||
| 7 | |||
| 8 | Author: Thomas G. Lane | ||
| 9 | |||
| 10 | Function: This file defines the application interface for the JPEG library. | ||
| 11 | Most applications using the library need only include this file, and perhaps | ||
| 12 | jerror.h if they want to know the exact error codes. | ||
| 13 | |||
| 14 | Source: MediaBench II | ||
| 15 | http://euler.slu.edu/~fritts/mediabench (mirror) | ||
| 16 | |||
| 17 | Original name: cjpeg | ||
| 18 | |||
| 19 | Changes: No major functional changes. | ||
| 20 | |||
| 21 | License: See the accompanying README file. | ||
| 22 | |||
| 23 | */ | ||
| 24 | |||
| 25 | |||
| 26 | #ifndef JPEGLIB_H | ||
| 27 | #define JPEGLIB_H | ||
| 28 | |||
| 29 | /* | ||
| 30 | Various constants determining the sizes of things. | ||
| 31 | All of these are specified by the JPEG standard, so don't change them if you | ||
| 32 | want to be compatible. | ||
| 33 | */ | ||
| 34 | |||
| 35 | /* The basic DCT block is 8x8 samples */ | ||
| 36 | #define DCTSIZE 8 | ||
| 37 | |||
| 38 | /* DCTSIZE squared; # of elements in a block */ | ||
| 39 | #define DCTSIZE2 64 | ||
| 40 | |||
| 41 | |||
| 42 | /* | ||
| 43 | Data structures for images (arrays of samples and of DCT coefficients). | ||
| 44 | On 80x86 machines, the image arrays are too big for near pointers, but the | ||
| 45 | pointer arrays can fit in near memory. | ||
| 46 | */ | ||
| 47 | |||
| 48 | /* ptr to one image row of pixel samples. */ | ||
| 49 | typedef unsigned char *JSAMPROW; | ||
| 50 | |||
| 51 | /* ptr to some rows (a 2-D sample array) */ | ||
| 52 | typedef JSAMPROW *JSAMPARRAY; | ||
| 53 | |||
| 54 | /* one block of coefficients */ | ||
| 55 | typedef signed char JBLOCK[DCTSIZE2]; | ||
| 56 | |||
| 57 | /* pointer to one row of coefficient blocks */ | ||
| 58 | typedef JBLOCK *JBLOCKROW; | ||
| 59 | |||
| 60 | /* a 2-D array of coefficient blocks */ | ||
| 61 | typedef JBLOCKROW *JBLOCKARRAY; | ||
| 62 | |||
| 63 | /* useful in a couple of places */ | ||
| 64 | typedef signed char *JCOEFPTR; | ||
| 65 | |||
| 66 | |||
| 67 | /* | ||
| 68 | DCT coefficient quantization tables. | ||
| 69 | */ | ||
| 70 | |||
| 71 | typedef struct { | ||
| 72 | /* quantization step for each coefficient */ | ||
| 73 | /* | ||
| 74 | This array gives the coefficient quantizers in natural array order (not the | ||
| 75 | zigzag order in which they are stored in a JPEG DQT marker). | ||
| 76 | CAUTION: IJG versions prior to v6a kept this array in zigzag order. | ||
| 77 | */ | ||
| 78 | unsigned short quantval[ DCTSIZE2 ]; | ||
| 79 | |||
| 80 | /* 1 when table has been output */ | ||
| 81 | /* | ||
| 82 | This field is used only during compression. It's initialized 0 when the | ||
| 83 | table is created, and set 1 when it's been output to the file. You could | ||
| 84 | suppress output of a table by setting this to 1. (See jpeg_suppress_tables | ||
| 85 | for an example.) | ||
| 86 | */ | ||
| 87 | int sent_table; | ||
| 88 | } JQUANT_TBL; | ||
| 89 | |||
| 90 | |||
| 91 | /* | ||
| 92 | Huffman coding tables. | ||
| 93 | */ | ||
| 94 | |||
| 95 | typedef struct { | ||
| 96 | /* These two fields directly represent the contents of a JPEG DHT marker */ | ||
| 97 | |||
| 98 | /* bits[k] = # of symbols with codes of */ | ||
| 99 | /* length k bits; bits[0] is unused */ | ||
| 100 | unsigned char bits[ 17 ]; | ||
| 101 | |||
| 102 | /* The symbols, in order of incr code length */ | ||
| 103 | /* | ||
| 104 | This field is used only during compression. It's initialized 0 when the | ||
| 105 | table is created, and set 1 when it's been output to the file. You could | ||
| 106 | suppress output of a table by setting this to 1. (See jpeg_suppress_tables | ||
| 107 | for an example.) | ||
| 108 | */ | ||
| 109 | unsigned char huffval[ 256 ]; | ||
| 110 | |||
| 111 | /* 1 when table has been output */ | ||
| 112 | int sent_table; | ||
| 113 | } JHUFF_TBL; | ||
| 114 | |||
| 115 | |||
| 116 | /* | ||
| 117 | Basic info about one component (color channel). | ||
| 118 | */ | ||
| 119 | |||
| 120 | typedef struct { | ||
| 121 | /* | ||
| 122 | These values are fixed over the whole image. For compression, they must be | ||
| 123 | supplied by parameter setup; for decompression, they are read from the SOF | ||
| 124 | marker. | ||
| 125 | */ | ||
| 126 | |||
| 127 | /* identifier for this component (0..255) */ | ||
| 128 | int component_id; | ||
| 129 | |||
| 130 | /* its index in SOF or cinfo->comp_info[] */ | ||
| 131 | int component_index; | ||
| 132 | |||
| 133 | /* horizontal sampling factor (1..4) */ | ||
| 134 | int h_samp_factor; | ||
| 135 | |||
| 136 | /* vertical sampling factor (1..4) */ | ||
| 137 | int v_samp_factor; | ||
| 138 | |||
| 139 | /* quantization table selector (0..3) */ | ||
| 140 | int quant_tbl_no; | ||
| 141 | |||
| 142 | /* | ||
| 143 | These values may vary between scans. For compression, they must be supplied | ||
| 144 | by parameter setup; for decompression, they are read from the SOS marker. | ||
| 145 | The decompressor output side may not use these variables. | ||
| 146 | */ | ||
| 147 | |||
| 148 | /* DC entropy table selector (0..3) */ | ||
| 149 | int dc_tbl_no; | ||
| 150 | |||
| 151 | /* AC entropy table selector (0..3) */ | ||
| 152 | int ac_tbl_no; | ||
| 153 | |||
| 154 | /* Remaining fields should be treated as private by applications. */ | ||
| 155 | |||
| 156 | /* | ||
| 157 | These values are computed during compression or decompression startup: | ||
| 158 | Component's size in DCT blocks. Any dummy blocks added to complete an MCU | ||
| 159 | are not counted; therefore these values do not depend on whether a scan is | ||
| 160 | interleaved or not. | ||
| 161 | */ | ||
| 162 | unsigned int width_in_blocks; | ||
| 163 | unsigned int height_in_blocks; | ||
| 164 | |||
| 165 | /* | ||
| 166 | Size of a DCT block in samples. Always DCTSIZE for compression. For | ||
| 167 | decompression this is the size of the output from one DCT block, reflecting | ||
| 168 | any scaling we choose to apply during the IDCT step. Values of 1,2,4,8 are | ||
| 169 | likely to be supported. Note that different components may receive different | ||
| 170 | IDCT scalings. | ||
| 171 | */ | ||
| 172 | int DCT_scaled_size; | ||
| 173 | |||
| 174 | /* | ||
| 175 | The downsampled dimensions are the component's actual, unpadded number of | ||
| 176 | samples at the main buffer (preprocessing/compression interface), thus | ||
| 177 | downsampled_width = ceil(image_width * Hi/Hmax) and similarly for height. | ||
| 178 | For decompression, IDCT scaling is included, so | ||
| 179 | downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE) | ||
| 180 | */ | ||
| 181 | |||
| 182 | /* actual width in samples */ | ||
| 183 | unsigned int downsampled_width; | ||
| 184 | |||
| 185 | /* actual height in samples */ | ||
| 186 | unsigned int downsampled_height; | ||
| 187 | |||
| 188 | /* | ||
| 189 | This flag is used only for decompression. In cases where some of the | ||
| 190 | components will be ignored (eg grayscale output from YCbCr image), we can | ||
| 191 | skip most computations for the unused components. | ||
| 192 | */ | ||
| 193 | |||
| 194 | /* do we need the value of this component? */ | ||
| 195 | int component_needed; | ||
| 196 | |||
| 197 | /* | ||
| 198 | These values are computed before starting a scan of the component. The | ||
| 199 | decompressor output side may not use these variables. | ||
| 200 | */ | ||
| 201 | |||
