View Full Version : Use libavfilter in vapoursynth?
yuygfgg
14th October 2024, 08:33
I'm encoding on Apple Silicon Macs. However, KNLMEANSCL and libavfilter's nlmeans_opencl don't work correctly here for some reason. Luckily, libavfilter as a nlmeans_vulkan. Is it possible to use it inside vpys? Or I will have to port the code myself?
Myrsloik
14th October 2024, 09:41
I'm encoding on Apple Silicon Macs. However, KNLMEANSCL and libavfilter's nlmeans_opencl don't work correctly here for some reason. Luckily, libavfilter as a nlmeans_vulkan. Is it possible to use it inside vpys? Or I will have to port the code myself?
You have to port it.
ChaosKing
14th October 2024, 12:46
CPU version of KNLMEANSCL https://github.com/AmusementClub/vs-nlm-ispc
I have no idea if can be compiled for mac or not.
EDIT: I'm blind https://github.com/AmusementClub/vs-nlm-ispc?tab=readme-ov-file#arm
yuygfgg
14th October 2024, 12:55
CPU version of KNLMEANSCL https://github.com/AmusementClub/vs-nlm-ispc
I have no idea if can be compiled for mac or not.
EDIT: I'm blind https://github.com/AmusementClub/vs-nlm-ispc?tab=readme-ov-file#arm
I've used that for a long time. It's good and very fast, but I'm still seeking if I can offload some work from CPU to GPU. Currently the gpu only works for nnedi3cl and eedi3cl.
Z2697
14th October 2024, 19:09
If you are going to port somthing, is a somewhat general interface of libavfilters possible? So most of the FFmpeg's filters can be used...
(Talk about general interfaces I think vs-placebo, then I think perhaps you can use nlmeans shader (https://github.com/AN3223/dotfiles/tree/master/.config/mpv/shaders))
Last time I checked, vs-nlm-ispc got completely "smashed" by the opencl version in terms of speed, is it different in Apple Silicon chips? What performance is it that you would call it "very fast"?
What is the "not work correctly" mean by the way? Is it crashing, or is it have corrupted output frames?
ChaosKing
14th October 2024, 21:59
Performance king would be vs-nlm-cuda, but I don't think cuda is supported on mac?
yuygfgg
15th October 2024, 01:47
If you are going to port somthing, is a somewhat general interface of libavfilters possible? So most of the FFmpeg's filters can be used...
(Talk about general interfaces I think vs-placebo, then I think perhaps you can use nlmeans shader (https://github.com/AN3223/dotfiles/tree/master/.config/mpv/shaders))
Last time I checked, vs-nlm-ispc got completely "smashed" by the opencl version in terms of speed, is it different in Apple Silicon chips? What performance is it that you would call it "very fast"?
What is the "not work correctly" mean by the way? Is it crashing, or is it have corrupted output frames?
nlm_ispc is about 45 fps, it's high performance compared with bm3dcpu(~6fps)
not work correctly means it output broken images.
Z2697
15th October 2024, 10:48
nlm_ispc is about 45 fps, it's high performance compared with bm3dcpu(~6fps)
not work correctly means it output broken images.
Can you elaborate on what parameters is used in that speed comparison, and share a screenshot of the broken output?
yuygfgg
16th October 2024, 02:44
Performance king would be vs-nlm-cuda, but I don't think cuda is supported on mac?
yeah cuda don't support mac. I'm now learning apple's metal, it's like 80% similar with cuda. But it's swift that made it hard to use in vapoursynth plugins.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.