19 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
* $Id: xvid.c,v 1.45.2.7 2003-06-09 19:42:08 edgomez Exp $ |
* $Id: xvid.c,v 1.45.2.12 2003-08-02 15:08:30 edgomez Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
163 |
{ |
{ |
164 |
unsigned int cpu_flags; |
unsigned int cpu_flags; |
165 |
|
|
166 |
if (XVID_MAJOR(init->version) != 1) /* v1.x.x */ |
if (XVID_VERSION_MAJOR(init->version) != 1) /* v1.x.x */ |
167 |
return XVID_ERR_VERSION; |
return XVID_ERR_VERSION; |
168 |
|
|
169 |
cpu_flags = (init->cpu_flags & XVID_CPU_FORCE) ? init->cpu_flags : detect_cpu_flags(); |
cpu_flags = (init->cpu_flags & XVID_CPU_FORCE) ? init->cpu_flags : detect_cpu_flags(); |
305 |
|
|
306 |
/* Forward and Inverse Discrete Cosine Transformation functions */ |
/* Forward and Inverse Discrete Cosine Transformation functions */ |
307 |
fdct = fdct_mmx; |
fdct = fdct_mmx; |
308 |
idct = simple_idct_mmx; |
idct = idct_mmx; |
309 |
|
|
310 |
/* Quantization related functions */ |
/* Quantization related functions */ |
311 |
quant_intra = quant_intra_mmx; |
quant_intra = quant_intra_mmx; |
391 |
if ((cpu_flags & XVID_CPU_MMXEXT)) { |
if ((cpu_flags & XVID_CPU_MMXEXT)) { |
392 |
|
|
393 |
/* Inverse DCT */ |
/* Inverse DCT */ |
|
#if 0 /* We don't use Walken idct anymore! */ |
|
394 |
idct = idct_xmm; |
idct = idct_xmm; |
|
#endif |
|
395 |
|
|
396 |
/* Interpolation */ |
/* Interpolation */ |
397 |
interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_xmm; |
interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_xmm; |
437 |
if ((cpu_flags & XVID_CPU_3DNOWEXT)) { |
if ((cpu_flags & XVID_CPU_3DNOWEXT)) { |
438 |
|
|
439 |
/* Inverse DCT */ |
/* Inverse DCT */ |
|
#if 0 /* We don't use Walken idct anymore! */ |
|
440 |
idct = idct_3dne; |
idct = idct_3dne; |
|
#endif |
|
441 |
|
|
442 |
/* Buffer transfer */ |
/* Buffer transfer */ |
443 |
transfer_8to16copy = transfer_8to16copy_3dne; |
transfer_8to16copy = transfer_8to16copy_3dne; |
517 |
transfer_8to16sub2 = transfer_8to16sub2_ia64; |
transfer_8to16sub2 = transfer_8to16sub2_ia64; |
518 |
transfer_16to8add = transfer_16to8add_ia64; |
transfer_16to8add = transfer_16to8add_ia64; |
519 |
transfer8x8_copy = transfer8x8_copy_ia64; |
transfer8x8_copy = transfer8x8_copy_ia64; |
|
DPRINTF(DPRINTF_DEBUG, "Using IA-64 assembler routines."); |
|
520 |
} |
} |
521 |
#endif |
#endif |
522 |
|
|
549 |
static int |
static int |
550 |
xvid_gbl_info(xvid_gbl_info_t * info) |
xvid_gbl_info(xvid_gbl_info_t * info) |
551 |
{ |
{ |
552 |
if (XVID_MAJOR(info->version) != 1) /* v1.x.x */ |
if (XVID_VERSION_MAJOR(info->version) != 1) /* v1.x.x */ |
553 |
return XVID_ERR_VERSION; |
return XVID_ERR_VERSION; |
554 |
|
|
555 |
info->actual_version = XVID_VERSION; |
info->actual_version = XVID_VERSION; |
575 |
int height2; |
int height2; |
576 |
IMAGE img; |
IMAGE img; |
577 |
|
|
578 |
if (XVID_MAJOR(convert->version) != 1) /* v1.x.x */ |
if (XVID_VERSION_MAJOR(convert->version) != 1) /* v1.x.x */ |
579 |
return XVID_ERR_VERSION; |
return XVID_ERR_VERSION; |
580 |
|
|
581 |
#if 0 |
#if 0 |