comparison libmpcodecs/vf_tfields.c @ 29639:26a355ffe458

Add several HAVE_EBX_AVAILABLE conditions where necessary
author reimar
date Mon, 14 Sep 2009 14:47:56 +0000
parents 0f1b5b68af32
children bbb6ebec87a0
comparison
equal deleted inserted replaced
29638:209b805a26a9 29639:26a355ffe458
166 } 166 }
167 if (!up) fast_memcpy(d, s, w); 167 if (!up) fast_memcpy(d, s, w);
168 __asm__ volatile("emms \n\t" : : : "memory"); 168 __asm__ volatile("emms \n\t" : : : "memory");
169 } 169 }
170 170
171 #if HAVE_EBX_AVAILABLE
171 static void qpel_4tap_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up) 172 static void qpel_4tap_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up)
172 { 173 {
173 int i, j, ssd=ss; 174 int i, j, ssd=ss;
174 static const short filter[] = { 175 static const short filter[] = {
175 29, 29, 29, 29, 110, 110, 110, 110, 176 29, 29, 29, 29, 110, 110, 110, 110,
245 d[j] = (s[j+ssd] + 3*s[j])>>2; 246 d[j] = (s[j+ssd] + 3*s[j])>>2;
246 d += ds; s += ss; 247 d += ds; s += ss;
247 if (!up) fast_memcpy(d, s, w); 248 if (!up) fast_memcpy(d, s, w);
248 __asm__ volatile("emms \n\t" : : : "memory"); 249 __asm__ volatile("emms \n\t" : : : "memory");
249 } 250 }
251 #endif /* HAVE_EBX_AVAILABLE */
250 #endif 252 #endif
251 253
252 static inline int clamp(int a) 254 static inline int clamp(int a)
253 { 255 {
254 // If a<512, this is equivalent to: 256 // If a<512, this is equivalent to:
478 if (args) sscanf(args, "%d:%d", &vf->priv->mode, &vf->priv->parity); 480 if (args) sscanf(args, "%d:%d", &vf->priv->mode, &vf->priv->parity);
479 qpel_li = qpel_li_C; 481 qpel_li = qpel_li_C;
480 qpel_4tap = qpel_4tap_C; 482 qpel_4tap = qpel_4tap_C;
481 #if HAVE_MMX 483 #if HAVE_MMX
482 if(gCpuCaps.hasMMX) qpel_li = qpel_li_MMX; 484 if(gCpuCaps.hasMMX) qpel_li = qpel_li_MMX;
485 #if HAVE_EBX_AVAILABLE
483 if(gCpuCaps.hasMMX) qpel_4tap = qpel_4tap_MMX; 486 if(gCpuCaps.hasMMX) qpel_4tap = qpel_4tap_MMX;
487 #endif
484 #endif 488 #endif
485 #if HAVE_MMX2 489 #if HAVE_MMX2
486 if(gCpuCaps.hasMMX2) qpel_li = qpel_li_MMX2; 490 if(gCpuCaps.hasMMX2) qpel_li = qpel_li_MMX2;
487 #endif 491 #endif
488 #if HAVE_AMD3DNOW 492 #if HAVE_AMD3DNOW