Skip to content

Add SILK floating-point LPC primitives#154

Merged
thomas-vilte merged 3 commits into
pion:mainfrom
thomas-vilte:feat/silk-lpc-float
Jul 20, 2026
Merged

Add SILK floating-point LPC primitives#154
thomas-vilte merged 3 commits into
pion:mainfrom
thomas-vilte:feat/silk-lpc-float

Conversation

@thomas-vilte

@thomas-vilte thomas-vilte commented Jul 17, 2026

Copy link
Copy Markdown
Member

Description

Adds lpc_float.go, the shared floating-point DSP toolkit ported from silk/float/*_FLP.c — autocorrelation, Schur recursion, reflection-to-LPC conversion, bandwidth expansion, sine windowing, and the LPC analysis filter. Nothing in this repo calls these yet; they're the primitives the pitch analysis and Burg/LPC sub-PRs build on next.

Ported: innerProductFLP, autocorrelationFLP, schurFLP, k2aFLP, bwexpanderFLP, applySineWindowFLP, lpcAnalysisFilterFLP.

Reference issue

Part of the SILK encoder series (#147).

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.28%. Comparing base (4bed3b6) to head (3551fc6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #154      +/-   ##
==========================================
+ Coverage   88.19%   88.28%   +0.09%     
==========================================
  Files          34       35       +1     
  Lines        7868     7932      +64     
==========================================
+ Hits         6939     7003      +64     
  Misses        703      703              
  Partials      226      226              
Flag Coverage Δ
go 88.28% <100.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@thomas-vilte
thomas-vilte force-pushed the feat/silk-lpc-float branch from 4787443 to 7fa92ea Compare July 19, 2026 17:59
@thomas-vilte thomas-vilte changed the title feat(silk): add floating-point LPC and signal analysis primitives Add SILK floating-point LPC primitives Jul 19, 2026
thomas-vilte and others added 2 commits July 19, 2026 15:18
maxLPCOrder was 16 with a comment claiming it matched libopus's
SILK_MAX_ORDER_LPC, but that constant is actually 24 — harmless today
since this port only requests order 10/16, but a latent trap if a
future hybrid/SWB sub-PR reuses schurFLP at a higher order.

Also covers the correlationCount > inputDataSize clamp in
autocorrelationFLP, untested before (75% coverage on that function) —
without it, the lag loop slices inputData past its end once the
requested count exceeds what's available.

Co-authored-by: François Allais <francois.allais@hotmail.com>
@thomas-vilte
thomas-vilte merged commit 7944c91 into pion:main Jul 20, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants