changeset 5146:5db8d038eb1f libavcodec

use if() instead of #ifdef and ensure all possible optimisations are enabled
author aurel
date Fri, 15 Jun 2007 18:18:31 +0000
parents 68d85146620a
children 6fcb43a6339c
files dsputil.c
diffstat 1 files changed, 9 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/dsputil.c	Fri Jun 15 08:22:06 2007 +0000
+++ b/dsputil.c	Fri Jun 15 18:18:31 2007 +0000
@@ -4138,25 +4138,15 @@
     memset(c->put_2tap_qpel_pixels_tab, 0, sizeof(c->put_2tap_qpel_pixels_tab));
     memset(c->avg_2tap_qpel_pixels_tab, 0, sizeof(c->avg_2tap_qpel_pixels_tab));
 
-#if defined(HAVE_MMX)
-    dsputil_init_mmx(c, avctx);
-#elif defined(ARCH_ARMV4L)
-    dsputil_init_armv4l(c, avctx);
-#elif defined(HAVE_MLIB)
-    dsputil_init_mlib(c, avctx);
-#elif defined(ARCH_SPARC)
-   dsputil_init_vis(c,avctx);
-#elif defined(ARCH_ALPHA)
-    dsputil_init_alpha(c, avctx);
-#elif defined(ARCH_POWERPC)
-    dsputil_init_ppc(c, avctx);
-#elif defined(HAVE_MMI)
-    dsputil_init_mmi(c, avctx);
-#elif defined(ARCH_SH4)
-    dsputil_init_sh4(c,avctx);
-#elif defined(ARCH_BFIN)
-    dsputil_init_bfin(c,avctx);
-#endif
+    if (ENABLE_MMX)      dsputil_init_mmx   (c, avctx);
+    if (ENABLE_ARMV4L)   dsputil_init_armv4l(c, avctx);
+    if (ENABLE_MLIB)     dsputil_init_mlib  (c, avctx);
+    if (ENABLE_SPARC)    dsputil_init_vis   (c, avctx);
+    if (ENABLE_ALPHA)    dsputil_init_alpha (c, avctx);
+    if (ENABLE_POWERPC)  dsputil_init_ppc   (c, avctx);
+    if (ENABLE_MMI)      dsputil_init_mmi   (c, avctx);
+    if (ENABLE_SH4)      dsputil_init_sh4   (c, avctx);
+    if (ENABLE_BFIN)     dsputil_init_bfin  (c, avctx);
 
     for(i=0; i<64; i++){
         if(!c->put_2tap_qpel_pixels_tab[0][i])