--- ffmpeg-0.4.9-p20051216-shared/libavcodec/i386/dsputil_mmx.c.orig 2006-01-14 13:13:04.000000000 +0100 +++ ffmpeg-0.4.9-p20051216-shared/libavcodec/i386/dsputil_mmx.c 2006-01-14 13:06:59.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)) ); }