Add SILK LPC-to-NLSF conversion (a2nlsf)#157
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #157 +/- ##
==========================================
- Coverage 88.49% 88.47% -0.02%
==========================================
Files 36 37 +1
Lines 8074 8185 +111
==========================================
+ Hits 7145 7242 +97
- Misses 703 712 +9
- Partials 226 231 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: François Allais <francois.allais@hotmail.com>
thomas-vilte
force-pushed
the
feat/silk-a2nlsf
branch
from
July 20, 2026 21:42
3086f97 to
30eb2f8
Compare
FrantaBOT
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
adds
silk_A2NLSF— converts monic LPC/whitening filter coefficients (Q16) to Normalized Line Spectral Frequencies (Q15). This is root-finding: the filter's even/odd polynomials get evaluated on a fixed cosine grid, with binary-division refinement around each sign crossing, alternating between the two polynomials for each successive root. also includes the float wrapper (a2nlsfFLP) and thebwexpander32bandwidth-expansion helper used when the root search doesn't converge on the first passported from
A2NLSF.c,bwexpander_32.c, and the FLP wrapper inwrappers_FLP.cone thing worth calling out: the "ran out of retries, fall back to an evenly-spaced white spectrum" branch (
maxIterA2NLSFexhausted) is real defensive code in libopus, but I couldn't construct an input that reaches it — threw millions of random and clustered/near-duplicate NLSF vectors at it and the worst case I found needed 16 of the 17 allowed retries. left it uncovered rather than force a contrived case; the rest of the file is in the high 90s/100%Reference issue
part of the SILK encoder series (#156)