From 5b67ce2afa1a692af0fc431641bbbbb04da19bca Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Tue, 27 Nov 2007 22:42:55 +0000 Subject: [PATCH] build vc1dsp_mmx.c in its own compilation unit Originally committed as revision 11102 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/Makefile | 2 ++ libavcodec/i386/dsputil_mmx.c | 11 +++++++---- libavcodec/i386/vc1dsp_mmx.c | 6 ++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 2b6b4b450f..7bc987c3b6 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -363,11 +363,13 @@ OBJS-$(CONFIG_GPL) += i386/idct_mmx.o OBJS-$(CONFIG_CAVS_DECODER) += i386/cavsdsp_mmx.o OBJS-$(CONFIG_SNOW_DECODER) += i386/snowdsp_mmx.o +OBJS-$(CONFIG_VC1_DECODER) += i386/vc1dsp_mmx.o OBJS-$(CONFIG_VP3_DECODER) += i386/vp3dsp_mmx.o i386/vp3dsp_sse2.o OBJS-$(CONFIG_VP5_DECODER) += i386/vp3dsp_mmx.o i386/vp3dsp_sse2.o OBJS-$(CONFIG_VP6_DECODER) += i386/vp3dsp_mmx.o i386/vp3dsp_sse2.o OBJS-$(CONFIG_VP6A_DECODER) += i386/vp3dsp_mmx.o i386/vp3dsp_sse2.o OBJS-$(CONFIG_VP6F_DECODER) += i386/vp3dsp_mmx.o i386/vp3dsp_sse2.o +OBJS-$(CONFIG_WMV3_DECODER) += i386/vc1dsp_mmx.o endif ASM_OBJS-$(ARCH_ARMV4L) += armv4l/jrevdct_arm.o \ diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c index 06b4b2728f..2c8173b948 100644 --- a/libavcodec/i386/dsputil_mmx.c +++ b/libavcodec/i386/dsputil_mmx.c @@ -2843,10 +2843,6 @@ PREFETCH(prefetch_3dnow, prefetch) #undef PREFETCH #include "h264dsp_mmx.c" -#if defined(CONFIG_VC1_DECODER) || defined(CONFIG_WMV3_DECODER) \ - || defined(CONFIG_VC1_ENCODER) || defined(CONFIG_WMV3_ENCODER) -#include "vc1dsp_mmx.c" -#endif /* AVS specific */ void ff_cavsdsp_init_mmx2(DSPContext* c, AVCodecContext *avctx); @@ -2864,6 +2860,13 @@ void ff_avg_cavs_qpel16_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride) { avg_pixels16_mmx(dst, src, stride, 16); } +/* 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); +} + /* external functions, from idct_mmx.c */ void ff_mmx_idct(DCTELEM *block); void ff_mmxext_idct(DCTELEM *block); diff --git a/libavcodec/i386/vc1dsp_mmx.c b/libavcodec/i386/vc1dsp_mmx.c index 418c2bd407..9e2b9a4568 100644 --- a/libavcodec/i386/vc1dsp_mmx.c +++ b/libavcodec/i386/vc1dsp_mmx.c @@ -444,9 +444,7 @@ static void vc1_mspel_mc(uint8_t *dst, const uint8_t *src, int stride, vc1_put_shift_8bits[hmode](dst, src, stride, rnd, 1); } -static void put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd) { - put_pixels8_mmx(dst, src, stride, 8); -} +void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd); /** Macro to ease bicubic filter interpolation functions declarations */ #define DECLARE_FUNCTION(a, b) \ @@ -474,7 +472,7 @@ DECLARE_FUNCTION(3, 2) DECLARE_FUNCTION(3, 3) void ff_vc1dsp_init_mmx(DSPContext* dsp, AVCodecContext *avctx) { - dsp->put_vc1_mspel_pixels_tab[ 0] = put_vc1_mspel_mc00_mmx; + dsp->put_vc1_mspel_pixels_tab[ 0] = ff_put_vc1_mspel_mc00_mmx; dsp->put_vc1_mspel_pixels_tab[ 4] = put_vc1_mspel_mc01_mmx; dsp->put_vc1_mspel_pixels_tab[ 8] = put_vc1_mspel_mc02_mmx; dsp->put_vc1_mspel_pixels_tab[12] = put_vc1_mspel_mc03_mmx;