fix(macos): use two H.264 VideoToolbox reference frames#5415
Draft
Elegy wants to merge 1 commit into
Draft
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.


Summary
max_ref_frames=2for H.264 VideoToolbox.This is a follow-up to #5200 and the behavior reported in #5013.
Regression and A/B results
I reproduced the regression between these Sunshine revisions using identical Homebrew-mode builds and the same FFmpeg bundle:
3c7952b2dd7f1c8fe74249d0303e7f9d335daf8b3ee4144a8123da467cc771acc1d449e98668a8e2from fix(macos): drop max_ref_frames=1 for h264_videotoolbox and enable PARALLEL_ENCODING #5200The first bad revision removed
max_ref_frames=1for H.264 VideoToolbox and enabled parallel encoding. Testing those changes independently produced this matrix:Two reference buffers preserve the bandwidth improvement from #5200 while restoring continuous H.264 delivery on this M1 host.
Test environment
MacBookAir10,1), Apple M1, 8 GBThe runtime matrix was measured with the same code change on Sunshine base
40ae6c800274afff664838cc48386e01fcffe2cd. This PR rebases that change onto current master.Validation
Sunshine.appfrom current master withninja -C build sunshine.test_sunshinetarget.EncoderVariants/EncoderTest.ValidateEncoder/videotoolboxpasses.This is a draft because the value has only been validated on M1 hardware. Testing on Intel Macs and other Apple Silicon generations would be useful before merge.