Picture Scaling Algorithms explanation ?
#1
During play back : Settings (cogwheel) >> Video Settings >> Video Scaling Method.
These boys : https://github.com/xbmc/xbmc/blob/8d4a5b...pp#L30-L44

I'm a fairly new user of Kodi. Since v17.
I want to learn when to apply which picture scaling algorithm.
Which : picture scaling algorithm XYZ. When : jagged people and objects.
But I can't find anything about Picture scaling in the Wiki. And in the Tips and Tricks forum there is also nothing. Not in one place.

Is there such an explanation, in one place ?

Also:
When does a change of this setting take effect ? Instantaneously, or is the current buffer emptied first ?
#2
Start here for example: http://tanbakuchi.com/posts/comparison-o...lgorithms/ . As you want to learn, you need to study a bit - image processing is a science of its own. The names you linked match the method. The order is "low cpu impact / low quality" to "higher cpu impact / higher quality".
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
#3
Excellent. Thanks very much fritsch.
Would you happen to know the answer to my other question (after "Also:") ?
EDIT: Related to Kodi of course.
#4
Are we talking about slideshows?
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
#5
No.
Let me explain. I want to know when I change the picture scaling method during play back of a video with : Settings (cogwheel) >> Video Settings >> Video Scaling Method, when does the new method kick in ?
Right away ?
Or is what is currently already buffered from SSD or Blu-Ray disc, first displayed with the old scaling method.
Basically, if what is in the buffer has already been scaled and enhanced.

A video is playing. At 720p or 1080p its resolution is always lower than my 1440p screen. So scaling is possible.
But many times the 720p video is not scaled correctly.
1280 x 720p doubled horizontally and vertically would be exactly 2560 x 1440p. The video's picture would be sharp, clean, and fill the whole screen.
Alas, many times that doesn't happen and I end up with a 720p video that fills the whole screen but has a blurry and/or slightly pixelated picture. It looks like the enhancement portion of the picture scaling method has failed. Only the stretching has worked. When I turn scaling off, the picture becomes sharp (after a while) but fills only one quarter of the screen.
So I assume that I need a different scaling method per video to get a sharp picture.

While the videos with a 1080p resolution always play with a sharp, clean picture filling the whole screen, or with black borders at the top and bottom (which I do not mind at all).

When I play the same 720p video or Blu-Ray disc with VLC it displays sharp and clean and fills the whole screen.
I assume that my GPU is doing the scaling then.

EDIT: I mean DVD disc not Blu-Ray disc.
#6
For Video Player the above linked code is the wrong code. The scaling methods is changed instantly - you see that in the log. Depending on which decoding you use (hw or sw) I'd suggest Lanczos 3 Optimized - in combination with "Use HQ scalers when scaling above 20%".
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
#7
This "Lanczos 3 Optimized" together with "Render method Advanced shaders (GLSL) did the trick for 2 of my 3 test DVDs.
Too bad that "Enable HQ scalers for scaling above 20%" is not accessible from the video settings menu when the movie is already playing.

I still do not know why the above settings worked though. Just like I don't know when to apply which of the other settings.
And I still have a lot of old 480p (from early 2000's) and 720p DVD discs.
#8
Lanczos3 Optimized is the best solution for 99.999 % of all your content, with one exception: if the content is already as large as your target screen. That's why the "Use HQ scalers when scaling above 20%" is needed. You can save Lanczos3 Optimized when playing one of your DVDs for "all videos", then it will be chosen automatically for all your content - besides that content, that already is arround the size of your output.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
#9
Yes, I had already saved "Lanczos3 Optimised" as default. Because it didn't harm the picture of the other discs.

So that's why "Enable HQ scalers for scaling above 20%" didn't do anything with any percentage. I thought that it meant only enable when scaling up at least with +20%. Like in :

Times 1.7689 :
(2560 - 1920) / 1920 = 0.333333. * 100 = +33.3333% upscaling (x1.33)
(1440 - 1080) / 1080 = 0.333333. * 100 = +33.3333% upscaling (x1.33)

Times 4 :
(2560 - 1280) / 1280 = 1. * 100 = +100% upscaling (x2)
(1440 - 720) / 720 = 1. * 100 = +100% upscaling (x2)

Times 12 :
(2560 - 640) / 640 = 3. * 100 = +300% upscaling (x4)
(1440 - 480) / 480 = 2. * 100 = +200% upscaling (x3)

So I was going to modify Estuary to add a button which calculates the "for scaling above %" and pops it in a small modal. But the setting isn't even available from the settings popup when the the movie is playing. Maybe rightfully so, because it is going to be a pretty static value anyway. It's all above 20%.

To do the same for the picture scaling methods, I would have to gain knowledge of when and which one to apply. Visually or by analyzing the picture of the movie. The last one is out of my league. So I was looking for knowledge about it, dumped online.

I keep looking into getting this done (on and off) because I can't get the idea out of my head.
Thanks for helping me out.
#10
Not really ... that setting is evaluated on movie start. For movies not in that range it falls back to nearest neighbour / bilinear. For all others it uses lanczos3 optimized.

As I still don't know what hardware you use ... I cannot help you further. On Android for example with surface rendering and mediacodec no lanczos is available at all.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
#11
I don't understand the paragraph starting with "Not really ..."

Screenshots of my HTPC (built from old parts, only the 2 SSDs and GPU are left overs from my previous desktop). Screenshots were taken after logging into the Kodi shell from SDDM.
I only log into Plasma shell to update Arch. Or to make a post like this with screenshots.

https://postimg.org/gallery/l6o4e7tm/
#12
The scalers apply to Video playback, they have zero to do with the GUI.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
#13
I realise that it has nothing to do with the GUI.
I wrote that as additional information to the screenshots of my HTPC's hardware. To clarify the use case.
#14
When video starts, it checks the shader that is set - this is lanczos 3 in your case. It takes that shader computes the scaling ratio. If it below those 20% it will fall back to Nearest Neighbour / Bilinear else it will use Lanczos3 Optimized.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
#15
OK, So far I know now that "Lanczos3 Optimised" is the best of the bunch at large to huge upscaling.
"Nearest Neighbour" and "Bilinear" are best from medium down to no scaling.
But there are 9 others. Are those not relevant to upscaling at all ?

Logout Mark Read Team Forum Stats Members Help
Picture Scaling Algorithms explanation ?0