summaryrefslogtreecommitdiff
path: root/media-video/ffmpeg/files/ffmpeg-shared-gcc4.1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/ffmpeg/files/ffmpeg-shared-gcc4.1.patch')
-rwxr-xr-xmedia-video/ffmpeg/files/ffmpeg-shared-gcc4.1.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/media-video/ffmpeg/files/ffmpeg-shared-gcc4.1.patch b/media-video/ffmpeg/files/ffmpeg-shared-gcc4.1.patch
new file mode 100755
index 0000000..680c755
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-shared-gcc4.1.patch
@@ -0,0 +1,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))
+ );
+ }
+