Bugfix: Dolby Vision Profile 10.0 playback artifacts issue#3153
Open
ybai001 wants to merge 1 commit intoandroidx:mainfrom
Open
Bugfix: Dolby Vision Profile 10.0 playback artifacts issue#3153ybai001 wants to merge 1 commit intoandroidx:mainfrom
ybai001 wants to merge 1 commit intoandroidx:mainfrom
Conversation
* This issue was triggered because androidx#2830 was not merged correctly. * The issue arises when all three of the following conditions are * met simultaneously: * 1. The content is Dolby Vision Profile 10.0 * 2. A resolution switch occurs during playback due to network * bandwidth changes (e.g., 1080p → 720p) * 3. The device’s AV1 decoder fails to properly handle AV1 * Codec-Specific Data (CSD)
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.
This issue was triggered because this PR was not merged correctly.
The issue arises when all four of the following conditions are met simultaneously:
getAlternativeCodecMimeType() returns backward compatible codec mime type. For example, For Dolby Vision profile 10.0, it returns null since DV P10.0 is not backward compatible with AV1. Both DV P10.1 and P10.4 will return AV1.
getDolbyVisionBlMimeType() returns base layer of Dolby Vision stream. For example, for all Dolby Vision profile 10.x (10.0, 10.1, 10.4), it will return AV1 since all of them are AV1 based. This method doesn't consider backward compatibility.
Without this patch, during resolution switch of DV P10.0 playback, MediaCodecRenderer::onInputFormatChanged() is called, MediaCodecUtil.getAlternativeCodecMimeType(newFormat) returns null so that CSD is still sent to DV decoder. DV decoder forwards this CSD to AV1 decoder then results in decoding failure.
With this patch, MediaCodecUtil.getDolbyVisionBlMimeType(newFormat) returns video/av1, which results in CSD is set to null. Then everything is OK since AV1 decoder will not receive CSD.
The good news is there is no DV P10.0 content in market by now. But we had better fix it ASAP.