[FFmpeg-devel] [PATCH] hardcoded ff_cos tables
Reimar Döffinger
Reimar.Doeffinger
Wed Oct 14 13:13:59 CEST 2009
On Wed, Oct 14, 2009 at 11:57:18AM +0100, M?ns Rullg?rd wrote:
> > Index: libavcodec/Makefile
> > ===================================================================
> > --- libavcodec/Makefile (revision 20231)
> > +++ libavcodec/Makefile (working copy)
> > @@ -571,6 +571,16 @@
> >
> > DIRS = alpha arm bfin mlib ppc ps2 sh4 sparc x86
> >
> > +CLEANFILES = cos_tables.h costablegen$(HOSTEXESUF)
> > +
> > include $(SUBDIR)../subdir.mak
> >
> > $(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o
> > +
> > +$(SUBDIR)costablegen$(HOSTEXESUF): $(SUBDIR)costablegen.c
> > + $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
> > +
> > +$(SUBDIR)cos_tables.h: $(SUBDIR)costablegen$(HOSTEXESUF)
> > + ./$< > $@
>
> You can't have ./ there. It won't work.
On the contrary, it won't work without when doing make in libavcodec,
while it will work in both cases with.
> > +#include "libavutil/mathematics.h"
>
> You can't #include any ffmpeg headers in files to be compiled with
> HOSTCC. They will pull in asm and other definitions for the target
> machine. It doesn't look like you're using anything from that header
> anyway.
M_PI. Though it might be best to just define that manually.
> > + int i, j;
> > + FILE *table = stdout;
> > + fprintf(table, "/* This file was generated by libavcodec/costablegen */\n");
> > + fprintf(table, "#include \"dsputil.h\"\n");
>
> Why not simply use printf()?
Well, I was undecided whether to print it or write directly to file.
More information about the ffmpeg-devel
mailing list