comparison libswscale/rgb2rgb_template.c @ 28323:99c49467ebbc

HAVE_3DNOW --> HAVE_AMD3DNOW to sync with latest configure changes.
author diego
date Sun, 25 Jan 2009 19:58:33 +0000
parents 877336d3c598
children 267dd38c800e
comparison
equal deleted inserted replaced
28322:fa1f53d4d263 28323:99c49467ebbc
41 #define MMREG_SIZE 16 41 #define MMREG_SIZE 16
42 #else 42 #else
43 #define MMREG_SIZE 8 43 #define MMREG_SIZE 8
44 #endif 44 #endif
45 45
46 #if HAVE_3DNOW 46 #if HAVE_AMD3DNOW
47 #define PREFETCH "prefetch" 47 #define PREFETCH "prefetch"
48 #define PREFETCHW "prefetchw" 48 #define PREFETCHW "prefetchw"
49 #define PAVGB "pavgusb" 49 #define PAVGB "pavgusb"
50 #elif HAVE_MMX2 50 #elif HAVE_MMX2
51 #define PREFETCH "prefetchnta" 51 #define PREFETCH "prefetchnta"
54 #else 54 #else
55 #define PREFETCH " # nop" 55 #define PREFETCH " # nop"
56 #define PREFETCHW " # nop" 56 #define PREFETCHW " # nop"
57 #endif 57 #endif
58 58
59 #if HAVE_3DNOW 59 #if HAVE_AMD3DNOW
60 /* On K6 femms is faster than emms. On K7 femms is directly mapped to emms. */ 60 /* On K6 femms is faster than emms. On K7 femms is directly mapped to emms. */
61 #define EMMS "femms" 61 #define EMMS "femms"
62 #else 62 #else
63 #define EMMS "emms" 63 #define EMMS "emms"
64 #endif 64 #endif
1912 dst[2*srcWidth-1]= src[srcWidth-1]; 1912 dst[2*srcWidth-1]= src[srcWidth-1];
1913 1913
1914 dst+= dstStride; 1914 dst+= dstStride;
1915 1915
1916 for (y=1; y<srcHeight; y++){ 1916 for (y=1; y<srcHeight; y++){
1917 #if HAVE_MMX2 || HAVE_3DNOW 1917 #if HAVE_MMX2 || HAVE_AMD3DNOW
1918 const long mmxSize= srcWidth&~15; 1918 const long mmxSize= srcWidth&~15;
1919 __asm__ volatile( 1919 __asm__ volatile(
1920 "mov %4, %%"REG_a" \n\t" 1920 "mov %4, %%"REG_a" \n\t"
1921 "1: \n\t" 1921 "1: \n\t"
1922 "movq (%0, %%"REG_a"), %%mm0 \n\t" 1922 "movq (%0, %%"REG_a"), %%mm0 \n\t"
2227 "add %%"REG_d", %%"REG_d" \n\t" 2227 "add %%"REG_d", %%"REG_d" \n\t"
2228 ASMALIGN(4) 2228 ASMALIGN(4)
2229 "1: \n\t" 2229 "1: \n\t"
2230 PREFETCH" 64(%0, %%"REG_d") \n\t" 2230 PREFETCH" 64(%0, %%"REG_d") \n\t"
2231 PREFETCH" 64(%1, %%"REG_d") \n\t" 2231 PREFETCH" 64(%1, %%"REG_d") \n\t"
2232 #if HAVE_MMX2 || HAVE_3DNOW 2232 #if HAVE_MMX2 || HAVE_AMD3DNOW
2233 "movq (%0, %%"REG_d"), %%mm0 \n\t" 2233 "movq (%0, %%"REG_d"), %%mm0 \n\t"
2234 "movq (%1, %%"REG_d"), %%mm1 \n\t" 2234 "movq (%1, %%"REG_d"), %%mm1 \n\t"
2235 "movq 6(%0, %%"REG_d"), %%mm2 \n\t" 2235 "movq 6(%0, %%"REG_d"), %%mm2 \n\t"
2236 "movq 6(%1, %%"REG_d"), %%mm3 \n\t" 2236 "movq 6(%1, %%"REG_d"), %%mm3 \n\t"
2237 PAVGB" %%mm1, %%mm0 \n\t" 2237 PAVGB" %%mm1, %%mm0 \n\t"
2288 "pmaddwd %%mm5, %%mm0 \n\t" 2288 "pmaddwd %%mm5, %%mm0 \n\t"
2289 "pmaddwd %%mm5, %%mm1 \n\t" 2289 "pmaddwd %%mm5, %%mm1 \n\t"
2290 "packssdw %%mm1, %%mm0 \n\t" // V1 V0 U1 U0 2290 "packssdw %%mm1, %%mm0 \n\t" // V1 V0 U1 U0
2291 "psraw $7, %%mm0 \n\t" 2291 "psraw $7, %%mm0 \n\t"
2292 2292
2293 #if HAVE_MMX2 || HAVE_3DNOW 2293 #if HAVE_MMX2 || HAVE_AMD3DNOW
2294 "movq 12(%0, %%"REG_d"), %%mm4 \n\t" 2294 "movq 12(%0, %%"REG_d"), %%mm4 \n\t"
2295 "movq 12(%1, %%"REG_d"), %%mm1 \n\t" 2295 "movq 12(%1, %%"REG_d"), %%mm1 \n\t"
2296 "movq 18(%0, %%"REG_d"), %%mm2 \n\t" 2296 "movq 18(%0, %%"REG_d"), %%mm2 \n\t"
2297 "movq 18(%1, %%"REG_d"), %%mm3 \n\t" 2297 "movq 18(%1, %%"REG_d"), %%mm3 \n\t"
2298 PAVGB" %%mm1, %%mm4 \n\t" 2298 PAVGB" %%mm1, %%mm4 \n\t"