diff --git a/app/streaming/session.cpp b/app/streaming/session.cpp index ad3741b0..bac58ed5 100644 --- a/app/streaming/session.cpp +++ b/app/streaming/session.cpp @@ -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 {