2 * Generate a header file for hardcoded Parametric Stereo tables
4 * Copyright (c) 2010 Alex Converse <alex.converse@gmail.com>
6 * This file is part of FFmpeg.
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 #define CONFIG_HARDCODED_TABLES 0
25 #include "aacps_tablegen.h"
26 #include "tableprint.h"
28 void write_float_3d_array (const void *p, int b, int c, int d)
32 for (i = 0; i < b; i++) {
34 write_float_2d_array(f, c, d);
40 void write_float_4d_array (const void *p, int a, int b, int c, int d)
44 for (i = 0; i < a; i++) {
46 write_float_3d_array(f, b, c, d);
58 printf("static const float pd_re_smooth[8*8*8] = {\n");
59 write_float_array(pd_re_smooth, 8*8*8);
61 printf("static const float pd_im_smooth[8*8*8] = {\n");
62 write_float_array(pd_im_smooth, 8*8*8);
65 printf("static const float HA[46][8][4] = {\n");
66 write_float_3d_array(HA, 46, 8, 4);
68 printf("static const float HB[46][8][4] = {\n");
69 write_float_3d_array(HB, 46, 8, 4);
72 printf("static const DECLARE_ALIGNED(16, float, f20_0_8)[8][8][2] = {\n");
73 write_float_3d_array(f20_0_8, 8, 8, 2);
75 printf("static const DECLARE_ALIGNED(16, float, f34_0_12)[12][8][2] = {\n");
76 write_float_3d_array(f34_0_12, 12, 8, 2);
78 printf("static const DECLARE_ALIGNED(16, float, f34_1_8)[8][8][2] = {\n");
79 write_float_3d_array(f34_1_8, 8, 8, 2);
81 printf("static const DECLARE_ALIGNED(16, float, f34_2_4)[4][8][2] = {\n");
82 write_float_3d_array(f34_2_4, 4, 8, 2);
85 printf("static const DECLARE_ALIGNED(16, float, Q_fract_allpass)[2][50][3][2] = {\n");
86 write_float_4d_array(Q_fract_allpass, 2, 50, 3, 2);
88 printf("static const DECLARE_ALIGNED(16, float, phi_fract)[2][50][2] = {\n");
89 write_float_3d_array(phi_fract, 2, 50, 2);