[FFmpeg-devel] [PATCH] Automatically generate ac3enc_data.h

Michael Niedermayer michaelni
Sat Jan 12 17:49:52 CET 2008


On Sat, Jan 12, 2008 at 04:32:57PM +0000, M?ns Rullg?rd wrote:
> flameeyes at gmail.com (Diego 'Flameeyes' Petten?) writes:
> 
> > It's not the nicest thing out there, but it should work...
> >
> > Autogenerate ac3enc_data.h through Makefile rules.
> >
> > From: Diego 'Flameeyes' Petten?? <flameeyes at gmail.com>
> >
> >
> > ---
> >
> >  libavcodec/Makefile        |   14 +++++
> >  libavcodec/ac3enc_data.h   |  115 --------------------------------------------
> >  libavcodec/ac3enc_tables.c |    1 
> >  3 files changed, 14 insertions(+), 116 deletions(-)
> >  delete mode 100644 libavcodec/ac3enc_data.h
> >
> >
> > diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> > index 139689a..352feff 100644
> > --- a/libavcodec/Makefile
> > +++ b/libavcodec/Makefile
> > @@ -463,7 +463,8 @@ clean::
> >  	   ps2/*.o ps2/*~ \
> >  	   sh4/*.o sh4/*~ \
> >  	   sparc/*.o sparc/*~ \
> > -	   apiexample $(TESTS)
> > +	   apiexample $(TESTS) \
> > +	   $(TABLEGEN) $(TABLES)
> >  
> >  TESTS= imgresample-test fft-test dct-test
> >  ifeq ($(ARCH_X86),yes)
> > @@ -486,4 +487,15 @@ imgresample-test: imgresample.c $(LIBNAME)
> >  
> >  motion-test: motion-test.o $(LIBNAME)
> >  
> > +TABLEGEN= ac3enc-gentables
> > +TABLES= ac3enc_data.h
> > +
> > +ac3enc.c: ac3enc_data.h
> > +
> > +%-gentables: %_tables.c
> > +	$(CC) $(CFLAGS) -DGENTABLES -o $@ $^ $(EXTRALIBS)
> > +
> > +%_data.h: %-gentables
> > +	./$^ > $@
> > +
> 
> I'm not opposed to the idea of generating tables at build time, but
> this will break cross-compiling.  To make it work, we'd need to
> introduce a HOSTCC variable, or use something like Perl to generate
> the tables.

Iam not a fan of perl ...
Actually id remove it from my system if i could easily :)

That said, i think the chances of perl being unavailable might be higher
than no host cc being available. But iam just guessing ...
cygwin/mingw contain perl by default?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080112/c7949316/attachment.pgp>



More information about the ffmpeg-devel mailing list