bjin / mpv-prescalers

prescalers for mpv, as user shaders
GNU Lesser General Public License v3.0
355 stars 34 forks source link

Play around with the kernel shape #14

Closed haasn closed 7 years ago

haasn commented 7 years ago

Instead of sampling and training the entire R*R kernel, it's possible that you could get a better result with fewer required samples by using a more circular organization (e.g. store a diamond-like pattern or a circle approximation), much in the same way that polar EWA sampling does.

Since you can just use any pattern of samples you want for your weights and interpolation, this should be relatively easy to accomplish in practice, I would imagine?

bjin commented 7 years ago

It probably won't help much, considering that radius=4 improved the PSNR by only 0.06dB on the test set. We are already reaching the limit of simple linear model. On the other hand, introducing irregular shape will cause more texels being unnecessarily sampled in compute shader, and also add complexity to code, probably doesn't justify the literally near to zero quality improvement.

haasn commented 7 years ago

Fair enough. I was more so going to argue in terms of performance: you could make r4 perform more like r3 by removing the samples that don't add any extra PSNR.