View Full Version : vcm a new plugin with many functions
vcmohan
13th October 2020, 07:24
vcm (http://www.avisynth.nl/users/vcmohan/vcm/vcm.html) is a plugin that has all functions of vcmod, vcmove, vcfreq and vcMisc. A few more functions are also included. During upgradation of functions, some input parameters might have been changed. My plugins index page also reflect this change. In future I intend to update this plugin as and when necessary and keep the older plugins unaffected. The links to them however will not be in my index page.
Those functions that work in frequency domain need libfftw3f-3 dll in the path. It is dynamically linked so other functions that work in spatial domain need not have this dll.
I have a few days back added a new function ColorBox that gives an output similar to that of colorbars of avisynth. The output will be any YUV color (excepting half float) format.
I remember to have posted a thread about this plugin, but I fail to see it in search. So posted this again.
StainlessS
13th October 2020, 10:57
vcmohan,
Perhaps this post a few days back (not thread):- https://forum.doom9.org/showthread.php?p=1925351#post1925351
I have added a new function ColorBox to this vcm plugin.
It outputs boxes of colors in all YUV formats (except YUV444PH). The frames are output for 100 sec at fps 24. May be useful as colorbars of avisynth.
Perhaps you could not find due to searching for a thread.
Anyways, this is google search I used (D9 search would probably also work searching "vcm ", user "vcmohan", Posts.
Note below, "vcm " ===== "vcm" + SPACE.
GOOGLE:- "vcm " NEAR "vcmohan" site:forum.doom9.org
https://www.google.co.uk/search?ei=Z3eFX_L6Ksel1fAP14Sz0AI&q=%22vcm+%22+NEAR+%22vcmohan%22+site%3Aforum.doom9.org&oq=%22vcm+%22+NEAR+%22vcmohan%22+site%3Aforum.doom9.org&gs_lcp=CgZwc3ktYWIQA1CyVljZwQFg5MQBaABwAHgAgAGUAYgBiw2SAQM3LjmYAQCgAQGqAQdnd3Mtd2l6wAEB&sclient=psy-ab&ved=0ahUKEwiyyujJpLHsAhXHUhUIHVfCDCoQ4dUDCAw&uact=5
EDIT: D9 search on Thread Title ONLY containing "vcm" and posted by user "vcmohan",
finds only this thread and the link at top of this post.
To view all threads started by vcmohan, go to his Profile Page, click on Statistics.
Click "Find all threads started by vcmohan".
EDIT: I cant really post a link to "Find all threads started by vcmohan" as searches expire after a time
(maybe about 30 minutes or 1 hour), and so link will no longer work.
ChaosKing
13th October 2020, 11:10
You can also show all post by a user. Click on your nick and then on "Find More Posts by vcmohan"
sl1pkn07
17th October 2020, 23:01
fail build on linux
https://gist.github.com/sl1pkn07/859235f9726ccb6100ecfe1bbf391a42
greetings
vcmohan
24th December 2020, 07:20
I have added two new functions f2qBokeh that operates in frequency domain and bokeh that is in spatial domain. I understand that "bokeh" means to blur in Japanese. Many smart phones have this setting with camera.
A big difference between pics taken of birds, flowers or animals with high end cameras by seasoned photographers and taken by rest of us lies how the background appears vis-a-vis the object. Great pics have the background blurred beyond recognition in shapes similar to shape of Iris of camera, whereas ordinary pics show background with enough detail , though slightly blurred, to detract attention.
With a view to blur background more keeping in focus pic undisturbed these two functions are designed to operate. The metric used to discriminate in focus and out of focus parts are different in these two functions. Size of grid used and threshold play a key part in getting an acceptable result and so some experimentation using frameEval is required.
I have not yet posted the source code as I invite comments for improvement. As it is in my mind there are a couple of issues to be addressed. A link to a display of processed image (http://www.avisynth.nl/users/vcmohan/manyPlus/f2qbokeh0.png)
. Top left is input, right is heavily blurred image, bottom left is F2QBokeh output, Right has difference between input and output. This was obtained using avisynth+ platform but similar results can be expected on vapoursynth.
Selur
23rd February 2021, 16:12
Any change to get a version of vcm that is not compiled with dependencies to MSVC C++ 2013?
(first I used an old vcmod.dll from 2016, but even http://www.avisynth.nl/users/vcmohan/vcm/vcm.7z from this year requires that old MSVC,...)
Ideally a static build or a runtime that comes with Windows 10 by default?
Cu Selur
vcmohan
3rd March 2021, 13:41
Any change to get a version of vcm that is not compiled with dependencies to MSVC C++ 2013?
(first I used an old vcmod.dll from 2016, but even http://www.avisynth.nl/users/vcmohan/vcm/vcm.7z from this year requires that old MSVC,...)
Ideally a static build or a runtime that comes with Windows 10 by default?
Cu Selur
Sorry for it. I am using 2019 VC++. But it appears it goes to previous version as I recompile. May be I need to have afresh create a new project somewhere else and compile?
pinterf
3rd March 2021, 14:06
Platform Toolset set to "Visual Studio 2019 (v142)" should be enough, in Project Configuration|General
vcmohan
4th March 2021, 07:33
Thanks. I have changed that already and uploaded new version .
Selur
6th March 2021, 07:33
looks fine thanks ! :)
vcmohan
22nd April 2021, 12:48
Added a function StepFilter. This removes HorizontalBars seen in some VHS tape conversions. While frequency domain versions f1quiver and f2quiver may yield better results for removal of such noise, this function is simpler to use. Some blurring may occur.
vcmohan
29th May 2021, 08:35
All frequency domain functions were revised and new functions F1QClean and F2QLimit were added. The first charecter of names of all functions are changed to upper case, so as to conform to the Vapoursynth convention.
Bug reports and suggestions are very much welcome.
Thanks, I find especially the frequency domain functions very interesting as I recently discovered they can be used for creating masks. You also have many other interesting plugins like Neural. I'd love to see more examples on how they can be used.
vcmohan
30th May 2021, 13:32
Thanks for the kind words. I would love to put examples for each function but that takes lot of space. I have limited space on my page.
About Neural, I am also disappointed at not being able to use. Possibly video processing is not linear maths only. In fact I have two more neural functions, but did not include them as I could not find any place they can be used.
I would love to put examples for each function but that takes lot of space. I have limited space on my page.
I see. What kind of arrangement do you have? Could you get more space? Disk space is cheap these days so it shouldn't be a problem to have a little more for these valuable contributions.
If that's not possible you could always host your images on free image hosts. I personally use https://postimages.org/. Of course they are not as reliable in principle but at least my images have stayed there for years.
vcmohan
31st May 2021, 08:09
My web page is graciously being hosted by avisynth for over a decade I was allotted 100mb. I did not ask for more. May be I will some time soon. Thanks for the link. The site probably shows some ads. It may be against the policy of this forum. I need to check.
ChaosKing
31st May 2021, 09:32
You could also use github as a "hoster". Github pages (limit is 1GB) are static sites too. Everything is free.
You only need very basic knowlage of git + there are many guis for that. In addition you can also host your source code there, make relases and people can contribute more easily to your filter.
If you don't want to use github and still need more space I would happily give you some GB on vsdb.top with a subdomain of your choice.
vcmohan
31st May 2021, 12:40
Thanks for the suggestion. I will explore Github. I thought it hosts only code and not html and images.
ChaosKing
31st May 2021, 13:11
https://avs-plus.net is for example a Github Page (with a custom domain). The domain stuff is optional.
vcmohan
31st May 2021, 14:35
Thanks. But it looks I will not be able to keep images on the GITHUB. Images require more memory than the code. I find I am at 82mb used out of 100mb space. Only thing I can think of now is to delete all images from avisynth 5 and 6+ versions and use the released space for avisynth+ and vapoursynth versions. In the tutorial on the GITHUB, it was stated that only text is allowed. Clearly images are out.
ChaosKing
31st May 2021, 14:38
Images are allowed! I can send you an example / small tut later.
ChaosKing
31st May 2021, 15:01
Look here is your html code + a image on github: https://thechaoscoder.github.io/pagestest/
Image url https://thechaoscoder.github.io/pagestest/unnamed.png
I added a branch "homepage". You just choose this branch in your github repo settings and github will use it as the root folder to serve html pages. Repo: https://github.com/theChaosCoder/pagestest/tree/homepage
I will upload a short video later on how to do it.
EDIT
You could also stay on avisynth.nl but host only the images on github. Basically what zorr suggested with an external img hoster.
Thanks for the link. The site probably shows some ads. It may be against the policy of this forum. I need to check.
You can link to the images without any ads. For example if you look at the first post in this thread (https://forum.doom9.org/showthread.php?t=176076) the images are all hosted on postimages.org.
And like Chaos said Github is also an option. But you just need to figure out what works best for you.
ChaosKing
4th June 2021, 10:35
Took a bit longer but here's a quick how to setup github pages.
https://www.dropbox.com/s/q6ue2r2p8bhpkge/gitpage.mp4?dl=0
or direct download link https://www.dropbox.com/s/q6ue2r2p8bhpkge/gitpage.mp4?dl=1
* The "myhomepage" branch is optional, you could also just use "main".
* I just found out you can even drag and drop a folder with all your images in the upload box thingy!
* There a some good and free git GUIs like "GitHub Desktop" where you can clone, pull and push with just a mouse click.
Editing in ScreenToGif is not the best experience :D
ReinerSchweinlin
6th July 2021, 21:41
Some PNGs could be reduced in size with some PNG Optimizer - but 100MB eventually will be not enough :)
If you want something traditional, I could give you some space to host stuff - not using it myself, so what better use than to support such fine filters :) I would gladly help you out!
vcmohan
13th July 2021, 14:22
Many thanks. I am examining my page and finding some unnecessary images. I will remove them and optimize rest. many thanks once again.
Selur
17th July 2021, 10:28
@vcmohan: Any hint in how to convert a defish(fov=114,scaling="fitxy") (https://forum.videohelp.com/threads/402482-Which-parameters-to-use-with-FFMPEG-to-rectify-Mars-helicopter-images) in an equivalent vcm.DeBarrel(..) call?
vcmohan
17th July 2021, 13:57
I have not really thought about that. But may be try with a square sized frame and debarrel with relatively higher values for a and b. I am not sure it will work. I will try.
Selur
17th July 2021, 16:10
I will try.
Thanks, I keep my fingers crossed, since I would really prefer to use Vapoursynth with vcm.DeBarrel instead of Avisynth with defish to drop the Avisynth dependency (which would allow me to do this on Linux and MacOS), but I now have spend quite some time and I don't seem to be anywhere near the results I (so easily) got with defish.
Cu Selur
vcmohan
18th July 2021, 12:37
The problem with the input is the center of frame is not the center of the fish eye. Need to correct for that first. As the fish eye looks like a circular photo, the value of c be 0.5 with a and b at zero. Sorry I misguided you. I also added borders on left, top, bottom and right for centering and for accommodating the corrected image. Finally I cropped to be equal to that of the defish_eye image seen in the link.
the script used is
<code>
ret = core.std.AddBorders(ret,left = 100, right = 100, top = 100, bottom = 740)
ret = core.vcm.DeBarrel(ret,abc =[ 0.0, 0.0, 0.5],pin = 0)
ret=core.std.Crop(ret,left = 60, right = 60, top = 40, bottom = 740)
</code>
Selur
18th July 2021, 13:41
Nice! Thanks!
Avisynth with defish(fov=114,scaling="fitxy"):
https://i.ibb.co/FkQVCHV/defish-fox-114-scaling-fitxy.png
DeBarrel:
https://i.ibb.co/DkLbvLC/debarrel.png
Cu Selur
ChaosKing
18th July 2021, 14:07
defish looks extremly cropped, is this normal?
kedautinh12
18th July 2021, 14:13
Can you share me original picture to compare??
Selur
18th July 2021, 14:22
Can you share me original pickture to compare??
Original pic was linked in the thread I linked to, you can download it from https://mars.nasa.gov/mars2020/multimedia/raw-images/RRF_0104_0676180997_659ECM_N0040510RHAZ02002_01_295J
defish looks extremly cropped, is this normal?
Not sure whether it's normal, but since it by default keeps the input resolution it's to be expected to crop quite a bit.
Selur
18th July 2021, 16:38
btw. when using:
defish(fov=114,scaling="fitxy", scale=0.5)
you see why the cropping is so strong:
https://i.ibb.co/ryGz7JG/defish-fox-114-scaling-fitxy-scale-0-5.png
Cu Selur
kedautinh12
22nd July 2021, 11:51
Success to port script to avisynth x64, thank vcmohan very much
zorr
28th July 2021, 20:11
I'm testing vcm.F1QLimit and noticed some oddities.
The max value of span is 99, with bigger values I get error message "F1QLimit: limit percentage value can be 0 to 99". I tested with 1920x1080 source so the max should be 1920/8 = 240.
Documentation states that frequencies should be at least 10 larger than span but on some cases it needs to be 11 larger. For example span=90 and freqs=[100] gives error message "F1QClean: freqs must be between 10 + span and nuquist - span". Changing span to 89 or frequency to 101 makes the error go away.
The max frequency should be 512 - span but if span is even then the correct formula is 512 - span - 1. For example with span 6 the max frequency is 505. Does even span make sense, should it always be odd?
vcmohan
2nd August 2021, 13:27
As my laptop was and still down since last week, I did not see this comment. It looks like the problem is in floating point and integer conversion. I will rectify It as soon as I get either a new battery pack for my laptop or buy a new one(Expensive)
sl1pkn07
29th August 2021, 00:19
Hi seems the latyest source code fail build for me
In file included from vcm.cpp:79:
F2Quiver.cpp:203:10: fatal error: hammingCodeInsert.cpp: No such file or directory
203 | #include "hammingCodeInsert.cpp"
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
greetings
vcmohan
29th August 2021, 13:24
[QUOTE=zorr;1948668]I'm testing vcm.F1QLimit and noticed some oddities.[?QUOTE}
At last I could get most of data into my new laptop. The documentation for these two filters (F1QClean and F1QLimit) are revised. Please check now. Thanks for pointing out the errors. regards.
@sl1pkn07: The missing file is inserted now.
zorr
30th August 2021, 21:02
The documentation for these two filters (F1QClean and F1QLimit) are revised. Please check now. Thanks for pointing out the errors. regards.
Thanks, I'll test them.
sl1pkn07
3rd September 2021, 09:16
hi
now fails with:
vcm.cpp:91:10: fatal error: Mean.cpp: No such file or directory
91 | #include "Mean.cpp"
| ^~~~~~~~~~
compilation terminated.
greetings
vcmohan
4th September 2021, 14:06
hi
now fails with:
vcm.cpp:91:10: fatal error: Mean.cpp: No such file or directory
91 | #include "Mean.cpp"
| ^~~~~~~~~~
compilation terminated.
greetings
Sorry. I included it now. Hope no more misses. I am somewhat overwhelmed with this. I have to seriously learn to use GitHub.
sl1pkn07
5th September 2021, 18:29
sorry vcmohan, but still fails
https://sl1pkn07.wtf/paste/view/raw/e14324ca
greetings
Myrsloik
5th September 2021, 19:22
sorry vcmohan, but still fails
https://sl1pkn07.wtf/paste/view/raw/e14324ca
greetings
Why are you trying to compile windows only code on not windows?
sl1pkn07
5th September 2021, 21:56
then unixDynamicLinkingCodeForFFT.cpp is for?
vcmohan
7th September 2021, 13:45
then unixDynamicLinkingCodeForFFT.cpp is for?
Sorry. It is not required. Long time back tried to convert to Unix. That is a remnant. Please ignore or delete.
vcmohan
11th September 2021, 08:42
I have added two functions to this plugin. 1. CorrectLD and 2. Circles.
CorrectLD is short for correct Lens Distortion. This includes barrel, pincushion , different formula to the DeBarrel, and also fish eye. Fish eye correction can be done with 4 methods viz: Orthoganal, Linear, equisolid and panaromic. Normal images can also be convereted to fish eye images by this function. In test mode dots on original image show the area covered and curvatures. This function takes in 3 parameters diameter, fk and rix. Test mode may be useful to decide upon parameters to use.
Circles just draws circles on image and may be useful to specify center of a circular curvature seen in fish eye images which have been edited.
For the image from mars used in a post above the following code may be tried.
##ret=core.imwri.Read ( r'C:\images\fisheye.jpg')
##ret = core.std.AddBorders(ret,270,270,670,0)
##ret = core.vcm.Circles(ret, dim = 0.5,dots = 1,xo = 870, yo = 1270, fdia = 2800, cint =50)
##ret = core.vcm.CorrectLD(ret, test = 0,dim = 0.5,dots = 2, method = 3,q = 4, fk = 2.804825, rix = 1.25,xo = 870, yo = 1270, fdia = 2800)
##ret = core.vcm.CorrectLD(ret, test = 0,dim = 0.5,dots = 2, method = 4,q = 4, fk = 2.804825, rix = 1.25,xo = 870, yo = 1270, fdia = 2500)
##ret = core.vcm.CorrectLD(ret, test = 0,dim = 0.5,dots = 2, method = 5,q = 4, fk = 2.804825, rix = 1.25,xo = 870, yo = 1270, fdia = 2500)
##ret = core.vcm.CorrectLD(ret, test = 0,dim = 0.5,dots = 2, method = 6,q = 4, fk = 3.04825, rix = 1.25,xo = 870, yo = 1270, fdia = 2500)
Request feed back on features or bugs.
@selur may look into. I have some reservation in why should a horizontal horizon be strived at? It should remain circular I think.
Selur
17th September 2021, 13:54
Thanks new function seems to work fine.
I think the horizontal horizont is simply something one would expect when looking at a horizont.
vcmohan
17th September 2021, 14:07
If one sees all around the horizontal horizon should be all around so must be circular. From a paper from Pune University I read a scheme to make the circle fit into a rectangle. Possibly it has made the change in deFish fitxy. I will try a different procedure and check. Will take some time.
zorr
18th September 2021, 00:07
The documentation for these two filters (F1QClean and F1QLimit) are revised. Please check now.
Still testing these but it's already clear that the latest version gives different results, was that intentional?
Also a small documentation error, minimum allowed span seems to be 3 and not 5. :)
vcmohan
20th September 2021, 14:09
Still testing these but it's already clear that the latest version gives different results, was that intentional? Different in what way? If you run F1Quiver test prior and after to applying these filters you will notice the the changes in freq spectra. If the results are not as expected please inform me. I am forgetting things and do not recall what other changes I might have made.
Also a small documentation error, minimum allowed span seems to be 3 and not 5. :) I will correct it next upload. Thanks for pointing out. I was debating whether to use 3 or 5 as minimum.
zorr
25th September 2021, 18:30
If you run F1Quiver test prior and after to applying these filters you will notice the the changes in freq spectra.
Thanks, is there a way to only show the test display (test=1) without any processing? That would be needed to show before and after differences of F1QLimit. Argument filter is compulsory and cannot be an empty array, also I wasn't able to find a combination of filter settings which don't do any changes.
vcmohan
27th September 2021, 13:50
I probably did not understand clearly. One can compare the unprocessed input and processed output by using StackHorizontal(input, output) If I remember correct in F1Quiver test in test mode custom filter 0,100,512,100 should not do any filtering.
zorr
27th September 2021, 22:36
I probably did not understand clearly. One can compare the unprocessed input and processed output by using StackHorizontal(input, output) If I remember correct in F1Quiver test in test mode custom filter 0,100,512,100 should not do any filtering.
You understood correctly, I needed the filter settings which don't touch the output. However your example doesn't work, there's an error message "F1Quiver: degree the sharpness value of filter pair should be 1 to 12 only". I tried changing the last parameter (the sharpness) to 1 and 12 but the resulting filter does changes in both cases.
By the way I'm testing if there are any changes with
video2 = core.vcm.F1Quiver(video, filter=[0,100,512,1], test=0)
diff = core.std.MakeDiff(video, video2, planes=0)
diff = core.std.Expr(clips=[diff], expr=f"x 128 = 0 255 ?")
diff.set_output()
which will display white where video2 is not identical to video and black where it is.
vcmohan
29th September 2021, 13:56
try with
video2 = core.vcm.F1Quiver(video, filter=[10,100,50,100], test=0, custom = 1)
It will propagate values back and forward. Essentially there should be no filtering. However as all values are converted into floating point and back there can be round off errors and should be minor.
zorr
2nd October 2021, 22:29
try with
video2 = core.vcm.F1Quiver(video, filter=[10,100,50,100], test=0, custom = 1)
Thanks, it works.
So I made a comparison of F1QLimit versions, the settings used were
core.vcm.F1QLimit(video, limit=80, span=7, freqs=[29])
Below you can see the original frame, F1QLimit dated 2021-05-31 and the latest version dated 2021-09-13. It looks like they manipulate the same frequencies but the older version has a much stronger effect.
https://i.postimg.cc/2SCjh66Z/f1quiver-comparison.gif
MysteryX
3rd October 2021, 01:04
Just ran some benchmark on my script.
Script evaluation done in 10.57 seconds
Output 30 frames in 29.24 seconds (1.03 fps)
Filtername Filter mode Time (%) Time (s)
Median parallel 504.36 147.47
Analyse parallel 48.44 14.16
Analyse parallel 47.72 13.95
Analyse parallel 47.69 13.94
Analyse parallel 47.49 13.88
Analyse parallel 46.58 13.62
Analyse parallel 45.95 13.44
KNLMeansCL parreq 43.67 12.77
I'm not happy. vcm.Median is a prefilter to a prefilter to a prefilter, before doing MDegrain analysis. What would be a MUCH faster alternative? Plain Convolution matrix?
Edit: this actually gives me better results than Median
std.Convolution(matrix=[1, 2, 1, 2, 4, 2, 1, 2, 1])
vcmohan
4th October 2021, 13:47
Just ran some benchmark on my script.
Filtername Filter mode Time (%) Time (s)
Median parallel 504.36 147.47
I'm not happy. vcm.Median is a prefilter to a prefilter to a prefilter, before doing MDegrain analysis. What would be a MUCH faster alternative?
[/code]
As mentioned in the description of vcm.Median
starting value of grid is 3 i.e. 3x3 pixels.
Compute max, min and median of the grid
1. if median is more than minimum and less than maximium:-
if the grid center value is greater than minimum and less than maximum,the value is not changed
Otherwise center value of grid is replaced by median.
2 else:-
if grid size is less than maxgrid, it is increased to next step and process repeated.
Otherwise center value is unchanged.
As per theory
Quote "Ordinary median filters perform well as long as the spatial density of impulsive noise is small. Adaptive Median filter can handle impulsive noise having larger probability. An additional benefit is this seeks to preserve detail while smoothing non impulse noise something that the traditional median filter does not do.
The algorithm described has three purposes.
1.To remove salt and pepper (impulse) noise.
2.To smooth other noise which may not be impulsive
3.To reduce distortion such as excessive thinning or thickening of object boundaries.
" unquote
It will be slow depending on the type and intensity of noise present.
I will look into the code again and see if I can improve speed.
MysteryX
4th October 2021, 16:31
Thanks, it helps to know what it's supposed to do to put it at the right place.
With 4K/5K videos, I actually have that problem where the noise is only removed locally (stabilized) but larger visible grain patterns are very hard to address.
You could test with this short 5K clip (https://drive.google.com/file/d/1SL-n7pzLZShcg0D9sCYsGrMntKh7J3J3/view?usp=sharing)
Here's another one with more severe noise (https://drive.google.com/file/d/1vo1ntJlTqWG2uhxiXqOsvqikIgEgJzHF/view?usp=sharing)
With Median at the start of the denoising on the first clip, I'm seeing a slight improvement with Median(maxgrid=9)... but not really with maxgrid=5. Could be useful if it wasn't such a performance pit.
vcmohan
5th October 2021, 14:02
I am using the C++ algorithm in place std:sort to get median. May be I need to use an assembly version? I am not at all conversant with assembler coding, though I started my coding career in 1970 with an assembler on a 16 bit machine. The 9X9 grid size limit was set arbitrarily. I can increase if required, but the performance will further deteriorate, I am afraid.
MysteryX
5th October 2021, 16:23
I am using the C++ algorithm in place std:sort to get median. May be I need to use an assembly version? I am not at all conversant with assembler coding, though I started my coding career in 1970 with an assembler on a 16 bit machine. The 9X9 grid size limit was set arbitrarily. I can increase if required, but the performance will further deteriorate, I am afraid.
Same -- I can write code in C++, but can't do assembly version.
Video processing without assembly optimization, however, can't scale at all. It needs to process packs of 32 values with a single command to scale up. Not sure if all tasks can be optimized in such a way.
Assembly takes a long time to learn. The best is to have someone proficient with assembly to look at it.
There are 3 types of coders in the community
1. Scripters (who know how to use and match all the filters)
2. Coders (who can write C++ plugins)
3. Assembly guys (who can write assembly)
Both of us are #2... very few #3 out there.
MysteryX
5th October 2021, 17:14
I tried it on 5K clip with various grid sizes. With maxgrid=9, there's a definite softening of large-scale noise without noticeable degradation of image clarity. Not much with grid 7 or 5.
Could you give me a version with the limit removed so that I can test what level gives optimal results? In case performance gets optimized.
Performance-wise, simple Median runs at 4fps with maxgrix=5 and 2.9fps with maxgrid=9. Bad, but not huge difference.
Yomiko
5th October 2021, 23:16
There are constant-time median filters fyr
https://github.com/HomeOfVapourSynthEvolution/VapourSynth-CTMF
https://github.com/4re/vapoursynth-cmedian
MysteryX
6th October 2021, 02:39
There are constant-time median filters fyr
https://github.com/HomeOfVapourSynthEvolution/VapourSynth-CTMF
https://github.com/4re/vapoursynth-cmedian
This gives a very strong blur effect. Not the same thing at all.
Running Median(maxgrid=9) before the denoising chain does give a very tiny improvement overall -- just not worth the performance cost. I wonder if maxgrid of 11 or 13 would give more improvement.
vcmohan
6th October 2021, 14:10
The best is to have someone proficient with assembly to look at it.
When I started coding in C++ for avisynth 2.5 years back, I was encouraged to post my source code with the idea that some kind soul may improve performance by changes as well as catch bugs. Users of course catch bugs, but thats it.
MysteryX
6th October 2021, 19:27
Ya. My experience with Open Source, nobody touches anything of it either. But one kind soul did go through some of my code to add some assembly optimization.
sl1pkn07
7th October 2021, 16:00
the hope never lose
https://github.com/AmusementClub/vcm
this guys include linux support :D
greetings
vcmohan
8th October 2021, 14:02
Thanks for the link. Never knew that this was happening.
MysteryX
8th October 2021, 15:14
He could have done a pull request; or you can merge back his changes manually.
btw if you had Avisynth plugins before, why aren't you developing your new plugins to be compatible in both VapourSynth and Avisynth? It's not harder to make it cross-platform compatible. In fact it helps with clearer separation between engine-management and actual processing code.
vcmohan
11th October 2021, 14:11
He could have done a pull request; or you can merge back his changes manually.
btw if you had Avisynth plugins before, why aren't you developing your new plugins to be compatible in both VapourSynth and Avisynth? It's not harder to make it cross-platform compatible. In fact it helps with clearer separation between engine-management and actual processing code. Is this for me ?
In avisynth, I need to code specially for compat formats. The 'new' call is allowed. Also I need not specially free unused frames. In error messages I can format. All this makes difference apart from various other calls. I usually code for avisynth+, debug using ThrowError and then recode for vapoursynth. Many times I get new ideas during conversion and go back and forth. Its a bit drudgery to remember all calls and requirements of each platform but possibly worth it. I do not want to use too many compiler instructions #if and #endif to keep my sanity. Otherwise vapoursynth I beleive, can load avisynth plugins direct. I like some aspects in each of the platforms.
MysteryX
11th October 2021, 15:09
Look at the way I did it here. (https://github.com/mysteryx93/FrameRateConverter/tree/master/Src) I created a "Environments" folder that I can copy/paste into new project that handles all these discrepancies. Common folder contains shared code logic. Then the Avisynth and VapourSynth code branches are very simple.
vcmohan
12th October 2021, 14:44
I am not using GITHUB. When I first tried to register for it it wanted two stage identification for which it appears I need to install some other app. Microsoft app , as I understood, once I install it will require for every other authentication like my bank or gmail, wants to do two stage authentification. I am putoff by this.
You are using some unix app diff to add or remove some lines in the common code folder. As I am on windows 10 I do not have that facility.
This is what I understood. Please correct me if I am wrong.
MysteryX
12th October 2021, 17:14
Dunno what you're talking about... I'm using Visual Studio in Windows 10, and don't have 2-factor authentication on GitHub.
ChaosKing
12th October 2021, 18:11
I am not using GITHUB. When I first tried to register for it it wanted two stage identification for which it appears I need to install some other app. Microsoft app , as I understood, once I install it will require for every other authentication like my bank or gmail, wants to do two stage authentification. I am putoff by this.
You are using some unix app diff to add or remove some lines in the common code folder. As I am on windows 10 I do not have that facility.
This is what I understood. Please correct me if I am wrong.
You don't need a Microsoft app for that. 2 factor auth is optional.
Winmerge is great tool on windows for file diffs.
Best git gui is GitKraken in my opinion (diff included). It's free for open source repos.
MysteryX
12th October 2021, 20:22
I use TortoiseGit and do everything from Explorer without needing to open an app (mostly pull or commit & push, occasional history).
I'll give GitKraken a try.
vcmohan
13th October 2021, 13:56
OK. Thanks. I will try after a few days as right now I am doing something else. I tried a different method to get median in place of c++ sort. But it turned out 3 times slower. So I gave that up.
DJATOM
13th October 2021, 14:41
I'm also using TortoiseGit for some quick stuff, otherwise git CLI or Sourcetree.
vcmohan
1st November 2021, 13:45
I have rewritten deBarrel function.Now it has 2 methods of correction and fast execution. Fish Eye function has also been redone for efficiency and for all formats of input.
vcmohan
6th November 2021, 08:30
@MysteryX was disappointed at the slow speed of my median function. I have now (I think) speeded it somewhat. As I changed some methods may please check new verion of vcm plugin and check for speed as well as quality. The max grid can be up to 11 now.
If it is satisfactory, I will retain it and release new code else I will revert back to older version.
sl1pkn07
13th December 2021, 18:02
Hi. accordig by this, new version have missing sources
https://github.com/AmusementClub/vcm/issues/1
greetings
vcmohan
15th December 2021, 12:30
Sorry for missing files. I have uploaded the two missing files as part of vcm_src. compressed file on to my plugin page. I hope this will be used to update the github
ChaosKing
15th December 2021, 12:55
Thx.
Btw this here is a 1:1 copy of your zip archive (so that vsrepo has a stable download link :D) https://github.com/Vapoursynth-Plugins-Gitify/vcm
And this repo has some patches (mostly for linux I think) https://github.com/AmusementClub/vcm
ChaosKing
9th January 2022, 12:58
Seems like Circles.cpp is missing in vcm_source.7z
../vcm.cpp:82:10: fatal error: Circles.cpp: No such file or directory
82 | #include "Circles.cpp"
| ^~~~~~~~~~~~~
vcmohan
10th January 2022, 13:07
Thanks for pointing out. Uploaded new src zip file.
ChaosKing
14th January 2022, 10:50
Compilation seems still not possible:
https://github.com/AmusementClub/vcm/issues/1#issuecomment-1012727843
- Circles.cpp: missing definition of BGR8_YUV (this is the sole usage of the identifier)
- Fisheye.cpp, FisheyePart.cpp, moveDeBarrel.cpp: missing definitions of setInterpolationScheme and bestOfNineIndex
- FourFoldSymmetricMarking.h: calls to LaQuantile provides 7 arguments, the only known implementation in interpolationMethods.h only requires 6.
- Missing definition for f2qsharpCreate, f2qsharpCreate, and f2qcorrCreate. (likely missing source file?)
vcmohan
14th January 2022, 13:20
Strange. On my PC I am able to compile with same set of files. I have once again uploaded the src zip file to be safe. Are you sure that you are not using older vcm.cpp file?
ChaosKing
14th January 2022, 16:20
I think I made an error, I replaced all files but have not deleted any of the removed files.
ChaosKing
6th February 2022, 21:03
There are still problems with the source files. For example where is the function definition for bestOfNineIndex() located?
Fisheye.cpp, FisheyePart.cpp and moveDeBarrel.cpp are calling this function but I can't find it in the source zip.
Is this the correct link for the source? http://www.avisynth.nl/users/vcmohan/vcm/vcm_src.7z
vcmohan
9th February 2022, 12:24
Its in the InterpolationMethods.h. I find the updated src zip file was having the old version of this. I updated it now. Sorry, it seems I am giving you endless problems. The way I organized the file structure on my computer probably is not optimum.
ChaosKing
9th February 2022, 13:33
We are getting closer 2/4 fixed (I hope) :D
- Circles.cpp: missing definition of BGR8_YUV (this is the sole usage of the identifier)
- [x] Fisheye.cpp, FisheyePart.cpp, moveDeBarrel.cpp: missing definitions of setInterpolationScheme and bestOfNineIndex
- [x] FourFoldSymmetricMarking.h: calls to LaQuantile provides 7 arguments, the only known implementation in interpolationMethods.h only requires 6.
- Missing definition for f2qsharpCreate, f2qsharpCreate, and f2qcorrCreate. (likely missing source file?)
Could you check also for BGR8_YUV() and f2qsharpCreate, f2qsharpCreate, and f2qcorrCreate
vcmohan
10th February 2022, 13:15
Hopefully all issues resolve in this new upload. Many thanks for your patience.
ChaosKing
11th February 2022, 09:30
Thank you for the update, but I still have some work for you :D
LaQuantile function defined in https://github.com/Vapoursynth-Plugins-Gitify/vcm/blob/3c99e8736092d8dea440114d8e8b3f66562bb9d2/interpolationMethods.h#L56
requires 7 parameters,
but some callers only pass 6 arguments: https://github.com/Vapoursynth-Plugins-Gitify/vcm/blob/3c99e8736092d8dea440114d8e8b3f66562bb9d2/FisheyePart.cpp#L331
https://github.com/Vapoursynth-Plugins-Gitify/vcm/blob/3c99e8736092d8dea440114d8e8b3f66562bb9d2/vcm.cpp#L137
references undefined function f2qblurCreate.
vcmohan
11th February 2022, 12:51
May be the new update done today will solve the problems. I found two files were old and needed new versions. Hopeful now.
ChaosKing
10th March 2022, 11:37
Just wanted to report that it compiles again! :thanks:
https://github.com/AmusementClub/vcm/actions
vcmohan
10th March 2022, 12:56
thanks. relieved.
Julek
30th March 2022, 15:58
I'm having problems with Amp:
https://github.com/AmusementClub/vcm/issues/3
vcmohan
31st March 2022, 13:54
Thanks for pointing out. The bug was caused by a typo. Please check the uploaded newer version.
Efenstor
11th May 2023, 15:43
@vcmohan: Thank you so much for supporting these plugins, after all these years! They are truly irreplaceable and can do magic in the right hands.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.