[FFmpeg-devel] [PATCH] support for hardcoded mpegaudiodec tables

Måns Rullgård mans
Wed Oct 21 20:24:52 CEST 2009


Michael Niedermayer <michaelni at gmx.at> writes:

> On Wed, Oct 21, 2009 at 05:50:03PM +0200, Reimar D?ffinger wrote:
>> On Wed, Oct 21, 2009 at 05:23:18PM +0200, Michael Niedermayer wrote:
>> > On Wed, Oct 21, 2009 at 05:04:56PM +0200, Reimar D?ffinger wrote:
>> > > On Tue, Oct 20, 2009 at 04:17:37PM +0200, Reimar D?ffinger wrote:
>> > > > this allows hardcoding some of tables in mpegaudiodec.
>> > > > Here a .h file is used so that these tables can still be static
>> > > > in both cases.
>> > > 
>> > > Any objections?
>> > 
>> > yes, it duplicates the code that generates these tables and makes
>> > changing them harder and more error prone
>> 
>> what is an acceptable way to avoid that to you?
>
>> Putting that duplicated part into a header?
>> Or a separate .c file?
>
> yes both are possible, either way it should be done for all (non small)
> hardcoded tables and the files should have consistent names like
> mpegaudiodec_tblgen.c or so
> all these files should be listed at Makefile level and Makefile
> magic should then either link them into libav* or link them to a
> table printer, print the tables, compile them and link them
> ... or something like that ...

If the naming is consistent, it can all be done with a single makefile
rule.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list