FFmpeg
2.1.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
libavcodec
aacps_tablegen.c
Go to the documentation of this file.
1
/*
2
* Generate a header file for hardcoded Parametric Stereo tables
3
*
4
* Copyright (c) 2010 Alex Converse <alex.converse@gmail.com>
5
*
6
* This file is part of FFmpeg.
7
*
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.
12
*
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.
17
*
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
21
*/
22
23
#include <stdlib.h>
24
#define CONFIG_HARDCODED_TABLES 0
25
#include "
aacps_tablegen.h
"
26
#include "
tableprint.h
"
27
28
void
write_float_3d_array
(
const
void
*p,
int
b
,
int
c
,
int
d)
29
{
30
int
i;
31
const
float
*f = p;
32
for
(i = 0; i <
b
; i++) {
33
printf(
"{\n"
);
34
write_float_2d_array
(f, c, d);
35
printf(
"},\n"
);
36
f += c * d;
37
}
38
}
39
40
void
write_float_4d_array
(
const
void
*p,
int
a
,
int
b
,
int
c
,
int
d)
41
{
42
int
i;
43
const
float
*f = p;
44
for
(i = 0; i <
a
; i++) {
45
printf(
"{\n"
);
46
write_float_3d_array
(f, b, c, d);
47
printf(
"},\n"
);
48
f += b * c * d;
49
}
50
}
51
52
int
main
(
void
)
53
{
54
ps_tableinit
();
55
56
write_fileheader
();
57
58
printf(
"static const float pd_re_smooth[8*8*8] = {\n"
);
59
write_float_array
(
pd_re_smooth
, 8*8*8);
60
printf(
"};\n"
);
61
printf(
"static const float pd_im_smooth[8*8*8] = {\n"
);
62
write_float_array
(
pd_im_smooth
, 8*8*8);
63
printf(
"};\n"
);
64
65
printf(
"static const float HA[46][8][4] = {\n"
);
66
write_float_3d_array
(
HA
, 46, 8, 4);
67
printf(
"};\n"
);
68
printf(
"static const float HB[46][8][4] = {\n"
);
69
write_float_3d_array
(
HB
, 46, 8, 4);
70
printf(
"};\n"
);
71
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);
74
printf(
"};\n"
);
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);
77
printf(
"};\n"
);
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);
80
printf(
"};\n"
);
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);
83
printf(
"};\n"
);
84
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);
87
printf(
"};\n"
);
88
printf(
"static const DECLARE_ALIGNED(16, float, phi_fract)[2][50][2] = {\n"
);
89
write_float_3d_array
(
phi_fract
, 2, 50, 2);
90
printf(
"};\n"
);
91
92
return
0;
93
}
Q_fract_allpass
static float Q_fract_allpass[2][50][3][2]
Definition:
aacps_tablegen.h:48
b
const char * b
Definition:
vf_curves.c:105
pd_im_smooth
static float pd_im_smooth[8 *8 *8]
Definition:
aacps_tablegen.h:41
f34_1_8
static float f34_1_8[8][8][2]
Definition:
aacps_tablegen.h:46
write_float_2d_array
void write_float_2d_array(const void *, int, int)
tableprint.h
write_float_3d_array
void write_float_3d_array(const void *p, int b, int c, int d)
Definition:
aacps_tablegen.c:28
f20_0_8
static float f20_0_8[8][8][2]
Definition:
aacps_tablegen.h:44
phi_fract
static float phi_fract[2][50][2]
Definition:
aacps_tablegen.h:49
write_float_4d_array
void write_float_4d_array(const void *p, int a, int b, int c, int d)
Definition:
aacps_tablegen.c:40
f34_2_4
static float f34_2_4[4][8][2]
Definition:
aacps_tablegen.h:47
write_float_array
void write_float_array(const float *, int)
HA
static float HA[46][8][4]
Definition:
aacps_tablegen.h:42
pd_re_smooth
static float pd_re_smooth[8 *8 *8]
Definition:
aacps_tablegen.h:40
ps_tableinit
static void ps_tableinit(void)
Definition:
aacps_tablegen.h:83
HB
static float HB[46][8][4]
Definition:
aacps_tablegen.h:43
f34_0_12
static float f34_0_12[12][8][2]
Definition:
aacps_tablegen.h:45
aacps_tablegen.h
c
static double c[64]
Definition:
vsrc_mptestsrc.c:87
main
int main(int argc, char **argv)
Definition:
main.c:22
write_fileheader
static void write_fileheader(void)
Definition:
tableprint.h:115
a
a
Definition:
h264pred_template.c:466
Generated on Tue Dec 3 2013 09:58:01 for FFmpeg by
1.8.5