<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Nearest neighbor scaling?"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94816#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Nearest neighbor scaling?"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94816">bug 94816</a>
from <span class="vcard"><a class="email" href="mailto:nw9165-3201@yahoo.com" title="nw9165-3201@yahoo.com">nw9165-3201@yahoo.com</a>
</span></b>
<pre>(In reply to Chris Wilson from <a href="show_bug.cgi?id=94816#c9">comment #9</a>)
<span class="quote">> It's underway: <a href="https://patchwork.freedesktop.org/patch/79564/">https://patchwork.freedesktop.org/patch/79564/</a>
> [...]
> You would use xrandr --output DP1 --mode 3840x2160 --scale-from 1920x1080
> (with an updated xrandr).</span >
Awesome, thank you :). Some questions though:
As far as I can tell from your xrandr patch, the user can now select between
auto, bilinear and nearest (neighbor) filtering, right?
On the xrandr command line you have posted I do not see "--filter nearest"
though.
Does that mean that in addition to adding a "--filter" option, your patch also
makes nearest neighbor filtering the new default for 960x540 @ 1920x1080,
1280x720 @ 2560x1440, 1920x1080 @ 3840x2160 and so on without the user having
to specify "--filter nearest"?
<span class="quote">> In theory, yes. In practice, I imagine the games will be querying the list
> of monitor resolutions and do something different. Ideally, the games would
> do the upscaling themselves (that also allows for something like the UI
> overlay being high definition for sharp text, whilst upscaling the heavy
> content). Doing the upscaling late in the chain incurs an additional step
> (that is less likely to be as efficient as doing it earlier in the client).</span >
Hm, yes, ideally. But in reality I don't think there are a lot of games that do
upscaling on their own. And I doubt any of them are using nearest neighbor
scaling.
Unreal Engine 4 for example has a "Screen Percentage" option which "renders the
scene at a lower resolution and then scales it up", see:
<a href="https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/PostProcessing/1_13/index.html">https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/PostProcessing/1_13/index.html</a>
But it uses bilinear filtering and the devs either do not seem to understand or
not care about nearest neighbor filtering, at least judging from the following
thread over there, see:
<a href="https://answers.unrealengine.com/questions/110547/rendering-at-320x180px-and-point-scaling-up.html">https://answers.unrealengine.com/questions/110547/rendering-at-320x180px-and-point-scaling-up.html</a>
And Unreal Engine 4 is just one example.
Unfortunately it looks like most people don't really think about the advantages
of nearest neighbor scaling on high DPI screens.
As far as I know most UHD-TVs do not even have an option to scale 1920x1080 to
3840x2160 via nearest neighbor. The only brand that I know of which does offer
this option on their UHD-TVs is Panasonic. Panasonic has an option called
"1080p Pixel by 4pixels" which, if enabled, scales 1920x1080 to 3840x2160 via
nearest neighbor.
UHD PC monitors on the other hand do not offer such an option at all (none that
I know of).
<span class="quote">> With the panel fitter it is even easier as we just use xrandr --output eDP1
> --mode 1920x1080 and the hardware scales automatically to the native
> resolution of the panel from the source buffer (but we still want to ideally
> disable the filter here even though the hardware should be using a higher
> quality filter than bilinear).</span >
Could you please explain to me what a "panel fitter" is? Is it a hardware
scaler on Intel GPUs that scales the image in hardware?
And is "panel fitter" an Intel specific name or is it a generic term?
Does the hardware image scaler inside Intel GPU have a specific name?
It would be really interesting to know more about the hardware image scaler
inside the Intel GPUs (if there is one).
<span class="quote">> (but we still want to ideally
> disable the filter here even though the hardware should be using a higher
> quality filter than bilinear).</span >
Yes, wouldn't it be possible to use the hardware image scaler inside the Intel
GPUs to upscale the image with nearest neighbor instead of using xrandr
(software)?
<span class="quote">> even though the hardware should be using a higher quality filter than
> bilinear).</span >
So what kind of filter is it using if not bilinear? And maybe the hardware can
be told to use another filter, like nearest neighbor for example (see above)?
Sorry for bothering you with all those questions, but I am really interested in
this (IMHO important) topic, especially due to high DPI displays becoming more
and more common.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>