From 096cc11ec102701a18951b4f0437d609081ca1dd Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 26 Feb 2013 17:29:48 +0100 Subject: [PATCH] x86: vc1dsp: Move ff_avg_vc1_mspel_mc00_mmxext out of dsputil_mmx.c --- libavcodec/x86/dsputil_mmx.c | 8 -------- libavcodec/x86/dsputil_mmx.h | 6 +++++- libavcodec/x86/h264_qpel.c | 1 - libavcodec/x86/vc1dsp_init.c | 9 +++++++++ libavcodec/x86/vc1dsp_mmx.c | 3 --- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index d02a6ee8bd..161c7f34e0 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -128,8 +128,6 @@ void ff_put_no_rnd_pixels8_y2_exact_mmxext(uint8_t *block, void ff_put_no_rnd_pixels8_y2_exact_3dnow(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h); -void ff_avg_pixels8_mmxext(uint8_t *block, const uint8_t *pixels, - ptrdiff_t line_size, int h); void ff_avg_pixels8_3dnow(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h); void ff_avg_pixels8_x2_mmxext(uint8_t *block, const uint8_t *pixels, @@ -1314,12 +1312,6 @@ void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, { ff_put_pixels8_mmx(dst, src, stride, 8); } - -void ff_avg_vc1_mspel_mc00_mmxext(uint8_t *dst, const uint8_t *src, - int stride, int rnd) -{ - ff_avg_pixels8_mmxext(dst, src, stride, 8); -} #endif /* HAVE_YASM */ #if HAVE_INLINE_ASM diff --git a/libavcodec/x86/dsputil_mmx.h b/libavcodec/x86/dsputil_mmx.h index 86de479b62..78cbd1e408 100644 --- a/libavcodec/x86/dsputil_mmx.h +++ b/libavcodec/x86/dsputil_mmx.h @@ -22,7 +22,9 @@ #ifndef AVCODEC_X86_DSPUTIL_MMX_H #define AVCODEC_X86_DSPUTIL_MMX_H +#include #include + #include "libavcodec/dsputil.h" #include "libavutil/x86/asm.h" @@ -87,13 +89,15 @@ void ff_add_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, int line_s void ff_put_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, int line_size); void ff_put_signed_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, int line_size); +void ff_avg_pixels8_mmxext(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); + void ff_put_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride); void ff_avg_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride); void ff_put_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride); void ff_avg_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride); void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd); -void ff_avg_vc1_mspel_mc00_mmxext(uint8_t *dst, const uint8_t *src, int stride, int rnd); void ff_put_rv40_qpel8_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size); void ff_put_rv40_qpel16_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size); diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c index 9954243ac6..921f270648 100644 --- a/libavcodec/x86/h264_qpel.c +++ b/libavcodec/x86/h264_qpel.c @@ -31,7 +31,6 @@ void ff_put_pixels4_mmxext(uint8_t *block, const uint8_t *pixels, int line_size, int h); void ff_avg_pixels4_mmxext(uint8_t *block, const uint8_t *pixels, int line_size, int h); void ff_put_pixels8_mmxext(uint8_t *block, const uint8_t *pixels, int line_size, int h); -void ff_avg_pixels8_mmxext(uint8_t *block, const uint8_t *pixels, int line_size, int h); static void ff_put_pixels16_mmxext(uint8_t *block, const uint8_t *pixels, int line_size, int h) { diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c index 230d06f0c0..3f0b67ce67 100644 --- a/libavcodec/x86/vc1dsp_init.c +++ b/libavcodec/x86/vc1dsp_init.c @@ -27,6 +27,7 @@ #include "libavutil/cpu.h" #include "libavutil/x86/cpu.h" #include "libavcodec/vc1dsp.h" +#include "dsputil_mmx.h" #include "vc1dsp.h" #include "config.h" @@ -60,6 +61,12 @@ static void vc1_h_loop_filter16_sse4(uint8_t *src, int stride, int pq) ff_vc1_h_loop_filter8_sse4(src, stride, pq); ff_vc1_h_loop_filter8_sse4(src+8*stride, stride, pq); } + +static void avg_vc1_mspel_mc00_mmxext(uint8_t *dst, const uint8_t *src, + int stride, int rnd) +{ + ff_avg_pixels8_mmxext(dst, src, stride, 8); +} #endif /* HAVE_YASM */ void ff_put_vc1_chroma_mc8_nornd_mmx (uint8_t *dst, uint8_t *src, @@ -100,6 +107,8 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) if (mm_flags & AV_CPU_FLAG_MMXEXT) { ASSIGN_LF(mmxext); dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_mmxext; + + dsp->avg_vc1_mspel_pixels_tab[0] = avg_vc1_mspel_mc00_mmxext; } else if (mm_flags & AV_CPU_FLAG_3DNOW) { dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_3dnow; } diff --git a/libavcodec/x86/vc1dsp_mmx.c b/libavcodec/x86/vc1dsp_mmx.c index 345b213f9d..cc3b72b4eb 100644 --- a/libavcodec/x86/vc1dsp_mmx.c +++ b/libavcodec/x86/vc1dsp_mmx.c @@ -721,9 +721,6 @@ av_cold void ff_vc1dsp_init_mmx(VC1DSPContext *dsp) av_cold void ff_vc1dsp_init_mmxext(VC1DSPContext *dsp) { -#if HAVE_YASM - dsp->avg_vc1_mspel_pixels_tab[ 0] = ff_avg_vc1_mspel_mc00_mmxext; -#endif /* HAVE_YASM */ dsp->avg_vc1_mspel_pixels_tab[ 4] = avg_vc1_mspel_mc01_mmxext; dsp->avg_vc1_mspel_pixels_tab[ 8] = avg_vc1_mspel_mc02_mmxext; dsp->avg_vc1_mspel_pixels_tab[12] = avg_vc1_mspel_mc03_mmxext;