[FFmpeg-devel] MacOS X Compile error with swscale
Måns Rullgård
mans
Sat Mar 29 18:05:45 CET 2008
Diego Biurrun <diego at biurrun.de> writes:
> On Sat, Mar 29, 2008 at 04:47:54AM -0600, Scott Harper wrote:
>> I'm using the latest svn as of this writing.
>>
>> I configure ffmpeg as follows:
>>
>> ./configure --enable-shared --enable-gpl --disable-mmx --enable-
>> libmp3lame --disable-vhook --enable-libfaad --enable-libfaac --enable-
>> swscale
>>
>> And I get the following error:
>>
>> yuv2rgb.c: In function ?yuv2rgb_get_func_ptr?:
>> yuv2rgb.c:609: error: ?yuv420_rgb32_MMX2? undeclared (first use in
>> this function)
>> yuv2rgb.c:609: error: (Each undeclared identifier is reported only once
>> yuv2rgb.c:609: error: for each function it appears in.)
>> yuv2rgb.c:610: error: ?yuv420_rgb24_MMX2? undeclared (first use in
>> this function)
>> yuv2rgb.c:611: error: ?yuv420_rgb16_MMX2? undeclared (first use in
>> this function)
>> yuv2rgb.c:612: error: ?yuv420_rgb15_MMX2? undeclared (first use in
>> this function)
>> yuv2rgb.c:617: error: ?yuv420_rgb32_MMX? undeclared (first use in this
>> function)
>> yuv2rgb.c:618: error: ?yuv420_rgb24_MMX? undeclared (first use in this
>> function)
>> yuv2rgb.c:619: error: ?yuv420_rgb16_MMX? undeclared (first use in this
>> function)
>> yuv2rgb.c:620: error: ?yuv420_rgb15_MMX? undeclared (first use in this
>> function)
>> make[1]: *** [yuv2rgb.o] Error 1
>> make: *** [lib] Error 2
>>
>> Looks like it's still trying to use some MMX code, even though I
>> disabled it, perhaps? (I'm open to being completely wrong about this.)
>
> It is trying to use MMX2 code, not MMX code. You could add
> --disable-mmx2 to the command line to make compilation go through
> or try the patch I created to fix the situation.
>
> Diego
>
> Index: libswscale/yuv2rgb.c
> ===================================================================
> --- libswscale/yuv2rgb.c (revision 26300)
> +++ libswscale/yuv2rgb.c (working copy)
> @@ -156,7 +156,7 @@
> };
> #endif
>
> -#ifdef HAVE_MMX
> +#if defined(HAVE_MMX) || defined(HAVE_MMX2)
>
> /* hope these constant values are cache line aligned */
> DECLARE_ASM_CONST(8, uint64_t, mmx_00ffw) = 0x00ff00ff00ff00ffULL;
> @@ -170,8 +170,10 @@
> static volatile uint64_t attribute_used __attribute__((aligned(8))) g6Dither;
> static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither;
>
> +#endif /* defined(HAVE_MMX) || defined(HAVE_MMX2) */
> +
> +#ifdef HAVE_MMX
> #undef HAVE_MMX
> -
> //MMX versions
> #undef RENAME
> #define HAVE_MMX
Hmm... ifdef, undef, define... seems a little redundant.
> @@ -179,17 +181,19 @@
> #undef HAVE_3DNOW
> #define RENAME(a) a ## _MMX
> #include "yuv2rgb_template.c"
> +#endif /* HAVE_MMX */
>
> +#ifdef HAVE_MMX2
> +#undef HAVE_MMX2
> //MMX2 versions
> #undef RENAME
> -#define HAVE_MMX
> +#undef HAVE_MMX
> #define HAVE_MMX2
And again.
> #undef HAVE_3DNOW
> #define RENAME(a) a ## _MMX2
> #include "yuv2rgb_template.c"
> +#endif /* HAVE_MMX2 */
>
> -#endif /* HAVE_MMX */
> -
Am I the only one thinking this file is a bit of a mess?
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list