tags 324026 +sid,patch
thanks homie
Hi,
Here's a patch that I stole from ffmpeg CVS that appears to fix things.
However, the build of VLC (which is what I did this for) is still broken
in different ways:
/usr/bin/ld:
../modules/video_chroma/libi420_rgb_mmx_pic.a(libi420_rgb_mmx_pic_a-i420_rgb16.o):
relocation R_X86_64_32S against `a local symbol' can not be used when
making
a shared object; recompile with -fPIC
./modules/video_chroma/libi420_rgb_mmx_pic.a: could not read symbols:
Bad value
collect2: ld returned 1 exit status
This happens while trying to build the mozilla plugin.
--
Joshua Kwan
--- dsputil_mmx.c 2005-09-11 21:23:35.000000000 -0700
+++
/var/cache/pbuilder/build/4870/tmp/ffmpeg-0.cvs20050811/libavcodec/i386/dsputil_mmx.c
2005-09-11 21:22:27.000000000 -0700
@@ -616,31 +618,30 @@
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 ...
- "push %2 \n\t"
- "push %0 \n\t"
- "movd (%2), %%mm0 \n\t"
- "movd (%2,%3), %%mm1 \n\t"
- "lea (%2, %3, 2), %2 \n\t"
- "movd (%2), %%mm2 \n\t"
- "movd (%2,%3), %%mm3 \n\t"
+ "movd %4, %%mm0 \n\t"
+ "movd %5, %%mm1 \n\t"
+ "movd %6, %%mm2 \n\t"
+ "movd %7, %%mm3 \n\t"
"punpcklbw %%mm1, %%mm0 \n\t"
"punpcklbw %%mm3, %%mm2 \n\t"
"movq %%mm0, %%mm1 \n\t"
"punpcklwd %%mm2, %%mm0 \n\t"
"punpckhwd %%mm2, %%mm1 \n\t"
- "movd %%mm0, (%0) \n\t"
+ "movd %%mm0, %0 \n\t"
"punpckhdq %%mm0, %%mm0 \n\t"
- "movd %%mm0, (%0,%1) \n\t"
- "lea (%0, %1, 2), %0 \n\t"
- "movd %%mm1, (%0) \n\t"
+ "movd %%mm0, %1 \n\t"
+ "movd %%mm1, %2 \n\t"
"punpckhdq %%mm1, %%mm1 \n\t"
- "movd %%mm1, (%0,%1) \n\t"
- "popl %0 \n\t"
- "popl %2 \n\t"
- :: "r" (dst),
- "r" (dst_stride),
- "r" (src),
- "r" (src_stride)
+ "movd %%mm1, %3 \n\t"
+
+ : "=m" (*(uint32_t*)(dst + 0*dst_stride)),
+ "=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))
);
}
@@ -1081,8 +1082,8 @@
return tmp + hf_noise8_mmx(pix+8, line_size, h);
}
-static int nsse16_mmx(void * _c, uint8_t * pix1, uint8_t * pix2, int
line_size, int h) {
- MpegEncContext *c = _c;
+static int nsse16_mmx(void *p, uint8_t * pix1, uint8_t * pix2, int line_size,
int h) {
+ MpegEncContext *c = p;
int score1= sse16_mmx(c, pix1, pix2, line_size, h);
int score2= hf_noise16_mmx(pix1, line_size, h) - hf_noise16_mmx(pix2,
line_size, h);
@@ -1090,8 +1091,8 @@
else return score1 + ABS(score2)*8;
}
-static int nsse8_mmx(void * _c, uint8_t * pix1, uint8_t * pix2, int line_size,
int h) {
- MpegEncContext *c = _c;
+static int nsse8_mmx(void *p, uint8_t * pix1, uint8_t * pix2, int line_size,
int h) {
+ MpegEncContext *c = p;
int score1= sse8_mmx(c, pix1, pix2, line_size, h);
int score2= hf_noise8_mmx(pix1, line_size, h) - hf_noise8_mmx(pix2,
line_size, h);