aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jdct.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jdct.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jdct.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jdct.h786
1 files changed, 393 insertions, 393 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jdct.h b/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jdct.h
index b1ff912..360dec8 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jdct.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/jdct.h
@@ -1,393 +1,393 @@
1/* 1/*
2 * jdct.h 2 * jdct.h
3 * 3 *
4 * Copyright (C) 1994-1996, Thomas G. Lane. 4 * Copyright (C) 1994-1996, Thomas G. Lane.
5 * This file is part of the Independent JPEG Group's software. 5 * This file is part of the Independent JPEG Group's software.
6 * For conditions of distribution and use, see the accompanying README file. 6 * For conditions of distribution and use, see the accompanying README file.
7 * 7 *
8 * This include file contains common declarations for the forward and 8 * This include file contains common declarations for the forward and
9 * inverse DCT modules. These declarations are private to the DCT managers 9 * inverse DCT modules. These declarations are private to the DCT managers
10 * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. 10 * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms.
11 * The individual DCT algorithms are kept in separate files to ease 11 * The individual DCT algorithms are kept in separate files to ease
12 * machine-dependent tuning (e.g., assembly coding). 12 * machine-dependent tuning (e.g., assembly coding).
13 */ 13 */
14 14
15 15
16/* 16/*
17 * A forward DCT routine is given a pointer to an input sample array and 17 * A forward DCT routine is given a pointer to an input sample array and
18 * a pointer to a work area of type DCTELEM[]; the DCT is to be performed 18 * a pointer to a work area of type DCTELEM[]; the DCT is to be performed
19 * in-place in that buffer. Type DCTELEM is int for 8-bit samples, INT32 19 * in-place in that buffer. Type DCTELEM is int for 8-bit samples, INT32
20 * for 12-bit samples. (NOTE: Floating-point DCT implementations use an 20 * for 12-bit samples. (NOTE: Floating-point DCT implementations use an
21 * array of type FAST_FLOAT, instead.) 21 * array of type FAST_FLOAT, instead.)
22 * The input data is to be fetched from the sample array starting at a 22 * The input data is to be fetched from the sample array starting at a
23 * specified column. (Any row offset needed will be applied to the array 23 * specified column. (Any row offset needed will be applied to the array
24 * pointer before it is passed to the FDCT code.) 24 * pointer before it is passed to the FDCT code.)
25 * Note that the number of samples fetched by the FDCT routine is 25 * Note that the number of samples fetched by the FDCT routine is
26 * DCT_h_scaled_size * DCT_v_scaled_size. 26 * DCT_h_scaled_size * DCT_v_scaled_size.
27 * The DCT outputs are returned scaled up by a factor of 8; they therefore 27 * The DCT outputs are returned scaled up by a factor of 8; they therefore
28 * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This 28 * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This
29 * convention improves accuracy in integer implementations and saves some 29 * convention improves accuracy in integer implementations and saves some
30 * work in floating-point ones. 30 * work in floating-point ones.
31 * Quantization of the output coefficients is done by jcdctmgr.c. 31 * Quantization of the output coefficients is done by jcdctmgr.c.
32 */ 32 */
33 33
34#if BITS_IN_JSAMPLE == 8 34#if BITS_IN_JSAMPLE == 8
35typedef int DCTELEM; /* 16 or 32 bits is fine */ 35typedef int DCTELEM; /* 16 or 32 bits is fine */
36#else 36#else
37typedef INT32 DCTELEM; /* must have 32 bits */ 37typedef INT32 DCTELEM; /* must have 32 bits */
38#endif 38#endif
39 39
40typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data, 40typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data,
41 JSAMPARRAY sample_data, 41 JSAMPARRAY sample_data,
42 JDIMENSION start_col)); 42 JDIMENSION start_col));
43typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data, 43typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data,
44 JSAMPARRAY sample_data, 44 JSAMPARRAY sample_data,
45 JDIMENSION start_col)); 45 JDIMENSION start_col));
46 46
47 47
48/* 48/*
49 * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer 49 * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer
50 * to an output sample array. The routine must dequantize the input data as 50 * to an output sample array. The routine must dequantize the input data as
51 * well as perform the IDCT; for dequantization, it uses the multiplier table 51 * well as perform the IDCT; for dequantization, it uses the multiplier table
52 * pointed to by compptr->dct_table. The output data is to be placed into the 52 * pointed to by compptr->dct_table. The output data is to be placed into the
53 * sample array starting at a specified column. (Any row offset needed will 53 * sample array starting at a specified column. (Any row offset needed will
54 * be applied to the array pointer before it is passed to the IDCT code.) 54 * be applied to the array pointer before it is passed to the IDCT code.)
55 * Note that the number of samples emitted by the IDCT routine is 55 * Note that the number of samples emitted by the IDCT routine is
56 * DCT_h_scaled_size * DCT_v_scaled_size. 56 * DCT_h_scaled_size * DCT_v_scaled_size.
57 */ 57 */
58 58
59/* typedef inverse_DCT_method_ptr is declared in jpegint.h */ 59/* typedef inverse_DCT_method_ptr is declared in jpegint.h */
60 60
61/* 61/*
62 * Each IDCT routine has its own ideas about the best dct_table element type. 62 * Each IDCT routine has its own ideas about the best dct_table element type.
63 */ 63 */
64 64
65typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ 65typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */
66#if BITS_IN_JSAMPLE == 8 66#if BITS_IN_JSAMPLE == 8
67typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ 67typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */
68#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ 68#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */
69#else 69#else
70typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ 70typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */
71#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ 71#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */
72#endif 72#endif
73typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ 73typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */
74 74
75 75
76/* 76/*
77 * Each IDCT routine is responsible for range-limiting its results and 77 * Each IDCT routine is responsible for range-limiting its results and
78 * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could 78 * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could
79 * be quite far out of range if the input data is corrupt, so a bulletproof 79 * be quite far out of range if the input data is corrupt, so a bulletproof
80 * range-limiting step is required. We use a mask-and-table-lookup method 80 * range-limiting step is required. We use a mask-and-table-lookup method
81 * to do the combined operations quickly. See the comments with 81 * to do the combined operations quickly. See the comments with
82 * prepare_range_limit_table (in jdmaster.c) for more info. 82 * prepare_range_limit_table (in jdmaster.c) for more info.
83 */ 83 */
84 84
85#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE) 85#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE)
86 86
87#define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */ 87#define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */
88 88
89 89
90/* Short forms of external names for systems with brain-damaged linkers. */ 90/* Short forms of external names for systems with brain-damaged linkers. */
91 91
92#ifdef NEED_SHORT_EXTERNAL_NAMES 92#ifdef NEED_SHORT_EXTERNAL_NAMES
93#define jpeg_fdct_islow jFDislow 93#define jpeg_fdct_islow jFDislow
94#define jpeg_fdct_ifast jFDifast 94#define jpeg_fdct_ifast jFDifast
95#define jpeg_fdct_float jFDfloat 95#define jpeg_fdct_float jFDfloat
96#define jpeg_fdct_7x7 jFD7x7 96#define jpeg_fdct_7x7 jFD7x7
97#define jpeg_fdct_6x6 jFD6x6 97#define jpeg_fdct_6x6 jFD6x6
98#define jpeg_fdct_5x5 jFD5x5 98#define jpeg_fdct_5x5 jFD5x5
99#define jpeg_fdct_4x4 jFD4x4 99#define jpeg_fdct_4x4 jFD4x4
100#define jpeg_fdct_3x3 jFD3x3 100#define jpeg_fdct_3x3 jFD3x3
101#define jpeg_fdct_2x2 jFD2x2 101#define jpeg_fdct_2x2 jFD2x2
102#define jpeg_fdct_1x1 jFD1x1 102#define jpeg_fdct_1x1 jFD1x1
103#define jpeg_fdct_9x9 jFD9x9 103#define jpeg_fdct_9x9 jFD9x9
104#define jpeg_fdct_10x10 jFD10x10 104#define jpeg_fdct_10x10 jFD10x10
105#define jpeg_fdct_11x11 jFD11x11 105#define jpeg_fdct_11x11 jFD11x11
106#define jpeg_fdct_12x12 jFD12x12 106#define jpeg_fdct_12x12 jFD12x12
107#define jpeg_fdct_13x13 jFD13x13 107#define jpeg_fdct_13x13 jFD13x13
108#define jpeg_fdct_14x14 jFD14x14 108#define jpeg_fdct_14x14 jFD14x14
109#define jpeg_fdct_15x15 jFD15x15 109#define jpeg_fdct_15x15 jFD15x15
110#define jpeg_fdct_16x16 jFD16x16 110#define jpeg_fdct_16x16 jFD16x16
111#define jpeg_fdct_16x8 jFD16x8 111#define jpeg_fdct_16x8 jFD16x8
112#define jpeg_fdct_14x7 jFD14x7 112#define jpeg_fdct_14x7 jFD14x7
113#define jpeg_fdct_12x6 jFD12x6 113#define jpeg_fdct_12x6 jFD12x6
114#define jpeg_fdct_10x5 jFD10x5 114#define jpeg_fdct_10x5 jFD10x5
115#define jpeg_fdct_8x4 jFD8x4 115#define jpeg_fdct_8x4 jFD8x4
116#define jpeg_fdct_6x3 jFD6x3 116#define jpeg_fdct_6x3 jFD6x3
117#define jpeg_fdct_4x2 jFD4x2 117#define jpeg_fdct_4x2 jFD4x2
118#define jpeg_fdct_2x1 jFD2x1 118#define jpeg_fdct_2x1 jFD2x1
119#define jpeg_fdct_8x16 jFD8x16 119#define jpeg_fdct_8x16 jFD8x16
120#define jpeg_fdct_7x14 jFD7x14 120#define jpeg_fdct_7x14 jFD7x14
121#define jpeg_fdct_6x12 jFD6x12 121#define jpeg_fdct_6x12 jFD6x12
122#define jpeg_fdct_5x10 jFD5x10 122#define jpeg_fdct_5x10 jFD5x10
123#define jpeg_fdct_4x8 jFD4x8 123#define jpeg_fdct_4x8 jFD4x8
124#define jpeg_fdct_3x6 jFD3x6 124#define jpeg_fdct_3x6 jFD3x6
125#define jpeg_fdct_2x4 jFD2x4 125#define jpeg_fdct_2x4 jFD2x4
126#define jpeg_fdct_1x2 jFD1x2 126#define jpeg_fdct_1x2 jFD1x2
127#define jpeg_idct_islow jRDislow 127#define jpeg_idct_islow jRDislow
128#define jpeg_idct_ifast jRDifast 128#define jpeg_idct_ifast jRDifast
129#define jpeg_idct_float jRDfloat 129#define jpeg_idct_float jRDfloat
130#define jpeg_idct_7x7 jRD7x7 130#define jpeg_idct_7x7 jRD7x7
131#define jpeg_idct_6x6 jRD6x6 131#define jpeg_idct_6x6 jRD6x6
132#define jpeg_idct_5x5 jRD5x5 132#define jpeg_idct_5x5 jRD5x5
133#define jpeg_idct_4x4 jRD4x4 133#define jpeg_idct_4x4 jRD4x4
134#define jpeg_idct_3x3 jRD3x3 134#define jpeg_idct_3x3 jRD3x3
135#define jpeg_idct_2x2 jRD2x2 135#define jpeg_idct_2x2 jRD2x2
136#define jpeg_idct_1x1 jRD1x1 136#define jpeg_idct_1x1 jRD1x1
137#define jpeg_idct_9x9 jRD9x9 137#define jpeg_idct_9x9 jRD9x9
138#define jpeg_idct_10x10 jRD10x10 138#define jpeg_idct_10x10 jRD10x10
139#define jpeg_idct_11x11 jRD11x11 139#define jpeg_idct_11x11 jRD11x11
140#define jpeg_idct_12x12 jRD12x12 140#define jpeg_idct_12x12 jRD12x12
141#define jpeg_idct_13x13 jRD13x13 141#define jpeg_idct_13x13 jRD13x13
142#define jpeg_idct_14x14 jRD14x14 142#define jpeg_idct_14x14 jRD14x14
143#define jpeg_idct_15x15 jRD15x15 143#define jpeg_idct_15x15 jRD15x15
144#define jpeg_idct_16x16 jRD16x16 144#define jpeg_idct_16x16 jRD16x16
145#define jpeg_idct_16x8 jRD16x8 145#define jpeg_idct_16x8 jRD16x8
146#define jpeg_idct_14x7 jRD14x7 146#define jpeg_idct_14x7 jRD14x7
147#define jpeg_idct_12x6 jRD12x6 147#define jpeg_idct_12x6 jRD12x6
148#define jpeg_idct_10x5 jRD10x5 148#define jpeg_idct_10x5 jRD10x5
149#define jpeg_idct_8x4 jRD8x4 149#define jpeg_idct_8x4 jRD8x4
150#define jpeg_idct_6x3 jRD6x3 150#define jpeg_idct_6x3 jRD6x3
151#define jpeg_idct_4x2 jRD4x2 151#define jpeg_idct_4x2 jRD4x2
152#define jpeg_idct_2x1 jRD2x1 152#define jpeg_idct_2x1 jRD2x1
153#define jpeg_idct_8x16 jRD8x16 153#define jpeg_idct_8x16 jRD8x16
154#define jpeg_idct_7x14 jRD7x14 154#define jpeg_idct_7x14 jRD7x14
155#define jpeg_idct_6x12 jRD6x12 155#define jpeg_idct_6x12 jRD6x12
156#define jpeg_idct_5x10 jRD5x10 156#define jpeg_idct_5x10 jRD5x10
157#define jpeg_idct_4x8 jRD4x8 157#define jpeg_idct_4x8 jRD4x8
158#define jpeg_idct_3x6 jRD3x8 158#define jpeg_idct_3x6 jRD3x8
159#define jpeg_idct_2x4 jRD2x4 159#define jpeg_idct_2x4 jRD2x4
160#define jpeg_idct_1x2 jRD1x2 160#define jpeg_idct_1x2 jRD1x2
161#endif /* NEED_SHORT_EXTERNAL_NAMES */ 161#endif /* NEED_SHORT_EXTERNAL_NAMES */
162 162
163/* Extern declarations for the forward and inverse DCT routines. */ 163/* Extern declarations for the forward and inverse DCT routines. */
164 164
165EXTERN(void) jpeg_fdct_islow 165EXTERN(void) jpeg_fdct_islow
166 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 166 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
167EXTERN(void) jpeg_fdct_ifast 167EXTERN(void) jpeg_fdct_ifast
168 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 168 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
169EXTERN(void) jpeg_fdct_float 169EXTERN(void) jpeg_fdct_float
170 JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 170 JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col));
171EXTERN(void) jpeg_fdct_7x7 171EXTERN(void) jpeg_fdct_7x7
172 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 172 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
173EXTERN(void) jpeg_fdct_6x6 173EXTERN(void) jpeg_fdct_6x6
174 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 174 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
175EXTERN(void) jpeg_fdct_5x5 175EXTERN(void) jpeg_fdct_5x5
176 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 176 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
177EXTERN(void) jpeg_fdct_4x4 177EXTERN(void) jpeg_fdct_4x4
178 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 178 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
179EXTERN(void) jpeg_fdct_3x3 179EXTERN(void) jpeg_fdct_3x3
180 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 180 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
181EXTERN(void) jpeg_fdct_2x2 181EXTERN(void) jpeg_fdct_2x2
182 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 182 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
183EXTERN(void) jpeg_fdct_1x1 183EXTERN(void) jpeg_fdct_1x1
184 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 184 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
185EXTERN(void) jpeg_fdct_9x9 185EXTERN(void) jpeg_fdct_9x9
186 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 186 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
187EXTERN(void) jpeg_fdct_10x10 187EXTERN(void) jpeg_fdct_10x10
188 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 188 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
189EXTERN(void) jpeg_fdct_11x11 189EXTERN(void) jpeg_fdct_11x11
190 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 190 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
191EXTERN(void) jpeg_fdct_12x12 191EXTERN(void) jpeg_fdct_12x12
192 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 192 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
193EXTERN(void) jpeg_fdct_13x13 193EXTERN(void) jpeg_fdct_13x13
194 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 194 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
195EXTERN(void) jpeg_fdct_14x14 195EXTERN(void) jpeg_fdct_14x14
196 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 196 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
197EXTERN(void) jpeg_fdct_15x15 197EXTERN(void) jpeg_fdct_15x15
198 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 198 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
199EXTERN(void) jpeg_fdct_16x16 199EXTERN(void) jpeg_fdct_16x16
200 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 200 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
201EXTERN(void) jpeg_fdct_16x8 201EXTERN(void) jpeg_fdct_16x8
202 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 202 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
203EXTERN(void) jpeg_fdct_14x7 203EXTERN(void) jpeg_fdct_14x7
204 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 204 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
205EXTERN(void) jpeg_fdct_12x6 205EXTERN(void) jpeg_fdct_12x6
206 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 206 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
207EXTERN(void) jpeg_fdct_10x5 207EXTERN(void) jpeg_fdct_10x5
208 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 208 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
209EXTERN(void) jpeg_fdct_8x4 209EXTERN(void) jpeg_fdct_8x4
210 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 210 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
211EXTERN(void) jpeg_fdct_6x3 211EXTERN(void) jpeg_fdct_6x3
212 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 212 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
213EXTERN(void) jpeg_fdct_4x2 213EXTERN(void) jpeg_fdct_4x2
214 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 214 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
215EXTERN(void) jpeg_fdct_2x1 215EXTERN(void) jpeg_fdct_2x1
216 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 216 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
217EXTERN(void) jpeg_fdct_8x16 217EXTERN(void) jpeg_fdct_8x16
218 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 218 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
219EXTERN(void) jpeg_fdct_7x14 219EXTERN(void) jpeg_fdct_7x14
220 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 220 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
221EXTERN(void) jpeg_fdct_6x12 221EXTERN(void) jpeg_fdct_6x12
222 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 222 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
223EXTERN(void) jpeg_fdct_5x10 223EXTERN(void) jpeg_fdct_5x10
224 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 224 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
225EXTERN(void) jpeg_fdct_4x8 225EXTERN(void) jpeg_fdct_4x8
226 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 226 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
227EXTERN(void) jpeg_fdct_3x6 227EXTERN(void) jpeg_fdct_3x6
228 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 228 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
229EXTERN(void) jpeg_fdct_2x4 229EXTERN(void) jpeg_fdct_2x4
230 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 230 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
231EXTERN(void) jpeg_fdct_1x2 231EXTERN(void) jpeg_fdct_1x2
232 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); 232 JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
233 233
234EXTERN(void) jpeg_idct_islow 234EXTERN(void) jpeg_idct_islow
235 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 235 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
236 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 236 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
237EXTERN(void) jpeg_idct_ifast 237EXTERN(void) jpeg_idct_ifast
238 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 238 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
239 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 239 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
240EXTERN(void) jpeg_idct_float 240EXTERN(void) jpeg_idct_float
241 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 241 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
242 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 242 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
243EXTERN(void) jpeg_idct_7x7 243EXTERN(void) jpeg_idct_7x7
244 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 244 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
245 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 245 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
246EXTERN(void) jpeg_idct_6x6 246EXTERN(void) jpeg_idct_6x6
247 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 247 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
248 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 248 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
249EXTERN(void) jpeg_idct_5x5 249EXTERN(void) jpeg_idct_5x5
250 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 250 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
251 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 251 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
252EXTERN(void) jpeg_idct_4x4 252EXTERN(void) jpeg_idct_4x4
253 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 253 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
254 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 254 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
255EXTERN(void) jpeg_idct_3x3 255EXTERN(void) jpeg_idct_3x3
256 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 256 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
257 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 257 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
258EXTERN(void) jpeg_idct_2x2 258EXTERN(void) jpeg_idct_2x2
259 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 259 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
260 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 260 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
261EXTERN(void) jpeg_idct_1x1 261EXTERN(void) jpeg_idct_1x1
262 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 262 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
263 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 263 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
264EXTERN(void) jpeg_idct_9x9 264EXTERN(void) jpeg_idct_9x9
265 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 265 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
266 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 266 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
267EXTERN(void) jpeg_idct_10x10 267EXTERN(void) jpeg_idct_10x10
268 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 268 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
269 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 269 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
270EXTERN(void) jpeg_idct_11x11 270EXTERN(void) jpeg_idct_11x11
271 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 271 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
272 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 272 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
273EXTERN(void) jpeg_idct_12x12 273EXTERN(void) jpeg_idct_12x12
274 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 274 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
275 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 275 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
276EXTERN(void) jpeg_idct_13x13 276EXTERN(void) jpeg_idct_13x13
277 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 277 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
278 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 278 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
279EXTERN(void) jpeg_idct_14x14 279EXTERN(void) jpeg_idct_14x14
280 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 280 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
281 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 281 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
282EXTERN(void) jpeg_idct_15x15 282EXTERN(void) jpeg_idct_15x15
283 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 283 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
284 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 284 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
285EXTERN(void) jpeg_idct_16x16 285EXTERN(void) jpeg_idct_16x16
286 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 286 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
287 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 287 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
288EXTERN(void) jpeg_idct_16x8 288EXTERN(void) jpeg_idct_16x8
289 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 289 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
290 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 290 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
291EXTERN(void) jpeg_idct_14x7 291EXTERN(void) jpeg_idct_14x7
292 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 292 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
293 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 293 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
294EXTERN(void) jpeg_idct_12x6 294EXTERN(void) jpeg_idct_12x6
295 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 295 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
296 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 296 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
297EXTERN(void) jpeg_idct_10x5 297EXTERN(void) jpeg_idct_10x5
298 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 298 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
299 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 299 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
300EXTERN(void) jpeg_idct_8x4 300EXTERN(void) jpeg_idct_8x4
301 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 301 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
302 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 302 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
303EXTERN(void) jpeg_idct_6x3 303EXTERN(void) jpeg_idct_6x3
304 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 304 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
305 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 305 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
306EXTERN(void) jpeg_idct_4x2 306EXTERN(void) jpeg_idct_4x2
307 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 307 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
308 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 308 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
309EXTERN(void) jpeg_idct_2x1 309EXTERN(void) jpeg_idct_2x1
310 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 310 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
311 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 311 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
312EXTERN(void) jpeg_idct_8x16 312EXTERN(void) jpeg_idct_8x16
313 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 313 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
314 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 314 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
315EXTERN(void) jpeg_idct_7x14 315EXTERN(void) jpeg_idct_7x14
316 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 316 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
317 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 317 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
318EXTERN(void) jpeg_idct_6x12 318EXTERN(void) jpeg_idct_6x12
319 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 319 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
320 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 320 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
321EXTERN(void) jpeg_idct_5x10 321EXTERN(void) jpeg_idct_5x10
322 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 322 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
323 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 323 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
324EXTERN(void) jpeg_idct_4x8 324EXTERN(void) jpeg_idct_4x8
325 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 325 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
326 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 326 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
327EXTERN(void) jpeg_idct_3x6 327EXTERN(void) jpeg_idct_3x6
328 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 328 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
329 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 329 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
330EXTERN(void) jpeg_idct_2x4 330EXTERN(void) jpeg_idct_2x4
331 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 331 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
332 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 332 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
333EXTERN(void) jpeg_idct_1x2 333EXTERN(void) jpeg_idct_1x2
334 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 334 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
335 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 335 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
336 336
337 337
338/* 338/*
339 * Macros for handling fixed-point arithmetic; these are used by many 339 * Macros for handling fixed-point arithmetic; these are used by many
340 * but not all of the DCT/IDCT modules. 340 * but not all of the DCT/IDCT modules.
341 * 341 *
342 * All values are expected to be of type INT32. 342 * All values are expected to be of type INT32.
343 * Fractional constants are scaled left by CONST_BITS bits. 343 * Fractional constants are scaled left by CONST_BITS bits.
344 * CONST_BITS is defined within each module using these macros, 344 * CONST_BITS is defined within each module using these macros,
345 * and may differ from one module to the next. 345 * and may differ from one module to the next.
346 */ 346 */
347 347
348#define ONE ((INT32) 1) 348#define ONE ((INT32) 1)
349#define CONST_SCALE (ONE << CONST_BITS) 349#define CONST_SCALE (ONE << CONST_BITS)
350 350
351/* Convert a positive real constant to an integer scaled by CONST_SCALE. 351/* Convert a positive real constant to an integer scaled by CONST_SCALE.
352 * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, 352 * Caution: some C compilers fail to reduce "FIX(constant)" at compile time,
353 * thus causing a lot of useless floating-point operations at run time. 353 * thus causing a lot of useless floating-point operations at run time.
354 */ 354 */
355 355
356#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) 356#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5))
357 357
358/* Descale and correctly round an INT32 value that's scaled by N bits. 358/* Descale and correctly round an INT32 value that's scaled by N bits.
359 * We assume RIGHT_SHIFT rounds towards minus infinity, so adding 359 * We assume RIGHT_SHIFT rounds towards minus infinity, so adding
360 * the fudge factor is correct for either sign of X. 360 * the fudge factor is correct for either sign of X.
361 */ 361 */
362 362
363#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) 363#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)
364 364
365/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. 365/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
366 * This macro is used only when the two inputs will actually be no more than 366 * This macro is used only when the two inputs will actually be no more than
367 * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a 367 * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a
368 * full 32x32 multiply. This provides a useful speedup on many machines. 368 * full 32x32 multiply. This provides a useful speedup on many machines.
369 * Unfortunately there is no way to specify a 16x16->32 multiply portably 369 * Unfortunately there is no way to specify a 16x16->32 multiply portably
370 * in C, but some C compilers will do the right thing if you provide the 370 * in C, but some C compilers will do the right thing if you provide the
371 * correct combination of casts. 371 * correct combination of casts.
372 */ 372 */
373 373
374#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ 374#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */
375#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) 375#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const)))
376#endif 376#endif
377#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ 377#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */
378#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const))) 378#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const)))
379#endif 379#endif
380 380
381#ifndef MULTIPLY16C16 /* default definition */ 381#ifndef MULTIPLY16C16 /* default definition */
382#define MULTIPLY16C16(var,const) ((var) * (const)) 382#define MULTIPLY16C16(var,const) ((var) * (const))
383#endif 383#endif
384 384
385/* Same except both inputs are variables. */ 385/* Same except both inputs are variables. */
386 386
387#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ 387#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */
388#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) 388#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2)))
389#endif 389#endif
390 390
391#ifndef MULTIPLY16V16 /* default definition */ 391#ifndef MULTIPLY16V16 /* default definition */
392#define MULTIPLY16V16(var1,var2) ((var1) * (var2)) 392#define MULTIPLY16V16(var1,var2) ((var1) * (var2))
393#endif 393#endif