00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 #include <stdlib.h>
00024 #define CONFIG_HARDCODED_TABLES 0
00025 #include "aacps_tablegen.h"
00026 #include "tableprint.h"
00027 
00028 void write_float_3d_array (const void *p, int b, int c, int d)
00029 {
00030     int i;
00031     const float *f = p;
00032     for (i = 0; i < b; i++) {
00033         printf("{\n");
00034         write_float_2d_array(f, c, d);
00035         printf("},\n");
00036         f += c * d;
00037     }
00038 }
00039 
00040 void write_float_4d_array (const void *p, int a, int b, int c, int d)
00041 {
00042     int i;
00043     const float *f = p;
00044     for (i = 0; i < a; i++) {
00045         printf("{\n");
00046         write_float_3d_array(f, b, c, d);
00047         printf("},\n");
00048         f += b * c * d;
00049     }
00050 }
00051 
00052 int main(void)
00053 {
00054     ps_tableinit();
00055 
00056     write_fileheader();
00057 
00058     printf("static const float pd_re_smooth[8*8*8] = {\n");
00059     write_float_array(pd_re_smooth, 8*8*8);
00060     printf("};\n");
00061     printf("static const float pd_im_smooth[8*8*8] = {\n");
00062     write_float_array(pd_im_smooth, 8*8*8);
00063     printf("};\n");
00064 
00065     printf("static const float HA[46][8][4] = {\n");
00066     write_float_3d_array(HA, 46, 8, 4);
00067     printf("};\n");
00068     printf("static const float HB[46][8][4] = {\n");
00069     write_float_3d_array(HB, 46, 8, 4);
00070     printf("};\n");
00071 
00072     printf("static const float f20_0_8[8][7][2] = {\n");
00073     write_float_3d_array(f20_0_8, 8, 7, 2);
00074     printf("};\n");
00075     printf("static const float f34_0_12[12][7][2] = {\n");
00076     write_float_3d_array(f34_0_12, 12, 7, 2);
00077     printf("};\n");
00078     printf("static const float f34_1_8[8][7][2] = {\n");
00079     write_float_3d_array(f34_1_8, 8, 7, 2);
00080     printf("};\n");
00081     printf("static const float f34_2_4[4][7][2] = {\n");
00082     write_float_3d_array(f34_2_4, 4, 7, 2);
00083     printf("};\n");
00084 
00085     printf("static const float Q_fract_allpass[2][50][3][2] = {\n");
00086     write_float_4d_array(Q_fract_allpass, 2, 50, 3, 2);
00087     printf("};\n");
00088     printf("static const float phi_fract[2][50][2] = {\n");
00089     write_float_3d_array(phi_fract, 2, 50, 2);
00090     printf("};\n");
00091 
00092     return 0;
00093 }