[FFmpeg-devel] [PATCH] Add code for tables generation to ac3enc_tables.c

Michael Niedermayer michaelni
Sat Jan 12 21:08:48 CET 2008


On Sat, Jan 12, 2008 at 04:44:20PM +0100, Diego 'Flameeyes' Petten? wrote:
> 
> And the next path (which I haven't finished yet) will make ac3enc_data.h
> become auto-generated.
> 

> Add code for tables generation to ac3enc_tables.c
[...]
> +#ifdef GENTABLES
> +
> +#define print_table_hex(name, type, size, PRIx, columns)	\
> + do {									\
> +   int i;								\
> +   printf("static const " #type " " #name "[" #size  "] = {");	\
> +   for(i = 0; i < size; i++) {						\
> +     if ( i % columns == 0 )						\
> +       printf("\n  ");							\
> +     printf("0x%" PRIx "x%s", name[i], i < size-1 ? ", " : "");	\
> +   }									\
> +   printf("\n};\n\n");							\
> + } while(0);

no tabs please
no huge multiline macros please
this would fit nicer in a generic file (not ac3*)

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- 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/bf8ccee2/attachment.pgp>



More information about the ffmpeg-devel mailing list