17 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
* |
* |
20 |
* $Id: xvid.c,v 1.44 2003-02-20 22:46:18 edgomez Exp $ |
* $Id: xvid.c,v 1.47 2003-06-11 14:10:55 Isibaar Exp $ |
21 |
* |
* |
22 |
****************************************************************************/ |
****************************************************************************/ |
23 |
|
|
488 |
|
|
489 |
if ((cpu_flags & XVID_CPU_SSE2)) { |
if ((cpu_flags & XVID_CPU_SSE2)) { |
490 |
|
|
491 |
|
#if defined(EXPERIMENTAL_SSE2_CODE) /* many people reported crashes with SSE2 */ |
492 |
|
/* better deactivate it completely and fix everything */ |
493 |
|
/* in dev-api-4 */ |
494 |
calc_cbp = calc_cbp_sse2; |
calc_cbp = calc_cbp_sse2; |
495 |
|
|
496 |
/* Quantization */ |
/* Quantization */ |
499 |
quant_inter = quant_inter_sse2; |
quant_inter = quant_inter_sse2; |
500 |
dequant_inter = dequant_inter_sse2; |
dequant_inter = dequant_inter_sse2; |
501 |
|
|
|
#if defined(EXPERIMENTAL_SSE2_CODE) |
|
502 |
/* ME; slower than xmm */ |
/* ME; slower than xmm */ |
503 |
sad16 = sad16_sse2; |
sad16 = sad16_sse2; |
504 |
dev16 = dev16_sse2; |
dev16 = dev16_sse2; |
505 |
#endif |
#endif |
506 |
/* Forward and Inverse DCT */ |
/* Forward and Inverse DCT */ |
507 |
idct = idct_sse2; |
/* idct = idct_sse2; |
508 |
fdct = fdct_sse2; |
/* fdct = fdct_sse2; Both are none to be unprecise - better deactivate for now */ |
509 |
} |
} |
510 |
#endif |
#endif |
511 |
|
|
813 |
|
|
814 |
int xvid_init_test(int flags) |
int xvid_init_test(int flags) |
815 |
{ |
{ |
816 |
int cpu_flags = 0; |
#if defined(ARCH_IS_IA32) |
817 |
|
int cpu_flags; |
818 |
srand(time(0)); |
#endif |
819 |
|
|
820 |
printf("XviD tests\n\n"); |
printf("XviD tests\n\n"); |
821 |
|
|
826 |
idct_int32_init(); |
idct_int32_init(); |
827 |
emms(); |
emms(); |
828 |
|
|
829 |
|
srand(time(0)); |
830 |
|
|
831 |
/* fDCT test */ |
/* fDCT test */ |
832 |
printf("--- fdct ---\n"); |
printf("--- fdct ---\n"); |
833 |
test_transform(fdct_int32, fdct_int32, "c", TEST_FDCT, flags); |
test_transform(fdct_int32, fdct_int32, "c", TEST_FDCT, flags); |