Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland: "Update macOS VideoToolbox encoder color space settings."
This ensures the right color space information is set in the bitstream parameters. Sadly changing them while encodes are pending can hang the encoding session, so color space changes force creation of a new VTCompressionSession. This also cleans up the tests pretty substantially by adding an assert_eq() method for easier bot debugging. It also swaps the RGBA then I420 to I420 first since macOS defaults to a SRGB/rec601 color space when none is provided (so tests would pass w/o this change). No other hardware encoder sets a color space at all, but macOS has been silently assuming ~rec709 this whole time and seemingly converting frames to that space (see drawImage failures in earlier patch sets before WrapVideoFrameInCVPixelBuffer() fix). Since we set the same color space on inputs as we do the session, there should be no color space conversion happening by the OS. Bug: 1377842 Cq-Include-Trybots: luci.chromium.try:gpu-fyi-try-mac-nvidia-retina-rel,gpu-fyi-try-mac-intel-asan,gpu-fyi-try-mac-amd-retina-asan Change-Id: Ifa9fd481fc7197610418097d96cb5d733055088d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4246660 Reviewed-by: Alex Gough <ajgo@chromium.org> Commit-Queue: Dale Curtis <dalecurtis@chromium.org> Reviewed-by: Eugene Zemtsov <eugene@chromium.org> Reviewed-by: Brian Sheedy <bsheedy@chromium.org> Cr-Commit-Position: refs/heads/main@{#1117755}
- Loading branch information
1 parent
1b259b6
commit e6e93d8
Showing
15 changed files
with
431 additions
and
113 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.