Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd November 2014, 13:02   #1  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
vcmove a plugin for vapoursynth

vcmove is a plugin developed for vapoursynth, by modifying and improving plugins originally developed for avisynth. This plugin moves pixels as per requirement. Useful for correcting certain distortions or tilt or for transitions. The functions included in this are:
Code:
1.Rotate
2.DeBarrel
3.Quad2Rect
4.Rect2Quad
A full description of this plugin is at vcmove
Works for windows. Comments, suggestions are welcome.
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 22nd November 2014, 17:23   #2  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
any plan to share the code?

to try to build for linux

greetings

PS: also vcfreq and vcmod
sl1pkn07 is offline   Reply With Quote
Old 23rd November 2014, 10:55   #3  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
Certainly. I am waiting for a few error reports or comments or suggestions. Then I will tidy up and make the code available. If in the present condition itself I should do that, in a few days it will be done.
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 23rd November 2014, 12:46   #4  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
You'll make 64bit compiles for windows too, right?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 23rd November 2014, 13:20   #5  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
I wish to. In my VC++ compiler some one mentioned that I have to add "windows 64" or I am not sure, whether it will accept. I do wish to know exactly what I need to add.
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 31st March 2016, 09:44   #6  |  Link
Efenstor
Registered User
 
Join Date: Aug 2008
Location: Krasnoyarsk, Russian Federation
Posts: 90
Compiling under Linux

I am struggling to compile vcmove under Linux (x64), but as there's no Makefile I don't know where to start.

P.S.: by the way, vcmohan did not provide a link to the vcmove source code on the site, so I needed to figure it out by analogy with the other links: http://www.avisynth.nl/users/vcmohan.../vcmove_src.7z
Efenstor is offline   Reply With Quote
Old 1st April 2016, 12:15   #7  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
Code:
mv ReformHelper.cpp reformHelper.cpp
gcc -fPIC -shared -std=c++11 vcmove.cpp -o libvcmove.so
Are_ is offline   Reply With Quote
Old 1st April 2016, 12:36   #8  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
Sorry for the missing link. Now it is included.
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 1st April 2016, 18:14   #9  |  Link
Efenstor
Registered User
 
Join Date: Aug 2008
Location: Krasnoyarsk, Russian Federation
Posts: 90
Quote:
Originally Posted by Are_ View Post
Code:
mv ReformHelper.cpp reformHelper.cpp
gcc -fPIC -shared -std=c++11 vcmove.cpp -o libvcmove.so
Thanks a lot!!! And thanks to you, mr. Mohan!
Efenstor is offline   Reply With Quote
Old 6th April 2016, 20:26   #10  |  Link
Efenstor
Registered User
 
Join Date: Aug 2008
Location: Krasnoyarsk, Russian Federation
Posts: 90
Banding

DeBarrel produces weird banding artifacts, which are most noticeable on the sky. For a test, I have debarrelled a simple white clip (see the attachment). I had implemented Lanczos interpolation many years ago when I was into programming, and remember that the code included some "equalization" technique, without which the image contained somewhat noticable "pits". I wonder may it be the case with vcmove? No equalization I mean. Please, can you fix this, as barrel correction may be the main reason I has gotten into the VapourSynth stuff.
Attached Images
 
Efenstor is offline   Reply With Quote
Old 6th April 2016, 20:33   #11  |  Link
Efenstor
Registered User
 
Join Date: Aug 2008
Location: Krasnoyarsk, Russian Federation
Posts: 90
I've remembered! When I did my coding, I didn't implement Lanczos from scratch, but instead adopted and modified the image resize function from ImageMagick. Can this be of any help?

Last edited by Efenstor; 6th April 2016 at 20:45.
Efenstor is offline   Reply With Quote
Old 8th April 2016, 07:15   #12  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
Thanks for pointing out. While the formulation for avisynth was integer maths, for vapoursynth I had to change it to floating point. I have now included some checks in the Lanczos interpolation and uploaded. I still see even though much reduced a greenish hue when I use white blank clip. Please check it. I will try with bicubic or use integers float hybrid to make it better. May take a few days.
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 8th April 2016, 15:22   #13  |  Link
Efenstor
Registered User
 
Join Date: Aug 2008
Location: Krasnoyarsk, Russian Federation
Posts: 90
Quote:
Originally Posted by vcmohan View Post
Thanks for pointing out. While the formulation for avisynth was integer maths, for vapoursynth I had to change it to floating point. I have now included some checks in the Lanczos interpolation and uploaded. I still see even though much reduced a greenish hue when I use white blank clip. Please check it. I will try with bicubic or use integers float hybrid to make it better. May take a few days.
Thank you! But I still see the moiré pattern. Interestingly enough, I don't see any greenish hue you mentioned, and analysing a screenshot in Gimp shows that the RGB values are identical (although all lesser than 255,255,255).

Here is my test script, in case you need it:
Code:
import vapoursynth as vs
core = vs.get_core()

clip = core.std.BlankClip(width=1920, height=1080, length=100, color=(255,255,255))
clip = core.vcmove.DeBarrel(clip=clip, a=0.005, b=0.009, c=0.085)
clip = core.resize.Bilinear(clip=clip, format=vs.YUV420P8, matrix_s="709")
clip.set_output()

Last edited by Efenstor; 8th April 2016 at 15:25.
Efenstor is offline   Reply With Quote
Old 8th April 2016, 15:36   #14  |  Link
Efenstor
Registered User
 
Join Date: Aug 2008
Location: Krasnoyarsk, Russian Federation
Posts: 90
I have just checked: there is the greenish cast indeed, but only in the YUV444 colorspace. In RGB24 it's all okay.
Efenstor is offline   Reply With Quote
Old 9th April 2016, 13:31   #15  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
I have modified code. Hopefully it should work now. Please check the new update.
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 9th April 2016, 16:28   #16  |  Link
Efenstor
Registered User
 
Join Date: Aug 2008
Location: Krasnoyarsk, Russian Federation
Posts: 90
Quote:
Originally Posted by vcmohan View Post
I have modified code. Hopefully it should work now. Please check the new update.
That's it: no moiree, no greenish cast! It's all cool now!
Efenstor is offline   Reply With Quote
Old 10th April 2016, 05:47   #17  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
Made a very small change. May not be visible in results most of the time. But uses a better approximation. Sorry for trouble. But pl use the newest.
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 12th April 2016, 15:03   #18  |  Link
Efenstor
Registered User
 
Join Date: Aug 2008
Location: Krasnoyarsk, Russian Federation
Posts: 90
Quote:
Originally Posted by vcmohan View Post
Made a very small change. May not be visible in results most of the time. But uses a better approximation. Sorry for trouble. But pl use the newest.
Trouble??? Every little line of useful code added to the world of libre software is worth more than gold.
Efenstor is offline   Reply With Quote
Old 21st April 2017, 14:36   #19  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
Hi.

the sources on http://www.avisynth.nl/users/vcmohan.../vcmove_src.7z is changes/updates recently? the SHA256 of the older file downloaded in 09-04-2016 and the new file downloaded today is different

Code:
┌─┤[$]|[sl1pkn07]|[sL1pKn07]|[~/aplicaciones/vapoursynth-plugin-vcmove]|
└───╼  ls *7z*
-rw-r--r-- 1 sl1pkn07 users 23017 abr 21 15:31 vcmove-src.7z
-rw-r--r-- 1 sl1pkn07 users 22858 abr  9  2016 vcmove-src.7z.
┌─┤[$]|[sl1pkn07]|[sL1pKn07]|[~/aplicaciones/vapoursynth-plugin-vcmove]|
└───╼  sha256sums *7z*
bash: sha256sums: no se encontró la orden
┌─┤[$]|[sl1pkn07]|[sL1pKn07]|[~/aplicaciones/vapoursynth-plugin-vcmove]|
└───╼  sha256sum *7z*
18d99e51d0d2ebf12274a23c92977ee11e1427dded1875390709e8203c7af0ec  vcmove-src.7z
63c425d67a839c8993a6e52a778b6bfe42c38cb4ad472fbab3e8661a90d3b8ef  vcmove-src.7z.

greetings
__________________
[AUR] Vapoursynth Stuff
[AUR] Avisynth Stuff
sl1pkn07 is offline   Reply With Quote
Old 21st April 2017, 14:51   #20  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
Somewhat:

Code:
$ for i in $(ls -1); do echo $i && diff $i ../vcmove_src/$i ; done
Clamp.h
11c11,12
<       return val < min ? min : val > max - 0.5f ?  max : val;
---
>       val += 0.5f;
>       return val < min ? min : val > max  ?  max : val;
CubicIntCoeff.cpp
CubicIntCoeff.h
LaQuantileInterpolate.cpp
LanczosCoefficients.cpp
LinearIntCoeff.cpp
ReformHelper.cpp
UnitSq2Quad_matrix.cpp
VSHelper.h
VapourSynth.h
moveDeBarrel.cpp
moveQuad2Rect.cpp
moveRect2Quad.cpp
moveRotate.cpp
vcmove.cpp
Are_ is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.