comparison libmpcodecs/vf_divtc.c @ 28907:ccbde3575f0a

Check for HAVE_EBX_AVAILABLE before enabling MMX code that needs the EBX register. Makes things a bit simpler for everyone who insists on compiling MPlayer as PIE-code.
author reimar
date Fri, 13 Mar 2009 17:12:40 +0000
parents 6cc8cc259dc1
children a49f45515e08
comparison
equal deleted inserted replaced
28906:6cc8cc259dc1 28907:ccbde3575f0a
31 31
32 /* 32 /*
33 * diff_MMX and diff_C stolen from vf_decimate.c 33 * diff_MMX and diff_C stolen from vf_decimate.c
34 */ 34 */
35 35
36 #if HAVE_MMX 36 #if HAVE_MMX && HAVE_EBX_AVAILABLE
37 static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns) 37 static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
38 { 38 {
39 volatile short out[4]; 39 volatile short out[4];
40 __asm__ ( 40 __asm__ (
41 "movl $8, %%ecx \n\t" 41 "movl $8, %%ecx \n\t"
681 if(p->window<5) p->window=5; 681 if(p->window<5) p->window=5;
682 if(!(p->history=calloc(sizeof *p->history, p->window))) 682 if(!(p->history=calloc(sizeof *p->history, p->window)))
683 goto nomem; 683 goto nomem;
684 684
685 diff = diff_C; 685 diff = diff_C;
686 #if HAVE_MMX 686 #if HAVE_MMX && HAVE_EBX_AVAILABLE
687 if(gCpuCaps.hasMMX) diff = diff_MMX; 687 if(gCpuCaps.hasMMX) diff = diff_MMX;
688 #endif 688 #endif
689 689
690 free(args); 690 free(args);
691 return 1; 691 return 1;