Annotation of /trunk/xine-lib/patches/xine-lib-1.1.0-pic-fb-asm.patch
Parent Directory | Revision Log
Revision 153 -
(hide annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 2106 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 2106 byte(s)
-import
1 | niro | 153 | diff -ur xine-lib-1.1.0-orig/src/libffmpeg/libavcodec/i386/dsputil_mmx.c xine-lib-1.1.0/src/libffmpeg/libavcodec/i386/dsputil_mmx.c |
2 | --- xine-lib-1.1.0-orig/src/libffmpeg/libavcodec/i386/dsputil_mmx.c 2005-09-07 16:55:46.000000000 -0400 | ||
3 | +++ xine-lib-1.1.0/src/libffmpeg/libavcodec/i386/dsputil_mmx.c 2005-09-07 16:56:31.000000000 -0400@@ -615,31 +615,32 @@ | ||
4 | @@ -615,31 +615,32 @@ | ||
5 | } | ||
6 | |||
7 | static inline void transpose4x4(uint8_t *dst, uint8_t *src, int dst_stride, int src_stride){ | ||
8 | + void *dst_reg = dst, *src_reg = src; | ||
9 | + | ||
10 | asm volatile( //FIXME could save 1 instruction if done as 8x4 ... | ||
11 | - "movd %4, %%mm0 \n\t" | ||
12 | - "movd %5, %%mm1 \n\t" | ||
13 | - "movd %6, %%mm2 \n\t" | ||
14 | - "movd %7, %%mm3 \n\t" | ||
15 | + "movd (%1), %%mm0 \n\t" | ||
16 | + "movd (%1,%5), %%mm1 \n\t" | ||
17 | + "lea (%1, %5, 2), %1 \n\t" | ||
18 | + "movd (%1), %%mm2 \n\t" | ||
19 | + "movd (%1,%5), %%mm3 \n\t" | ||
20 | "punpcklbw %%mm1, %%mm0 \n\t" | ||
21 | "punpcklbw %%mm3, %%mm2 \n\t" | ||
22 | "movq %%mm0, %%mm1 \n\t" | ||
23 | "punpcklwd %%mm2, %%mm0 \n\t" | ||
24 | "punpckhwd %%mm2, %%mm1 \n\t" | ||
25 | - "movd %%mm0, %0 \n\t" | ||
26 | + "movd %%mm0, (%0) \n\t" | ||
27 | "punpckhdq %%mm0, %%mm0 \n\t" | ||
28 | - "movd %%mm0, %1 \n\t" | ||
29 | - "movd %%mm1, %2 \n\t" | ||
30 | + "movd %%mm0, (%0,%4) \n\t" | ||
31 | + "lea (%0, %4, 2), %0 \n\t" | ||
32 | + "movd %%mm1, (%0) \n\t" | ||
33 | "punpckhdq %%mm1, %%mm1 \n\t" | ||
34 | - "movd %%mm1, %3 \n\t" | ||
35 | - | ||
36 | - : "=m" (*(uint32_t*)(dst + 0*dst_stride)), | ||
37 | - "=m" (*(uint32_t*)(dst + 1*dst_stride)), | ||
38 | - "=m" (*(uint32_t*)(dst + 2*dst_stride)), | ||
39 | - "=m" (*(uint32_t*)(dst + 3*dst_stride)) | ||
40 | - : "m" (*(uint32_t*)(src + 0*src_stride)), | ||
41 | - "m" (*(uint32_t*)(src + 1*src_stride)), | ||
42 | - "m" (*(uint32_t*)(src + 2*src_stride)), | ||
43 | - "m" (*(uint32_t*)(src + 3*src_stride)) | ||
44 | + "movd %%mm1, (%0,%4) \n\t" | ||
45 | + : "=&r" (dst_reg), | ||
46 | + "=&r" (src_reg) | ||
47 | + : "0" (dst_reg), | ||
48 | + "1" (src_reg), | ||
49 | + "r" (dst_stride), | ||
50 | + "r" (src_stride) | ||
51 | ); | ||
52 | } | ||
53 |