[SCM] libav/experimental: clean up #ifdef HAVE_IPP

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:50:51 UTC 2013


The following commit has been merged in the experimental branch:
commit f07e8487b01ab43c72c6c487fc26feeb85bc396b
Author: Måns Rullgård <mans at mansr.com>
Date:   Fri Sep 15 23:20:58 2006 +0000

    clean up #ifdef HAVE_IPP
    
    Originally committed as revision 6278 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/armv4l/dsputil_arm.c b/libavcodec/armv4l/dsputil_arm.c
index cebd176..8a9347d 100644
--- a/libavcodec/armv4l/dsputil_arm.c
+++ b/libavcodec/armv4l/dsputil_arm.c
@@ -164,45 +164,46 @@ static void simple_idct_ARM_add(uint8_t *dest, int line_size, DCTELEM *block)
     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
 }
+#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 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx)
         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!

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list