forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Video: Support Dolby Vision downgrade playback for MSE
For now, if Chrome wants to implement Dolby Vision support, platform decoders like `D3D11VideoDecoder` or `VideoToolboxVideoDecoder` won't work. On macOS AVFoundation is required and on Windows MediaFoundation is required to support such format from what I understand. Regarding the above issues, as Dolby Vision contents usually encoded with H.264/5 codecs, then as long as device supports H.264/5 codec and `dv_bl_signal_compatibility_id` equals to 1,2,4 (HDR10, SDR,HLG compatible), then a downgrade should be performed and let these videos at least able to playback normally as H.264/5 codec contents as long as developer `addSourceBuffer` with mimetype looks like `hev1.2.4.L120.90` or `avc1.4d4015`. Note that when `addSourceBuffer` with mimetype looks like `dvh1.08.07`, then dolby vision contents will always be treated as dolby vision, the playback may still fails as expected if browser doesn't support dolby vision on the current platform. For web developers, the logic will be something like below: ``` if (isTypeSupported('video/mp4;codecs="dvh1.08.07"')) { if (use_rpu) { // Should be success and rendered with RPU meta. source.addSourceBuffer('video/mp4;codecs="dvh1.08.07"'); ... } else if (dvcc.dv_bl_signal_compatibility_id === 1 || dvcc.dv_bl_signal_compatibility_id === 2 || dvcc.dv_bl_signal_compatibility_id === 4) { // Should be success and rendered without RPU meta as // normal HLG/HDR10/SDR contents. source.addSourceBuffer('video/mp4;codecs="hev1.2.4.L120.90"'); ... } else { // Downgrade is not allowed, playback fails. } } else if (isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"')) { if (dvcc.dv_bl_signal_compatibility_id === 1 || dvcc.dv_bl_signal_compatibility_id === 2 || dvcc.dv_bl_signal_compatibility_id === 4) { // Should be success and rendered without RPU meta as // normal HLG/HDR10/SDR contents. source.addSourceBuffer('video/mp4;codecs="hev1.2.4.L120.90"'); ... } else { // Downgrade is not allowed, playback fails. } } else { // HEVC is not supported, playback fails. } ``` Bug: 1507390 Bug: 1500635 Change-Id: I6de0c11454ede30a8fc7838e164abc2d00822a48 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5058372 Commit-Queue: 朱思达 <zhusida@bytedance.com> Reviewed-by: Xiaohan Wang <xhwang@chromium.org> Cr-Commit-Position: refs/heads/main@{#1233339}
- Loading branch information
Showing
21 changed files
with
336 additions
and
150 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.