Skip to content

Add SILK Burg LPC analysis#159

Merged
thomas-vilte merged 1 commit into
pion:mainfrom
thomas-vilte:feat/silk-lpc-analysis
Jul 22, 2026
Merged

Add SILK Burg LPC analysis#159
thomas-vilte merged 1 commit into
pion:mainfrom
thomas-vilte:feat/silk-lpc-analysis

Conversation

@thomas-vilte

Copy link
Copy Markdown
Member

Description

adds burgModifiedFLP — LPC coefficient estimation via Burg's method, stacked over multiple subframes and capped at a max prediction gain (minInvGain). Wraps it in findLPC, which converts the result straight to NLSFs via a2nlsfFLP. the NLSF-interpolation search (picking the best interpolation index between the previous frame's NLSFs and this one) is deferred — the interpolation index stays fixed at 4 (no interpolation) for now

ported from burg_modified_FLP.c

caught one real bug while reviewing this locally, worth mentioning since it's not visible in the diff: I'd hand-copied the file instead of extracting it cleanly and introduced a few divergences from the reference (a dropped accumulation, a missing multiply, and a whole per-subframe update loop that went missing) — TestBurgModifiedFLPRecoversAR caught it immediately once I actually ran the tests. re-extracted the file straight from François's branch instead of retyping, so what's here now is his original, unmodified

Reference issue

part of the SILK encoder series (#158)

Co-authored-by: François Allais <francois.allais@hotmail.com>
@thomas-vilte
thomas-vilte requested a review from FrantaBOT July 21, 2026 18:44
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.02247% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.50%. Comparing base (ad89c91) to head (fe0e821).

Files with missing lines Patch % Lines
internal/silk/lpc_analysis.go 82.02% 13 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #159      +/-   ##
==========================================
- Coverage   88.57%   88.50%   -0.07%     
==========================================
  Files          38       39       +1     
  Lines        8252     8341      +89     
==========================================
+ Hits         7309     7382      +73     
- Misses        712      725      +13     
- Partials      231      234       +3     
Flag Coverage Δ
go 88.50% <82.02%> (-0.07%) ⬇️

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 merged commit c3caa37 into pion:main Jul 22, 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.

2 participants