1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
--- ffmpeg.orig/libavcodec/i386/dsputil_mmx.c 2006-03-04 07:50:27.000000000 +0100
+++ ffmpeg/libavcodec/i386/dsputil_mmx.c 2006-03-04 07:49:04.000000000 +0100
@@ -619,10 +619,22 @@
static inline void transpose4x4(uint8_t *dst, uint8_t *src, int dst_stride, int src_stride){
asm volatile( //FIXME could save 1 instruction if done as 8x4 ...
- "movd %4, %%mm0 \n\t"
- "movd %5, %%mm1 \n\t"
- "movd %6, %%mm2 \n\t"
- "movd %7, %%mm3 \n\t"
+ "movd %0, %%mm0 \n\t"
+ "movd %1, %%mm1 \n\t"
+ "movd %2, %%mm2 \n\t"
+
+ :
+ : "m" (*(uint32_t*)(src + 0*src_stride)),
+ "m" (*(uint32_t*)(src + 1*src_stride)),
+ "m" (*(uint32_t*)(src + 2*src_stride))
+ );
+ asm volatile( //FIXME could save 1 instruction if done as 8x4 ...
+ "movd %0, %%mm3 \n\t"
+
+ :
+ : "m" (*(uint32_t*)(src + 3*src_stride))
+ );
+ asm volatile( //FIXME could save 1 instruction if done as 8x4 ...
"punpcklbw %%mm1, %%mm0 \n\t"
"punpcklbw %%mm3, %%mm2 \n\t"
"movq %%mm0, %%mm1 \n\t"
@@ -639,10 +651,6 @@
"=m" (*(uint32_t*)(dst + 1*dst_stride)),
"=m" (*(uint32_t*)(dst + 2*dst_stride)),
"=m" (*(uint32_t*)(dst + 3*dst_stride))
- : "m" (*(uint32_t*)(src + 0*src_stride)),
- "m" (*(uint32_t*)(src + 1*src_stride)),
- "m" (*(uint32_t*)(src + 2*src_stride)),
- "m" (*(uint32_t*)(src + 3*src_stride))
);
}
|