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

Michael Niedermayer michaelni
Tue Oct 27 22:52:45 CET 2009


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

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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- 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/20091027/804d9380/attachment.pgp>



More information about the ffmpeg-devel mailing list