[MPlayer-cvslog] r19339 - in trunk/libswscale: rgb2rgb.c swscale.c yuv2rgb.c
Diego Biurrun
diego at biurrun.de
Fri Aug 11 10:55:27 CEST 2006
On Sat, Aug 05, 2006 at 12:00:54PM +0200, diego wrote:
>
> Log:
> Do not assemble MMX, MMX2 or 3DNOW code unconditionally on X86 and X86_64.
>
> --- trunk/libswscale/rgb2rgb.c (original)
> +++ trunk/libswscale/rgb2rgb.c Sat Aug 5 12:00:54 2006
> @@ -72,9 +72,11 @@
>
> -#if defined(ARCH_X86) || defined(ARCH_X86_64)
> +#if defined(HAVE_MMX)
> static const uint64_t mmx_null __attribute__((aligned(8))) = 0x0000000000000000ULL;
> static const uint64_t mmx_one __attribute__((aligned(8))) = 0xFFFFFFFFFFFFFFFFULL;
> +#endif
> +#if defined(ARCH_X86) || defined(ARCH_X86_64)
> static const uint64_t mask32b attribute_used __attribute__((aligned(8))) = 0x000000FF000000FFULL;
> static const uint64_t mask32g attribute_used __attribute__((aligned(8))) = 0x0000FF000000FF00ULL;
> static const uint64_t mask32r attribute_used __attribute__((aligned(8))) = 0x00FF000000FF0000ULL;
This breaks when MMX is disabled, see
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=549
The error message is:
make[1]: Entering directory `/usr/src/mplayer/mplayer/libswscale'
gcc -I../libvo -I../../libvo -fno-PIC -O4 -march=k6-3 -mtune=k6-3 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include -I/usr/X11R6/include -I/usr/include/ -I/usr/include/dxr2 -I/usr/include/freetype2 -I.. -I.. -I../libavutil -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o rgb2rgb.o rgb2rgb.c
In file included from rgb2rgb.c:171:
rgb2rgb_template.c: In function 'rgb15to24_MMX':
rgb2rgb_template.c:994: error: 'mmx_null' undeclared (first use in this function)
rgb2rgb_template.c:994: error: (Each undeclared identifier is reported only once
rgb2rgb_template.c:994: error: for each function it appears in.)
rgb2rgb_template.c:934: error: memory input 5 is not directly addressable
rgb2rgb_template.c: In function 'rgb16to24_MMX':
rgb2rgb_template.c:1135: error: 'mmx_null' undeclared (first use in this function)
rgb2rgb_template.c:1076: error: memory input 5 is not directly addressable
In file included from rgb2rgb.c:180:
rgb2rgb_template.c: In function 'rgb15to24_MMX2':
rgb2rgb_template.c:994: error: 'mmx_null' undeclared (first use in this function)
rgb2rgb_template.c:934: error: memory input 5 is not directly addressable
rgb2rgb_template.c: In function 'rgb16to24_MMX2':
rgb2rgb_template.c:1135: error: 'mmx_null' undeclared (first use in this function)
rgb2rgb_template.c:1076: error: memory input 5 is not directly addressable
In file included from rgb2rgb.c:189:
rgb2rgb_template.c: In function 'rgb15to24_3DNOW':
rgb2rgb_template.c:994: error: 'mmx_null' undeclared (first use in this function)
rgb2rgb_template.c:934: error: memory input 5 is not directly addressable
rgb2rgb_template.c: In function 'rgb16to24_3DNOW':
rgb2rgb_template.c:1135: error: 'mmx_null' undeclared (first use in this function)
rgb2rgb_template.c:1076: error: memory input 5 is not directly addressable
make[1]: *** [rgb2rgb.o] Error 1
This is tricky. mmx_null is used in rgb2rgb_template.c in a place
surrounded by #ifdef HAVE_MMX, but the problem is that
rgb2rgb_template.c is #included from rgb2rgb.c with #undef HAVE_MMX just
before it. Somehow adding #include "config.h" to the top of
rgb2rgb_template.c had no effect, not that I think it would be correct
anyway.
Ideas?
Diego
More information about the MPlayer-cvslog
mailing list