Skip to content

Fix HEVC fallback for Dolby Vision Profile 7 to preserve HDR10+ metadata#3160

Open
guyyagil wants to merge 1 commit intoandroidx:mainfrom
guyyagil:fix/dv-profile7-hdr10plus
Open

Fix HEVC fallback for Dolby Vision Profile 7 to preserve HDR10+ metadata#3160
guyyagil wants to merge 1 commit intoandroidx:mainfrom
guyyagil:fix/dv-profile7-hdr10plus

Conversation

@guyyagil
Copy link
Copy Markdown

@guyyagil guyyagil commented Apr 4, 2026

On devices/displays that do not support Dolby Vision, playback of DV Profile 7 (dvhe.07) hybrid remux files containing HDR10+ metadata in the base layer falls back to plain HDR10 instead of utilizing the HDR10+ dynamic metadata present in the HEVC base layer.

The issue is that getAlternativeCodecMimeType explicitly excludes DolbyVisionProfileDvheDtb (Profile 7) from the HEVC fallback path, so getAlternativeDecoderInfos returns empty on non-DV displays and no HEVC decoder is selected.

This change does not add Dolby Vision Profile 7 support.
It only enables HEVC fallback for cases where the platform decoder is already capable of decoding the base layer.

In practice, hybrid remux files (dvhe.07) contain a backward-compatible HEVC Main 10 base layer with HDR10+ metadata. Currently, excluding Profile 7 prevents selecting a usable HEVC decoder on non-DV displays, resulting in playback issues or loss of HDR10+ metadata.

This change aligns Profile 7 behavior with existing fallback handling for Profile 8, without affecting Dolby Vision-capable devices.

Fixes #3119

@guyyagil guyyagil changed the title Fix DV Profile 7 fallback to HEVC to preserve HDR10+ metadata Fix Dolby Vision Profile 7 fallback to HEVC to preserve HDR10+ metadata Apr 4, 2026
On devices that don't support Dolby Vision output, Profile 7 (DvheDtb)
remux files fell back to plain HDR10 because the HEVC base-layer
fallback path was blocked in getAlternativeCodecMimeType.

- Allow DolbyVisionProfileDvheDtb to fall back to HEVC in
  getAlternativeCodecMimeType, since its base layer is always
  backward-compatible HEVC Main 10.

Made-with: Cursor
@guyyagil guyyagil force-pushed the fix/dv-profile7-hdr10plus branch from 5968fe7 to d728e84 Compare April 5, 2026 19:44
@guyyagil guyyagil changed the title Fix Dolby Vision Profile 7 fallback to HEVC to preserve HDR10+ metadata Fix Dolby Vision fallback to HEVC to preserve HDR10+ metadata Apr 6, 2026
@guyyagil guyyagil changed the title Fix Dolby Vision fallback to HEVC to preserve HDR10+ metadata Fix missing HEVC fallback for Dolby Vision Profile 7 to preserve HDR10+ metadata in hybrid files Apr 6, 2026
@guyyagil guyyagil changed the title Fix missing HEVC fallback for Dolby Vision Profile 7 to preserve HDR10+ metadata in hybrid files Fix Dolby Vision fallback to HEVC to preserve HDR10+ metadata on hybrid files Apr 6, 2026
@guyyagil guyyagil changed the title Fix Dolby Vision fallback to HEVC to preserve HDR10+ metadata on hybrid files Fix Dolby Vision Profile 7 fallback to HEVC to preserve HDR10+ metadata on hybrid files Apr 6, 2026
@guyyagil guyyagil changed the title Fix Dolby Vision Profile 7 fallback to HEVC to preserve HDR10+ metadata on hybrid files Fix HEVC fallback for Dolby Vision Profile 7 to preserve HDR10+ metadata Apr 6, 2026
@rohitjoins rohitjoins requested a review from tianyif April 7, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants