• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavcodec/mdct_tablegen.c

Go to the documentation of this file.
00001 /*
00002  * Generate a header file for hardcoded MDCT tables
00003  *
00004  * Copyright (c) 2009 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 #define SINETABLE_CONST
00026 #define SINETABLE(size) \
00027     float ff_sine_##size[size]
00028 #define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
00029 #ifndef M_PI
00030 #define M_PI 3.14159265358979323846
00031 #endif
00032 #include "mdct_tablegen.h"
00033 #include "tableprint.h"
00034 
00035 int main(void)
00036 {
00037     int i;
00038 
00039     write_fileheader();
00040 
00041     for (i = 5; i <= 12; i++) {
00042         ff_init_ff_sine_windows(i);
00043         printf("SINETABLE(%4i) = {\n", 1 << i);
00044         write_float_array(ff_sine_windows[i], 1 << i);
00045         printf("};\n");
00046     }
00047 
00048     return 0;
00049 }

Generated on Fri Sep 16 2011 17:17:39 for FFmpeg by  doxygen 1.7.1