[FFmpeg-devel] [PATCH] Coremake support - ff-dcttest-nommxgpl.patch (1/1)

Diego Biurrun diego
Thu Jun 7 18:07:22 CEST 2007


On Thu, Jun 07, 2007 at 09:05:03AM -0400, Ronald S. Bultje wrote:
> 
> And attached is the last patch to fix dct-test. It needs math.h for M_PI 
> and definitions of functions such as sqrt() (normally through 
> HAVE_AV_CONFIG_H, but we're trying without now). Then, it needs 
> CONFIG_GPL/MMX awareness for those of us not using GPL code. Lastly, 
> since we no longer use HAVE_AV_CONFIG_H, the #undef printf can go away.

I don't see where we are trying without now ..

> --- dct-test.c	(revision 9221)
> +++ dct-test.c	(working copy)
> @@ -30,6 +30,7 @@
>  #include <string.h>
>  #include <sys/time.h>
>  #include <unistd.h>
> +#include <math.h>
>  
>  #include "dsputil.h"
>  
> @@ -40,8 +41,6 @@
>  #define MAX(a, b)  (((a) > (b)) ? (a) : (b))
>  #endif
>  
> -#undef printf

This is not for us, we compile with HAVE_AV_CONFIG_H.

> @@ -91,16 +90,20 @@
>    DCT_ERROR("SIMPLE-C",        1, simple_idct,        idct, NO_PERM),
>  
>  #ifdef ARCH_X86
> +  DCT_ERROR("FAAN",            0, ff_faandct,         fdct, FAAN_SCALE),
> +#ifdef HAVE_MMX
>    DCT_ERROR("MMX",             0, ff_fdct_mmx,        fdct, NO_PERM),
>    DCT_ERROR("MMX2",            0, ff_fdct_mmx2,       fdct, NO_PERM),
> -  DCT_ERROR("FAAN",            0, ff_faandct,         fdct, FAAN_SCALE),
 
The MMX2 test should be within HAVE_MMX2, not HAVE_MMX.  Michael already
mentioned that FAAN is not x86-specific.

>    DCT_ERROR("LIBMPEG2-MMX",    1, ff_mmx_idct,        idct, MMX_PERM),
>    DCT_ERROR("LIBMPEG2-MMXEXT", 1, ff_mmxext_idct,     idct, MMX_PERM),
>    DCT_ERROR("SIMPLE-MMX",      1, ff_simple_idct_mmx, idct, MMX_SIMPLE_PERM),
> +#ifdef CONFIG_GPL
>    DCT_ERROR("XVID-MMX",        1, ff_idct_xvid_mmx,   idct, NO_PERM),
>    DCT_ERROR("XVID-MMX2",       1, ff_idct_xvid_mmx2,  idct, NO_PERM),
>  #endif
> +#endif

This is wrong, ff_mmx_idct and ff_mmxext_idct are compiled conditional
to CONFIG_GPL, ff_idct_xvid_mmx and ff_idct_xvid_mmx2 are not.

Everything fixed.

Diego




More information about the ffmpeg-devel mailing list