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
58f3647a
Verified
Commit
58f3647a
authored
1 year ago
by
Jean-Marc Valin
Browse files
Options
Downloads
Patches
Plain Diff
Fix misc warnings
parent
81624caf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#4115
passed
1 year ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dnn/lpcnet_demo.c
+2
-2
2 additions, 2 deletions
dnn/lpcnet_demo.c
dnn/lpcnet_enc.c
+0
-2
0 additions, 2 deletions
dnn/lpcnet_enc.c
with
2 additions
and
4 deletions
dnn/lpcnet_demo.c
+
2
−
2
View file @
58f3647a
...
@@ -100,7 +100,7 @@ void usage(void) {
...
@@ -100,7 +100,7 @@ void usage(void) {
}
}
int
main
(
int
argc
,
char
**
argv
)
{
int
main
(
int
argc
,
char
**
argv
)
{
int
mode
;
int
mode
=
0
;
int
plc_percent
=
0
;
int
plc_percent
=
0
;
FILE
*
fin
,
*
fout
;
FILE
*
fin
,
*
fout
;
FILE
*
plc_file
=
NULL
;
FILE
*
plc_file
=
NULL
;
...
@@ -226,7 +226,7 @@ int main(int argc, char **argv) {
...
@@ -226,7 +226,7 @@ int main(int argc, char **argv) {
if
(
feof
(
fin
)
||
ret
!=
FRAME_SIZE
)
break
;
if
(
feof
(
fin
)
||
ret
!=
FRAME_SIZE
)
break
;
if
(
count
%
2
==
0
)
{
if
(
count
%
2
==
0
)
{
if
(
plc_file
!=
NULL
)
ret
=
fscanf
(
plc_file
,
"%d"
,
&
loss
);
if
(
plc_file
!=
NULL
)
ret
=
fscanf
(
plc_file
,
"%d"
,
&
loss
);
else
loss
=
rand
()
<
RAND_MAX
*
(
float
)
plc_percent
/
100
.
f
;
else
loss
=
rand
()
<
(
float
)
RAND_MAX
*
(
float
)
plc_percent
/
100
.
f
;
}
}
if
(
loss
)
lpcnet_plc_conceal
(
net
,
pcm
);
if
(
loss
)
lpcnet_plc_conceal
(
net
,
pcm
);
else
lpcnet_plc_update
(
net
,
pcm
);
else
lpcnet_plc_update
(
net
,
pcm
);
...
...
This diff is collapsed.
Click to expand it.
dnn/lpcnet_enc.c
+
0
−
2
View file @
58f3647a
...
@@ -92,7 +92,6 @@ static void biquad(float *y, float mem[2], const float *x, const float *b, const
...
@@ -92,7 +92,6 @@ static void biquad(float *y, float mem[2], const float *x, const float *b, const
void
compute_frame_features
(
LPCNetEncState
*
st
,
const
float
*
in
)
{
void
compute_frame_features
(
LPCNetEncState
*
st
,
const
float
*
in
)
{
float
aligned_in
[
FRAME_SIZE
];
float
aligned_in
[
FRAME_SIZE
];
int
i
;
int
i
;
float
E
=
0
;
float
Ly
[
NB_BANDS
];
float
Ly
[
NB_BANDS
];
float
follow
,
logMax
;
float
follow
,
logMax
;
kiss_fft_cpx
X
[
FREQ_SIZE
];
kiss_fft_cpx
X
[
FREQ_SIZE
];
...
@@ -125,7 +124,6 @@ void compute_frame_features(LPCNetEncState *st, const float *in) {
...
@@ -125,7 +124,6 @@ void compute_frame_features(LPCNetEncState *st, const float *in) {
Ly
[
i
]
=
MAX16
(
logMax
-
8
,
MAX16
(
follow
-
2
.
5
f
,
Ly
[
i
]));
Ly
[
i
]
=
MAX16
(
logMax
-
8
,
MAX16
(
follow
-
2
.
5
f
,
Ly
[
i
]));
logMax
=
MAX16
(
logMax
,
Ly
[
i
]);
logMax
=
MAX16
(
logMax
,
Ly
[
i
]);
follow
=
MAX16
(
follow
-
2
.
5
f
,
Ly
[
i
]);
follow
=
MAX16
(
follow
-
2
.
5
f
,
Ly
[
i
]);
E
+=
Ex
[
i
];
}
}
dct
(
st
->
features
,
Ly
);
dct
(
st
->
features
,
Ly
);
st
->
features
[
0
]
-=
4
;
st
->
features
[
0
]
-=
4
;
...
...
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