lavc/htmlsubtitles: handle colors starting with many '#'
[ffmpeg.git] / libavcodec / dv_tablegen.c
index 4294132..d032101 100644 (file)
 
 #include <stdlib.h>
 #define CONFIG_HARDCODED_TABLES 0
-#ifndef CONFIG_SMALL
-#error CONFIG_SMALL must be defined to generate tables
-#endif
 #include "dv_tablegen.h"
 #include "tableprint.h"
 #include <inttypes.h>
 
-WRITE_1D_FUNC_ARGV(vlc_pair, struct dv_vlc_pair, 7,
-                   "{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size)
-WRITE_2D_FUNC(vlc_pair, struct dv_vlc_pair)
+WRITE_1D_FUNC_ARGV(dv_vlc_pair, 7,
+                   "{0x%"PRIx32", %"PRIu32"}", data[i].vlc, data[i].size)
+WRITE_2D_FUNC(dv_vlc_pair)
 
-void tableinit(void)
+int main(void)
 {
     dv_vlc_map_tableinit();
-}
 
-const struct tabledef tables[] = {
-    {
-        "static const struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE]",
-        write_vlc_pair_2d_array,
-        dv_vlc_map,
-        DV_VLC_MAP_RUN_SIZE,
-        DV_VLC_MAP_LEV_SIZE
-    },
-    { NULL }
-};
+    write_fileheader();
+
+    printf("static const struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE] = {\n");
+    write_dv_vlc_pair_2d_array(dv_vlc_map, DV_VLC_MAP_RUN_SIZE, DV_VLC_MAP_LEV_SIZE);
+    printf("};\n");
+
+    return 0;
+}