96 JQUANT_TBL * qtbl; |
96 JQUANT_TBL * qtbl; |
97 |
97 |
98 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; |
98 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; |
99 ci++, compptr++) { |
99 ci++, compptr++) { |
100 /* Select the proper IDCT routine for this component's scaling */ |
100 /* Select the proper IDCT routine for this component's scaling */ |
101 switch (compptr->DCT_scaled_size) { |
101 switch ((compptr->DCT_h_scaled_size << 8) + compptr->DCT_v_scaled_size) { |
102 #ifdef IDCT_SCALING_SUPPORTED |
102 #ifdef IDCT_SCALING_SUPPORTED |
103 case 1: |
103 case ((1 << 8) + 1): |
104 method_ptr = jpeg_idct_1x1; |
104 method_ptr = jpeg_idct_1x1; |
105 method = JDCT_ISLOW; /* jidctred uses islow-style table */ |
105 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
106 break; |
106 break; |
107 case 2: |
107 case ((2 << 8) + 2): |
108 method_ptr = jpeg_idct_2x2; |
108 method_ptr = jpeg_idct_2x2; |
109 method = JDCT_ISLOW; /* jidctred uses islow-style table */ |
109 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
110 break; |
110 break; |
111 case 4: |
111 case ((3 << 8) + 3): |
|
112 method_ptr = jpeg_idct_3x3; |
|
113 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
114 break; |
|
115 case ((4 << 8) + 4): |
112 method_ptr = jpeg_idct_4x4; |
116 method_ptr = jpeg_idct_4x4; |
113 method = JDCT_ISLOW; /* jidctred uses islow-style table */ |
117 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
114 break; |
118 break; |
115 #endif |
119 case ((5 << 8) + 5): |
116 case DCTSIZE: |
120 method_ptr = jpeg_idct_5x5; |
|
121 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
122 break; |
|
123 case ((6 << 8) + 6): |
|
124 method_ptr = jpeg_idct_6x6; |
|
125 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
126 break; |
|
127 case ((7 << 8) + 7): |
|
128 method_ptr = jpeg_idct_7x7; |
|
129 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
130 break; |
|
131 case ((9 << 8) + 9): |
|
132 method_ptr = jpeg_idct_9x9; |
|
133 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
134 break; |
|
135 case ((10 << 8) + 10): |
|
136 method_ptr = jpeg_idct_10x10; |
|
137 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
138 break; |
|
139 case ((11 << 8) + 11): |
|
140 method_ptr = jpeg_idct_11x11; |
|
141 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
142 break; |
|
143 case ((12 << 8) + 12): |
|
144 method_ptr = jpeg_idct_12x12; |
|
145 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
146 break; |
|
147 case ((13 << 8) + 13): |
|
148 method_ptr = jpeg_idct_13x13; |
|
149 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
150 break; |
|
151 case ((14 << 8) + 14): |
|
152 method_ptr = jpeg_idct_14x14; |
|
153 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
154 break; |
|
155 case ((15 << 8) + 15): |
|
156 method_ptr = jpeg_idct_15x15; |
|
157 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
158 break; |
|
159 case ((16 << 8) + 16): |
|
160 method_ptr = jpeg_idct_16x16; |
|
161 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
162 break; |
|
163 case ((16 << 8) + 8): |
|
164 method_ptr = jpeg_idct_16x8; |
|
165 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
166 break; |
|
167 case ((14 << 8) + 7): |
|
168 method_ptr = jpeg_idct_14x7; |
|
169 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
170 break; |
|
171 case ((12 << 8) + 6): |
|
172 method_ptr = jpeg_idct_12x6; |
|
173 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
174 break; |
|
175 case ((10 << 8) + 5): |
|
176 method_ptr = jpeg_idct_10x5; |
|
177 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
178 break; |
|
179 case ((8 << 8) + 4): |
|
180 method_ptr = jpeg_idct_8x4; |
|
181 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
182 break; |
|
183 case ((6 << 8) + 3): |
|
184 method_ptr = jpeg_idct_6x3; |
|
185 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
186 break; |
|
187 case ((4 << 8) + 2): |
|
188 method_ptr = jpeg_idct_4x2; |
|
189 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
190 break; |
|
191 case ((2 << 8) + 1): |
|
192 method_ptr = jpeg_idct_2x1; |
|
193 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
194 break; |
|
195 case ((8 << 8) + 16): |
|
196 method_ptr = jpeg_idct_8x16; |
|
197 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
198 break; |
|
199 case ((7 << 8) + 14): |
|
200 method_ptr = jpeg_idct_7x14; |
|
201 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
202 break; |
|
203 case ((6 << 8) + 12): |
|
204 method_ptr = jpeg_idct_6x12; |
|
205 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
206 break; |
|
207 case ((5 << 8) + 10): |
|
208 method_ptr = jpeg_idct_5x10; |
|
209 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
210 break; |
|
211 case ((4 << 8) + 8): |
|
212 method_ptr = jpeg_idct_4x8; |
|
213 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
214 break; |
|
215 case ((3 << 8) + 6): |
|
216 method_ptr = jpeg_idct_3x6; |
|
217 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
218 break; |
|
219 case ((2 << 8) + 4): |
|
220 method_ptr = jpeg_idct_2x4; |
|
221 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
222 break; |
|
223 case ((1 << 8) + 2): |
|
224 method_ptr = jpeg_idct_1x2; |
|
225 method = JDCT_ISLOW; /* jidctint uses islow-style table */ |
|
226 break; |
|
227 #endif |
|
228 case ((DCTSIZE << 8) + DCTSIZE): |
117 switch (cinfo->dct_method) { |
229 switch (cinfo->dct_method) { |
118 #ifdef DCT_ISLOW_SUPPORTED |
230 #ifdef DCT_ISLOW_SUPPORTED |
119 case JDCT_ISLOW: |
231 case JDCT_ISLOW: |
120 method_ptr = jpeg_idct_islow; |
232 method_ptr = jpeg_idct_islow; |
121 method = JDCT_ISLOW; |
233 method = JDCT_ISLOW; |