[FFmpeg-cvslog] x86: call most of the x86 dsp init functions under if (ARCH_X86)

Janne Grunau git at videolan.org
Mon Oct 8 22:03:16 CEST 2012


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Fri Oct  5 19:54:10 2012 +0200| [f101eab1be1a296a1a048cd905edfcacc3b546ed] | committer: Janne Grunau

x86: call most of the x86 dsp init functions under if (ARCH_X86)

Rename the called dsp init functions to *_init_x86.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f101eab1be1a296a1a048cd905edfcacc3b546ed
---

 libavcodec/ac3dsp.c           |    2 +-
 libavcodec/dct.c              |    4 ++--
 libavcodec/dct.h              |    2 +-
 libavcodec/fft.c              |    2 +-
 libavcodec/fft.h              |    2 +-
 libavcodec/fmtconvert.c       |    2 +-
 libavcodec/h264dsp.c          |    2 +-
 libavcodec/h264pred.c         |    2 +-
 libavcodec/lpc.c              |    2 +-
 libavcodec/mpegaudiodsp.c     |    2 +-
 libavcodec/mpegaudiodsp.h     |    2 +-
 libavcodec/pngdsp.c           |    2 +-
 libavcodec/proresdsp.c        |    2 +-
 libavcodec/rv34dsp.c          |    2 +-
 libavcodec/rv40dsp.c          |    2 +-
 libavcodec/sbrdsp.c           |    2 +-
 libavcodec/vp56dsp.c          |    2 +-
 libavcodec/vp8dsp.c           |    2 +-
 libavcodec/x86/Makefile       |   33 +++++++++++++++++----------------
 libavcodec/x86/fft_init.c     |    4 ++--
 libavcodec/x86/mpegaudiodec.c |    2 +-
 libavcodec/x86/rv40dsp_init.c |    4 ++--
 22 files changed, 41 insertions(+), 40 deletions(-)

diff --git a/libavcodec/ac3dsp.c b/libavcodec/ac3dsp.c
index 41f79b9..7e7a808 100644
--- a/libavcodec/ac3dsp.c
+++ b/libavcodec/ac3dsp.c
@@ -211,6 +211,6 @@ av_cold void ff_ac3dsp_init(AC3DSPContext *c, int bit_exact)
 
     if (ARCH_ARM)
         ff_ac3dsp_init_arm(c, bit_exact);
-    if (HAVE_MMX)
+    if (ARCH_X86)
         ff_ac3dsp_init_x86(c, bit_exact);
 }
diff --git a/libavcodec/dct.c b/libavcodec/dct.c
index 73716d3..0128c7d 100644
--- a/libavcodec/dct.c
+++ b/libavcodec/dct.c
@@ -209,8 +209,8 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
     }
 
     s->dct32 = ff_dct32_float;
-    if (HAVE_MMX)
-        ff_dct_init_mmx(s);
+    if (ARCH_X86)
+        ff_dct_init_x86(s);
 
     return 0;
 }
diff --git a/libavcodec/dct.h b/libavcodec/dct.h
index c898856..905cc01 100644
--- a/libavcodec/dct.h
+++ b/libavcodec/dct.h
@@ -47,6 +47,6 @@ struct DCTContext {
 int  ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType type);
 void ff_dct_end (DCTContext *s);
 
-void ff_dct_init_mmx(DCTContext *s);
+void ff_dct_init_x86(DCTContext *s);
 
 #endif /* AVCODEC_DCT_H */
diff --git a/libavcodec/fft.c b/libavcodec/fft.c
index 1e31dde..0983e80 100644
--- a/libavcodec/fft.c
+++ b/libavcodec/fft.c
@@ -160,7 +160,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
 #if CONFIG_FFT_FLOAT
     if (ARCH_ARM)     ff_fft_init_arm(s);
     if (HAVE_ALTIVEC) ff_fft_init_altivec(s);
-    if (HAVE_MMX)     ff_fft_init_mmx(s);
+    if (ARCH_X86)     ff_fft_init_x86(s);
     if (CONFIG_MDCT)  s->mdct_calcw = s->mdct_calc;
 #else
     if (CONFIG_MDCT)  s->mdct_calcw = ff_mdct_calcw_c;
diff --git a/libavcodec/fft.h b/libavcodec/fft.h
index 706f94b..7f10f72 100644
--- a/libavcodec/fft.h
+++ b/libavcodec/fft.h
@@ -135,7 +135,7 @@ int ff_fft_init(FFTContext *s, int nbits, int inverse);
 
 #if CONFIG_FFT_FLOAT
 void ff_fft_init_altivec(FFTContext *s);
-void ff_fft_init_mmx(FFTContext *s);
+void ff_fft_init_x86(FFTContext *s);
 void ff_fft_init_arm(FFTContext *s);
 #else
 void ff_fft_fixed_init_arm(FFTContext *s);
diff --git a/libavcodec/fmtconvert.c b/libavcodec/fmtconvert.c
index c90ffc1..642e1d2 100644
--- a/libavcodec/fmtconvert.c
+++ b/libavcodec/fmtconvert.c
@@ -85,5 +85,5 @@ av_cold void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx)
 
     if (ARCH_ARM) ff_fmt_convert_init_arm(c, avctx);
     if (HAVE_ALTIVEC) ff_fmt_convert_init_altivec(c, avctx);
-    if (HAVE_MMX) ff_fmt_convert_init_x86(c, avctx);
+    if (ARCH_X86) ff_fmt_convert_init_x86(c, avctx);
 }
diff --git a/libavcodec/h264dsp.c b/libavcodec/h264dsp.c
index ec59e4a..1353c1a 100644
--- a/libavcodec/h264dsp.c
+++ b/libavcodec/h264dsp.c
@@ -114,5 +114,5 @@ void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, const int chroma_fo
 
     if (ARCH_ARM) ff_h264dsp_init_arm(c, bit_depth, chroma_format_idc);
     if (HAVE_ALTIVEC) ff_h264dsp_init_ppc(c, bit_depth, chroma_format_idc);
-    if (HAVE_MMX) ff_h264dsp_init_x86(c, bit_depth, chroma_format_idc);
+    if (ARCH_X86) ff_h264dsp_init_x86(c, bit_depth, chroma_format_idc);
 }
diff --git a/libavcodec/h264pred.c b/libavcodec/h264pred.c
index 4334d60..fb44046 100644
--- a/libavcodec/h264pred.c
+++ b/libavcodec/h264pred.c
@@ -533,5 +533,5 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co
     }
 
     if (ARCH_ARM) ff_h264_pred_init_arm(h, codec_id, bit_depth, chroma_format_idc);
-    if (HAVE_MMX) ff_h264_pred_init_x86(h, codec_id, bit_depth, chroma_format_idc);
+    if (ARCH_X86) ff_h264_pred_init_x86(h, codec_id, bit_depth, chroma_format_idc);
 }
diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c
index cc3ce44..126dbc1 100644
--- a/libavcodec/lpc.c
+++ b/libavcodec/lpc.c
@@ -258,7 +258,7 @@ av_cold int ff_lpc_init(LPCContext *s, int blocksize, int max_order,
     s->lpc_apply_welch_window = lpc_apply_welch_window_c;
     s->lpc_compute_autocorr   = lpc_compute_autocorr_c;
 
-    if (HAVE_MMX)
+    if (ARCH_X86)
         ff_lpc_init_x86(s);
 
     return 0;
diff --git a/libavcodec/mpegaudiodsp.c b/libavcodec/mpegaudiodsp.c
index 431724a..cd9371b 100644
--- a/libavcodec/mpegaudiodsp.c
+++ b/libavcodec/mpegaudiodsp.c
@@ -41,6 +41,6 @@ void ff_mpadsp_init(MPADSPContext *s)
     s->imdct36_blocks_fixed = ff_imdct36_blocks_fixed;
 
     if (ARCH_ARM)     ff_mpadsp_init_arm(s);
-    if (HAVE_MMX)     ff_mpadsp_init_mmx(s);
+    if (ARCH_X86)     ff_mpadsp_init_x86(s);
     if (HAVE_ALTIVEC) ff_mpadsp_init_altivec(s);
 }
diff --git a/libavcodec/mpegaudiodsp.h b/libavcodec/mpegaudiodsp.h
index 2997b3f..1f85a15 100644
--- a/libavcodec/mpegaudiodsp.h
+++ b/libavcodec/mpegaudiodsp.h
@@ -55,7 +55,7 @@ void ff_mpa_synth_filter_float(MPADSPContext *s,
                                float *sb_samples);
 
 void ff_mpadsp_init_arm(MPADSPContext *s);
-void ff_mpadsp_init_mmx(MPADSPContext *s);
+void ff_mpadsp_init_x86(MPADSPContext *s);
 void ff_mpadsp_init_altivec(MPADSPContext *s);
 
 void ff_mpa_synth_init_float(float *window);
diff --git a/libavcodec/pngdsp.c b/libavcodec/pngdsp.c
index d40bf9c..00734d7 100644
--- a/libavcodec/pngdsp.c
+++ b/libavcodec/pngdsp.c
@@ -44,5 +44,5 @@ void ff_pngdsp_init(PNGDSPContext *dsp)
     dsp->add_bytes_l2         = add_bytes_l2_c;
     dsp->add_paeth_prediction = ff_add_png_paeth_prediction;
 
-    if (HAVE_MMX) ff_pngdsp_init_x86(dsp);
+    if (ARCH_X86) ff_pngdsp_init_x86(dsp);
 }
diff --git a/libavcodec/proresdsp.c b/libavcodec/proresdsp.c
index 39d1206..5996904 100644
--- a/libavcodec/proresdsp.c
+++ b/libavcodec/proresdsp.c
@@ -75,7 +75,7 @@ void ff_proresdsp_init(ProresDSPContext *dsp)
     dsp->idct_put = prores_idct_put_c;
     dsp->idct_permutation_type = FF_NO_IDCT_PERM;
 
-    if (HAVE_MMX) ff_proresdsp_x86_init(dsp);
+    if (ARCH_X86) ff_proresdsp_x86_init(dsp);
 
     ff_init_scantable_permutation(dsp->idct_permutation,
                                   dsp->idct_permutation_type);
diff --git a/libavcodec/rv34dsp.c b/libavcodec/rv34dsp.c
index ac14ed9..25e8c3d 100644
--- a/libavcodec/rv34dsp.c
+++ b/libavcodec/rv34dsp.c
@@ -137,6 +137,6 @@ av_cold void ff_rv34dsp_init(RV34DSPContext *c, DSPContext* dsp) {
 
     if (HAVE_NEON)
         ff_rv34dsp_init_neon(c, dsp);
-    if (HAVE_MMX)
+    if (ARCH_X86)
         ff_rv34dsp_init_x86(c, dsp);
 }
diff --git a/libavcodec/rv40dsp.c b/libavcodec/rv40dsp.c
index 762f714..36188d2 100644
--- a/libavcodec/rv40dsp.c
+++ b/libavcodec/rv40dsp.c
@@ -603,7 +603,7 @@ av_cold void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp) {
     c->rv40_loop_filter_strength[0] = rv40_h_loop_filter_strength;
     c->rv40_loop_filter_strength[1] = rv40_v_loop_filter_strength;
 
-    if (HAVE_MMX)
+    if (ARCH_X86)
         ff_rv40dsp_init_x86(c, dsp);
     if (HAVE_NEON)
         ff_rv40dsp_init_neon(c, dsp);
diff --git a/libavcodec/sbrdsp.c b/libavcodec/sbrdsp.c
index 8c88fb3..781ec83 100644
--- a/libavcodec/sbrdsp.c
+++ b/libavcodec/sbrdsp.c
@@ -243,6 +243,6 @@ av_cold void ff_sbrdsp_init(SBRDSPContext *s)
 
     if (ARCH_ARM)
         ff_sbrdsp_init_arm(s);
-    if (HAVE_MMX)
+    if (ARCH_X86)
         ff_sbrdsp_init_x86(s);
 }
diff --git a/libavcodec/vp56dsp.c b/libavcodec/vp56dsp.c
index e208a03..5a36e52 100644
--- a/libavcodec/vp56dsp.c
+++ b/libavcodec/vp56dsp.c
@@ -90,5 +90,5 @@ void ff_vp56dsp_init(VP56DSPContext *s, enum AVCodecID codec)
     }
 
     if (ARCH_ARM) ff_vp56dsp_init_arm(s, codec);
-    if (HAVE_MMX) ff_vp56dsp_init_x86(s, codec);
+    if (ARCH_X86) ff_vp56dsp_init_x86(s, codec);
 }
diff --git a/libavcodec/vp8dsp.c b/libavcodec/vp8dsp.c
index 3700cc3..2ab68bc 100644
--- a/libavcodec/vp8dsp.c
+++ b/libavcodec/vp8dsp.c
@@ -521,7 +521,7 @@ av_cold void ff_vp8dsp_init(VP8DSPContext *dsp)
     VP8_BILINEAR_MC_FUNC(1, 8);
     VP8_BILINEAR_MC_FUNC(2, 4);
 
-    if (HAVE_MMX)
+    if (ARCH_X86)
         ff_vp8dsp_init_x86(dsp);
     if (HAVE_ALTIVEC)
         ff_vp8dsp_init_altivec(dsp);
diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile
index be4fd54..d0cfb95 100644
--- a/libavcodec/x86/Makefile
+++ b/libavcodec/x86/Makefile
@@ -1,38 +1,39 @@
+OBJS                                   += x86/fmtconvert_init.o
+
+OBJS-$(CONFIG_AAC_DECODER)             += x86/sbrdsp_init.o
+OBJS-$(CONFIG_AC3DSP)                  += x86/ac3dsp_init.o
 OBJS-$(CONFIG_DNXHD_ENCODER)           += x86/dnxhdenc.o
+OBJS-$(CONFIG_FFT)                     += x86/fft_init.o
+OBJS-$(CONFIG_H264DSP)                 += x86/h264dsp_init.o
+OBJS-$(CONFIG_H264PRED)                += x86/h264_intrapred_init.o
+OBJS-$(CONFIG_LPC)                     += x86/lpc.o
 OBJS-$(CONFIG_MLP_DECODER)             += x86/mlpdsp.o
+OBJS-$(CONFIG_MPEGAUDIODSP)            += x86/mpegaudiodec.o
 OBJS-$(CONFIG_MPEGVIDEO)               += x86/mpegvideo.o
 OBJS-$(CONFIG_MPEGVIDEOENC)            += x86/mpegvideoenc.o
+OBJS-$(CONFIG_PNG_DECODER)             += x86/pngdsp_init.o
+OBJS-$(CONFIG_PRORES_DECODER)          += x86/proresdsp_init.o
+OBJS-$(CONFIG_RV30_DECODER)            += x86/rv34dsp_init.o
+OBJS-$(CONFIG_RV40_DECODER)            += x86/rv34dsp_init.o            \
+                                          x86/rv40dsp_init.o
 OBJS-$(CONFIG_TRUEHD_DECODER)          += x86/mlpdsp.o
 OBJS-$(CONFIG_VP3DSP)                  += x86/vp3dsp_init.o
+OBJS-$(CONFIG_VP5_DECODER)             += x86/vp56dsp_init.o
+OBJS-$(CONFIG_VP6_DECODER)             += x86/vp56dsp_init.o
+OBJS-$(CONFIG_VP8_DECODER)             += x86/vp8dsp_init.o
 OBJS-$(CONFIG_XMM_CLOBBER_TEST)        += x86/w64xmmtest.o
 
 MMX-OBJS                               += x86/dsputil_mmx.o             \
                                           x86/fdct.o                    \
-                                          x86/fmtconvert_init.o         \
                                           x86/idct_mmx_xvid.o           \
                                           x86/idct_sse2_xvid.o          \
                                           x86/simple_idct.o             \
 
-MMX-OBJS-$(CONFIG_AAC_DECODER)         += x86/sbrdsp_init.o
-MMX-OBJS-$(CONFIG_AC3DSP)              += x86/ac3dsp_init.o
 MMX-OBJS-$(CONFIG_CAVS_DECODER)        += x86/cavsdsp.o
 MMX-OBJS-$(CONFIG_DWT)                 += x86/snowdsp.o
 MMX-OBJS-$(CONFIG_ENCODERS)            += x86/dsputilenc_mmx.o          \
                                           x86/motion_est.o
-MMX-OBJS-$(CONFIG_FFT)                 += x86/fft_init.o
-MMX-OBJS-$(CONFIG_H264DSP)             += x86/h264dsp_init.o
-MMX-OBJS-$(CONFIG_H264PRED)            += x86/h264_intrapred_init.o
-MMX-OBJS-$(CONFIG_LPC)                 += x86/lpc.o
-MMX-OBJS-$(CONFIG_MPEGAUDIODSP)        += x86/mpegaudiodec.o
-MMX-OBJS-$(CONFIG_PNG_DECODER)         += x86/pngdsp_init.o
-MMX-OBJS-$(CONFIG_PRORES_DECODER)      += x86/proresdsp_init.o
-MMX-OBJS-$(CONFIG_RV30_DECODER)        += x86/rv34dsp_init.o
-MMX-OBJS-$(CONFIG_RV40_DECODER)        += x86/rv34dsp_init.o            \
-                                          x86/rv40dsp_init.o
 MMX-OBJS-$(CONFIG_VC1_DECODER)         += x86/vc1dsp_mmx.o
-MMX-OBJS-$(CONFIG_VP5_DECODER)         += x86/vp56dsp_init.o
-MMX-OBJS-$(CONFIG_VP6_DECODER)         += x86/vp56dsp_init.o
-MMX-OBJS-$(CONFIG_VP8_DECODER)         += x86/vp8dsp_init.o
 
 YASM-OBJS-$(CONFIG_AAC_DECODER)        += x86/sbrdsp.o
 YASM-OBJS-$(CONFIG_AC3DSP)             += x86/ac3dsp.o
diff --git a/libavcodec/x86/fft_init.c b/libavcodec/x86/fft_init.c
index 9ee3f9c..5554b24 100644
--- a/libavcodec/x86/fft_init.c
+++ b/libavcodec/x86/fft_init.c
@@ -22,7 +22,7 @@
 #include "libavcodec/dct.h"
 #include "fft.h"
 
-av_cold void ff_fft_init_mmx(FFTContext *s)
+av_cold void ff_fft_init_x86(FFTContext *s)
 {
     int has_vectors = av_get_cpu_flags();
 #if ARCH_X86_32
@@ -56,7 +56,7 @@ av_cold void ff_fft_init_mmx(FFTContext *s)
 }
 
 #if CONFIG_DCT
-av_cold void ff_dct_init_mmx(DCTContext *s)
+av_cold void ff_dct_init_x86(DCTContext *s)
 {
     int has_vectors = av_get_cpu_flags();
     if (EXTERNAL_SSE(has_vectors))
diff --git a/libavcodec/x86/mpegaudiodec.c b/libavcodec/x86/mpegaudiodec.c
index f8dc8eb..c914fe1 100644
--- a/libavcodec/x86/mpegaudiodec.c
+++ b/libavcodec/x86/mpegaudiodec.c
@@ -223,7 +223,7 @@ DECL_IMDCT_BLOCKS(ssse3,sse)
 DECL_IMDCT_BLOCKS(avx,avx)
 #endif /* HAVE_YASM */
 
-void ff_mpadsp_init_mmx(MPADSPContext *s)
+void ff_mpadsp_init_x86(MPADSPContext *s)
 {
     int mm_flags = av_get_cpu_flags();
 
diff --git a/libavcodec/x86/rv40dsp_init.c b/libavcodec/x86/rv40dsp_init.c
index 2b71bb0..a7d92f7 100644
--- a/libavcodec/x86/rv40dsp_init.c
+++ b/libavcodec/x86/rv40dsp_init.c
@@ -195,12 +195,12 @@ void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
     if (EXTERNAL_MMX(mm_flags)) {
         c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_mmx;
         c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_mmx;
-#if HAVE_INLINE_ASM
+#if HAVE_MMX_INLINE
         c->put_pixels_tab[0][15] = ff_put_rv40_qpel16_mc33_mmx;
         c->put_pixels_tab[1][15] = ff_put_rv40_qpel8_mc33_mmx;
         c->avg_pixels_tab[0][15] = ff_avg_rv40_qpel16_mc33_mmx;
         c->avg_pixels_tab[1][15] = ff_avg_rv40_qpel8_mc33_mmx;
-#endif /* HAVE_INLINE_ASM */
+#endif /* HAVE_MMX_INLINE */
 #if ARCH_X86_32
         QPEL_MC_SET(put_, _mmx)
 #endif



More information about the ffmpeg-cvslog mailing list