diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-09-13 02:18:12 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-09-13 02:18:12 +0000 |
commit | 6869e4a7a453f829239eb46f83066c39000f0cee (patch) | |
tree | 939ade23228907fcc169d559648cafc32018fdc8 /libswscale/swscale_template.c | |
parent | 07fd651300ec7888333d41446afdc6a2edafa569 (diff) |
Make horizontal mmx scaling code match C code.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27596 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale/swscale_template.c')
-rw-r--r-- | libswscale/swscale_template.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c index 4bcb6054fd..f78d1bb83a 100644 --- a/libswscale/swscale_template.c +++ b/libswscale/swscale_template.c @@ -2170,7 +2170,6 @@ static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW "push %%"REG_b" \n\t" #endif "pxor %%mm7, %%mm7 \n\t" - "movq "MANGLE(w02)", %%mm6 \n\t" "push %%"REG_BP" \n\t" // we use 7 regs here ... "mov %%"REG_a", %%"REG_BP" \n\t" ASMALIGN(4) @@ -2185,10 +2184,11 @@ static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW "punpcklbw %%mm7, %%mm2 \n\t" "pmaddwd %%mm1, %%mm0 \n\t" "pmaddwd %%mm2, %%mm3 \n\t" - "psrad $8, %%mm0 \n\t" - "psrad $8, %%mm3 \n\t" - "packssdw %%mm3, %%mm0 \n\t" - "pmaddwd %%mm6, %%mm0 \n\t" + "movq %%mm0, %%mm4 \n\t" + "punpckldq %%mm3, %%mm0 \n\t" + "punpckhdq %%mm3, %%mm4 \n\t" + "paddd %%mm4, %%mm0 \n\t" + "psrad $7, %%mm0 \n\t" "packssdw %%mm0, %%mm0 \n\t" "movd %%mm0, (%4, %%"REG_BP") \n\t" "add $4, %%"REG_BP" \n\t" @@ -2216,7 +2216,6 @@ static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW "push %%"REG_b" \n\t" #endif "pxor %%mm7, %%mm7 \n\t" - "movq "MANGLE(w02)", %%mm6 \n\t" "push %%"REG_BP" \n\t" // we use 7 regs here ... "mov %%"REG_a", %%"REG_BP" \n\t" ASMALIGN(4) @@ -2242,11 +2241,11 @@ static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW "pmaddwd %%mm2, %%mm5 \n\t" "paddd %%mm4, %%mm0 \n\t" "paddd %%mm5, %%mm3 \n\t" - - "psrad $8, %%mm0 \n\t" - "psrad $8, %%mm3 \n\t" - "packssdw %%mm3, %%mm0 \n\t" - "pmaddwd %%mm6, %%mm0 \n\t" + "movq %%mm0, %%mm4 \n\t" + "punpckldq %%mm3, %%mm0 \n\t" + "punpckhdq %%mm3, %%mm4 \n\t" + "paddd %%mm4, %%mm0 \n\t" + "psrad $7, %%mm0 \n\t" "packssdw %%mm0, %%mm0 \n\t" "movd %%mm0, (%4, %%"REG_BP") \n\t" "add $4, %%"REG_BP" \n\t" @@ -2272,7 +2271,6 @@ static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW dst-= counter/2; asm volatile( "pxor %%mm7, %%mm7 \n\t" - "movq "MANGLE(w02)", %%mm6 \n\t" ASMALIGN(4) "1: \n\t" "mov %2, %%"REG_c" \n\t" @@ -2297,10 +2295,11 @@ static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW "cmp %4, %%"REG_c" \n\t" " jb 2b \n\t" "add %6, %1 \n\t" - "psrad $8, %%mm4 \n\t" - "psrad $8, %%mm5 \n\t" - "packssdw %%mm5, %%mm4 \n\t" - "pmaddwd %%mm6, %%mm4 \n\t" + "movq %%mm4, %%mm0 \n\t" + "punpckldq %%mm5, %%mm4 \n\t" + "punpckhdq %%mm5, %%mm0 \n\t" + "paddd %%mm0, %%mm4 \n\t" + "psrad $7, %%mm4 \n\t" "packssdw %%mm4, %%mm4 \n\t" "mov %3, %%"REG_a" \n\t" "movd %%mm4, (%%"REG_a", %0) \n\t" |