Commit ff506a90 authored by Loren Merritt's avatar Loren Merritt

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
parent 8e380710
......@@ -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){
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment