mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-02 15:55:39 +00:00
Work around poor video scaling quality on Qualcomm GPUs
This commit is contained in:
parent
1197b17509
commit
3defccb6e2
@ -382,15 +382,28 @@ bool DXVA2Renderer::isDXVideoProcessorAPIBlacklisted()
|
|||||||
D3DADAPTER_IDENTIFIER9 id;
|
D3DADAPTER_IDENTIFIER9 id;
|
||||||
|
|
||||||
hr = d3d9->GetAdapterIdentifier(caps.AdapterOrdinal, 0, &id);
|
hr = d3d9->GetAdapterIdentifier(caps.AdapterOrdinal, 0, &id);
|
||||||
if (SUCCEEDED(hr) && id.VendorId == 0x8086) {
|
if (SUCCEEDED(hr)) {
|
||||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
if (id.VendorId == 0x8086) {
|
||||||
"Avoiding IDirectXVideoProcessor API on Intel GPU");
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
"Avoiding IDirectXVideoProcessor API on Intel GPU");
|
||||||
|
|
||||||
// On Intel GPUs, we can get unwanted video "enhancements" due to post-processing
|
// On Intel GPUs, we can get unwanted video "enhancements" due to post-processing
|
||||||
// effects that the GPU driver forces on us. In many cases, this makes the video
|
// effects that the GPU driver forces on us. In many cases, this makes the video
|
||||||
// actually look worse. We can avoid these by using StretchRect() instead on these
|
// actually look worse. We can avoid these by using StretchRect() instead on these
|
||||||
// platforms.
|
// platforms.
|
||||||
result = true;
|
result = true;
|
||||||
|
}
|
||||||
|
else if (id.VendorId == 0x4d4f4351) { // QCOM in ASCII
|
||||||
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
"Avoiding IDirectXVideoProcessor API on Qualcomm GPU");
|
||||||
|
|
||||||
|
// On Qualcomm GPUs (all D3D9on12 GPUs?), the scaling quality of VideoProcessBlt()
|
||||||
|
// is absolutely horrible. StretchRect() is much much better.
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
result = false;
|
result = false;
|
||||||
@ -971,7 +984,7 @@ Exit:
|
|||||||
int DXVA2Renderer::getDecoderColorspace()
|
int DXVA2Renderer::getDecoderColorspace()
|
||||||
{
|
{
|
||||||
if (isDXVideoProcessorAPIBlacklisted()) {
|
if (isDXVideoProcessorAPIBlacklisted()) {
|
||||||
// StretchRect() assumes Rec 601 on Intel GPUs
|
// StretchRect() assumes Rec 601 on Intel and Qualcomm GPUs.
|
||||||
return COLORSPACE_REC_601;
|
return COLORSPACE_REC_601;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user