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

Reimar Döffinger Reimar.Doeffinger
Wed Oct 28 05:50:42 CET 2009


On Tue, Oct 27, 2009 at 10:52:45PM +0100, Michael Niedermayer wrote:
> On Tue, Oct 27, 2009 at 05:57:00PM +0100, Reimar D?ffinger wrote:
> > On Tue, Oct 27, 2009 at 05:29:34PM +0100, Reimar D?ffinger wrote:
> > > On Tue, Oct 27, 2009 at 05:05:51PM +0100, Michael Niedermayer wrote:
> > > > up to these your implementation did not look that bad but this here
> > > > would need 2(signedness)(8/16/32/64/float/double)(1d/2d) ->
> > > > 24 functions
> > > 
> > > Do you mind the number of functions or the code duplication?
> > > The functions I think can be easily generated by two macros with about
> > > 4 parameters, one for 1d and one for 2d, getting rid of duplicated code
> > > and binary size should really not matter here.
> > 
> > More specifically, see attached patch.
> > I will note that I have been too lazy to implement line-breaking
> > support for 2d arrays, that can be done if ever it becomes useful...
> 
> [...]
> > +struct tabledef {
> > +    const char *declaration;
> > +    void (*printfunc)(const void *, int, int);
> > +    const void *data;
> > +    int size;
> > +    int size2;
> > +};
> 
> this should be documented

There's more documentation missing, and I think the generated file
should just always include stdint.h and other such "cosmetic issues".

> except that, if you prefer this macro "mess" i am fine with it as well

I am not really happy with it, but I do think I prefer it.



More information about the ffmpeg-devel mailing list