mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-08-16 16:36:01 +00:00
Reduce the bitrate to YUV420 defaults if YUV444 was selected but not negotiated
If the user has selected a custom bitrate, we will leave it alone.
This commit is contained in:
parent
46910cf774
commit
02853e74ba
@ -1584,6 +1584,24 @@ bool Session::startConnectionAsync()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the user has chosen YUV444 without adjusting the bitrate but the host doesn't
|
||||||
|
// support YUV444 streaming, use the default non-444 bitrate for the stream instead.
|
||||||
|
// This should provide equivalent image quality for YUV420 as the stream would have
|
||||||
|
// had if the host supported YUV444 (though obviously with 4:2:0 subsampling).
|
||||||
|
// If the user has adjusted the bitrate from default, we'll assume they really wanted
|
||||||
|
// that value and not second guess them.
|
||||||
|
if (m_Preferences->enableYUV444 &&
|
||||||
|
!(m_StreamConfig.supportedVideoFormats & VIDEO_FORMAT_MASK_YUV444) &&
|
||||||
|
m_StreamConfig.bitrate == StreamingPreferences::getDefaultBitrate(m_StreamConfig.width,
|
||||||
|
m_StreamConfig.height,
|
||||||
|
m_StreamConfig.fps,
|
||||||
|
true)) {
|
||||||
|
m_StreamConfig.bitrate = StreamingPreferences::getDefaultBitrate(m_StreamConfig.width,
|
||||||
|
m_StreamConfig.height,
|
||||||
|
m_StreamConfig.fps,
|
||||||
|
false);
|
||||||
|
}
|
||||||
|
|
||||||
int err = LiStartConnection(&hostInfo, &m_StreamConfig, &k_ConnCallbacks,
|
int err = LiStartConnection(&hostInfo, &m_StreamConfig, &k_ConnCallbacks,
|
||||||
&m_VideoCallbacks, &m_AudioCallbacks,
|
&m_VideoCallbacks, &m_AudioCallbacks,
|
||||||
NULL, 0, NULL, 0);
|
NULL, 0, NULL, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user