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. |
![]() |
#1 | Link |
Registered User
Join Date: Jan 2006
Posts: 1,862
|
New Plugin: Decomet 0.4
Name: Decomet
Version: 0.4 Author: jmac698 Description: An Avisynth C plugin to reduce the appearance of black streaks and white lines, also called dropouts. Works by selecting the clean pixels from two separate recordings of the video. Usage: decomet(clip1, clip2), where the clips are separate recordings of the same video. The videos must be edited to the same start point and stay in sync. http://www.sendspace.com/file/aetchs |
![]() |
![]() |
![]() |
#2 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,571
|
A source, a source, my kingdom for a source.
EDIT: Post the source & I'll see if I can do a quick convert to CPP interface, without changing any of the active code. Of course, I dont speak C interface, but I'll give it a bash. Dont worry about the source being in an unkempt state, we is all messy sometimes.
__________________
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; 10th November 2011 at 20:57. |
![]() |
![]() |
![]() |
#3 | Link |
Registered User
Join Date: Jan 2006
Posts: 1,862
|
Really? Your whole kingdom?
Code:
if (aY1>=BThresh && aY1<=WThresh && bY1>=BThresh && bY1<=WThresh) { dest_data[x] = (aY1 + bY1) / 2; // if both in safe range repl w avg(a,b) dest_data[x+1] = (aU + bU) / 2; dest_data[x+3] = (aV + bV) / 2; } else { dest_data[x] = aY1; // else don't change dest_data[x+1] = aU; dest_data[x+3] = aV; } if (aY2>=BThresh && aY2<=WThresh && bY2>=BThresh && bY2<=WThresh) { dest_data[x+2] = (aY2 + bY2) / 2; // if both in safe range repl w avg(a,b) dest_data[x+1] = (aU + bU) / 2; dest_data[x+3] = (aV + bV) / 2; } else { dest_data[x+1] = aU; dest_data[x+2] = aY2; dest_data[x+3] = aV; } if (aY1>=WThresh && bY1<aY1 && bY1>BThresh) { // if a is white, take b if darker (but not black) dest_data[x] = bY1; // Take b luma dest_data[x+1] = bU; // ... and chroma dest_data[x+3] = bV; } if (aY2>=WThresh && bY2<aY2 && bY1>BThresh) { dest_data[x+1] = bU; dest_data[x+2] = bY2; dest_data[x+3] = bV; } // color of b is taken if any Y were replaced if (aY1<=BThresh && bY1>aY1 && bY1<WThresh) { // if a is black, take b if lighter (but not white) dest_data[x] = bY1; dest_data[x+1] = bU; dest_data[x+3] = bV; } if (aY2<=BThresh && bY2>aY2 && bY2<WThresh) { dest_data[x+1] = bU; dest_data[x+2] = bY2; dest_data[x+3] = bV; } |
![]() |
![]() |
![]() |
#4 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,571
|
Really, my entire kindom and all sub dominions.
OK, thought it might be an easier way of doing the C->CPP thing if you already new what it was supposed to do.
__________________
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 ??? |
![]() |
![]() |
![]() |
#6 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,571
|
Oh, you missed the EDIT:, when you do post source, give us a PM if I dont get back to you within a couple
of days and I'll do the convert. It should hopefully be easy for a simplish plug. I got so far into converting AVSInpaint() to CPP, but that is really not too easy to understand, the interface is embedded within the active code and is hard to figure out what should be extracted. I shall go back to it sometime. If you can, keep the active code departmentalized from the interface, twould make it easier for me. EDIT you could also PM me a source link if you were unwilling to publish.
__________________
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; 10th November 2011 at 21:41. |
![]() |
![]() |
![]() |
#8 | Link |
Registered User
Join Date: Jan 2006
Posts: 1,862
|
Hi Cherbette!
The Decomet plugin is meant for the difficult case of only 2 passes. If you are willing to take the time to make 3 passes, you can use the median technique instead. I haven't tried passes from different VCR's, but I know that in the case of one tape, there was the least noise on just one of the VCR's, so I didn't really have much choice. Based on the way the comets always appear in different places, I don't see any advantage to using different VCR's. |
![]() |
![]() |
![]() |
#9 | Link |
Registered User
Join Date: Nov 2011
Posts: 23
|
What is the median technique and which would you recommend? I can send you a screencap if you'd like of the video in question...it's really strange the comets seem to disappear when I pause the video but all three VCR's I've played it on have comets active during playback.
|
![]() |
![]() |
![]() |
#11 | Link |
Registered User
Join Date: Jan 2006
Posts: 1,862
|
oh! that's a real pain. Digital decay is a serious problem these days, there's rare plugins you can hardly find anymore.
For help in identifying your problem, please view http://forum.videohelp.com/threads/3...omets-dropouts That contains an example and description of the types of comet noise I've run into. You can post your screenshot also if you like, I'm happy to compare how it looks for others. The median technique has been covered a few times, let me search a link. |
![]() |
![]() |
![]() |
#12 | Link |
Registered User
Join Date: Jan 2006
Posts: 1,862
|
Here's a thread about it
http://forum.videohelp.com/threads/3...87#post2146687 |
![]() |
![]() |
![]() |
#13 | Link |
Registered User
Join Date: Jan 2006
Posts: 1,862
|
see under new plugins & utilities
http://forum.doom9.org/showthread.ph...76#post1582976 Updated link. |
![]() |
![]() |
![]() |
#14 | Link | ||
Registered User
Join Date: Sep 2016
Posts: 9
|
I'm trying to get decomet to work here and am struggling with the script. I don't have any knowledge about that, so I already expected the script to not work:-)
This is what I try as a script: Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#15 | Link | |||
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,611
|
Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#16 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,571
|
I dont know how you are getting past the LoadPlugin/LoadCPlugin lines, you need a '\' between "C:\Program Files\AviSynth\Plugins-to-load" and plug name.
(just add it to end of the "C:\Program Files\AviSynth\Plugins-to-load\" line.)
__________________
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 ??? |
![]() |
![]() |
![]() |
#17 | Link |
Registered User
Join Date: Jan 2006
Posts: 1,862
|
Agreed. Also, the demo script I included, creates an artificial sample of the problem, then shows the plugin removing it. To use it practically, load your two clips and call decomet.
Code:
avisynth_install_dir="C:\Program Files\AviSynth\Plugins-to-load\" plugin1_fn="avisynth_c.dll" Cplugin1_fn="Decomet.dll" LoadPlugin(avisynth_install_dir+plugin1_fn) LoadCPlugin(avisynth_install_dir+Cplugin1_fn) clip1=AVISource("myvideo1.avi").AssumeTFF() clip2=AVISource("myvideo2.avi").AssumeTFF() decomet(clip1, clip2) I lost all my sources long ago, but the snippet I posted is enough to recreate it. It's still a useful plugin, as there's still none like it. I can probably program C++ now btw, since technically I've learned Python, Java, Objective-C and Swift by now ![]() Last edited by jmac698; 21st July 2017 at 07:52. |
![]() |
![]() |
![]() |
#18 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,571
|
Quote:
__________________
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 ??? |
|
![]() |
![]() |
![]() |
#20 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,571
|
Quote:
![]() Think I mixed up DeComet and DeMosaic (de-Bayer) when thinking of what source I had, here DeMosaic. (original C and CPP mod, with source):- http://www.mediafire.com/file/4cii55...emosaicCPP.zip EDIT: And DeMosaic thread:- https://forum.doom9.org/showthread.p...light=demosaic EDIT: I dont think that you ever published or supplied to me the full DeComet source. Some posted alternatives to DeComet here:- http://forum.doom9.org/showthread.ph...et#post1800999 here Decomet alternatives, DeClick (DGraft) and DePulse/DepulseC(with source):- http://www.mediafire.com/file/e56wv9...9eu/DeStuff.7z EDIT: The above Destuff.7z uses recent-ish version of 7Zip and may not decompress with some versions of WinZip/WinRar. EDIT: Always amazes me to see color coming out of BW image Code:
#LoadPlugin("DemosaicCPP.dll") # Standard CPP plugin, can go in Plugins dir ImageSource("image.jpg") ConvertToYV12() o=Last DemosaicCPP(xoffset = 1, yoffset = 0, method = "bilinear") #DemosaicCPP(xoffset = 1, yoffset = 0, method = "nearest") RGBAdjust(r=1.0, g=1.1, b=1.8, a=1.0, rb=0.0, gb=0.0, bb=0.0, ab=0.0, rg=1.00, gg=1.00, bg=1.00, ag=1.00, analyze=false) Return StackVertical(o.ConvertToRGB32.Sub("Source"),Last.Sub("DeMosaic")) Function Sub(clip c,string tit){ S="Subtitle(String(current_frame,"+Chr(34)+"%.f] "+tit+Chr(34)+"))"StackVertical(c.BlankClip(height=20).ScriptClip(S),c) } ![]() EDIT: BW image contained in DeMosaic zip file.
__________________
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 July 2017 at 01:12. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|