mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 14:40:56 +00:00
Fix incorrect autoselection of SW AV1 over HW H.264 for SDR content
This commit is contained in:
@@ -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
|
// Deprioritize AV1 unless we can't hardware decode HEVC, and have HDR enabled
|
||||||
// or we're on Windows or a non-x86 Linux/BSD.
|
// 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);
|
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
|
#ifdef Q_OS_DARWIN
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user