-
Notifications
You must be signed in to change notification settings - Fork 19
Faster blur for sharpness #660
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
base: master
Are you sure you want to change the base?
Conversation
…oved. Render blur to temporary texture to prevent flickering. Implemented 'fast_gaussian_blur' method from blog.ivank.net that uses three box blurs to approximate Gaussian blur. This makes slider more performant. Fixes HaikuArchives#92
Implemented faster gaussian blur moved code into thread Fixes HaikuArchives#92
|
The visual results seem to be quite bad. Take any image and slide the "Sharpness" slider between both extremes. Instead of blurred it gets blocky, and sharpening also introduces some blockiness. Moving the "Effect strength" slider introduces major artefacts. Have you tested your changes? |
|
so the blockiness (to some extent) is expected because it uses the lower resolution preview that other parts of the app use for example if you use the twirl addon with a large image it gets blocky. but it should resolve the blockiness after a moment, it should not stay blocky. there shouldn't be any artefacts. yes i did test with a small 800px image a medium 4000px image and a large 8000px image and the only problem i saw was it takes a moment for the 8000px one to resolve after you release the mouse button. but 4000px and smaller worked pretty well to me? i wouldnt purposely post a broken code review, i just thought it might still be too slow |
|
Some images showing the blockiness and artefacts: Sharpness at ~80%, moving he effect strength slider produces artifacts: The crash when moving the sharpness slider a few times with a large image: All 100% reproducible here. Weird that it's working for you... I'm on Haiku Beta5, 64bit. |
|
I rebased from master, and checked out this PR 660 on top of it. I did a "build.sh clean all" to remove all old objects and built from scratch. I still see the issues described above. Not sure how we should proceed here. Maybe we need to find a third person to break the tie... :) ETA: I checked with a nightly, too. |
|
I think if you are the person who usually veriefies the changes then you are the final say. "it works on my machine" is the oldest excuse in software! this isue is very very minor so I probably spent way too much time already on it and there are many other issues I could try to fix instead. i think the risk of breakng is not worth haveing a live slider btw i noticed gaussian blur addons slider also isn't live so maybe it is just a hard problem to solve. thanks for testing it and sorry for wasting time |
1 similar comment
|
I think if you are the person who usually veriefies the changes then you are the final say. "it works on my machine" is the oldest excuse in software! this isue is very very minor so I probably spent way too much time already on it and there are many other issues I could try to fix instead. i think the risk of breakng is not worth haveing a live slider btw i noticed gaussian blur addons slider also isn't live so maybe it is just a hard problem to solve. thanks for testing it and sorry for wasting time |
|
No harm done. I didn't spend too much time on it, at least. :) |
|
I assume @korli's question was to HiCamino, though I just want to point out that my issues are not with speed, but the artifacts, blockage and crash. |
|
Sorry i didn't see this question. I was using a virtualbox vm but my number of cpus is 1. I don't think there is a way to choose a different slower cpu in virtualbox unfortunatley. |












One last try, I hate to giveup so I moved code around in the thread and i use a fast blur from https://blog.ivank.net/fastest-gaussian-blur.html it seems better. 4k is pretty responsive and 8k is a little slow but the slider stays responsive. let me know if it is good enough
Fixes #92