comparison libmpcodecs/vf_yadif.c @ 28292:d6001126678f

More #ifdef HAVE_MMX etc. missed by earlier search.
author reimar
date Fri, 16 Jan 2009 09:32:54 +0000
parents 245a232deb93
children df67d03dde3b
comparison
equal deleted inserted replaced
28291:2f5073b600f4 28292:d6001126678f
66 66
67 memcpy_pic(p->ref[2][i], src[i], width>>is_chroma, height>>is_chroma, p->stride[i], src_stride[i]); 67 memcpy_pic(p->ref[2][i], src[i], width>>is_chroma, height>>is_chroma, p->stride[i], src_stride[i]);
68 } 68 }
69 } 69 }
70 70
71 #if defined(HAVE_MMX) && defined(NAMED_ASM_ARGS) 71 #if HAVE_MMX && defined(NAMED_ASM_ARGS)
72 72
73 #define LOAD4(mem,dst) \ 73 #define LOAD4(mem,dst) \
74 "movd "mem", "#dst" \n\t"\ 74 "movd "mem", "#dst" \n\t"\
75 "punpcklbw %%mm7, "#dst" \n\t" 75 "punpcklbw %%mm7, "#dst" \n\t"
76 76
279 #undef CHECK 279 #undef CHECK
280 #undef CHECK1 280 #undef CHECK1
281 #undef CHECK2 281 #undef CHECK2
282 #undef FILTER 282 #undef FILTER
283 283
284 #endif /* defined(HAVE_MMX) && defined(NAMED_ASM_ARGS) */ 284 #endif /* HAVE_MMX && defined(NAMED_ASM_ARGS) */
285 285
286 static void filter_line_c(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, uint8_t *cur, uint8_t *next, int w, int refs, int parity){ 286 static void filter_line_c(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, uint8_t *cur, uint8_t *next, int w, int refs, int parity){
287 int x; 287 int x;
288 uint8_t *prev2= parity ? prev : cur ; 288 uint8_t *prev2= parity ? prev : cur ;
289 uint8_t *next2= parity ? cur : next; 289 uint8_t *next2= parity ? cur : next;
361 }else{ 361 }else{
362 fast_memcpy(&dst[i][y*dst_stride[i]], &p->ref[1][i][y*refs], w); 362 fast_memcpy(&dst[i][y*dst_stride[i]], &p->ref[1][i][y*refs], w);
363 } 363 }
364 } 364 }
365 } 365 }
366 #if defined(HAVE_MMX) && defined(NAMED_ASM_ARGS) 366 #if HAVE_MMX && defined(NAMED_ASM_ARGS)
367 if(gCpuCaps.hasMMX2) __asm__ volatile("emms \n\t" : : : "memory"); 367 if(gCpuCaps.hasMMX2) __asm__ volatile("emms \n\t" : : : "memory");
368 #endif 368 #endif
369 } 369 }
370 370
371 static int config(struct vf_instance_s* vf, 371 static int config(struct vf_instance_s* vf,
499 vf->priv->do_deinterlace=1; 499 vf->priv->do_deinterlace=1;
500 500
501 if (args) sscanf(args, "%d:%d", &vf->priv->mode, &vf->priv->parity); 501 if (args) sscanf(args, "%d:%d", &vf->priv->mode, &vf->priv->parity);
502 502
503 filter_line = filter_line_c; 503 filter_line = filter_line_c;
504 #if defined(HAVE_MMX) && defined(NAMED_ASM_ARGS) 504 #if HAVE_MMX && defined(NAMED_ASM_ARGS)
505 if(gCpuCaps.hasMMX2) filter_line = filter_line_mmx2; 505 if(gCpuCaps.hasMMX2) filter_line = filter_line_mmx2;
506 #endif 506 #endif
507 507
508 return 1; 508 return 1;
509 } 509 }