From dc8599f188a265d690927b01e254db8452f1f02f Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Tue, 15 Oct 2024 09:13:57 -0400 Subject: [PATCH] Improve direct play support for Dolby Vision --- source/utils/deviceCapabilities.bs | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/source/utils/deviceCapabilities.bs b/source/utils/deviceCapabilities.bs index aa580e53a..8960b504b 100644 --- a/source/utils/deviceCapabilities.bs +++ b/source/utils/deviceCapabilities.bs @@ -562,27 +562,44 @@ function getCodecProfiles() as object hevcVideoRangeTypes = "SDR" vp9VideoRangeTypes = "SDR" av1VideoRangeTypes = "SDR" + canPlayDovi = false if canPlay4k() dp = di.GetDisplayProperties() + + if dp.DolbyVision + canPlayDovi = true + + h264VideoRangeTypes = h264VideoRangeTypes + "|DOVI|DOVIWithSDR" + hevcVideoRangeTypes = hevcVideoRangeTypes + "|DOVI|DOVIWithSDR" + av1VideoRangeTypes = av1VideoRangeTypes + "|DOVI|DOVIWithSDR" + end if + if dp.Hdr10 hevcVideoRangeTypes = hevcVideoRangeTypes + "|HDR10" vp9VideoRangeTypes = vp9VideoRangeTypes + "|HDR10" av1VideoRangeTypes = av1VideoRangeTypes + "|HDR10" + + if canPlayDovi + hevcVideoRangeTypes = hevcVideoRangeTypes + "|DOVIWithHDR10" + av1VideoRangeTypes = av1VideoRangeTypes + "|DOVIWithHDR10" + end if end if + if dp.Hdr10Plus av1VideoRangeTypes = av1VideoRangeTypes + "|HDR10+" end if + if dp.HLG hevcVideoRangeTypes = hevcVideoRangeTypes + "|HLG" vp9VideoRangeTypes = vp9VideoRangeTypes + "|HLG" av1VideoRangeTypes = av1VideoRangeTypes + "|HLG" - end if - if dp.DolbyVision - h264VideoRangeTypes = h264VideoRangeTypes + "|DOVI" - hevcVideoRangeTypes = hevcVideoRangeTypes + "|DOVI" - 'vp9VideoRangeTypes = vp9VideoRangeTypes + ",DOVI" no evidence that vp9 can hold DOVI - av1VideoRangeTypes = av1VideoRangeTypes + "|DOVI" + + if canPlayDovi + hevcVideoRangeTypes = hevcVideoRangeTypes + "|DOVIWithHLG" + vp9VideoRangeTypes = vp9VideoRangeTypes + "|DOVIWithHLG" + av1VideoRangeTypes = av1VideoRangeTypes + "|DOVIWithHLG" + end if end if end if