OLD | NEW |
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. |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 /* Short forms of external names for systems with brain-damaged linkers. */ | 89 /* Short forms of external names for systems with brain-damaged linkers. */ |
90 | 90 |
91 #ifdef NEED_SHORT_EXTERNAL_NAMES | 91 #ifdef NEED_SHORT_EXTERNAL_NAMES |
92 #define jpeg_fdct_islow jFDislow | 92 #define jpeg_fdct_islow jFDislow |
93 #define jpeg_fdct_ifast jFDifast | 93 #define jpeg_fdct_ifast jFDifast |
94 #define jpeg_fdct_float jFDfloat | 94 #define jpeg_fdct_float jFDfloat |
95 #define jpeg_idct_islow jRDislow | 95 #define jpeg_idct_islow jRDislow |
96 #define jpeg_idct_ifast jRDifast | 96 #define jpeg_idct_ifast jRDifast |
97 #define jpeg_idct_float jRDfloat | 97 #define jpeg_idct_float jRDfloat |
| 98 #define jpeg_idct_7x7 jRD7x7 |
| 99 #define jpeg_idct_6x6 jRD6x6 |
| 100 #define jpeg_idct_5x5 jRD5x5 |
98 #define jpeg_idct_4x4 jRD4x4 | 101 #define jpeg_idct_4x4 jRD4x4 |
| 102 #define jpeg_idct_3x3 jRD3x3 |
99 #define jpeg_idct_2x2 jRD2x2 | 103 #define jpeg_idct_2x2 jRD2x2 |
100 #define jpeg_idct_1x1 jRD1x1 | 104 #define jpeg_idct_1x1 jRD1x1 |
| 105 #define jpeg_idct_9x9 jRD9x9 |
| 106 #define jpeg_idct_10x10 jRD10x10 |
| 107 #define jpeg_idct_11x11 jRD11x11 |
| 108 #define jpeg_idct_12x12 jRD12x12 |
| 109 #define jpeg_idct_13x13 jRD13x13 |
| 110 #define jpeg_idct_14x14 jRD14x14 |
| 111 #define jpeg_idct_15x15 jRD15x15 |
| 112 #define jpeg_idct_16x16 jRD16x16 |
101 #endif /* NEED_SHORT_EXTERNAL_NAMES */ | 113 #endif /* NEED_SHORT_EXTERNAL_NAMES */ |
102 | 114 |
103 /* Extern declarations for the forward and inverse DCT routines. */ | 115 /* Extern declarations for the forward and inverse DCT routines. */ |
104 | 116 |
105 EXTERN(void) jpeg_fdct_islow JPP((DCTELEM * data)); | 117 EXTERN(void) jpeg_fdct_islow JPP((DCTELEM * data)); |
106 EXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data)); | 118 EXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data)); |
107 EXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data)); | 119 EXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data)); |
108 | 120 |
109 EXTERN(void) jpeg_idct_islow | 121 EXTERN(void) jpeg_idct_islow |
110 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, | 122 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
111 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); | 123 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
112 EXTERN(void) jpeg_idct_ifast | 124 EXTERN(void) jpeg_idct_ifast |
113 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, | 125 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
114 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); | 126 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
115 EXTERN(void) jpeg_idct_float | 127 EXTERN(void) jpeg_idct_float |
116 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, | 128 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
117 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); | 129 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
| 130 EXTERN(void) jpeg_idct_7x7 |
| 131 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 132 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
| 133 EXTERN(void) jpeg_idct_6x6 |
| 134 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 135 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
| 136 EXTERN(void) jpeg_idct_5x5 |
| 137 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 138 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
118 EXTERN(void) jpeg_idct_4x4 | 139 EXTERN(void) jpeg_idct_4x4 |
119 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, | 140 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
120 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); | 141 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
| 142 EXTERN(void) jpeg_idct_3x3 |
| 143 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 144 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
121 EXTERN(void) jpeg_idct_2x2 | 145 EXTERN(void) jpeg_idct_2x2 |
122 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, | 146 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
123 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); | 147 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
124 EXTERN(void) jpeg_idct_1x1 | 148 EXTERN(void) jpeg_idct_1x1 |
125 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, | 149 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
126 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); | 150 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
| 151 EXTERN(void) jpeg_idct_9x9 |
| 152 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 153 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
| 154 EXTERN(void) jpeg_idct_10x10 |
| 155 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 156 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
| 157 EXTERN(void) jpeg_idct_11x11 |
| 158 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 159 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
| 160 EXTERN(void) jpeg_idct_12x12 |
| 161 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 162 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
| 163 EXTERN(void) jpeg_idct_13x13 |
| 164 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 165 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
| 166 EXTERN(void) jpeg_idct_14x14 |
| 167 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 168 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
| 169 EXTERN(void) jpeg_idct_15x15 |
| 170 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 171 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
| 172 EXTERN(void) jpeg_idct_16x16 |
| 173 JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
| 174 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
127 | 175 |
128 | 176 |
129 /* | 177 /* |
130 * Macros for handling fixed-point arithmetic; these are used by many | 178 * Macros for handling fixed-point arithmetic; these are used by many |
131 * but not all of the DCT/IDCT modules. | 179 * but not all of the DCT/IDCT modules. |
132 * | 180 * |
133 * All values are expected to be of type INT32. | 181 * All values are expected to be of type INT32. |
134 * Fractional constants are scaled left by CONST_BITS bits. | 182 * Fractional constants are scaled left by CONST_BITS bits. |
135 * CONST_BITS is defined within each module using these macros, | 183 * CONST_BITS is defined within each module using these macros, |
136 * and may differ from one module to the next. | 184 * and may differ from one module to the next. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 223 |
176 /* Same except both inputs are variables. */ | 224 /* Same except both inputs are variables. */ |
177 | 225 |
178 #ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ | 226 #ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ |
179 #define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) | 227 #define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) |
180 #endif | 228 #endif |
181 | 229 |
182 #ifndef MULTIPLY16V16 /* default definition */ | 230 #ifndef MULTIPLY16V16 /* default definition */ |
183 #define MULTIPLY16V16(var1,var2) ((var1) * (var2)) | 231 #define MULTIPLY16V16(var1,var2) ((var1) * (var2)) |
184 #endif | 232 #endif |
OLD | NEW |