Skip to content

Add decoder complexity for deep PLC#2

Merged
DoumanAsh merged 3 commits into
DoumanAsh:masterfrom
jacksongoode:decoder-complexity
Sep 16, 2025
Merged

Add decoder complexity for deep PLC#2
DoumanAsh merged 3 commits into
DoumanAsh:masterfrom
jacksongoode:decoder-complexity

Conversation

@jacksongoode
Copy link
Copy Markdown
Contributor

@jacksongoode jacksongoode commented Sep 16, 2025

Resolves #2.

This adds the methods for the decoder complexity & two tests, gated behind the dred flag (since it by necessity includes the deep PLC resources), though you could optionally expose just the deep PLC build arg and these flags could be changed.

Comment thread src/decoder.rs Outdated
///Supported values are from 0 to 10, 10 meaning highest complexity.
///Values of 5 or above will use deep packet loss concealment.
pub fn set_complexity(&mut self, value: u8) -> Result<(), ErrorCode> {
if value > 10 {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

There is no need to duplicate this check, C code will validate it and return error just fine too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed 👍

@jacksongoode
Copy link
Copy Markdown
Contributor Author

Not sure how you feel about the test I've added, even if the decoder complexity is set to 4 (and I suppose not using deep PLC), the output will still differ, so its more a test of the the complexity just affecting the decoded output.

@DoumanAsh
Copy link
Copy Markdown
Owner

Test is sufficient on its own. After all change of output is tied to overall quality that opus sacrifices when you reduce complexity, and it is hardly possible to make a more complex test

@DoumanAsh DoumanAsh merged commit a6a903c into DoumanAsh:master Sep 16, 2025
2 of 3 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