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
e2a6aaa7
Commit
e2a6aaa7
authored
13 years ago
by
Timothy B. Terriberry
Committed by
Jean-Marc Valin
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Improves accuracy of NLSF2A by reordering the polynomial roots
parent
d5158a42
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
silk/NLSF2A.c
+11
-1
11 additions, 1 deletion
silk/NLSF2A.c
with
11 additions
and
1 deletion
silk/NLSF2A.c
+
11
−
1
View file @
e2a6aaa7
...
...
@@ -69,6 +69,15 @@ void silk_NLSF2A(
const
opus_int
d
/* I filter order (should be even) */
)
{
/* This ordering was found to maximize quality. It improves numerical accuracy of
silk_NLSF2A_find_poly() compared to "standard" ordering. */
static
const
unsigned
char
ordering16
[
16
]
=
{
0
,
15
,
8
,
7
,
4
,
11
,
12
,
3
,
2
,
13
,
10
,
5
,
6
,
9
,
14
,
1
};
static
const
unsigned
char
ordering10
[
10
]
=
{
0
,
9
,
6
,
3
,
4
,
5
,
8
,
1
,
2
,
7
};
const
unsigned
char
*
ordering
;
opus_int
k
,
i
,
dd
;
opus_int32
cos_LSF_QA
[
SILK_MAX_ORDER_LPC
];
opus_int32
P
[
SILK_MAX_ORDER_LPC
/
2
+
1
],
Q
[
SILK_MAX_ORDER_LPC
/
2
+
1
];
...
...
@@ -80,6 +89,7 @@ void silk_NLSF2A(
silk_assert
(
d
==
10
||
d
==
16
);
/* convert LSFs to 2*cos(LSF), using piecewise linear curve from table */
ordering
=
d
==
16
?
ordering16
:
ordering10
;
for
(
k
=
0
;
k
<
d
;
k
++
)
{
silk_assert
(
NLSF
[
k
]
>=
0
);
silk_assert
(
NLSF
[
k
]
<=
32767
);
...
...
@@ -98,7 +108,7 @@ void silk_NLSF2A(
delta
=
silk_LSFCosTab_FIX_Q12
[
f_int
+
1
]
-
cos_val
;
/* Q12, with a range of 0..200 */
/* Linear interpolation */
cos_LSF_QA
[
k
]
=
silk_RSHIFT_ROUND
(
silk_LSHIFT
(
cos_val
,
8
)
+
silk_MUL
(
delta
,
f_frac
),
20
-
QA
);
/* QA */
cos_LSF_QA
[
ordering
[
k
]
]
=
silk_RSHIFT_ROUND
(
silk_LSHIFT
(
cos_val
,
8
)
+
silk_MUL
(
delta
,
f_frac
),
20
-
QA
);
/* QA */
}
dd
=
silk_RSHIFT
(
d
,
1
);
...
...
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