Fix incorrect autoselection of SW AV1 over HW H.264 for SDR content

This commit is contained in:
Cameron Gutman
2026-03-28 20:19:11 -05:00
parent 88b4a17fe1
commit 53a7680a38

View File

@@ -781,24 +781,6 @@ bool Session::initialize(QQuickWindow* qtWindow)
}
}
#if 0
// TODO: Determine if AV1 is better depending on the decoder
if (getDecoderAvailability(testWindow,
m_Preferences->videoDecoderSelection,
m_Preferences->enableYUV444 ?
(m_Preferences->enableHdr ? VIDEO_FORMAT_AV1_HIGH10_444 : VIDEO_FORMAT_AV1_HIGH8_444) :
(m_Preferences->enableHdr ? VIDEO_FORMAT_AV1_MAIN10 : VIDEO_FORMAT_AV1_MAIN8),
m_StreamConfig.width,
m_StreamConfig.height,
m_StreamConfig.fps) != DecoderAvailability::Hardware) {
// Deprioritize AV1 unless we can't hardware decode HEVC and have HDR enabled.
// We want to keep AV1 at the top of the list for HDR with software decoding
// because dav1d is higher performance than FFmpeg's HEVC software decoder.
if (hevcDA == DecoderAvailability::Hardware || !m_Preferences->enableHdr) {
m_SupportedVideoFormats.deprioritizeByMask(VIDEO_FORMAT_MASK_AV1);
}
}
#else
// Deprioritize AV1 unless we can't hardware decode HEVC, and have HDR enabled
// or we're on Windows or a non-x86 Linux/BSD.
//
@@ -826,7 +808,15 @@ bool Session::initialize(QQuickWindow* qtWindow)
) {
m_SupportedVideoFormats.deprioritizeByMask(VIDEO_FORMAT_MASK_AV1);
}
#endif
else if (!m_Preferences->enableHdr &&
getDecoderAvailability(testWindow,
m_Preferences->videoDecoderSelection,
m_Preferences->enableYUV444 ? VIDEO_FORMAT_AV1_HIGH8_444 : VIDEO_FORMAT_AV1_MAIN8,
m_StreamConfig.width,
m_StreamConfig.height,
m_StreamConfig.fps) != DecoderAvailability::Hardware) {
m_SupportedVideoFormats.deprioritizeByMask(VIDEO_FORMAT_MASK_AV1);
}
#ifdef Q_OS_DARWIN
{