Add external DRED weights and harden borrowed wrappers - #6
Merged
Merged
Conversation
Deniskore
force-pushed
the
new-version
branch
2 times, most recently
from
August 16, 2026 10:07
a5af982 to
9cc4b15
Compare
There was a problem hiding this comment.
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
DerefMutaccess 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.
There was a problem hiding this comment.
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()?;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.