00001 /* 00002 * Generate a header file for hardcoded DV tables 00003 * 00004 * Copyright (c) 2010 Reimar Döffinger <Reimar.Doeffinger@gmx.de> 00005 * 00006 * This file is part of FFmpeg. 00007 * 00008 * FFmpeg is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * FFmpeg is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with FFmpeg; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00021 */ 00022 00023 #include <stdlib.h> 00024 #define CONFIG_HARDCODED_TABLES 0 00025 #ifndef CONFIG_SMALL 00026 #error CONFIG_SMALL must be defined to generate tables 00027 #endif 00028 #include "dv_tablegen.h" 00029 #include "tableprint.h" 00030 #include <inttypes.h> 00031 00032 WRITE_1D_FUNC_ARGV(dv_vlc_pair, 7, 00033 "{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size) 00034 WRITE_2D_FUNC(dv_vlc_pair) 00035 00036 int main(void) 00037 { 00038 dv_vlc_map_tableinit(); 00039 00040 write_fileheader(); 00041 00042 printf("static const struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE] = {\n"); 00043 write_dv_vlc_pair_2d_array(dv_vlc_map, DV_VLC_MAP_RUN_SIZE, DV_VLC_MAP_LEV_SIZE); 00044 printf("};\n"); 00045 00046 return 0; 00047 }