changeset 3726:49fb1958d8e1 libavcodec

clean up #ifdef HAVE_IPP
author mru
date Fri, 15 Sep 2006 23:20:58 +0000
parents 3e5ef8f13f1b
children eae401c5bf30
files armv4l/dsputil_arm.c
diffstat 1 files changed, 11 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/armv4l/dsputil_arm.c	Fri Sep 15 21:57:19 2006 +0000
+++ b/armv4l/dsputil_arm.c	Fri Sep 15 23:20:58 2006 +0000
@@ -164,45 +164,46 @@
     simple_idct_ARM (block);
     ff_add_pixels_clamped(block, dest, line_size);
 }
+
+#ifdef HAVE_IPP
 static void simple_idct_ipp(DCTELEM *block)
 {
-#ifdef HAVE_IPP
     ippiDCT8x8Inv_Video_16s_C1I(block);
-#endif
 }
 static void simple_idct_ipp_put(uint8_t *dest, int line_size, DCTELEM *block)
 {
-#ifdef HAVE_IPP
     ippiDCT8x8Inv_Video_16s8u_C1R(block, dest, line_size);
-#endif
 }
 
 void add_pixels_clamped_iwmmxt(const DCTELEM *block, uint8_t *pixels, int line_size);
 
 static void simple_idct_ipp_add(uint8_t *dest, int line_size, DCTELEM *block)
 {
-#ifdef HAVE_IPP
     ippiDCT8x8Inv_Video_16s_C1I(block);
 #ifdef HAVE_IWMMXT
     add_pixels_clamped_iwmmxt(block, dest, line_size);
 #else
     add_pixels_clamped_ARM(block, dest, line_size);
 #endif
+}
 #endif
-}
 
 void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx)
 {
-    const int idct_algo= avctx->idct_algo;
+    int idct_algo= avctx->idct_algo;
 
     ff_put_pixels_clamped = c->put_pixels_clamped;
     ff_add_pixels_clamped = c->add_pixels_clamped;
 
+    if(idct_algo == FF_IDCT_AUTO){
 #ifdef HAVE_IPP
-    if(idct_algo==FF_IDCT_ARM){
+        idct_algo = FF_IDCT_IPP;
 #else
-    if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){
+        idct_algo = FF_IDCT_ARM;
 #endif
+    }
+
+    if(idct_algo==FF_IDCT_ARM){
         c->idct_put= j_rev_dct_ARM_put;
         c->idct_add= j_rev_dct_ARM_add;
         c->idct    = j_rev_dct_ARM;
@@ -213,14 +214,12 @@
         c->idct    = simple_idct_ARM;
         c->idct_permutation_type= FF_NO_IDCT_PERM;
 #ifdef HAVE_IPP
-    } else if (idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_IPP){
-#else
     } else if (idct_algo==FF_IDCT_IPP){
-#endif
         c->idct_put= simple_idct_ipp_put;
         c->idct_add= simple_idct_ipp_add;
         c->idct    = simple_idct_ipp;
         c->idct_permutation_type= FF_NO_IDCT_PERM;
+#endif
     }
 
 /*     c->put_pixels_tab[0][0] = put_pixels16_arm; */ // NG!