Mercurial > libavcodec.hg
comparison dct-test.c @ 1064:b32afefe7d33 libavcodec
* UINTX -> uintx_t INTX -> intx_t
author | kabi |
---|---|
date | Tue, 11 Feb 2003 16:35:48 +0000 |
parents | 0c32f81b42b2 |
children | 1e39f273ecd6 |
comparison
equal
deleted
inserted
replaced
1063:fdeac9642346 | 1064:b32afefe7d33 |
---|---|
38 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, | 38 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, |
39 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, | 39 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, |
40 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 | 40 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 |
41 }; | 41 }; |
42 | 42 |
43 UINT8 cropTbl[256 + 2 * MAX_NEG_CROP]; | 43 uint8_t cropTbl[256 + 2 * MAX_NEG_CROP]; |
44 | 44 |
45 INT64 gettime(void) | 45 int64_t gettime(void) |
46 { | 46 { |
47 struct timeval tv; | 47 struct timeval tv; |
48 gettimeofday(&tv,NULL); | 48 gettimeofday(&tv,NULL); |
49 return (INT64)tv.tv_sec * 1000000 + tv.tv_usec; | 49 return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec; |
50 } | 50 } |
51 | 51 |
52 #define NB_ITS 20000 | 52 #define NB_ITS 20000 |
53 #define NB_ITS_SPEED 50000 | 53 #define NB_ITS_SPEED 50000 |
54 | 54 |
84 void (*fdct_func)(DCTELEM *block), | 84 void (*fdct_func)(DCTELEM *block), |
85 void (*fdct_ref)(DCTELEM *block), int test) | 85 void (*fdct_ref)(DCTELEM *block), int test) |
86 { | 86 { |
87 int it, i, scale; | 87 int it, i, scale; |
88 int err_inf, v; | 88 int err_inf, v; |
89 INT64 err2, ti, ti1, it1; | 89 int64_t err2, ti, ti1, it1; |
90 INT64 sysErr[64], sysErrMax=0; | 90 int64_t sysErr[64], sysErrMax=0; |
91 int maxout=0; | 91 int maxout=0; |
92 int blockSumErrMax=0, blockSumErr; | 92 int blockSumErrMax=0, blockSumErr; |
93 | 93 |
94 srandom(0); | 94 srandom(0); |
95 | 95 |
259 is_idct ? "IDCT" : "DCT", | 259 is_idct ? "IDCT" : "DCT", |
260 name, (double)it1 * 1000.0 / (double)ti1); | 260 name, (double)it1 * 1000.0 / (double)ti1); |
261 #endif | 261 #endif |
262 } | 262 } |
263 | 263 |
264 static UINT8 img_dest[64] __attribute__ ((aligned (8))); | 264 static uint8_t img_dest[64] __attribute__ ((aligned (8))); |
265 static UINT8 img_dest1[64] __attribute__ ((aligned (8))); | 265 static uint8_t img_dest1[64] __attribute__ ((aligned (8))); |
266 | 266 |
267 void idct248_ref(UINT8 *dest, int linesize, INT16 *block) | 267 void idct248_ref(uint8_t *dest, int linesize, int16_t *block) |
268 { | 268 { |
269 static int init; | 269 static int init; |
270 static double c8[8][8]; | 270 static double c8[8][8]; |
271 static double c4[4][4]; | 271 static double c4[4][4]; |
272 double block1[64], block2[64], block3[64]; | 272 double block1[64], block2[64], block3[64]; |
343 } | 343 } |
344 } | 344 } |
345 } | 345 } |
346 | 346 |
347 void idct248_error(const char *name, | 347 void idct248_error(const char *name, |
348 void (*idct248_put)(UINT8 *dest, int line_size, INT16 *block)) | 348 void (*idct248_put)(uint8_t *dest, int line_size, int16_t *block)) |
349 { | 349 { |
350 int it, i, it1, ti, ti1, err_max, v; | 350 int it, i, it1, ti, ti1, err_max, v; |
351 | 351 |
352 srandom(0); | 352 srandom(0); |
353 | 353 |