40 |
#include "utils/mbfunctions.h" |
#include "utils/mbfunctions.h" |
41 |
#include "quant/quant.h" |
#include "quant/quant.h" |
42 |
#include "motion/motion.h" |
#include "motion/motion.h" |
43 |
|
#include "motion/gmc.h" |
44 |
#include "motion/sad.h" |
#include "motion/sad.h" |
45 |
#include "utils/emms.h" |
#include "utils/emms.h" |
46 |
#include "utils/timer.h" |
#include "utils/timer.h" |
307 |
sse8_16bit = sse8_16bit_c; |
sse8_16bit = sse8_16bit_c; |
308 |
sse8_8bit = sse8_8bit_c; |
sse8_8bit = sse8_8bit_c; |
309 |
|
|
310 |
|
init_GMC(cpu_flags); |
311 |
|
|
312 |
#if defined(ARCH_IS_IA32) |
#if defined(ARCH_IS_IA32) |
313 |
|
|
314 |
if ((cpu_flags & XVID_CPU_MMX) || (cpu_flags & XVID_CPU_MMXEXT) || |
if ((cpu_flags & XVID_CPU_MMX) || (cpu_flags & XVID_CPU_MMXEXT) || |
439 |
interpolate8x8_halfpel_hv_add = interpolate8x8_halfpel_hv_add_xmm; |
interpolate8x8_halfpel_hv_add = interpolate8x8_halfpel_hv_add_xmm; |
440 |
|
|
441 |
/* Quantization */ |
/* Quantization */ |
|
quant_mpeg_intra = quant_mpeg_intra_xmm; |
|
442 |
quant_mpeg_inter = quant_mpeg_inter_xmm; |
quant_mpeg_inter = quant_mpeg_inter_xmm; |
443 |
|
|
444 |
dequant_h263_intra = dequant_h263_intra_xmm; |
dequant_h263_intra = dequant_h263_intra_xmm; |
638 |
* features there really are. */ |
* features there really are. */ |
639 |
if (cpu_flags & XVID_CPU_ASM) { |
if (cpu_flags & XVID_CPU_ASM) { |
640 |
/* SIMD state flusher */ |
/* SIMD state flusher */ |
641 |
emms = emms_3dn; |
emms = emms_mmx; |
642 |
|
|
643 |
/* DCT operators */ |
/* DCT operators */ |
644 |
fdct = fdct_skal_x86_64; |
fdct = fdct_skal_x86_64; |
675 |
quant_h263_inter = quant_h263_inter_x86_64; |
quant_h263_inter = quant_h263_inter_x86_64; |
676 |
dequant_h263_intra = dequant_h263_intra_x86_64; |
dequant_h263_intra = dequant_h263_intra_x86_64; |
677 |
dequant_h263_inter = dequant_h263_inter_x86_64; |
dequant_h263_inter = dequant_h263_inter_x86_64; |
678 |
quant_mpeg_intra = quant_mpeg_intra_x86_64; |
/*quant_mpeg_intra = quant_mpeg_intra_x86_64; fix me! */ |
679 |
quant_mpeg_inter = quant_mpeg_inter_x86_64; |
quant_mpeg_inter = quant_mpeg_inter_x86_64; |
680 |
dequant_mpeg_intra = dequant_mpeg_intra_x86_64; |
dequant_mpeg_intra = dequant_mpeg_intra_x86_64; |
681 |
dequant_mpeg_inter = dequant_mpeg_inter_x86_64; |
dequant_mpeg_inter = dequant_mpeg_inter_x86_64; |
716 |
info->actual_version = XVID_VERSION; |
info->actual_version = XVID_VERSION; |
717 |
info->build = "xvid-1.2.0-dev"; |
info->build = "xvid-1.2.0-dev"; |
718 |
info->cpu_flags = detect_cpu_flags(); |
info->cpu_flags = detect_cpu_flags(); |
|
|
|
|
#if defined(_SMP) && defined(WIN32) |
|
|
info->num_threads = pthread_num_processors_np();; |
|
|
#else |
|
719 |
info->num_threads = 0; |
info->num_threads = 0; |
720 |
|
|
721 |
|
#if defined(WIN32) |
722 |
|
{ |
723 |
|
DWORD dwProcessAffinityMask, dwSystemAffinityMask; |
724 |
|
if (GetProcessAffinityMask(GetCurrentProcess(), &dwProcessAffinityMask, &dwSystemAffinityMask)) { |
725 |
|
int i; |
726 |
|
for(i=0; i<32; i++) { |
727 |
|
if ((dwProcessAffinityMask & (1<<i))) |
728 |
|
info->num_threads++; |
729 |
|
} |
730 |
|
} |
731 |
|
} |
732 |
#endif |
#endif |
733 |
|
|
734 |
return 0; |
return 0; |