Skip to content

Add external DRED weights and harden borrowed wrappers - #6

Merged
Deniskore merged 1 commit into
mainfrom
new-version
Aug 16, 2026
Merged

Deniskore merged 1 commit into
mainfrom
new-version

Conversation

@Deniskore

Copy link
Copy Markdown
Owner

No description provided.

@Deniskore
Deniskore force-pushed the new-version branch 2 times, most recently from a5af982 to 9cc4b15 Compare August 16, 2026 10:07
@Deniskore
Deniskore requested a balanced review from Copilot August 16, 2026 10:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds runtime-loaded DRED weights and prevents borrowed wrappers from exposing movable owning handles.

Changes:

  • Adds external-weight loading, aligned retention, build configuration, and end-to-end verification.
  • Replaces borrowed-wrapper DerefMut access with explicit forwarding methods.
  • Hardens packet validation and expands CTL tests.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/ci.yml Adds external-weight CI coverage.
Cargo.lock Refreshes dependency resolutions.
Cargo.toml Defines the external-weights feature.
README.md Documents DRED feature behavior.
build.rs Configures and downloads external-weight assets.
scripts/verify_external_weights.py Generates weights and runs integration testing.
src/decoder.rs Adds retained decoder weights and hardened borrowing.
src/dred.rs Copies and retains DRED decoder weights.
src/encoder.rs Adds retained encoder weights and hardened borrowing.
src/lib.rs Adds borrowed-method delegation macros.
src/multistream.rs Adds LSB-depth CTLs and safe delegation.
src/packet.rs Adds overflow and parser-result validation.
src/projection.rs Hardens borrowed projection wrappers.
src/repacketizer.rs Hardens borrowed repacketizer access.
tests/ctl_compatibility.rs Expands CTL compatibility assertions.
tests/external_weights.rs Tests external DRED weights end to end.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/decoder.rs Outdated
Comment thread src/encoder.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/encoder.rs:701

  • Once external weights are active, this makes every setter routed through simple_ctl (including bitrate and packet-loss updates) parse and initialize the entire DNN blob again. Those CTLs may be adjusted on the real-time path, so they should remain constant-time; libopus keeps the model fields outside its reset ranges, so this reload is not needed for ordinary setters. Remove it here and, if a particular operation truly clears the model, restore only around that operation.
        self.reload_active_dnn_blob()?;

@Deniskore
Deniskore merged commit 33a14fe into main Aug 16, 2026
12 checks passed
@Deniskore
Deniskore deleted the new-version branch August 16, 2026 18:34
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