diff options
author | Måns Rullgård <mans@mansr.com> | 2010-08-03 20:59:00 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2010-08-03 20:59:00 +0000 |
commit | f079a64aea0d19dd7adfc045747cd4b4dfb6225c (patch) | |
tree | f02085b637c2b6386bc96ed92aac18e7b8450383 /libavcodec/x86/cavsdsp_mmx.c | |
parent | 61ee75bbf86cc2a69fb02c32e391c197ddd9fcf3 (diff) | |
download | ffmpeg-f079a64aea0d19dd7adfc045747cd4b4dfb6225c.tar.gz |
Move cavs dsp functions to their own struct
Originally committed as revision 24685 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/x86/cavsdsp_mmx.c')
-rw-r--r-- | libavcodec/x86/cavsdsp_mmx.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libavcodec/x86/cavsdsp_mmx.c b/libavcodec/x86/cavsdsp_mmx.c index e8c7065fd7..7872b3cced 100644 --- a/libavcodec/x86/cavsdsp_mmx.c +++ b/libavcodec/x86/cavsdsp_mmx.c @@ -25,6 +25,7 @@ #include "libavutil/common.h" #include "libavutil/x86_cpu.h" #include "libavcodec/dsputil.h" +#include "libavcodec/cavsdsp.h" #include "dsputil_mmx.h" /***************************************************************************** @@ -437,7 +438,7 @@ CAVS_MC(put_, 16,mmx2) CAVS_MC(avg_, 8, mmx2) CAVS_MC(avg_, 16,mmx2) -void ff_cavsdsp_init_mmx2(DSPContext* c, AVCodecContext *avctx) { +static void ff_cavsdsp_init_mmx2(CAVSDSPContext* c, AVCodecContext *avctx) { #define dspfunc(PFX, IDX, NUM) \ c->PFX ## _pixels_tab[IDX][ 0] = ff_ ## PFX ## NUM ## _mc00_mmx2; \ c->PFX ## _pixels_tab[IDX][ 2] = ff_ ## PFX ## NUM ## _mc20_mmx2; \ @@ -453,7 +454,7 @@ void ff_cavsdsp_init_mmx2(DSPContext* c, AVCodecContext *avctx) { c->cavs_idct8_add = cavs_idct8_add_mmx; } -void ff_cavsdsp_init_3dnow(DSPContext* c, AVCodecContext *avctx) { +static void ff_cavsdsp_init_3dnow(CAVSDSPContext* c, AVCodecContext *avctx) { #define dspfunc(PFX, IDX, NUM) \ c->PFX ## _pixels_tab[IDX][ 0] = ff_ ## PFX ## NUM ## _mc00_mmx2; \ c->PFX ## _pixels_tab[IDX][ 2] = ff_ ## PFX ## NUM ## _mc20_3dnow; \ @@ -468,3 +469,11 @@ void ff_cavsdsp_init_3dnow(DSPContext* c, AVCodecContext *avctx) { #undef dspfunc c->cavs_idct8_add = cavs_idct8_add_mmx; } + +void ff_cavsdsp_init_mmx(CAVSDSPContext *c, AVCodecContext *avctx) +{ + int mm_flags = mm_support(); + + if (mm_flags & FF_MM_MMX2) ff_cavsdsp_init_mmx2 (c, avctx); + if (mm_flags & FF_MM_3DNOW) ff_cavsdsp_init_3dnow(c, avctx); +} |