comparison jfdctfst.c @ 2967:ef2149182f1c libavcodec

COSMETICS: Remove all trailing whitespace.
author diego
date Sat, 17 Dec 2005 18:14:38 +0000
parents eb26d190cf5a
children bfabfdf9ce55
comparison
equal deleted inserted replaced
2966:564788471dd4 2967:ef2149182f1c
32 32
33 /** 33 /**
34 * @file jfdctfst.c 34 * @file jfdctfst.c
35 * Independent JPEG Group's fast AAN dct. 35 * Independent JPEG Group's fast AAN dct.
36 */ 36 */
37 37
38 #include <stdlib.h> 38 #include <stdlib.h>
39 #include <stdio.h> 39 #include <stdio.h>
40 #include "common.h" 40 #include "common.h"
41 #include "dsputil.h" 41 #include "dsputil.h"
42 42
130 tmp6 = dataptr[1] - dataptr[6]; 130 tmp6 = dataptr[1] - dataptr[6];
131 tmp2 = dataptr[2] + dataptr[5]; 131 tmp2 = dataptr[2] + dataptr[5];
132 tmp5 = dataptr[2] - dataptr[5]; 132 tmp5 = dataptr[2] - dataptr[5];
133 tmp3 = dataptr[3] + dataptr[4]; 133 tmp3 = dataptr[3] + dataptr[4];
134 tmp4 = dataptr[3] - dataptr[4]; 134 tmp4 = dataptr[3] - dataptr[4];
135 135
136 /* Even part */ 136 /* Even part */
137 137
138 tmp10 = tmp0 + tmp3; /* phase 2 */ 138 tmp10 = tmp0 + tmp3; /* phase 2 */
139 tmp13 = tmp0 - tmp3; 139 tmp13 = tmp0 - tmp3;
140 tmp11 = tmp1 + tmp2; 140 tmp11 = tmp1 + tmp2;
141 tmp12 = tmp1 - tmp2; 141 tmp12 = tmp1 - tmp2;
142 142
143 dataptr[0] = tmp10 + tmp11; /* phase 3 */ 143 dataptr[0] = tmp10 + tmp11; /* phase 3 */
144 dataptr[4] = tmp10 - tmp11; 144 dataptr[4] = tmp10 - tmp11;
145 145
146 z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ 146 z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */
147 dataptr[2] = tmp13 + z1; /* phase 5 */ 147 dataptr[2] = tmp13 + z1; /* phase 5 */
148 dataptr[6] = tmp13 - z1; 148 dataptr[6] = tmp13 - z1;
149 149
150 /* Odd part */ 150 /* Odd part */
151 151
152 tmp10 = tmp4 + tmp5; /* phase 2 */ 152 tmp10 = tmp4 + tmp5; /* phase 2 */
153 tmp11 = tmp5 + tmp6; 153 tmp11 = tmp5 + tmp6;
154 tmp12 = tmp6 + tmp7; 154 tmp12 = tmp6 + tmp7;
184 DCTELEM *dataptr; 184 DCTELEM *dataptr;
185 int ctr; 185 int ctr;
186 SHIFT_TEMPS 186 SHIFT_TEMPS
187 187
188 row_fdct(data); 188 row_fdct(data);
189 189
190 /* Pass 2: process columns. */ 190 /* Pass 2: process columns. */
191 191
192 dataptr = data; 192 dataptr = data;
193 for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { 193 for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
194 tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; 194 tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];
197 tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; 197 tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
198 tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; 198 tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];
199 tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; 199 tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
200 tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; 200 tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
201 tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; 201 tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
202 202
203 /* Even part */ 203 /* Even part */
204 204
205 tmp10 = tmp0 + tmp3; /* phase 2 */ 205 tmp10 = tmp0 + tmp3; /* phase 2 */
206 tmp13 = tmp0 - tmp3; 206 tmp13 = tmp0 - tmp3;
207 tmp11 = tmp1 + tmp2; 207 tmp11 = tmp1 + tmp2;
208 tmp12 = tmp1 - tmp2; 208 tmp12 = tmp1 - tmp2;
209 209
210 dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ 210 dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */
211 dataptr[DCTSIZE*4] = tmp10 - tmp11; 211 dataptr[DCTSIZE*4] = tmp10 - tmp11;
212 212
213 z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ 213 z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */
214 dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ 214 dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */
215 dataptr[DCTSIZE*6] = tmp13 - z1; 215 dataptr[DCTSIZE*6] = tmp13 - z1;
216 216
217 /* Odd part */ 217 /* Odd part */
218 218
219 tmp10 = tmp4 + tmp5; /* phase 2 */ 219 tmp10 = tmp4 + tmp5; /* phase 2 */
220 tmp11 = tmp5 + tmp6; 220 tmp11 = tmp5 + tmp6;
221 tmp12 = tmp6 + tmp7; 221 tmp12 = tmp6 + tmp7;
251 DCTELEM *dataptr; 251 DCTELEM *dataptr;
252 int ctr; 252 int ctr;
253 SHIFT_TEMPS 253 SHIFT_TEMPS
254 254
255 row_fdct(data); 255 row_fdct(data);
256 256
257 /* Pass 2: process columns. */ 257 /* Pass 2: process columns. */
258 258
259 dataptr = data; 259 dataptr = data;
260 for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { 260 for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
261 tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*1]; 261 tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*1];
266 tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3]; 266 tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3];
267 tmp6 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*5]; 267 tmp6 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*5];
268 tmp7 = dataptr[DCTSIZE*6] - dataptr[DCTSIZE*7]; 268 tmp7 = dataptr[DCTSIZE*6] - dataptr[DCTSIZE*7];
269 269
270 /* Even part */ 270 /* Even part */
271 271
272 tmp10 = tmp0 + tmp3; 272 tmp10 = tmp0 + tmp3;
273 tmp11 = tmp1 + tmp2; 273 tmp11 = tmp1 + tmp2;
274 tmp12 = tmp1 - tmp2; 274 tmp12 = tmp1 - tmp2;
275 tmp13 = tmp0 - tmp3; 275 tmp13 = tmp0 - tmp3;
276 276
277 dataptr[DCTSIZE*0] = tmp10 + tmp11; 277 dataptr[DCTSIZE*0] = tmp10 + tmp11;
278 dataptr[DCTSIZE*4] = tmp10 - tmp11; 278 dataptr[DCTSIZE*4] = tmp10 - tmp11;
279 279
280 z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); 280 z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781);
281 dataptr[DCTSIZE*2] = tmp13 + z1; 281 dataptr[DCTSIZE*2] = tmp13 + z1;
282 dataptr[DCTSIZE*6] = tmp13 - z1; 282 dataptr[DCTSIZE*6] = tmp13 - z1;
283 283
284 tmp10 = tmp4 + tmp7; 284 tmp10 = tmp4 + tmp7;
285 tmp11 = tmp5 + tmp6; 285 tmp11 = tmp5 + tmp6;
286 tmp12 = tmp5 - tmp6; 286 tmp12 = tmp5 - tmp6;
287 tmp13 = tmp4 - tmp7; 287 tmp13 = tmp4 - tmp7;
288 288
289 dataptr[DCTSIZE*1] = tmp10 + tmp11; 289 dataptr[DCTSIZE*1] = tmp10 + tmp11;
290 dataptr[DCTSIZE*5] = tmp10 - tmp11; 290 dataptr[DCTSIZE*5] = tmp10 - tmp11;
291 291
292 z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); 292 z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781);
293 dataptr[DCTSIZE*3] = tmp13 + z1; 293 dataptr[DCTSIZE*3] = tmp13 + z1;
294 dataptr[DCTSIZE*7] = tmp13 - z1; 294 dataptr[DCTSIZE*7] = tmp13 - z1;
295 295
296 dataptr++; /* advance pointer to next column */ 296 dataptr++; /* advance pointer to next column */
297 } 297 }
298 } 298 }
299 299
300 300