[FFmpeg-devel] [PATCH] Coremake support - ff-dcttest-nommxgpl.patch (1/1)
Ronald S. Bultje
rbultje
Thu Jun 7 15:05:03 CEST 2007
Hi,
In article <20070521171340.GK16391 at MichaelsNB>,
Michael Niedermayer <michaelni at gmx.at> wrote:
> > In file included from dct-test.c:33:
> > dsputil.h: In function 'copy_block2':
> > dsputil.h:688: warning: implicit declaration of function 'ST16'
> > dsputil.h:688: warning: implicit declaration of function 'LD16'
> > dsputil.h: In function 'copy_block4':
> > dsputil.h:699: warning: implicit declaration of function 'ST32'
> > dsputil.h:699: warning: implicit declaration of function 'LD32'
> > dct-test.c: In function 'idct248_ref':
> > dct-test.c:333: warning: implicit declaration of function 'sqrt'
> > dct-test.c:333: warning: incompatible implicit declaration of built-in
> > function 'sqrt'
> > dct-test.c:334: warning: implicit declaration of function 'cos'
> > dct-test.c:334: warning: incompatible implicit declaration of built-in
> > function 'cos'
> > dct-test.c:334: error: 'M_PI' undeclared (first use in this function)
> > dct-test.c:334: error: (Each undeclared identifier is reported only once
> > dct-test.c:334: error: for each function it appears in.)
> > dct-test.c:342: warning: incompatible implicit declaration of built-in
> > function 'sqrt'
> > dct-test.c:343: warning: incompatible implicit declaration of built-in
> > function 'cos'
> > dct-test.c:350: warning: incompatible implicit declaration of built-in
> > function 'sqrt'
> > dct-test.c:393: warning: implicit declaration of function 'rint'
> > dct-test.c:393: warning: incompatible implicit declaration of built-in
> > function 'rint'
> >
> > I can work around this by adding an include for math.h.
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.
Ronald
Index: dct-test.c
===================================================================
--- 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
-
void *fast_memcpy(void *a, const void *b, size_t c){return memcpy(a,b,c);};
/* reference fdct/idct */
@@ -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),
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
+#endif
#ifdef HAVE_ALTIVEC
DCT_ERROR("altivecfdct", 0, fdct_altivec, fdct, NO_PERM),
More information about the ffmpeg-devel
mailing list