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.46 2003-06-09 17:07:10 Isibaar Exp $ |
* $Id: xvid.c,v 1.47 2003-06-11 14:10:55 Isibaar Exp $ |
21 |
* |
* |
22 |
****************************************************************************/ |
****************************************************************************/ |
23 |
|
|
320 |
|
|
321 |
/* Forward and Inverse Discrete Cosine Transformation functions */ |
/* Forward and Inverse Discrete Cosine Transformation functions */ |
322 |
fdct = fdct_mmx; |
fdct = fdct_mmx; |
323 |
idct = simple_idct_mmx; /* use simple idct by default */ |
idct = idct_mmx; |
324 |
|
|
325 |
/* Quantization related functions */ |
/* Quantization related functions */ |
326 |
quant_intra = quant_intra_mmx; |
quant_intra = quant_intra_mmx; |
406 |
if ((cpu_flags & XVID_CPU_MMXEXT)) { |
if ((cpu_flags & XVID_CPU_MMXEXT)) { |
407 |
|
|
408 |
/* Inverse DCT */ |
/* Inverse DCT */ |
409 |
/* idct = idct_xmm; Don't use Walken idct anymore! */ |
idct = idct_xmm; |
410 |
|
|
411 |
/* Interpolation */ |
/* Interpolation */ |
412 |
interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_xmm; |
interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_xmm; |
452 |
if ((cpu_flags & XVID_CPU_3DNOWEXT)) { |
if ((cpu_flags & XVID_CPU_3DNOWEXT)) { |
453 |
|
|
454 |
/* Inverse DCT */ |
/* Inverse DCT */ |
455 |
/* idct = idct_3dne; Don't use Walken idct anymore */ |
idct = idct_3dne; |
456 |
|
|
457 |
/* Buffer transfer */ |
/* Buffer transfer */ |
458 |
transfer_8to16copy = transfer_8to16copy_3dne; |
transfer_8to16copy = transfer_8to16copy_3dne; |
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; |