summaryrefslogtreecommitdiffstats
path: root/libmpeg2/idct.c
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-04-12 22:42:00 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-04-12 22:42:00 +0000
commitfabb1b271a3f55cb5d0a3b2dbefc0da910ecd70c (patch)
treef09fe1bcbc177c762ca6a614599cd377e2b26457 /libmpeg2/idct.c
parent751c9867194aac6a59630c66bd56e43a13296de2 (diff)
downloadmpv-fabb1b271a3f55cb5d0a3b2dbefc0da910ecd70c.tar.bz2
mpv-fabb1b271a3f55cb5d0a3b2dbefc0da910ecd70c.tar.xz
Backport SSE2-optimized IDCT routines from upstream libmpeg2.
Thanks to Alexander Strange for finding and fixing some bugs. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26425 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpeg2/idct.c')
-rw-r--r--libmpeg2/idct.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libmpeg2/idct.c b/libmpeg2/idct.c
index 5fb4b508af..530e10c9b0 100644
--- a/libmpeg2/idct.c
+++ b/libmpeg2/idct.c
@@ -240,7 +240,11 @@ static void mpeg2_idct_add_c (const int last, int16_t * block,
void mpeg2_idct_init (uint32_t accel)
{
#ifdef ARCH_X86
- if (accel & MPEG2_ACCEL_X86_MMXEXT) {
+ if (accel & MPEG2_ACCEL_X86_SSE2) {
+ mpeg2_idct_copy = mpeg2_idct_copy_sse2;
+ mpeg2_idct_add = mpeg2_idct_add_sse2;
+ mpeg2_idct_mmx_init ();
+ } else if (accel & MPEG2_ACCEL_X86_MMXEXT) {
mpeg2_idct_copy = mpeg2_idct_copy_mmxext;
mpeg2_idct_add = mpeg2_idct_add_mmxext;
mpeg2_idct_mmx_init ();