-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improving the selection of chroma scaler in libplacebo. #241
Comments
mpv-player/mpv#12163 (comment) Edit: I see you're active in that issue as well. I don't think anything has changed? Why don't you just use the (deleted) superxbr-chroma implementation from that repo? |
i'm not only active i was the creator of that now closed issue. as far as i can see it is gone on that repo. and it needs an x scale to correct positioning without it it's pretty useless and that's why i hate the idea of user based chroma scaler there is to much that can go wrong. super xbr was made for pixel art where it does terrible in my honest opinion. maybe the version in madVR is different or the AR is just tuned to perfection and this is not a port of mpdn version. making this a huge waste of time. super xbr pretty much outperforms jinc in quality while been cheaper. but i'm not alone in that super xbr is very useful boat. |
And did you try RAVU chroma as recommended? |
if it has been updated with //!OFFSET ALIG i could. i'm actually open to test everything but the main point is the missing or lack of shader that are actually can be used with offset correction. before we run in circles this is where it pretty much ended: mpv-player/mpv#12163 (comment) i don't even know what that caveats is he is talking about. |
This is more of a discussion https://github.com/haasn/libplacebo/discussions than an issue. I think there are no built-in scalers in libplacebo that would satisfy you and in general I don't see libplacebo integrating meme shaders natively. I think there are few options of chroma scaling that may be interesting for you: |
same issue as before chroma placement. why is a cheaper better scaler a meme? but sure here we go even more comparisons: https://slow.pics/c/tOaGmWhi ngu AA sharp are a meme as chroma scaler super xbr is not. and my issue with luma guided still stays. and yes this is my first try and i sadly manage to break joint already. |
ravu-chroma is here https://github.com/bjin/mpv-prescalers/tree/cc02ed95c1fe05b72bc21d41257c4c085e6e409b EDIT: here are all scripts to generate https://github.com/bjin/mpv-prescalers/tree/source If you want community to look more into those or other solutions, you would need to provide examples where it is better. Currently bilateral variants are commonly agreed to be better. |
at least i can now see why it didn't take off...
The ported shaders (in mpv) also include contributions licensed under terms of screenshot-high-bit-depth=no is now been used sorry about that but 16 bit screenshots is very cool but as a default maybe a bit over kill. |
Just a reminder that most (all?) chroma shaders upsample chroma to luma resolution and not to the final output resolution, so, assuming you're still using this as your test image, you're doubling the merged planes after doubling chroma which kinda invalidates the entire comparison. I tested this exact same frame here and to be honest the shaders seem fine enough: https://slow.pics/c/RlkFmHRb I do understand your disdain with luma-guided approaches as they can produce subpar results when there's no correlation between the planes, and in that case the best option available is probably RAVU chroma. CfL has some logic to prevent it from producing pure garbage but it's obviously not perfect and it can be easily fooled by things like chromatic aberration. To me this sounds more like a feature request, but as kasper mentioned you'd have to convince the community this is actually better than what we already have, and then find someone actually willing to work on it. |
first of all your test is amazing it is showing my issue i'm complaining about. the CTL has chroma bleeding most likely because of wrong placement which could explain the heavy aliasing in CTL and something that is fixable. the doubling of the merged plane is intentional and is fair as long as the doubling is the same scaler. because i want a realistic output. there are multiply reasons for that one is watching 1080p images on UHD is not that fun. the source for this was SD: https://slow.pics/c/tOaGmWhi does mpv not work like this and will not use "scale" to get to the final destination and will use something else? if that's the case it would start to explain a lot. but in the OSD it looked like it does it this way. i'm not confident in my use of mpv at all and the fact that all results are barely different to bilinear proofs that. the super xbr i load there is different but just nothing. does this hook loading even work the image changes slightly so i guess so? all these comparisons are very time consuming and i'm still not sure they are take serious. |
The "normal" order of operations is to upsample chroma to luma resolution, merge the planes, convert them to RGB and then do the final scaling step to the target resolution. You can control which filters to use with This image may or may not be up to date, but it can give you an idea: About the filters looking the same, I don't know what you're doing wrongly but they certainly don't: https://slow.pics/c/iH9cifkK You're correct though that both CfL and Krig seem to have some negligible pixel shifting in this example, this probably has something to do with the |
thanks. with CTL it may just correct the luma channel instead of the chroma channel. but i still see red getting into pure black which it typical for chroma bleeding. i used the AV1 version or maybe that is a key/I frame and the one i used in the madVR is not having better quality. my madVR is not doing any calibration i have an calibrated end device so colors should be the same... |
scaler in deep: showing what they are actually doing even through you will nearly never ever see it like this: a bunch of images to compare the first couple are mostly to show abrration will be removed by luma guide just as you point out but ewa sharpest also fails slighty. super xbr from 25 to 150 because it can do pretty much every sharpness a user could want: https://slow.pics/c/72JEh0DC i use 100 at 1080p images but for 1080p upscaled to 4K i'm using the 150 version. i was also planning to add a couple of measured differences but that was a waste of time: https://drive.google.com/file/d/1E7-XBHJ6Jlndafm5URsxCU3z-oAmZolW/view?usp=sharing edit: performance benchmark
4060 this is pointless. madVR 6 ms for the rest a fast image upscale check: both mpdn and madVR super xbr perform well while the mpv version is just subpar. PSNR are other matrix are pointless there is x shifting super XBR doesn't need a x shift for image scaling. edit even more: i'm speechless |
@mightyhuhn: chroma offset has been fixed. See Artoriuz/glsl-chroma-from-luma-prediction@b792035 and Artoriuz/glsl-joint-bilateral@22cf9d7 and can try it now, apparently it works better. You need recent mpv build with mpv-player/mpv@42ff6f9 change. |
i already tested joint and prediction today with an mpv build from 20.10.2024. i will redo it. |
i used my stat of the art test pattern: lovely. |
this is pretty much the same request as the one on mpv that did go no where.
so here i try again with hopefully better arguments:
chroma scaling in libplacebo is not up to par to other renderers.
using an external shader to upscale the entire image works just fine. with chroma stuff it get's more complicated with placement and such. so that's very user unfriendly.
so the usual answer will be to use a form of biliteral which can go utterly wrong. (i can proof that yet again but i really don't want to)
so here is an normal example: https://slow.pics/c/nYnRAWTf
shows super xbr 150 which is similar in speed to jinc in madVR. (sorry it is so fast i can not measure it.)
here is another test with upscaling to 4K all scaler are madVR the image scaler was also super xbr 100 in this case:
https://slow.pics/c/zUsy6eUa
this is literally a day night difference: but i had to give up on this after reading this: mpv-player/mpv#12384
reconstruct is very similar to krig biliteral but if that fails it fails even harder then that. so the results is not that interesting to me.
i used this input string to toggle in mpv: CTRL+9 cycle-values cscale "bilinear" "sinc" "jinc" "bicubic" "ewa_lanczos4sharpest" "ewa_robidouxsharp"
why they all look pretty much the same except for bilinear is beyond me and not why i'm here.
there is no GLSL port of super xbr i know of so no mpv port with hooks to. so the best i can poin to is this:
https://github.com/zachsaw/MPDN_Extensions/blob/master/Extensions/RenderScripts/Super-xBR/super-xbr.hlsl
video source: at the end
if there are other ways to get comparable results in gpu-next libplacebo i'm all ears.
have a nice day.
a yeah i forgot pretty sure JRVR has it so there is maybe even a port out there already it's MIT so maybe not.
The text was updated successfully, but these errors were encountered: