Skip to content

[WIP] feat: Opus decoder (SILK mode) #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 55 commits into
base: dev-0.6
Choose a base branch
from

Conversation

jiztastamablastamarang
Copy link

This PR adds initial Opus codec support to Symphonia. The current implementation focuses on the SILK decoder path and core Opus infrastructure.

Core Components

  • Complete SILK decoder with frame decoding, LPC synthesis, and sample reconstruction
  • Range decoder for Opus bitstream entropy parsing
  • Opus packet parser supporting standard frame formats
  • Header and TOC (Table of Contents) parsing for all Opus frame types
  • Main OpusDecoder interface implementing AudioDecoder and RegisterableAudioDecoder traits

Technical Details

  • SILK decoder path includes:
    • LPC coefficient extraction
    • LSF interpolation and conversion
    • Frame header parsing with VAD flag detection
    • Sample reconstruction using LTP and LPC filters
    • Error concealment logic
    • Fixed-point arithmetic conversions from the reference implementation
  • Range decoder supports both regular and folded entropy coding
  • Frame type detection for all standard Opus modes
  • Support for all required Opus bitstream elements

Implementation Status

  • Supported: SILK-only mode decoding (functional for basic Opus SILK streams)
  • Stubbed: CELT and hybrid mode decoders (not yet implemented)
  • All code compiles and integrates with symphonia-core dev-0.6 API

Next Steps

  • Implement CELT decoder
  • Add hybrid mode support
  • Expand test coverage
  • Optimize for stereo mode

This PR is a functional prototype for Opus SILK streams. CELT and hybrid mode support will be added in future updates. Feedback and early review are welcome as development continues.

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.

4 participants