changeset 11381:f5ccf2e590d6 libavcodec

x86: move function prototypes to header files
author mru
date Sat, 06 Mar 2010 22:37:08 +0000
parents 8f061327e46a
children 50415a8f1451
files x86/cavsdsp_mmx.c x86/dsputil_mmx.c x86/dsputil_mmx.h x86/dsputilenc_mmx.c x86/idct_mmx.c x86/vc1dsp_mmx.c
diffstat 6 files changed, 27 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/x86/cavsdsp_mmx.c	Sat Mar 06 22:37:03 2010 +0000
+++ b/x86/cavsdsp_mmx.c	Sat Mar 06 22:37:08 2010 +0000
@@ -437,11 +437,6 @@
 CAVS_MC(avg_, 8, mmx2)
 CAVS_MC(avg_, 16,mmx2)
 
-void ff_put_cavs_qpel8_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride);
-void ff_avg_cavs_qpel8_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride);
-void ff_put_cavs_qpel16_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride);
-void ff_avg_cavs_qpel16_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride);
-
 void ff_cavsdsp_init_mmx2(DSPContext* c, AVCodecContext *avctx) {
 #define dspfunc(PFX, IDX, NUM) \
     c->PFX ## _pixels_tab[IDX][ 0] = ff_ ## PFX ## NUM ## _mc00_mmx2; \
--- a/x86/dsputil_mmx.c	Sat Mar 06 22:37:03 2010 +0000
+++ b/x86/dsputil_mmx.c	Sat Mar 06 22:37:08 2010 +0000
@@ -1818,9 +1818,6 @@
 #include "rv40dsp_mmx.c"
 
 /* CAVS specific */
-void ff_cavsdsp_init_mmx2(DSPContext* c, AVCodecContext *avctx);
-void ff_cavsdsp_init_3dnow(DSPContext* c, AVCodecContext *avctx);
-
 void ff_put_cavs_qpel8_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride) {
     put_pixels8_mmx(dst, src, stride, 8);
 }
@@ -1835,8 +1832,6 @@
 }
 
 /* VC1 specific */
-void ff_vc1dsp_init_mmx(DSPContext* dsp, AVCodecContext *avctx);
-
 void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
     put_pixels8_mmx(dst, src, stride, 8);
 }
@@ -1844,10 +1839,6 @@
     avg_pixels8_mmx2(dst, src, stride, 8);
 }
 
-/* external functions, from idct_mmx.c */
-void ff_mmx_idct(DCTELEM *block);
-void ff_mmxext_idct(DCTELEM *block);
-
 /* XXX: those functions should be suppressed ASAP when all IDCTs are
    converted */
 #if CONFIG_GPL
@@ -2499,17 +2490,6 @@
         float_to_int16_interleave_3dnow(dst, src, len, channels);
 }
 
-
-void ff_snow_horizontal_compose97i_sse2(IDWTELEM *b, int width);
-void ff_snow_horizontal_compose97i_mmx(IDWTELEM *b, int width);
-void ff_snow_vertical_compose97i_sse2(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, int width);
-void ff_snow_vertical_compose97i_mmx(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, int width);
-void ff_snow_inner_add_yblock_sse2(const uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h,
-                                   int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8);
-void ff_snow_inner_add_yblock_mmx(const uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h,
-                                  int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8);
-
-
 float ff_scalarproduct_float_sse(const float *v1, const float *v2, int order);
 
 void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
--- a/x86/dsputil_mmx.h	Sat Mar 06 22:37:03 2010 +0000
+++ b/x86/dsputil_mmx.h	Sat Mar 06 22:37:08 2010 +0000
@@ -156,4 +156,30 @@
 void put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size);
 void put_signed_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size);
 
+void ff_cavsdsp_init_mmx2(DSPContext* c, AVCodecContext *avctx);
+void ff_cavsdsp_init_3dnow(DSPContext* c, AVCodecContext *avctx);
+void ff_put_cavs_qpel8_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride);
+void ff_avg_cavs_qpel8_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride);
+void ff_put_cavs_qpel16_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride);
+void ff_avg_cavs_qpel16_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride);
+
+void ff_vc1dsp_init_mmx(DSPContext* dsp, AVCodecContext *avctx);
+void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd);
+void ff_avg_vc1_mspel_mc00_mmx2(uint8_t *dst, const uint8_t *src, int stride, int rnd);
+
+void ff_snow_horizontal_compose97i_sse2(IDWTELEM *b, int width);
+void ff_snow_horizontal_compose97i_mmx(IDWTELEM *b, int width);
+void ff_snow_vertical_compose97i_sse2(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, int width);
+void ff_snow_vertical_compose97i_mmx(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, int width);
+void ff_snow_inner_add_yblock_sse2(const uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h,
+                                   int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8);
+void ff_snow_inner_add_yblock_mmx(const uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h,
+                                  int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8);
+
+void ff_lpc_compute_autocorr_sse2(const int32_t *data, int len, int lag,
+                                   double *autoc);
+
+void ff_mmx_idct(DCTELEM *block);
+void ff_mmxext_idct(DCTELEM *block);
+
 #endif /* AVCODEC_X86_DSPUTIL_MMX_H */
--- a/x86/dsputilenc_mmx.c	Sat Mar 06 22:37:03 2010 +0000
+++ b/x86/dsputilenc_mmx.c	Sat Mar 06 22:37:08 2010 +0000
@@ -1348,10 +1348,6 @@
 #endif //HAVE_SSSE3
 
 
-void ff_lpc_compute_autocorr_sse2(const int32_t *data, int len, int lag,
-                                   double *autoc);
-
-
 void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
 {
     if (mm_flags & FF_MM_MMX) {
--- a/x86/idct_mmx.c	Sat Mar 06 22:37:03 2010 +0000
+++ b/x86/idct_mmx.c	Sat Mar 06 22:37:08 2010 +0000
@@ -23,6 +23,7 @@
 #include "libavutil/common.h"
 #include "libavcodec/dsputil.h"
 
+#include "dsputil_mmx.h"
 #include "mmx.h"
 
 #define ATTR_ALIGN(align) __attribute__ ((__aligned__ (align)))
@@ -594,9 +595,6 @@
     idct_col (block, 4);                                                \
 }
 
-void ff_mmx_idct(DCTELEM *block);
-void ff_mmxext_idct(DCTELEM *block);
-
 declare_idct (ff_mmxext_idct, mmxext_table,
               mmxext_row_head, mmxext_row, mmxext_row_tail, mmxext_row_mid)
 
--- a/x86/vc1dsp_mmx.c	Sat Mar 06 22:37:03 2010 +0000
+++ b/x86/vc1dsp_mmx.c	Sat Mar 06 22:37:08 2010 +0000
@@ -463,9 +463,6 @@
 VC1_MSPEL_MC(put_)
 VC1_MSPEL_MC(avg_)
 
-void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd);
-void ff_avg_vc1_mspel_mc00_mmx2(uint8_t *dst, const uint8_t *src, int stride, int rnd);
-
 /** Macro to ease bicubic filter interpolation functions declarations */
 #define DECLARE_FUNCTION(a, b)                                          \
 static void put_vc1_mspel_mc ## a ## b ## _mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd) { \