mac-videotoolbox: Add service-requested low latency rate control - #2
Open
ghbogarin wants to merge 1 commit into
Open
mac-videotoolbox: Add service-requested low latency rate control#2ghbogarin wants to merge 1 commit into
ghbogarin wants to merge 1 commit into
Conversation
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.
Description
Adds support for VideoToolbox's low latency rate control (
kVTVideoEncoderSpecification_EnableLowLatencyRateControl) to the Apple H.264 and HEVC hardware encoders.The mode is not exposed in the UI. It is requested programmatically through a hidden
low_latencyboolean registered on the encoder's property list, so a service can opt its encoder into it fromapply_encoder_settings.When it is requested,
create_encoderasks VideoToolbox for the low latency counterpart of the selected encoder withVTCopySupportedPropertyDictionaryForEncoder(the.rtvcvariant) and builds the session against that encoder ID rather than overriding the user's encoder selection.Motivation and Context
The Apple encoders currently target throughput and quality. Low latency rate control disables the encoder-side buffering and frame reordering that the default configuration relies on, which is what real-time delivery needs, at the cost of some compression efficiency, which is why it should not be turned on globally by default.
This change is