Skip to content

silk: add NEON optimized silk_LPC_analysis_filter for arm - #515

Open
Git-Donner wants to merge 1 commit into
xiph:mainfrom
Git-Donner:feat/arm-silk-LPC-optimization
Open

Git-Donner wants to merge 1 commit into
xiph:mainfrom
Git-Donner:feat/arm-silk-LPC-optimization

Conversation

@Git-Donner

Copy link
Copy Markdown

Summary

Add an AArch64 NEON implementation of silk_LPC_analysis_filter, achieving 2.8–3.4× speed-up over the scalar C reference on Kunpeng 920.

Implementation

  • Process 8 output samples in parallel using two NEON accumulators.
  • Preserve the original 32-bit wraparound, rounding, and saturation behavior.
  • Handle remaining samples with a scalar fallback.
  • Integrate with the existing ARM NEON build infrastructure and retain the portable C reference.

Validation

  • Bit-exact: 0 mismatches against the C reference across filter orders 8/10/12/16 and lengths 240/320/480, including random and near-saturation inputs.
  • Build/tests: Fixed-point build, unit tests, and opus_demo round-trip completed successfully.
  • Performance: 2.80–3.39× speed-up on Kunpeng 920 (GCC 12, -O3 -march=armv8-a). For d=16, len=480, execution time decreased from 2759 ns to 814 ns per call.

@Git-Donner

Copy link
Copy Markdown
Author

Hi maintainers,

Just following up on this PR. All 6 GitHub Actions workflows are currently awaiting approval.

Could a maintainer approve the workflows when convenient? I'd also appreciate any feedback or review on the implementation.

Thanks :)

@jmvalin

jmvalin commented Nov 10, 2026

Copy link
Copy Markdown
Member

Is the PR AI-generated? If so, please let me know what you did and didn't do with the output.

@Git-Donner

Copy link
Copy Markdown
Author

Yes, AI (Deepseek) was used to assist with this PR.

To clarify its involvement:

  • What AI did: It helped explore the NEON optimization approach and generated an initial implementation draft for parts of the optimized code.
  • What I did: I reviewed the generated code, modified and adapted it to match Opus's fixed-point arithmetic semantics, debugged the implementation, and handled the integration with the existing ARM build and dispatch infrastructure.
  • Validation: I personally performed the bit-exact comparisons against the original C implementation, ran the build and unit tests, and conducted the performance benchmarks on ARM.

I did not submit the raw AI-generated output without review. I took responsibility for reviewing, modifying, debugging, and validating the final implementation.

The final code and the reported test results are my responsibility.

Thanks for bringing this up.

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