3 |
* XVID MPEG-4 VIDEO CODEC |
* XVID MPEG-4 VIDEO CODEC |
4 |
* - Native API implementation - |
* - Native API implementation - |
5 |
* |
* |
6 |
* Copyright(C) 2001-2003 Peter Ross <pross@xvid.org> |
* Copyright(C) 2001-2004 Peter Ross <pross@xvid.org> |
7 |
* |
* |
8 |
* This program is free software ; you can redistribute it and/or modify |
* This program is free software ; you can redistribute it and/or modify |
9 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
229 |
interpolate8x8_avg2 = interpolate8x8_avg2_c; |
interpolate8x8_avg2 = interpolate8x8_avg2_c; |
230 |
interpolate8x8_avg4 = interpolate8x8_avg4_c; |
interpolate8x8_avg4 = interpolate8x8_avg4_c; |
231 |
|
|
232 |
|
/* postprocessing */ |
233 |
|
image_brightness = image_brightness_c; |
234 |
|
|
235 |
/* reduced resolution */ |
/* reduced resolution */ |
236 |
copy_upsampled_8x8_16to8 = xvid_Copy_Upsampled_8x8_16To8_C; |
copy_upsampled_8x8_16to8 = xvid_Copy_Upsampled_8x8_16To8_C; |
237 |
add_upsampled_8x8_16to8 = xvid_Add_Upsampled_8x8_16To8_C; |
add_upsampled_8x8_16to8 = xvid_Add_Upsampled_8x8_16To8_C; |
355 |
interpolate8x8_avg2 = interpolate8x8_avg2_mmx; |
interpolate8x8_avg2 = interpolate8x8_avg2_mmx; |
356 |
interpolate8x8_avg4 = interpolate8x8_avg4_mmx; |
interpolate8x8_avg4 = interpolate8x8_avg4_mmx; |
357 |
|
|
358 |
|
/* postprocessing */ |
359 |
|
image_brightness = image_brightness_mmx; |
360 |
|
|
361 |
/* reduced resolution */ |
/* reduced resolution */ |
362 |
copy_upsampled_8x8_16to8 = xvid_Copy_Upsampled_8x8_16To8_mmx; |
copy_upsampled_8x8_16to8 = xvid_Copy_Upsampled_8x8_16To8_mmx; |
363 |
add_upsampled_8x8_16to8 = xvid_Add_Upsampled_8x8_16To8_mmx; |
add_upsampled_8x8_16to8 = xvid_Add_Upsampled_8x8_16To8_mmx; |
455 |
|
|
456 |
if ((cpu_flags & XVID_CPU_3DNOWEXT)) { |
if ((cpu_flags & XVID_CPU_3DNOWEXT)) { |
457 |
|
|
458 |
|
/* Inverse DCT */ |
459 |
|
idct = idct_3dne; |
460 |
|
|
461 |
/* Buffer transfer */ |
/* Buffer transfer */ |
462 |
transfer_8to16copy = transfer_8to16copy_3dne; |
transfer_8to16copy = transfer_8to16copy_3dne; |
463 |
transfer_16to8copy = transfer_16to8copy_3dne; |
transfer_16to8copy = transfer_16to8copy_3dne; |
464 |
transfer_8to16sub = transfer_8to16sub_3dne; |
transfer_8to16sub = transfer_8to16sub_3dne; |
465 |
transfer_8to16subro = transfer_8to16subro_3dne; |
transfer_8to16subro = transfer_8to16subro_3dne; |
466 |
|
transfer_8to16sub2 = transfer_8to16sub2_3dne; |
467 |
transfer_16to8add = transfer_16to8add_3dne; |
transfer_16to8add = transfer_16to8add_3dne; |
468 |
transfer8x8_copy = transfer8x8_copy_3dne; |
transfer8x8_copy = transfer8x8_copy_3dne; |
469 |
|
|
|
if ((cpu_flags & XVID_CPU_MMXEXT)) { |
|
|
/* Inverse DCT */ |
|
|
idct = idct_3dne; |
|
|
|
|
|
/* Buffer transfer */ |
|
|
transfer_8to16sub2 = transfer_8to16sub2_3dne; |
|
|
|
|
|
/* Interpolation */ |
|
|
interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_3dne; |
|
|
interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_3dne; |
|
|
interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_3dne; |
|
|
|
|
470 |
/* Quantization */ |
/* Quantization */ |
471 |
quant_h263_intra = quant_h263_intra_3dne; /* cmov only */ |
quant_h263_intra = quant_h263_intra_3dne; |
472 |
quant_h263_inter = quant_h263_inter_3dne; |
quant_h263_inter = quant_h263_inter_3dne; |
473 |
dequant_mpeg_intra = dequant_mpeg_intra_3dne; /* cmov only */ |
dequant_mpeg_intra = dequant_mpeg_intra_3dne; |
474 |
dequant_mpeg_inter = dequant_mpeg_inter_3dne; |
dequant_mpeg_inter = dequant_mpeg_inter_3dne; |
475 |
dequant_h263_intra = dequant_h263_intra_3dne; |
dequant_h263_intra = dequant_h263_intra_3dne; |
476 |
dequant_h263_inter = dequant_h263_inter_3dne; |
dequant_h263_inter = dequant_h263_inter_3dne; |
477 |
|
|
478 |
/* ME functions */ |
/* ME functions */ |
479 |
calc_cbp = calc_cbp_3dne; |
calc_cbp = calc_cbp_3dne; |
|
|
|
480 |
sad16 = sad16_3dne; |
sad16 = sad16_3dne; |
481 |
sad8 = sad8_3dne; |
sad8 = sad8_3dne; |
482 |
sad16bi = sad16bi_3dne; |
sad16bi = sad16bi_3dne; |
483 |
sad8bi = sad8bi_3dne; |
sad8bi = sad8bi_3dne; |
484 |
dev16 = dev16_3dne; |
dev16 = dev16_3dne; |
485 |
} |
|
486 |
|
/* Interpolation */ |
487 |
|
interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_3dne; |
488 |
|
interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_3dne; |
489 |
|
interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_3dne; |
490 |
} |
} |
491 |
|
|
492 |
if ((cpu_flags & XVID_CPU_SSE2)) { |
if ((cpu_flags & XVID_CPU_SSE2)) { |
568 |
return XVID_ERR_VERSION; |
return XVID_ERR_VERSION; |
569 |
|
|
570 |
info->actual_version = XVID_VERSION; |
info->actual_version = XVID_VERSION; |
571 |
info->build = "xvid-1.0.2"; |
info->build = "xvid-1.0.0"; |
572 |
info->cpu_flags = detect_cpu_flags(); |
info->cpu_flags = detect_cpu_flags(); |
573 |
|
|
574 |
#if defined(_SMP) && defined(WIN32) |
#if defined(_SMP) && defined(WIN32) |