[FFmpeg-cvslog] r27596 - trunk/libswscale/swscale_template.c
michael
subversion
Sat Sep 13 04:18:14 CEST 2008
Author: michael
Date: Sat Sep 13 04:18:12 2008
New Revision: 27596
Log:
Make horizontal mmx scaling code match C code.
Modified:
trunk/libswscale/swscale_template.c
Modified: trunk/libswscale/swscale_template.c
==============================================================================
--- trunk/libswscale/swscale_template.c (original)
+++ trunk/libswscale/swscale_template.c Sat Sep 13 04:18:12 2008
@@ -2170,7 +2170,6 @@ static inline void RENAME(hScale)(int16_
"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_
"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_
"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_
"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_
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_
"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"
More information about the ffmpeg-cvslog
mailing list