Log in

View Full Version : HAvsFunc


Pages : 1 [2] 3 4 5 6 7 8 9 10 11 12 13

Reel.Deel
3rd July 2014, 22:54
Hmmm, I guess I must of missed that... I guess now the only Avisynth plugin required is DCTFilter?... Cool beans

Mystery Keeper
3rd July 2014, 23:50
Also Deblock. But I tried to replace lutspa with those functions, and it spawns threads like crazy. Right now VirtualDub is running 1581 thread and hanging. My own WIP editor dies quickly after spawning ~700.

Reel.Deel
3rd July 2014, 23:54
Also Deblock.

Of course http://www.smileyvault.com/albums/basic/smileyvault-slaphead.gif (http://www.smileyvault.com/) (how did I forget that?)

HolyWu
4th July 2014, 05:01
Also Deblock. But I tried to replace lutspa with those functions, and it spawns threads like crazy. Right now VirtualDub is running 1581 thread and hanging. My own WIP editor dies quickly after spawning ~700.
Try havsfunc-r7.7z (https://www.mediafire.com/?ynk5rizd26voxf7) and see if it works for you. I didn't give it a heavy test though.


Added the following function: GrainStabilizeMC.
Changed the way to generate block clip instead of using mt_lutspa, which is used in Deblock_QED.
HQDering mod updated to v1.8.
Added sigmoid curves to GammaToLinear/LinearToGamma.
LSFmod's Smode 2 is deleted. Now Smode=1 is Range sharpening, Smode=2 is Nonlinear sharpening (corrected version).
Optimized the way to build LUT of Smode=2 in LSFmod. In previous version std.Expr is used for >8-bit clip and the speed is very slow. Now std.Lut is used for 8~16-bit clip.
Replaced MakeDiff/AddDiff with internal function std.MakeDiff/std.MergeDiff instead of using std.Expr.

Mystery Keeper
4th July 2014, 10:02
Works, but the same way as with mt_lutspa. If I seek all the way to the last frame - I crash. But now I did get an error. "Seek pattern broke d2vsource." -_-
But it does work, so thank you again.

HolyWu
16th August 2014, 15:21
Updated r8.

Changed Deblock_QED to use native plugins. That's it.

Mystery Keeper
16th August 2014, 19:39
Thank you!

YamashitaRen
24th August 2014, 12:29
Thank you!
As a linux user, I greatly appreciate these steps toward a fully native vapoursynth :)

HolyWu
26th August 2014, 14:27
Updated r9.

Added GrainFactory3 function. The default of g?str is adjusted to a saner value as the default in the original is way too overkill. Besides, g?tex parameter is removed.

HolyWu
23rd September 2014, 16:22
Updated r10.

Changed QTGMC and some other functions to use native filters of MVTools.

Mystery Keeper
23rd September 2014, 16:39
Cool! Is it completely native now I thought there were some functions unported yet.

HolyWu
23rd September 2014, 16:51
Of course not. Only filters that listed at https://github.com/dubhater/vapoursynth-mvtools/blob/v1.1/readme.rst get changed.

Mystery Keeper
24th September 2014, 10:30
Can you please give a link for r9 too? So far VS MVTools is buggy, and QTGMC crashes even though I'm not using DCT.

HolyWu
24th September 2014, 13:48
No problem. First post is updated. It may be helpful to let jackoneill know what preset or arguments you specified to make it crash. I just let it run on a 1920x1080 clip about 10000 frames with all default values and don't encounter crash. The average speed is roughly at 5.0 fps.

lansing
25th September 2014, 03:10
I tried the new version with native mvtools added, on my 720x480 video, qtgmc(preset="medium"),

vapoursynth 32bit: 94fps
vapoursynth 64bit: 94fps

avisynth mt mvtools: 125fps


Updated the result for Vapoursynth 64 bit version, kind of disappointed. I was expecting it to be much faster.

HolyWu
10th October 2014, 08:48
Updated r11.

The mvtools-related filters used in QTGMC and ivtc_txt60mc are all native now.

Because QTGMC's SVThin and Lossless modes require rgvs.VerticalCleaner, I also include RemoveGrainVS.dll in the archive so you don't have to wait for the next release of VapourSynth.

Myrsloik
4th November 2014, 09:13
Why do we have to do?

import havsfunc
...
haf = havsfunc.HAvsFunc()
...
clip = haf.QTGMC(clip, Preset='Medium', TFF=True)

Wouldn't it make more sense to remove the HAvsFunc class that effectively does nothing so we can do:

import havsfunc as haf
...
clip = haf.QTGMC(clip, Preset='Medium', TFF=True)

HolyWu
4th November 2014, 15:23
You are right. The class was used to let users pass the core instance to the module before VapourSynth R19. Since the core now uses a singleton pattern, the class becomes redundant. I just didn't think of doing the modifications though...

HolyWu
25th December 2014, 17:30
Update r12.


The class is ditched so you can reduce one line in your script.
Add function Vinverse2.
Delete function InterFrame.
DeHalo_alpha: Remove the color family restriction of input clip.
HQDeringmod: Remove the color family restriction of input clip. Remove dering kernel 'dfttest' and related parameters. Remove stack16 related parameters.
QTGMC: Remove EdiMode 'nnedi2', 'nnedi', 'eedi2' and 'tdeint'.
Vinverse: Remove the color family restriction of input clip.
GSMC: Use native filters of MVTools. Remove lsb parameter.
SMDegrain: Use native filters of MVTools. Remove stack16 related parameters. Change prefilter=3 to MinBlur(3).
FastLineDarkenMOD: Remove the color family restriction of input clip.
LSFmod: Remove the color family restriction of input clip. Change the type of parameter 'preblur' from string to bool.

jackoneill
25th December 2014, 19:58
Is your vinverse different from the one in the VapourSynth source tree?

Reel.Deel
25th December 2014, 20:36
Vinverse2 is a modified version of Vinverse used as a helper this dot crawl removal script. (http://forum.doom9.org/showpost.php?p=1584186&postcount=62) tp7 also included a fast implementation in his Vinverse plugin. (https://github.com/tp7/vinverse)


Edit: oops, I completely misunderstood jackoneill's question. I honestly thought he asked about vinverse2. The eggnog must of been a little stronger this year ;)

feisty2
26th December 2014, 05:10
edit: okay, it's wrong, just tried and the result is completely different from mdegrain
I thought something from here (http://forum.doom9.org/showthread.php?t=156770&highlight=mdegrain9) could be useful
any luck with mcompensate + templinearappoximate to imitate "mdegrain (lsb=true)" ?

HolyWu
26th December 2014, 15:13
Is your vinverse different from the one in the VapourSynth source tree?
I think the only difference is high bitdepth support.

MonoS
28th December 2014, 22:16
I've also ported a avs script to vs, if you want you can add it to your collection [so that as much script will be available in only one place].
The original script is here http://recensubshq.forumfree.it/?t=64839203
The code is here: https://github.com/MonoS/VS-MaskDetail
The thread is here: http://forum.doom9.org/showthread.php?t=171546

lansing
17th January 2015, 01:33
Hi, I'm getting an error while using deblock_qed.

No attribute with the name dct exists. Did you mistype a plugin namespace

ret = haf.Deblock_QED(ret, quant1=40, quant2=24)

I'm using the latest Vapousynth, mvtools and deblock plugin.

Are_
17th January 2015, 01:50
dctfilter (http://forum.doom9.org/showthread.php?t=171039)

Next time you can search for the missing dll here (http://www.vapoursynth.com/doc/pluginlist.html).

lansing
17th January 2015, 02:00
thanks, it works now

Mystery Keeper
31st January 2015, 13:02
MVTools now support up to 16 bits and other formats. Functions need to be fixed to add that support too.

HolyWu
2nd February 2015, 16:44
Update r13.


Remove the format restriction of the following functions: QTGMC, GSMC, SMDegrain.
SMDegrain: Use sbr for prefilter instead of MinBlur.

zerowalker
4th February 2015, 06:54
SMDegrain acts a bit different compared to the Avisynth version on the same settings.
Is there some Default settings that are different?

SMDegrain(tr=2,thSAD=500,search=3)

That's what i tested and compared with.

HolyWu
4th February 2015, 16:27
SMDegrain acts a bit different compared to the Avisynth version on the same settings.
Is there some Default settings that are different?

Nope. The only big difference should be the prefilter setting which has been changed to use sbr for prefiltering. The others should be quite the same.

Test the core mvtools part first on your own to check whether the issue comes from mvtools itself. Here are equivalent settings for AVS and VS respectively.


super = MSuper(rfilter=4)
bv2 = MAnalyse(super, isb=true, delta=2, overlap=4, search=3, truemotion=false)
bv1 = MAnalyse(super, isb=true, delta=1, overlap=4, search=3, truemotion=false)
fv1 = MAnalyse(super, isb=false, delta=1, overlap=4, search=3, truemotion=false)
fv2 = MAnalyse(super, isb=false, delta=2, overlap=4, search=3, truemotion=false)
output = MDegrain2(super, bv1, fv1, bv2, fv2, thSAD=500, thSADC=250)



super = core.mv.Super(clip, rfilter=4)
bv2 = core.mv.Analyse(super, isb=True, delta=2, overlap=4, search=3, truemotion=False)
bv1 = core.mv.Analyse(super, isb=True, delta=1, overlap=4, search=3, truemotion=False)
fv1 = core.mv.Analyse(super, isb=False, delta=1, overlap=4, search=3, truemotion=False)
fv2 = core.mv.Analyse(super, isb=False, delta=2, overlap=4, search=3, truemotion=False)
output = core.mv.Degrain2(clip, super, bv1, fv1, bv2, fv2, thsad=500, thsadc=250)

zerowalker
4th February 2015, 22:00
Tested, it looks a bit different.
It's like the image is pushed up 1 line in some places VapourSynth (in a stretched way).

Does yours look identical?

zerowalker
13th February 2015, 12:55
So what am i supposed to do?
They looked different, is it supposed to, i mean it doesn't use the prefilter as far as i can tell, if rfilter isn't that of course? (isn't Prefilter when you add an already filtered imaged and use it as some kind of layer or something).

Reel.Deel
13th February 2015, 13:20
(isn't Prefilter when you add an already filtered imaged and use it as some kind of layer or something).

A prefiltered clip is usually used in order to try to get better motion analysis; gather motion vectors from the prefiltered clip and then use those vectors on the original clip.

feisty2
13th February 2015, 13:53
prefilter is a special filter used only on vector search clip
when you do the motion compensation (mv.compensate/degrain/...), vectors are required to move blocks from predicted frames to the current reference frame
the point is, you don't have to get vectors from the clip you are performing compensation
like, you can get vectors from a spatial denoised version of the source clip so you can reduce the local SAD value
that's pretty much it

zerowalker
13th February 2015, 17:53
So how come my results look different between them if i don't use a prefiltered source to do the vector thing?
I am missing something here, shouldn't they be identical?

jackoneill
13th February 2015, 18:55
So how come my results look different between them if i don't use a prefiltered source to do the vector thing?
I am missing something here, shouldn't they be identical?

Not 100% identical, no. There are some very small differences in the output of Super, which I haven't bothered to investigate. The small differences in Super propagate to every other filter in MVTools. However, I don't think these particular differences are visible in the output of Degrain, so it must be something else. Please show some screenshots (original image, filtered with Avisynth MVTools, filtered with VapourSynth MVTools). Maybe we should take this to the MVTools thread (http://forum.doom9.org/showthread.php?t=171207&page=6).

Tarutaru
26th February 2015, 14:38
Hi, QTGMC won't start and throw this error
$ vspipe Untitled.vpy -
Segmentation fault (core dumped)

and I got this in dmesg
traps: vspipe[17476] general protection ip:7f1b98e4d6cd sp:7f1b8e384c30 error:0 in libgenericfilters.so[7f1b98e48000+10000]

Is there something wrong with the genericfilters or some other problem? Thanks!
(OS - Linuxmint 17.1 x64)

Script -
import vapoursynth as vs
import havsfunc as haf
core = vs.get_core()
core.std.LoadPlugin('/usr/lib/x86_64-linux-gnu/libffms2.so.3')
ret = core.ffms2.Source(source='foo.bar')
ret = haf.QTGMC(ret, Preset='Medium', TFF=True)
ret.set_output()

Tarutaru
26th February 2015, 15:04
Solved by using Myrsloik's fork.
Thanks!!

Hi, QTGMC won't start and throw this error

and I got this in dmesg


Is there something wrong with the genericfilters or some other problem? Thanks!
(OS - Linuxmint 17.1 x64)

Script -

HolyWu
15th March 2015, 17:16
Update r14.


Add functions SigmoidInverse and SigmoidDirect from Dither package.
Remove the bitdepth restriction of ediaa function.
For functions that use mvtools, now internally apply DitherLumaRebuild to the clip when it's being fed to 'mv.Super' (for the final 'mv.Analyse' only). s0=1 is always used.
QTGMC: Use native filter of FFT3DFilter for noise processing if selected.

HolyWu
20th March 2015, 07:40
Update r15.


HQDeringmod: When invoking generic.Sobel, mthr was not properly scaled with the bitdepth of input clip.
QTGMC: When invoking TemporalSoften, thresholds and scenechange were not properly scaled with the bitdepth of input clip.

Pat357
21st March 2015, 00:14
Update r15.


HQDeringmod: When invoking generic.Sobel, mthr was not properly scaled with the bitdepth of input clip.
QTGMC: When invoking TemporalSoften, thresholds and scenechange were not properly scaled with the bitdepth of input clip.


Would you consider adding MCBob to HAvsFunc ?
Info & code about MCBob : http://avisynth.nl/index.php/MCBob .

For me the script is really to complicated to rewrite it myself ; otherwise I would have done it already.

Thanks !

HolyWu
21st March 2015, 04:34
Would you consider adding MCBob to HAvsFunc ?
Info & code about MCBob : http://avisynth.nl/index.php/MCBob .

For me the script is really to complicated to rewrite it myself ; otherwise I would have done it already.

Thanks !

I don't know, probably no. Isn't MCBob superseded by TempGaussMC which is considered to be more stable?

HolyWu
29th March 2015, 06:07
Update r16.


Add functions logoNR and SmoothLevels.
maa: Use native filter of SangNomMod. Expose 'aa' and 'aac' parameters.
SharpAAMCmod: Use native filter of SangNomMod if selected.
ivtc_txt60mc: Fix misusing of DitherLumaRebuild.
SMDegrain: Update to v3.0d.
Cosmetic changes.

MonoS
2nd April 2015, 18:59
I think there's a little bug into QTGMC.

When using InputType 2-3 at line 1013 got passed to mv.Mask a 16bit clip, but the plugin require a 8bit clip
Solved dithering srchClip like so [i mostly use 16bit QTGMC so i'm fine with this change]
inputTypeBlend = core.fmtc.bitdepth(core.mv.Mask(core.fmtc.bitdepth(srchClip, bits=8), bVec1, kind=1, ml=ProgSADMask), bits=16)

There's another instance in the code of mv.Mask, but wasn't triggered by my script

HolyWu
3rd April 2015, 03:18
It looks like jackoneill forgot to update mv.Mask to support 16 bits as well. :D

jeremy33
14th May 2015, 14:19
Hello,

I try to use LSFMod but I have this error "Erreur de segmentation" (Segfault)
If I try clip = haf.QTGMC(clip, Preset='Medium', TFF=True) I have this error "Exception en point flottant" (Floating point exception)

What's the problem ?

Thank you

djcj
14th May 2015, 15:34
What license is HAvsFunc?

HolyWu
14th May 2015, 16:32
Hello,

I try to use LSFMod but I have this error "Erreur de segmentation" (Segfault)
If I try clip = haf.QTGMC(clip, Preset='Medium', TFF=True) I have this error "Exception en point flottant" (Floating point exception)

What's the problem ?

Thank you

Sorry, I can't reproduce it on both 32 and 64 bits. What version of Python and VapourSynth did you install? Did you use vspipe to test your script? Normally you should get a traceback pointing out the code at which line caused the exception.

What license is HAvsFunc?

No license, just like most of the AVS scripts.

jeremy33
14th May 2015, 17:32
Sorry, I can't reproduce it on both 32 and 64 bits. What version of Python and VapourSynth did you install? Did you use vspipe to test your script? Normally you should get a traceback pointing out the code at which line caused the exception.
I'm on Netrunner 14 x64 (Ubuntu 14.04 derivative) and I use Python 3.4.0 and VapourSynth 27.

I use MPV, I also tried with Vspipe, and I only have this error with LSFMod : Segfault