diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2007-05-12 05:55:09 +0000 |
---|---|---|
committer | Loren Merritt <lorenm@u.washington.edu> | 2007-05-12 05:55:09 +0000 |
commit | ff506a906e82d5609abc80c4c7c395d5463757f7 (patch) | |
tree | ce3338439e44f4534d6ba1c25d0b6ed3b8a0fd14 /libavcodec/i386/mpegvideo_mmx.c | |
parent | 8e380710039e054bc617ab95a019e87c5258d809 (diff) | |
download | ffmpeg-ff506a906e82d5609abc80c4c7c395d5463757f7.tar.gz |
sse2 & ssse3 versions of dct_quantize.
core2: mmx2=154 sse2=73 ssse3=66 (cycles)
k8: mmx2=179 sse2=149
p4: mmx2=284 sse2=194
Originally committed as revision 9003 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386/mpegvideo_mmx.c')
-rw-r--r-- | libavcodec/i386/mpegvideo_mmx.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libavcodec/i386/mpegvideo_mmx.c b/libavcodec/i386/mpegvideo_mmx.c index 1b7b1c19f4..f8bdcc6e50 100644 --- a/libavcodec/i386/mpegvideo_mmx.c +++ b/libavcodec/i386/mpegvideo_mmx.c @@ -673,6 +673,12 @@ static void denoise_dct_sse2(MpegEncContext *s, DCTELEM *block){ ); } +#ifdef HAVE_SSSE3 +#define HAVE_SSSE3_BAK +#endif +#undef HAVE_SSSE3 + +#undef HAVE_SSE2 #undef HAVE_MMX2 #define RENAME(a) a ## _MMX #define RENAMEl(a) a ## _mmx @@ -685,12 +691,22 @@ static void denoise_dct_sse2(MpegEncContext *s, DCTELEM *block){ #define RENAMEl(a) a ## _mmx2 #include "mpegvideo_mmx_template.c" +#define HAVE_SSE2 #undef RENAME #undef RENAMEl #define RENAME(a) a ## _SSE2 #define RENAMEl(a) a ## _sse2 #include "mpegvideo_mmx_template.c" +#ifdef HAVE_SSSE3_BAK +#define HAVE_SSSE3 +#undef RENAME +#undef RENAMEl +#define RENAME(a) a ## _SSSE3 +#define RENAMEl(a) a ## _sse2 +#include "mpegvideo_mmx_template.c" +#endif + void MPV_common_init_mmx(MpegEncContext *s) { if (mm_flags & MM_MMX) { @@ -713,6 +729,11 @@ void MPV_common_init_mmx(MpegEncContext *s) } if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){ +#ifdef HAVE_SSSE3 + if(mm_flags & MM_SSSE3){ + s->dct_quantize= dct_quantize_SSSE3; + } else +#endif if(mm_flags & MM_SSE2){ s->dct_quantize= dct_quantize_SSE2; } else if(mm_flags & MM_MMXEXT){ |