opusenc: Forward OPUS_SET/GET_DRED_DURATION_REQUEST to encoder#38
Open
heistings wants to merge 1 commit intoxiph:masterfrom
Open
opusenc: Forward OPUS_SET/GET_DRED_DURATION_REQUEST to encoder#38heistings wants to merge 1 commit intoxiph:masterfrom
heistings wants to merge 1 commit intoxiph:masterfrom
Conversation
Add support for controlling DRED (Deep REDundancy) duration through the ope_encoder_ctl() API. This allows applications using libopusenc to enable and configure the new DRED feature introduced in Opus 1.5 for improved packet loss resilience. The new cases forward the OPUS_SET_DRED_DURATION_REQUEST and OPUS_GET_DRED_DURATION_REQUEST control requests to the underlying multistream encoder, enabling DRED functionality when encoding to Ogg Opus files. Signed-off-by: Hei Stansen <waterforest_pang@qq.com>
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.
Summary
This PR adds support for controlling DRED (Deep REDundancy) duration through the
ope_encoder_ctl()API, enabling applications using libopusenc to configure the new DRED feature introduced in Opus 1.5 for improved packet loss resilience.Changes
Added two new case handlers in
ope_encoder_ctl():OPUS_SET_DRED_DURATION_REQUEST: Forward the DRED duration setting to the underlying multistream encoderOPUS_GET_DRED_DURATION_REQUEST: Retrieve the current DRED duration from the encoderBoth cases are guarded by
#ifdefto maintain backward compatibility with older libopus versions that don't support DRED.Motivation
With Opus 1.5 introducing DRED (Deep REDundancy) for improved packet loss concealment, applications encoding to Ogg Opus files via libopusenc currently have no way to enable this feature. This patch bridges that gap by forwarding the DRED CTL requests through the libopusenc API.
Testing
Tested with Opus 1.5.2 built with
--enable-dred. The DRED duration can now be successfully configured when encoding Ogg Opus streams.Related PR: This fix depends on xiph/opus#450, which adds DRED CTL forwarding support to the multistream encoder API.
Both PRs are required for the complete DRED control path when encoding Ogg Opus files.