View Full Version : Deflicker
GMJCZP
4th August 2017, 00:41
OK, so Didee intent along with Masking Theory and RPN, shall remain a mystery to us both.
Using Mt_Polish in XP compatible MaskTools is much easier, and the awkwardness of keep having to switch probably means I'll mostly stick with Fizick version.
I guess we need someone with good eyes to figure out which of the Didee numbers produces best results.
That's why I do not like black boxes, sooner or later I'll take a look at this monster called Masktools. That is why I developed Khameleon.
StainlessS
4th August 2017, 01:08
I have no problems with KillerSpots. It works fine. The pic results from using Small_Deflicker.
Oops, guess I retrieved the script function name from corrupt memory cells (guess my flip flops went all floppy), I meant Small_Deflicker.
I was going to have a play with it and though that I would try figure out where the greenery originated,
looks like plugin chroma problems, perhaps due to erroneous settings as suggested by GMJCZP in post #50.
EDIT:
GMJCZP,
Your AdjustMOD(value,factor) function is exactly same as value/factor*factor.
Round value down to next lower multiple of factor, when value is not an exact multiple of factor.
In your usage AdjustMOD(width(o) /4,16) is exact same as width(o)/4/16*16 OR width(o)/(4*16)*16
Round value down to next lower multiple of factor ALWAYS
(value-1)/factor*factor
To round up, to the next higher multiple of factor, when value is not an exact multiple of factor.
(value+factor-1)/factor*factor.
To round up, to the next higher multiple of factor, ALWAYS.
(value+factor)/factor*factor
To round to nearest multiple of factor.
(value+factor/2)/factor*factor)
Maybe you like to make some black boxes :)
EDIT:
I seem to have missed out round down, [think it was already discussed, and so I missed it out]
value/factor*factor.
GMJCZP
4th August 2017, 02:07
Maybe you like to make some black boxes :)
No. I know that the function rounds to the lowest value because I am the father of that creature. I did so because after all it does not matter if you take the closest value, the lowest or the highest value, the result should not vary. I just wanted that small clip to be mod 16. ;-)
Thanks anyway for clarifying this, I will take it for the future.
StainlessS
4th August 2017, 02:36
Why particularly mod 16 ? [your lucky number, perhaps]
GMJCZP
4th August 2017, 02:51
The culprit is BlindPP. That is written in the script in the part of the requirements.
StainlessS
4th August 2017, 03:10
Thanks, did not know anything bout that.
EDIT:
written in the script in the part of the requirements
Yep, now I've spotted it.
GMJCZP
4th August 2017, 03:24
If the video of manono is black and white maybe explain the green band, we will wait for your response.
Edit: now that I remember, I tried small_deflicker on an anime video to black and white with no problems. Anyway the information is not bad.
StainlessS
4th August 2017, 03:34
It dont look quite black and white to me.
I'm currently in process of using VDUB MSU Old Cinema to add flickering and shimmering to a DVD clip (Cabaret sequence),
gonna run it through several times chopping off a prime number of frames from beginning (idea that it adds flicker in different
positions each time), and I think I'll do 3 or four iteration on clip, and then try your function on it.
Not though changing it to Black and white.
GMJCZP
4th August 2017, 03:41
The reason why the video is black and white is because I remembered this episode where you participated:
Here (https://forum.doom9.org/showthread.php?p=1699768#post1699768)
What do you think?
StainlessS
4th August 2017, 04:27
I just did quick test on Small_Deflicker on 1st generation MSU Old Cinema flickering, did not do very good, pretty much same as input.
Ran same through original Didee (packaged a bit) and got rid of pretty much all flickering.
Function Fn(clip c) {
o = c
sm = o.bicubicresize(o.width/16*4,o.height/16*4) # can be altered, but ~25% of original resolution seems reasonable
smm = sm.temporalsoften(1,32,255,24,2).merge(sm,0.25)
smm = smm.temporalsoften(2,12,255,20,2)
o2 = o.mt_makediff(mt_makediff(sm,smm,U=3,V=3).bicubicresize(width(o),height(o),0,0),U=3,V=3)
o2
}
EDIT: I did however see no greenery via Small_Deflicker, perhaps masktools version problem.
manono
4th August 2017, 04:37
Are you using the latest version of Masktools2?
No, something from 2005.
manono, is your video black and white? mmm...
No, it's a color film. I'll enclose another pic. Sometimes that color band is purpley looking, but most often green.
https://s3.postimg.org/wpjkv44yb/Artifact2.jpg (https://postimg.org/image/qolvy1ibz/)
Edit: I saw the StainlessS post after I posted. I tried that Fn he included. No more green and, as he also thought, the flickering is pretty much gone. For this particular source the flickering is mild. I've seen much worse. But, on quick comparison it's much much better now.
GMJCZP
4th August 2017, 06:27
New settings for Small_Deflicker (https://forum.doom9.org/showthread.php?p=1812060#post1812060):
- Adjusted the values of temporalsoften to those of kurish, reason why the force has increased.
- The ghosting effect is now mitigated (repair mode).
- Additional requirement: RGTools.
GMJCZP
4th August 2017, 06:34
manono, last version of Masktools2. (https://github.com/pinterf/masktools/releases/)
GMJCZP
4th August 2017, 15:00
Small_Deflicker 2.0 (https://forum.doom9.org/showthread.php?p=1812060#post1812060):
- Added presets (soft, medium, hard)
- Now the repair mode is optional
- Eliminated the Overlay line (maybe a bug in green screen with u = 2, v = 2 values)
manono
4th August 2017, 21:26
manono, last version of Masktools2. (https://github.com/pinterf/masktools/releases/)
Thank you. But it won't load and asks if maybe I'm missing a library.
"Module not found. Install missing library?"
Is there anything required for it to work that isn't required for older versions?
The new Small_Deflicker does seem to work much better at default settings. Still has the colored bottom part from time to time with the older version of MaskTools2 I've been using.
GMJCZP
4th August 2017, 21:37
1) Download the version of Masktools V2 as I indicated.
2) In the requirements section of the script it says "Requirements: Masktools2, RGTools, DGDecode (small clip must be mod 16)"
DGDecode: Groucho2004 version.
3) If you follow the error message enter here (http://repacks.net/forum/viewtopic.php?t=125) and install "Visual C ++ Runtimes AIO"
StainlessS
4th August 2017, 22:46
manono,
Module not found. Install missing library?
Always handy to have a copy of Dependency Walker around (or Groucho2004 AvsInfo)
http://www.dependencywalker.com/
Point it at dll or Exe and gives info on it including eg MS CPP runtime requirement.
M$ use and distribute it as part of various toolkits.
EDIT:
You may already have an older version, it was supplied as part of M$ Windows Support Tools on W2K and WXP
setup disks, as depends.exe
Depends.exe: Dependency Walker
Overview | Notes | Related Tools Run Depends Run Depends Help
--------------------------------------------------------------------------------
This tool scans any 32-bit or 64-bit Windows module (including .exe, .dll, .ocx, and .sys, among others) and builds a hierarchical tree diagram of all dependent modules. For each module found, it lists all the functions that are exported by that module, and identifies which of those functions are actually being called by other modules. Another view displays the minimum set of required files, along with detailed information about each file including a full path to the file, base address, version numbers, computer type, debug information, and more.
Depends is very useful for troubleshooting system errors related to module load problems. During the module scan, this tool detects dozens of common application problems such as missing modules, invalid modules, import/export mismatches, circular dependency errors, and mismatched computer types of modules.
Depends is useful for developers, testers, system administrators, creators of setup scripts, and anyone else who needs to examine what dependencies are required to make a specific module load successfully.
Depends runs on Windows 95, Windows 98, Windows NT 3.51, Windows NT 4.0, Windows 2000, and Windows XP. It can process any 32-bit or 64-bit Windows modules, including ones designed for Windows CE. It can run as a graphical application or as a console application. New features in version 2.0 include C++ function name undecoration, detection of delay-load and dynamic dependencies, application profiling, user-definable search paths, and the ability to save results to several file formats.
Details on running Depends can be found in Dependency Walker 2.0 Help (Depends.hlp), a separate documentation file.
System Requirements
The following are the system requirements for Depends:
Windows 95, Windows 98, Windows NT 3.51, Windows NT 4.0, Windows 2000, or Windows XP Professional
Files Required
Depends.cnt
Depends.exe
Depends.hlp
Dwinject.dll
EDIT: SUPPORT/TOOLS/ directory on Setup CD.
When you first set it up, suggest you point at dll, and "open With", and find the exe and "Always use" (or whatever its called)
tick box, so that you can just double click a dll and always auto open Dependency Walker.
manono
5th August 2017, 04:27
1) Download the version of Masktools V2 as I indicated.
I did already.
2) In the requirements section of the script it says "Requirements: Masktools2, RGTools, DGDecode (small clip must be mod 16)"
I have them already. Anyway, the message is about MaskTools2.
DGDecode: Groucho2004 version.
I'm not changing out my perfectly good version of DGDecode for a different one. It has no bearing on the MaskTools2 problem anyway.
3) If you follow the error message enter here and install "Visual C ++ Runtimes AIO"
This is what I thought would fix it, but nothing. The problem persists.
All these deflicker filters suck anyway because they rely on temporal cleaners and create ghosting during movement. I don't know why an AviSynth deflicker filter hasn't been created that averages the luma over a user-chosen number of frames, with some sort of scene change detection. Easy for me to say, right?
Anyway, thanks for trying.
GMJCZP
5th August 2017, 17:26
Small_Deflicker 2.1 (https://forum.doom9.org/showthread.php?p=1812060#post1812060):
- Added experimental option "cnr" for mitigate the side effects of the script (additional requirement: cnr2).
Groucho2004
7th August 2017, 18:06
Thank you. But it won't load and asks if maybe I'm missing a library.
"Module not found. Install missing library?"
Is there anything required for it to work that isn't required for older versions?Run AVSMeter with the switch "-avsinfo", it will tell you if any dependencies are missing for the plugins in your auto-load directory.
kedautinh12
25th May 2021, 06:12
Asd-g releases vs-cnr2 fork from vapoursynth-cnr2 can support HBD, can you replace cnr2 to vs-cnr2 with different parameters??
https://github.com/Asd-g/AviSynth-vsCnr2
Reel.Deel
25th May 2021, 07:15
Asd-g releases vs-cnr2 fork from vapoursynth-cnr2 can support HBD, can you replace cnr2 to vs-cnr2 with different parameters??
https://github.com/Asd-g/AviSynth-vsCnr2
Aside from the function name difference, all of the parameters are the same except for vsCnr2 does not have the "log" parameter. And the script in this thread that uses Cnr2 does not use that parameter so just switching the name to vsCnr should work. But there are other things in the script that are 8-bit only.
GMJCZP
25th May 2021, 11:57
There is a problem, BlindPP only works in YUY2 and YV12, there are two alternatives, either DG (videoh) modifies DGDecode to operate in HBD or I will have to rethink this.
real.finder
25th May 2021, 12:40
There is a problem, BlindPP only works in YUY2 and YV12, there are two alternatives, either DG (videoh) modifies DGDecode to operate in HBD or I will have to rethink this.
chikuzen try to port it but didn't finish it back then (https://github.com/chikuzen/MPEG2DecPlus/blob/mpeg2decplus/src/dgdecode/BlindPP.cpp), Asd-g 1st said " I would prefer to move BlindPP to a standalone plugin." then after he see the code "I'll not bother with BlindPP." then I asked DG http://rationalqm.us/board/viewtopic.php?f=7&t=1000
so unless pinterf did it, since it's old hard inline asm
GMJCZP
25th May 2021, 14:06
Version 2.2: (https://forum.doom9.org/showthread.php?p=1812060#post1812060)
Now Small_Deflicker operates in HBD (not ideal for BlindPP reconversions, vsCnr2 has been adopted). Feel free to testing.
kedautinh12
25th May 2021, 14:11
Thanks
GMJCZP
31st May 2021, 14:11
Small_Deflicker version 2.3: (https://forum.doom9.org/showthread.php?p=1812060#post1812060)
- Replaced BlindPP by vsMsmooth.
kedautinh12
31st May 2021, 14:13
Thank man
GMJCZP
10th June 2021, 03:36
Small_Deflicker 2.4: (https://forum.doom9.org/showthread.php?p=1812060#post1812060)
- Adjust vsCnr2 value for preset=3.
kedautinh12
10th June 2021, 04:53
Thanks
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.