Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Opus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
Opus
Commits
66c29fb6
Commit
66c29fb6
authored
3 years ago
by
Jean-Marc Valin
Browse files
Options
Downloads
Patches
Plain Diff
Remove some useless buffers
parent
adc50cab
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dnn/lpcnet.c
+0
-5
0 additions, 5 deletions
dnn/lpcnet.c
dnn/lpcnet_private.h
+0
-2
0 additions, 2 deletions
dnn/lpcnet_private.h
with
0 additions
and
7 deletions
dnn/lpcnet.c
+
0
−
5
View file @
66c29fb6
...
...
@@ -39,7 +39,6 @@
#define PREEMPH 0.85f
#define PITCH_GAIN_FEATURE 37
#define PDF_FLOOR 0.002
#define FRAME_INPUT_SIZE (NB_FEATURES + EMBED_PITCH_OUT_SIZE)
...
...
@@ -70,8 +69,6 @@ void run_frame_network(LPCNetState *lpcnet, float *rc, float *gru_a_condition, f
compute_conv1d
(
&
feature_conv2
,
conv2_out
,
net
->
feature_conv2_state
,
conv1_out
);
celt_assert
(
FRAME_INPUT_SIZE
==
FEATURE_CONV2_OUT_SIZE
);
if
(
lpcnet
->
frame_count
<
FEATURES_DELAY
)
RNN_CLEAR
(
conv2_out
,
FEATURE_CONV2_OUT_SIZE
);
memmove
(
lpcnet
->
old_input
[
1
],
lpcnet
->
old_input
[
0
],
(
FEATURES_DELAY
-
1
)
*
FRAME_INPUT_SIZE
*
sizeof
(
in
[
0
]));
memcpy
(
lpcnet
->
old_input
[
0
],
in
,
FRAME_INPUT_SIZE
*
sizeof
(
in
[
0
]));
compute_dense
(
&
feature_dense1
,
dense1_out
,
conv2_out
);
compute_dense
(
&
feature_dense2
,
condition
,
dense1_out
);
RNN_COPY
(
rc
,
condition
,
LPC_ORDER
);
...
...
@@ -168,8 +165,6 @@ LPCNET_EXPORT void lpcnet_synthesize(LPCNetState *lpcnet, const float *features,
/* Matches the Python code -- the 0.1 avoids rounding issues. */
pitch
=
(
int
)
floor
(.
1
+
50
*
features
[
18
]
+
100
);
pitch
=
IMIN
(
255
,
IMAX
(
33
,
pitch
));
memmove
(
&
lpcnet
->
old_gain
[
1
],
&
lpcnet
->
old_gain
[
0
],
(
FEATURES_DELAY
-
1
)
*
sizeof
(
lpcnet
->
old_gain
[
0
]));
lpcnet
->
old_gain
[
0
]
=
features
[
PITCH_GAIN_FEATURE
];
run_frame_network
(
lpcnet
,
rc
,
gru_a_condition
,
gru_b_condition
,
features
,
pitch
);
#ifdef END2END
rc2lpc
(
lpc
,
rc
);
...
...
This diff is collapsed.
Click to expand it.
dnn/lpcnet_private.h
+
0
−
2
View file @
66c29fb6
...
...
@@ -26,9 +26,7 @@ struct LPCNetState {
NNetState
nnet
;
int
last_exc
;
float
last_sig
[
LPC_ORDER
];
float
old_input
[
FEATURES_DELAY
][
FEATURE_CONV2_OUT_SIZE
];
float
old_lpc
[
FEATURES_DELAY
][
LPC_ORDER
];
float
old_gain
[
FEATURES_DELAY
];
float
sampling_logit_table
[
256
];
int
frame_count
;
float
deemph_mem
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment