Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
0ba8ba16
Commit
0ba8ba16
authored
Nov 04, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aacps: Adjust some const qualifiers to suppress warnings
parent
430d1219
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
11 deletions
+17
-11
aacps.c
libavcodec/aacps.c
+11
-7
aacps_tablegen.c
libavcodec/aacps_tablegen.c
+1
-1
aacps_tablegen.h
libavcodec/aacps_tablegen.h
+3
-1
aacpsdsp.c
libavcodec/aacpsdsp.c
+1
-1
aacpsdsp.h
libavcodec/aacpsdsp.h
+1
-1
No files found.
libavcodec/aacps.c
View file @
0ba8ba16
...
...
@@ -305,14 +305,15 @@ static void hybrid2_re(float (*in)[2], float (*out)[32][2], const float filter[8
}
/** Split one subband into 6 subsubbands with a complex filter */
static
void
hybrid6_cx
(
PSDSPContext
*
dsp
,
float
(
*
in
)[
2
],
float
(
*
out
)[
32
][
2
],
const
float
(
*
filter
)[
8
][
2
],
int
len
)
static
void
hybrid6_cx
(
PSDSPContext
*
dsp
,
float
(
*
in
)[
2
],
float
(
*
out
)[
32
][
2
],
TABLE_CONST
float
(
*
filter
)[
8
][
2
],
int
len
)
{
int
i
;
int
N
=
8
;
LOCAL_ALIGNED_16
(
float
,
temp
,
[
8
],
[
2
]);
for
(
i
=
0
;
i
<
len
;
i
++
,
in
++
)
{
dsp
->
hybrid_analysis
(
temp
,
in
,
filter
,
1
,
N
);
dsp
->
hybrid_analysis
(
temp
,
in
,
(
const
float
(
*
)[
8
][
2
])
filter
,
1
,
N
);
out
[
0
][
i
][
0
]
=
temp
[
6
][
0
];
out
[
0
][
i
][
1
]
=
temp
[
6
][
1
];
out
[
1
][
i
][
0
]
=
temp
[
7
][
0
];
...
...
@@ -328,12 +329,14 @@ static void hybrid6_cx(PSDSPContext *dsp, float (*in)[2], float (*out)[32][2], c
}
}
static
void
hybrid4_8_12_cx
(
PSDSPContext
*
dsp
,
float
(
*
in
)[
2
],
float
(
*
out
)[
32
][
2
],
const
float
(
*
filter
)[
8
][
2
],
int
N
,
int
len
)
static
void
hybrid4_8_12_cx
(
PSDSPContext
*
dsp
,
float
(
*
in
)[
2
],
float
(
*
out
)[
32
][
2
],
TABLE_CONST
float
(
*
filter
)[
8
][
2
],
int
N
,
int
len
)
{
int
i
;
for
(
i
=
0
;
i
<
len
;
i
++
,
in
++
)
{
dsp
->
hybrid_analysis
(
out
[
0
]
+
i
,
in
,
filter
,
32
,
N
);
dsp
->
hybrid_analysis
(
out
[
0
]
+
i
,
in
,
(
const
float
(
*
)[
8
][
2
])
filter
,
32
,
N
);
}
}
...
...
@@ -669,7 +672,8 @@ static void decorrelation(PSContext *ps, float (*out)[32][2], const float (*s)[3
memcpy
(
ap_delay
[
k
][
m
],
ap_delay
[
k
][
m
]
+
numQMFSlots
,
5
*
sizeof
(
ap_delay
[
k
][
m
][
0
]));
}
ps
->
dsp
.
decorrelate
(
out
[
k
],
delay
[
k
]
+
PS_MAX_DELAY
-
2
,
ap_delay
[
k
],
phi_fract
[
is34
][
k
],
Q_fract_allpass
[
is34
][
k
],
phi_fract
[
is34
][
k
],
(
const
float
(
*
)[
2
])
Q_fract_allpass
[
is34
][
k
],
transient_gain
[
b
],
g_decay_slope
,
nL
-
n0
);
}
for
(;
k
<
SHORT_DELAY_BAND
[
is34
];
k
++
)
{
...
...
@@ -747,7 +751,7 @@ static void stereo_processing(PSContext *ps, float (*l)[32][2], float (*r)[32][2
int8_t
(
*
ipd_mapped
)[
PS_MAX_NR_IIDICC
]
=
ipd_mapped_buf
;
int8_t
(
*
opd_mapped
)[
PS_MAX_NR_IIDICC
]
=
opd_mapped_buf
;
const
int8_t
*
k_to_i
=
is34
?
k_to_i_34
:
k_to_i_20
;
const
float
(
*
H_LUT
)[
8
][
4
]
=
(
PS_BASELINE
||
ps
->
icc_mode
<
3
)
?
HA
:
HB
;
TABLE_CONST
float
(
*
H_LUT
)[
8
][
4
]
=
(
PS_BASELINE
||
ps
->
icc_mode
<
3
)
?
HA
:
HB
;
//Remapping
if
(
ps
->
num_env_old
)
{
...
...
@@ -897,7 +901,7 @@ int ff_ps_apply(AVCodecContext *avctx, PSContext *ps, float L[2][38][64], float
memset
(
ps
->
ap_delay
+
top
,
0
,
(
NR_ALLPASS_BANDS
[
is34
]
-
top
)
*
sizeof
(
ps
->
ap_delay
[
0
]));
hybrid_analysis
(
&
ps
->
dsp
,
Lbuf
,
ps
->
in_buf
,
L
,
is34
,
len
);
decorrelation
(
ps
,
Rbuf
,
Lbuf
,
is34
);
decorrelation
(
ps
,
Rbuf
,
(
const
float
(
*
)[
32
][
2
])
Lbuf
,
is34
);
stereo_processing
(
ps
,
Lbuf
,
Rbuf
,
is34
);
hybrid_synthesis
(
&
ps
->
dsp
,
L
,
Lbuf
,
is34
,
len
);
hybrid_synthesis
(
&
ps
->
dsp
,
R
,
Rbuf
,
is34
,
len
);
...
...
libavcodec/aacps_tablegen.c
View file @
0ba8ba16
...
...
@@ -82,7 +82,7 @@ int main(void)
write_float_3d_array
(
f34_2_4
,
4
,
8
,
2
);
printf
(
"};
\n
"
);
printf
(
"static
const
DECLARE_ALIGNED(16, float, Q_fract_allpass)[2][50][3][2] = {
\n
"
);
printf
(
"static
TABLE_CONST
DECLARE_ALIGNED(16, float, Q_fract_allpass)[2][50][3][2] = {
\n
"
);
write_float_4d_array
(
Q_fract_allpass
,
2
,
50
,
3
,
2
);
printf
(
"};
\n
"
);
printf
(
"static const DECLARE_ALIGNED(16, float, phi_fract)[2][50][2] = {
\n
"
);
...
...
libavcodec/aacps_tablegen.h
View file @
0ba8ba16
...
...
@@ -28,6 +28,7 @@
#if CONFIG_HARDCODED_TABLES
#define ps_tableinit()
#define TABLE_CONST const
#include "libavcodec/aacps_tables.h"
#else
#include "libavutil/common.h"
...
...
@@ -37,6 +38,7 @@
#define NR_ALLPASS_BANDS20 30
#define NR_ALLPASS_BANDS34 50
#define PS_AP_LINKS 3
#define TABLE_CONST
static
float
pd_re_smooth
[
8
*
8
*
8
];
static
float
pd_im_smooth
[
8
*
8
*
8
];
static
float
HA
[
46
][
8
][
4
];
...
...
@@ -45,7 +47,7 @@ static DECLARE_ALIGNED(16, float, f20_0_8) [ 8][8][2];
static
DECLARE_ALIGNED
(
16
,
float
,
f34_0_12
)[
12
][
8
][
2
];
static
DECLARE_ALIGNED
(
16
,
float
,
f34_1_8
)
[
8
][
8
][
2
];
static
DECLARE_ALIGNED
(
16
,
float
,
f34_2_4
)
[
4
][
8
][
2
];
static
DECLARE_ALIGNED
(
16
,
float
,
Q_fract_allpass
)[
2
][
50
][
3
][
2
];
static
TABLE_CONST
DECLARE_ALIGNED
(
16
,
float
,
Q_fract_allpass
)[
2
][
50
][
3
][
2
];
static
DECLARE_ALIGNED
(
16
,
float
,
phi_fract
)[
2
][
50
][
2
];
static
const
float
g0_Q8
[]
=
{
...
...
libavcodec/aacpsdsp.c
View file @
0ba8ba16
...
...
@@ -93,7 +93,7 @@ static void ps_hybrid_synthesis_deint_c(float out[2][38][64],
static
void
ps_decorrelate_c
(
float
(
*
out
)[
2
],
float
(
*
delay
)[
2
],
float
(
*
ap_delay
)[
PS_QMF_TIME_SLOTS
+
PS_MAX_AP_DELAY
][
2
],
const
float
phi_fract
[
2
],
float
(
*
Q_fract
)[
2
],
const
float
phi_fract
[
2
],
const
float
(
*
Q_fract
)[
2
],
const
float
*
transient_gain
,
float
g_decay_slope
,
int
len
)
...
...
libavcodec/aacpsdsp.h
View file @
0ba8ba16
...
...
@@ -38,7 +38,7 @@ typedef struct PSDSPContext {
int
i
,
int
len
);
void
(
*
decorrelate
)(
float
(
*
out
)[
2
],
float
(
*
delay
)[
2
],
float
(
*
ap_delay
)[
PS_QMF_TIME_SLOTS
+
PS_MAX_AP_DELAY
][
2
],
const
float
phi_fract
[
2
],
float
(
*
Q_fract
)[
2
],
const
float
phi_fract
[
2
],
const
float
(
*
Q_fract
)[
2
],
const
float
*
transient_gain
,
float
g_decay_slope
,
int
len
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment