[FFmpeg-devel] [RFC] documenting the table generator infrastructure

Reimar Döffinger Reimar.Doeffinger
Wed Mar 24 19:44:03 CET 2010


On Wed, Mar 24, 2010 at 03:22:46PM +0100, Michael Niedermayer wrote:
> On Mon, Mar 22, 2010 at 12:14:33AM +0100, Reimar D?ffinger wrote:
> > A table generator consists of two files, *_tablegen.c and *_tablegen.h.
> > The .h file will provide the variable declarations and initialization
> > code for the tables, the .c describes the tables so they can be printed
> > as a header file.
> 
> shouldnt the c then be called *_tableprint.c ?

Well, in my idea of the whole thing, the tablegen files only have the code
to generate the tables and describe them, what the purpose if that description
is is none of their concern (tableprint.c takes care of that).

> > In addition it must also contain a "const struct tabledef tables[]"
> > array describing the tables to be generated.
> 
> this too is ugly, a print_tables(tables) with no naming constraint on
> tables seems cleaner

Maybe it should be changed. As said, my plan was a bit beyond what we have
now, so you could just e.g. link against a tableanalyze.c and it would not
print the tables but process them.
However that already broke when I used printing functions instead of trying
to describe the table completely, so maybe it makes sense to just give up on
that.



More information about the ffmpeg-devel mailing list