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. |
26th February 2010, 22:36 | #1 | Link |
Registered User
Join Date: Aug 2009
Posts: 28
|
Dup Filter for Avisynth
I recently found the dup filter here
http://neuron2.net/dup/dupnew.html But it does not seem to compare the target frame with the reference frame. It seems to compare the frame with itself. On the information it says: Dupe 2.3 Copyright 2003-2007 Donald Graft/Klaus Post frm 25: diff from frm 25 = 0.00% using frm 25 I am using direct show to import a MP4. and then running the dup command. There are no other filters in my chain. Am I miss'in something easy? I am using avisynth 2.5 Last edited by iMaiden; 26th February 2010 at 22:38. |
26th February 2010, 23:03 | #3 | Link |
Registered User
Join Date: Aug 2009
Posts: 28
|
loadplugin("Z:\LIBRARY\avisynth\directshowsource.dll")
loadplugin("Z:\LIBRARY\avisynth\dup.dll") DirectShowSource("z:\little_boy\og\MVI_8193.mp4") dup(threshold=.1,show=true,blksize=8,blend=true,chroma=true,maxcopies=20) converttorgb32(matrix="PC.709") ImageWriter("z:\little_boy\8193\fin",type="tif") |
28th February 2010, 07:20 | #4 | Link | |
Registered User
Join Date: Nov 2009
Posts: 2,352
|
Can I post here? I detected something is wrong with the dup filter. I found some incompatibility with tempgauss, I cant even preview in avsp, with the new Didee's modification. With beta1u it was failing at encode time. Besides dup.dll there is any other filters or routines it uses that can conflict with tempgauss's?
Quote:
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 4th March 2010 at 11:42. |
|
4th March 2010, 11:30 | #7 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Quote:
Does it still crash?
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
4th March 2010, 11:39 | #8 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,352
|
upss sorry, I didnt edit it was an old post, its solved now. But related to it right now Im processing srestore and dup as setmtmode(5), I dont know which way is better, but dup being an old filter made sense to me.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
6th November 2014, 03:24 | #9 | Link |
Registered User
Join Date: May 2010
Location: The Netherlands
Posts: 4
|
Updated Dup log, increased sensitivity for low contrast motion
As a reply to iMaiden, the one initiating this post, (I know it is ancient), i dared updating the dup v2.30 into dup1 v2.32.
Function name and dll are now called Dup1 so one can easily compare results in stackhorizontal of both Dup 2.30 and Dup1 2.32. With the original 2.30 i had difficulties preventing blend when small portion of the video showed motion in low contrast areas (e.g. moving clouds out of a window), unless one would set the threshold so low (<1%) that correct duplicates would not be detected. After few days testing I feel that this in the new v2.32 is solved. Now a Threshold around 1.5 served me good for BlkSize=32 and a good quality anime @ 640x480. Also, the debug (show) interface was not too helpful, it had a couple of fixes (see below). Changes (2014-11-11) - Show metric (when show=true) also when reading the first frame outside a set of duplicates (instead of diff from x to x = 0) - Skip border blocks in worst block metric calculation, they are more noisy - Added a simple motion metric to denoise decisions > old_metric = SumAbsDiff[] = Sum(Abs(Diff)) : more sensitive to high contrast any motion, less sensitive in low contrast motion, more noisy > lc_motion_metric = abs(SumSigDiff[]) = Abs(Sum(Diff)) : more sensitive to large motion in low contrast, less noisy (pos and neg noise cancels out) > new metric = 32/BLKSIZE * (old_metric/2 + lc_motion_metric): highest_Sum refers to this now - Show Largest sum block in overlay (when show=true), for new metric (much brighter), and old one (little brighter) - settings (personal preference): Dup(threshold =1.50,chroma=false,show =true, copy=true, maxcopies=20, blend=true, blksize=32,debug=false) P.S.: a downsize of v2.32, the new metric is not implemented in isse but just in C, and needs unrolling. Last edited by Max73; 12th November 2014 at 00:12. Reason: more tested, and improved |
6th November 2014, 05:09 | #10 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,685
|
It is strange to bring this particular thread back from the grave. If you are interested in more recent "technology" created for this purpose, I suggest you search for posts by StainlessS, especially in his long RT_Stats thread.
|
14th November 2014, 01:06 | #11 | Link |
Registered User
Join Date: May 2010
Location: The Netherlands
Posts: 4
|
@ johnmeyer,
I see your point, and checked out RT_stats, a lot of stuff there, but did not see there a clear way to blend "almost identical" frames I found that this little "dup filter" does its job pretty well, especially if preceded by stab. I just shared the same frustration of Maiden in setting the parameters right, which motivated me to upload an updated Dup1 (the original is to be found here, which fixed this issue among other changes (see previous post, 6th November, updated the 12th). |
14th November 2014, 01:12 | #12 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
@Max73, a moderator recently posted that the best way to ensure speedy approval of attachment is 'Report' your own post with attachment.
Perhaps its now time to report your post, pending about 8 days now.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
19th November 2015, 21:48 | #17 | Link |
Registered User
Join Date: Jul 2009
Posts: 13
|
Fixed access viloation bugs, updated to 2.6
These access violation bugs were a simple case of using uninitialized variables (a small miracle they did not pop up right away). Fixed two of these and updated to 2.6 api. Compiled in VS 2015.
|
21st December 2020, 13:56 | #18 | Link |
Registered User
Join Date: Mar 2018
Location: Germany
Posts: 200
|
I've got 2 simple question on it:
The filter compares neighboured frames, right? If that's the case: What about the scenario when the frames slowly "shift" away, all neighboured differences low, but the differences to the string's starting frame getting very high? How to handle the scenario? What's the behaviour/ use when copy = false? |
21st December 2020, 21:10 | #19 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,340
|
copy=false means it does not replace with duplicates. It's used for debugging purposes, so you can "see" what is going on with show=true, so you can adjust the settings such as threshold and blksize
Quote:
This filter will not adjust for that differences drift scenario . Not sure if there are any other options |
|
22nd December 2020, 02:58 | #20 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Duplicty2 script function can do what you are referring to, control via LagMax.
https://forum.doom9.org/showthread.p...ght=Duplicity2 Code:
Function Duplicity2(clip c,"Mode"=0,Float "ThG"=1.0,Float "ThB"=ThG*2.0, Int "ThP"=64,Float "IgP"=0.0,Int "ThK"=7, \ Int "MaxDupLen"=9,Int "LagMax"=MaxDupLen,Int "MaxInterp"=Min(9,MaxDupLen), \ int "BlkW"=64,int "BlkH"=BlkW,int "OLapX"=BlkW/2,Int "OLapY=BlkH/2", \ Int "X"=0,Int "Y"=0,Int"W"=0,Int "H"=0,Float "CW"=0.0,Bool "ChromaI"=False,Bool "AltScan"=False, \ Int "SPad"=16, Int "SSharp"=1, Int "SRFilter"=4, [* MSuper *] \ Int "ABlkSize"=16, Int "AOverlap"=4, Int "ASearch"=3,Int "ADct"=0, [* MAnalyse *] \ Int "RBlkSize"=8, Int "ROverlap"=2, Int "RthSAD"=100, [* MRecalculate *] \ Float "Iml"=200.0, Bool "IBlend"=True, Int "IthSCD1"=400, Int "IthSCD2"=130, [* MFlowInter *] \ Int "OthSCD1"=400,Int "OthSCD2"=130, [* Dupe Detect Override @ Scene Change *] \ String "OverRide"="",String "Frames"="Frames.txt",Bool "Ranges"=True,Bool "FrameAsRange"=False, \ Bool "Show"=True,Bool "Verb"=True,Bool "ShowBlk"=True,Bool "Dim"=True,Bool "ShowDot"=False, \ Bool "InterpFast"=True,String "DBase"="" \ ) # ... MaxDupLen, Default 9. Maximum permitted detection length of duplicate run, If detected dupe run exceeds this setting, then it is totally ignored and presumed to be a static scene. LagMax, Default MaxDupLen. Setting to a low number (min 1) will limit the distance of the Anchor frame prior to the current frame, eg setting LagMax=1, would always do LoMo/Dupe compare with the current frame and its predecessor. Maybe best left alone. # ... Can detect eg small eye movement whereas other detector would totally miss it.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 22nd December 2020 at 03:04. |
Thread Tools | Search this Thread |
Display Modes | |
|
|