moonlight-stream / moonlight-qt

GameStream client for PCs (Windows, Mac, Linux, and Steam Link)
GNU General Public License v3.0
9.96k stars 579 forks source link

Weird not pixel perfect decoding with Moonlight Windows #1276

Open makedir opened 4 months ago

makedir commented 4 months ago

I noticed there is some weird not pixel perfect issue with Moonlight decoding seen here:

Original host image:

image

Moonlight image with fullscreen mode:

image

Moonlight image with borderless window:

image

Original:

image

Moonlight borderless window:

image

Moonlight fullscreen:

image

Not just do the colors not perfectly match, the image kinda looks "blurry" in borderless window and "pixelated" in fullscreen mode.

Client: Intel UHD630 Host: Latest Sunshine stable, RTX4080 HEVC, 1080p

cgutman commented 3 months ago

Not just do the colors not perfectly match, the image kinda looks "blurry" in borderless window and "pixelated" in fullscreen mode.

Well the encoding process is lossy and involves 4:2:0 chroma subsampling, so you're certainly not going to get exactly the same colors back on the client. For a proper control for this test, you'd need another 1080p HEVC 4:2:0 video encoded by NVENC to compare, not the original content from the display. Without a lot more context, I don't really know what I'm looking at, but nothing here looks out of the ordinary to me.

You've not filled in the GitHub issue template properly, but if you're using Moonlight v4.3.1, then you'll be getting entirely different renderers for fullscreen (D3D9) and borderless windowed (D3D11). That would explain scaling differences.

makedir commented 3 months ago

Not sure why you assume I would not use latest Moonlight? This was done with 5.0.1. and as you see there are different outcomes with borderless window and fullscreen and pixels are not identical.

makedir commented 3 months ago

I have made a test recording on the host with Nvidia shadowplay recording, same bitrate 50mbit, as the stream. And it does not show the same anomalies like the above over Moonlight/Sunshine:

image

Both client and host are 1080p so the picture should be pixel perfect with no anomolies next to the colors. Yet there is some weird difference between Moonlight fullscreen and borderless window fullscreen. You can see if you look closely on the Firefox logo and see some tiny little pixelation on the bottom as one anomaly, there are more, in fullscreen, compared to borderless window fullscreen.

cgutman commented 3 months ago

Not sure why you assume I would not use latest Moonlight? This was done with 5.0.1. and as you see there are different outcomes with borderless window and fullscreen and pixels are not identical.

Facepalm, I meant v5.0.1 in my previous comment. Please try the latest nightly which no longer uses D3D9: https://ci.appveyor.com/project/cgutman/moonlight-qt/builds/49795009/job/wryy161d3l6ohnrg/artifacts

makedir commented 3 months ago

It seems the nightly has changed that

Fullscreen: image

Borderless window fullscreen: image

There blurryness is still there though

image

cgutman commented 3 months ago

Ah I see.

On those closeup images of the Windows logo, can you specify what exact scenario each image depicts? Ex: Is one full-screen and the other borderless? Or one is borderless and the other is a reference image?

Does the blurriness disappear if you change the "Video decoder" option in settings to "Force software decoding"?