diff motionpixels_tablegen.c @ 11570:e03e3df6fb7d libavcodec

Change/simplify the tableprint/tablegen API.
author reimar
date Thu, 01 Apr 2010 17:11:47 +0000
parents 2980d9efc542
children 59f399926c12
line wrap: on
line diff
--- a/motionpixels_tablegen.c	Thu Apr 01 16:52:14 2010 +0000
+++ b/motionpixels_tablegen.c	Thu Apr 01 17:11:47 2010 +0000
@@ -27,18 +27,15 @@
 #include "motionpixels_tablegen.h"
 #include "tableprint.h"
 
-void tableinit(void)
+int main(void)
 {
     motionpixels_tableinit();
-}
+
+    write_fileheader();
 
-const struct tabledef tables[] = {
-    {
-        "static const YuvPixel mp_rgb_yuv_table[1 << 15]",
-        write_int8_2d_array,
-        mp_rgb_yuv_table,
-        1 << 15,
-        3
-    },
-    { NULL }
-};
+    printf("static const YuvPixel mp_rgb_yuv_table[1 << 15] = {\n");
+    write_int8_2d_array(mp_rgb_yuv_table, 1 << 15, 3);
+    printf("};\n");
+
+    return 0;
+}