Unified · Split
| @@ -181,14 +181,6 @@ static void idct_mmx_init(void) · 180 unmodified lines | |||
| 181 | DECLARE_ALIGNED(16, static DCTELEM, block)[64]; | 181 | DECLARE_ALIGNED(16, static DCTELEM, block)[64]; |
| 182 | DECLARE_ALIGNED(8, static DCTELEM, block1)[64]; | 182 | DECLARE_ALIGNED(8, static DCTELEM, block1)[64]; |
| 183 | 183 | ||
| 184 | static inline void mmx_emms(void) | ||
| 185 | { | ||
| 186 | #if HAVE_MMX | ||
| 187 | if (cpu_flags & AV_CPU_FLAG_MMX) | ||
| 188 | __asm__ volatile ("emms\n\t"); | ||
| 189 | #endif | ||
| 190 | } | ||
| 191 | |||
| 192 | static void init_block(DCTELEM block[64], int test, int is_idct, AVLFG *prng) | 184 | static void init_block(DCTELEM block[64], int test, int is_idct, AVLFG *prng) |
| 193 | { | 185 | { |
| 194 | int i, j; | 186 | int i, j; |
| @@ -263,7 +255,7 @@ static int dct_error(const struct algo *dct, int test, int is_idct, int speed) · 68 unmodified lines | |||
| 263 | permute(block, block1, dct->format); | 255 | permute(block, block1, dct->format); |
| 264 | 256 | ||
| 265 | dct->func(block); | 257 | dct->func(block); |
| 266 | mmx_emms(); | 258 | emms_c(); |
| 267 | 259 | ||
| 268 | if (dct->format == SCALE_PERM) { | 260 | if (dct->format == SCALE_PERM) { |
| 269 | for (i = 0; i < 64; i++) { | 261 | for (i = 0; i < 64; i++) { |
| @@ -330,7 +322,7 @@ static int dct_error(const struct algo *dct, int test, int is_idct, int speed) · 60 unmodified lines | |||
| 330 | it1 += NB_ITS_SPEED; | 322 | it1 += NB_ITS_SPEED; |
| 331 | ti1 = gettime() - ti; | 323 | ti1 = gettime() - ti; |
| 332 | } while (ti1 < 1000000); | 324 | } while (ti1 < 1000000); |
| 333 | mmx_emms(); | 325 | emms_c(); |
| 334 | 326 | ||
| 335 | printf("%s %s: %0.1f kdct/s\n", is_idct ? "IDCT" : "DCT", dct->name, | 327 | printf("%s %s: %0.1f kdct/s\n", is_idct ? "IDCT" : "DCT", dct->name, |
| 336 | (double) it1 * 1000.0 / (double) ti1); | 328 | (double) it1 * 1000.0 / (double) ti1); |
| @@ -472,7 +464,7 @@ static void idct248_error(const char *name, · 135 unmodified lines | |||
| 472 | it1 += NB_ITS_SPEED; | 464 | it1 += NB_ITS_SPEED; |
| 473 | ti1 = gettime() - ti; | 465 | ti1 = gettime() - ti; |
| 474 | } while (ti1 < 1000000); | 466 | } while (ti1 < 1000000); |
| 475 | mmx_emms(); | 467 | emms_c(); |
| 476 | 468 | ||
| 477 | printf("%s %s: %0.1f kdct/s\n", 1 ? "IDCT248" : "DCT248", name, | 469 | printf("%s %s: %0.1f kdct/s\n", 1 ? "IDCT248" : "DCT248", name, |
| 478 | (double) it1 * 1000.0 / (double) ti1); | 470 | (double) it1 * 1000.0 / (double) ti1); |