View Full Version : New Plugin: Decomet 0.4
jmac698
10th November 2011, 20:16
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
StainlessS
10th November 2011, 20:48
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.
jmac698
10th November 2011, 20:59
Really? Your whole kingdom?
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;
}
I'm not releasing the full source now. Really, no one wants to look at it.
StainlessS
10th November 2011, 21:03
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.
jmac698
10th November 2011, 21:09
Oh I see, you'd offer to convert it to CPP? That would be really nice, however wait until I clean it up to the point that I actually do understand it :)
It's only in the barely just got it working stage.
StainlessS
10th November 2011, 21:39
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.
cherbette
8th March 2012, 17:36
Would something like this work best using several different VCR's to make the 2 or 3 different rips to decomet?
jmac698
8th March 2012, 17:52
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.
cherbette
8th March 2012, 18:19
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.
cherbette
8th March 2012, 18:21
Also the sendspace link to the plugin above is no longer active :(
jmac698
8th March 2012, 23:15
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/344270-white-streaks-black-streaks-comets-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.
jmac698
14th March 2012, 02:51
Here's a thread about it
http://forum.videohelp.com/threads/340963-Best-quality-and-speed-video-denoisers-2011?p=2146687#post2146687
jmac698
16th July 2012, 05:32
see under new plugins & utilities
http://forum.doom9.org/showthread.php?p=1582976#post1582976
Updated link.
Busty
19th July 2017, 10:53
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:
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)
clean=colorbars(width=360, height=240, pixel_type="YUY2")#Clean clip
clip1=addcomets(clean)#noisy clip1
clip2=addcomets(clean)#a different noisy clip2
decomet(clip1,clip2)
stackhorizontal(clip1.subtitle("Original 'A'"),clip2.subtitle("Original 'B'"),last.subtitle("Decomet cleaned version"))
function whiteline(clip template) {
template.blankclip(width=template.width/4, height=1,color_yuv=$EB8080)
}
clip1=AVISource("myvideo1.avi").AssumeTFF()
clip2=AVISource("myvideo2.avi").AssumeTFF()
decomet(clip1, clip2)
I get the error
"Avisynth open failure: Script error: there is no function named "addcomets" (C:\Program Files\Avisynth\Plugins\decomet.avs, line 8)
What exactly am I doing wrong here and how would be the right way? Thanks for any help!
Reel.Deel
19th July 2017, 13:58
What exactly am I doing wrong here and how would be the right way? Thanks for any help!
You're calling your clips as functions. Change the folllowing:
clip1=addcomets(clean)#noisy clip1
clip2=addcomets(clean)#a different noisy clip2
to something like
clip1=clean #noisy clip1
clip2=clean #a different noisy clip2
StainlessS
19th July 2017, 22:13
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.)
jmac698
21st July 2017, 07:47
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.
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)
@StainlessS
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 :) Swift is nice, reminds me of Python. I can see why people love Python, it should be the new basic. My favourite language will always be 6502 assembly though.
StainlessS
21st July 2017, 10:17
I lost all my sources long ago
I think I have the CPP version somewhere, I'll also see if I have C and post link to both a little later today.
amayra
21st July 2017, 11:21
there any hope to see Decomet full source code ?
StainlessS
21st July 2017, 13:09
I think I have the CPP version somewhere, I'll also see if I have C and post link to both a little later today.
Sorry, I dont have it :(
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/4cii55zfrcclekz/DemosaicCPP.zip
EDIT: And DeMosaic thread:- https://forum.doom9.org/showthread.php?t=163035&highlight=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.php?p=1800999&highlight=decomet#post1800999
here Decomet alternatives, DeClick (DGraft) and DePulse/DepulseC(with source):- http://www.mediafire.com/file/e56wv9l3bkki9eu/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
#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)
}
https://s20.postimg.org/9d2mes6f1/De_Mosaic.jpg (https://postimg.org/image/tx7gd9m61/)
EDIT: BW image contained in DeMosaic zip file.
johnmeyer
21st July 2017, 16:05
I've had pretty good luck removing dropouts using despot, which I feed with a motion-compensated clip. The only issue is that Despot has 1,001 parameters so tuning it to work with a specific clip can be really tricky, and requires a lot of patience. It doesn't catch 100% of all dropouts (it has problems when a dropout happens on top of an object that is moving fast, from frame-to-frame), but for those it does catch, the repair is virtually undetectable.
StainlessS
21st July 2017, 16:57
Where multi-Despot usage in same script, make sure to only use TSmooth of non zero on last usage only. [EDIT: if at all]
Ie where using different settings for differing sized spots, using TSmooth will do temporal smoothing, and as
DeSpot detect spots in temporal domain, it will prevent further usage where the temporal smoothing has previously occurred.
EDIT: All 1001 parameters were implemented for real particular people like John above, seems he's never happy :)
johnmeyer
21st July 2017, 17:11
EDIT: All 1001 parameters were implemented for real particular people like John above, seems he's never happy :)You got that right.
StainlessS
22nd July 2017, 03:59
I lost all my sources long ago, but the snippet I posted is enough to recreate it.
there any hope to see Decomet full source code ?
OK, here you both go.
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
// DeCometCPP v 0.05
#include <windows.h>
#include "avisynth.h"
class DeCometCPP : public GenericVideoFilter {
PClip child2;
const int wthresh;
const int bThresh;
public:
DeCometCPP(PClip _child,PClip _child2,int _wthresh,int _bThresh,IScriptEnvironment* env)
: GenericVideoFilter(_child), child2(_child2),wthresh(_wthresh),bThresh(_bThresh) {}
~DeCometCPP(){}
PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env);
};
PVideoFrame __stdcall DeCometCPP::GetFrame(int n, IScriptEnvironment* env) {
n = (n<0) ? 0 : (n>= vi.num_frames) ? vi.num_frames - 1 : n; // range limit n
PVideoFrame frame1 = child->GetFrame(n, env);
const int rowsize = frame1->GetRowSize(PLANAR_Y); // PLANAR_Y no effect on YUY2
const int height = frame1->GetHeight(PLANAR_Y);
const int pitch1 = frame1->GetPitch(PLANAR_Y);
const BYTE * srcp1 = frame1->GetReadPtr(PLANAR_Y);
PVideoFrame frame2 = child2->GetFrame(n, env);
const int pitch2 = frame2->GetPitch(PLANAR_Y);
const BYTE * srcp2 = frame2->GetReadPtr(PLANAR_Y);
//
PVideoFrame dst = env->NewVideoFrame(vi);
const int dpitch = dst->GetPitch(PLANAR_Y);
BYTE * dstp = dst->GetWritePtr(PLANAR_Y);
int x,y;
for(y=0;y<height;++y) {
for(x=0;x<rowsize;x+=4) {
const int aY1 = srcp1[x + 0];
const int aU = srcp1[x + 1];
const int aY2 = srcp1[x + 2];
const int aV = srcp1[x + 3];
const int bY1 = srcp2[x + 0];
const int bU = srcp2[x + 1];
const int bY2 = srcp2[x + 2];
const int bV = srcp2[x + 3];
//
if (aY1>=bThresh && aY1<=wthresh && bY1>=bThresh && bY1<=wthresh) {
dstp[x] = (aY1 + bY1) / 2; // if both in safe range repl w avg(a,b)
dstp[x+1] = (aU + bU) / 2;
dstp[x+3] = (aV + bV) / 2;
} else {
dstp[x] = aY1; // else don't change
dstp[x+1] = aU;
dstp[x+3] = aV;
}
if (aY2>=bThresh && aY2<=wthresh && bY2>=bThresh && bY2<=wthresh) {
dstp[x+2] = (aY2 + bY2) / 2; // if both in safe range repl w avg(a,b)
dstp[x+1] = (aU + bU) / 2;
dstp[x+3] = (aV + bV) / 2;
} else {
dstp[x+1] = aU;
dstp[x+2] = aY2;
dstp[x+3] = aV;
}
if (aY1>=wthresh && bY1<aY1 && bY1>bThresh) { // if a is white, take b if darker (but not black)
dstp[x] = bY1; // Take b luma
dstp[x+1] = bU; // ... and chroma
dstp[x+3] = bV;
}
if (aY2>=wthresh && bY2<aY2 && bY1>bThresh) {
dstp[x+1] = bU;
dstp[x+2] = bY2;
dstp[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)
dstp[x] = bY1;
dstp[x+1] = bU;
dstp[x+3] = bV;
}
if (aY2<=bThresh && bY2>aY2 && bY2<wthresh) {
dstp[x+1] = bU;
dstp[x+2] = bY2;
dstp[x+3] = bV;
}
}
srcp1 += pitch1;
srcp2 += pitch2;
dstp += dpitch;
}
//
return dst;
}
AVSValue __cdecl Create_DeCometCPP(AVSValue args, void* user_data, IScriptEnvironment* env) {
PClip child = args[0].AsClip();
PClip child2 = args[1].AsClip();
const int wthresh = args[2].AsInt(235-5);
const int bThresh = args[3].AsInt(16 +5);
const VideoInfo &vi = child->GetVideoInfo();
if(!vi.IsYUY2()) env->ThrowError("DeCometCPP: YUY2 Only");
const VideoInfo &vi2 = child2->GetVideoInfo();
if(!vi.IsSameColorspace(vi2)) env->ThrowError("DeCometCPP: Differing colorspace");
if(vi.width != vi2.width) env->ThrowError("DeCometCPP: Differing width");
if(vi.height != vi2.height) env->ThrowError("DeCometCPP: Differing height");
if(vi.num_frames != vi2.num_frames) env->ThrowError("DeCometCPP: Differing FrameCount");
if(bThresh<0 || bThresh>127) env->ThrowError("DeCometCPP: bThresh 0 -> 127(%d)",bThresh);
if(wthresh<128 || wthresh>255) env->ThrowError("DeCometCPP: wThresh 128 -> 255(%d)",wthresh);
return new DeCometCPP(child,child2,wthresh,bThresh,env);
}
extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit2(IScriptEnvironment* env) {
env->AddFunction("DeCometCPP", "cc[wthresh]i[bThresh]i", Create_DeCometCPP, 0);
return "`DeCometCPP' DeCometCPP plugin"; // A freeform name of the plugin.
}
I've made bThresh=16+5 (21) and wThresh=235-5(230), although not mentioned as args in original docs.
Also, might wanna mention that requires colorspace YUY2.
Tested only insofar that it dont crash and seems to correct the demo avs created comets (tested once only).
I'll leave it to JMac to publish a dll (and perhaps change the thresholds).
Detect logic unchanged.
EDIT: Might be nice to change it to YV24 instead of YUY2 (and leave name at DecometCPP [EDIT: or DeCometYV24] to differentiate from YUY2 version).
GMJCZP
22nd July 2017, 04:09
I have not tried it, but how about this:
Here (https://forum.doom9.org/showthread.php?p=1402690#post1402690) and Here (https://forum.doom9.org/showthread.php?t=165418)
StainlessS
22nd July 2017, 04:29
GMJCZP,
Your second link problem could be fixed via GamMac I think.
(I took the [EDIT: main] problem to be full frame change of colour [fluctuations], I did not examine thread too hard).
GMJCZP
22nd July 2017, 04:37
TinMan: this is the Didée script to remove spots, it's awesome!
The weakness of RemoveDirtMC is in anime scenes with rain, you have to use values less than 6 so that you do not eat raindrops; I did a fast test and I have not even seen a single drop of rain!
Edit: in the Didée script I used the Clense command.
Edit2: I just noticed his first failure to eat a piece of glitter from an object in the rain, but still I find it very good. It's that an anime scene with rain is a nightmare.
StainlessS
23rd July 2017, 16:32
JMac698,
Done a mod called DeCometYV24 (versioned as v0.0), will leave it to you to fiddle with, improve, correct, publish and put in new plugs thread.
Dont lose the source, I may not be keeping it around.
http://www.mediafire.com/file/bthk2lg1rfii5z2/DeCometYV24_dll_v0.01_20170723.zip
EDIT: ~45KB, dll, source, avs test file.
DeCometYV24 v0.01 by jmac698
A standard CPP plugin to reduce dropouts and black lines on analog video
YV24 Only. (May need a ConvertToRGB32 or whatever at end of script if player not YV24 capable, recent MPC-HC Player OK).
Usage: DeCometYV24(clip clip1, clip clip2,int "Blk"=16,int "Wht"=235)
Blk, Default 16, range 0 -> 126.
Wht, Default 235, range 129 -> 255.
EDIT: Gives slight preference to clip1, so use least affected clip for clip1.
The clips should come from two separate recordings of the same video.
It works by throwing out extreme black/white pixels found in one of the videos.
Ensure that the two videos had the same brightness levels and that they are in sync.
Below, result pixel chroma is taken from the chosen clip1 or clip2 pixel, based on luma Y of both pixels.
Anything Blk or lesser is targeted as Blk noise, anything Wht or greater is targeted as White noise.
Internally, the considered safe/legal region is from Blk+1 -> Wht-1, if both clip1 pixel and clip2 pixel
are in the legal region, then result pixel is average of both pixels.
If only one pixel is in the legal region, then that pixel is chosen.
If both pixels are SuperBlack (smaller or equal to Blk), then result will be the higher value of the two.
If both pixels are SuperWhite (greater or equal to Wht), then result will be the lower value of the two.
If one pixel is in Superblack, and other is in SuperWhite, then pixel chosen is based on the pixels above and below
(from the alternate field) of both clips.
The plugin seems to be almost bulletproof compared to original DeComet v0.4, except if there are real comets/glitches
that coincide on the same pixel (either both SuperBlack or SuperWhite, or one of each).
We only choose from one or other pixel, if they are both wrong, we are stuffed :(
(however, a further pass with DePulse might fix any bad result remaining from double glitch).
Source, I've left some debug stuff in but disabled.
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
// DeCometYV24 v 0.01
// *** NOTE *** Blk and Wht are altered for internal use, see Create_DeCometYV24()
#include <windows.h>
#include <stdio.h>
#include "avisynth26.h"
//#define BUG
#ifdef BUG
int dprintf(char* fmt, ...) {
char printString[512]="DeCometYV24: "; // MUST NUL TERM THIS (at least with "")
char *p=printString;
for(;*p++;);
--p; // @ null term
va_list argp;
va_start(argp, fmt);
vsprintf(p, fmt, argp);
va_end(argp);
for(;*p++;);
--p; // @ null term
if(printString == p || p[-1] != '\n') {
p[0]='\n'; // append n/l if not there already
p[1]='\0';
}
OutputDebugString(printString);
return p-printString; // strlen printString
}
#endif
class DeCometYV24 : public GenericVideoFilter {
PClip child2;
const int Blk;
const int Wht;
public:
DeCometYV24(PClip _child,PClip _child2,int _Blk,int _Wht,IScriptEnvironment* env)
: GenericVideoFilter(_child), child2(_child2),Blk(_Blk),Wht(_Wht) {}
~DeCometYV24(){}
PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env);
};
PVideoFrame __stdcall DeCometYV24::GetFrame(int n, IScriptEnvironment* env) {
n = (n<0) ? 0 : (n>= vi.num_frames) ? vi.num_frames - 1 : n; // range limit n
PVideoFrame frame1 = child->GetFrame(n, env);
const int rowsize = frame1->GetRowSize(PLANAR_Y); // PLANAR_Y no effect on YUY2
const int height = frame1->GetHeight(PLANAR_Y);
const int pitch1 = frame1->GetPitch(PLANAR_Y);
const BYTE * srcpY1 = frame1->GetReadPtr(PLANAR_Y);
const BYTE * srcpU1 = frame1->GetReadPtr(PLANAR_U);
const BYTE * srcpV1 = frame1->GetReadPtr(PLANAR_V);
const int pitchUV1 = frame1->GetPitch(PLANAR_U);
//
PVideoFrame frame2 = child2->GetFrame(n, env);
const int pitch2 = frame2->GetPitch(PLANAR_Y);
const BYTE * srcpY2 = frame2->GetReadPtr(PLANAR_Y);
const BYTE * srcpU2 = frame2->GetReadPtr(PLANAR_U);
const BYTE * srcpV2 = frame2->GetReadPtr(PLANAR_V);
const int pitchUV2 = frame2->GetPitch(PLANAR_U);
//
PVideoFrame dst = env->NewVideoFrame(vi);
const int dpitch = dst->GetPitch(PLANAR_Y);
BYTE * dstpY = dst->GetWritePtr(PLANAR_Y);
BYTE * dstpU = dst->GetWritePtr(PLANAR_U);
BYTE * dstpV = dst->GetWritePtr(PLANAR_V);
const int dpitchUV = dst->GetPitch(PLANAR_U);
enum {LEGAL_Y=0,SUPERBLK_Y=1,SUPERWHT_Y=2};
int x,y;
for(y=0;y<height;++y) {
for(x=0;x<rowsize;++x) {
const int Y1 = srcpY1[x];
const int U1 = srcpU1[x];
const int V1 = srcpV1[x];
const int Y2 = srcpY2[x];
const int U2 = srcpU2[x];
const int V2 = srcpV2[x];
//
const int Legal_Y1 = (Y1>Wht) ? SUPERWHT_Y : (Y1<Blk) ? SUPERBLK_Y : LEGAL_Y;
const int Legal_Y2 = (Y2>Wht) ? SUPERWHT_Y : (Y2<Blk) ? SUPERBLK_Y : LEGAL_Y;
#ifdef BUG
bool BUGZ=true;
#endif
//
if(Legal_Y1==LEGAL_Y) { // Y1=Legal
if(Legal_Y2==LEGAL_Y) {
dstpY[x] = (Y1 + Y2) / 2; // Both Legal, replace with average(Y1,Y2)
dstpU[x] = (U1 + U2) / 2;
dstpV[x] = (V1 + V2) / 2;
#ifdef BUG
BUGZ=false;
#endif
} else {
dstpY[x] = Y1; // Y2=Illegal, Use Legal Y1
dstpU[x] = U1;
dstpV[x] = V1;
}
} else if(Legal_Y2==LEGAL_Y) { // Y2=Legal
dstpY[x] = Y2; // Y1=Illegal, Use Legal Y2
dstpU[x] = U2;
dstpV[x] = V2;
} else if(Legal_Y1==SUPERBLK_Y) { // Y1=SuperBlack
if(Legal_Y2==SUPERBLK_Y) { // Both SuperBlack
const bool y1Best=(Y1>=Y2); // replace with nearer to legal
dstpY[x] = (y1Best)?Y1:Y2;
dstpU[x] = (y1Best)?U1:U2;
dstpV[x] = (y1Best)?V1:V2;
#ifdef BUG
BUGZ=false;
#endif
} else { // Y1=SuperBlack, Y2=SuperWhite
int AveY1=(y>0)?(srcpY1-pitch1)[x]:0; // pixel above, other field
AveY1+=(y<height-1)?(srcpY1+pitch1)[x]:0; // add pixel below, other field
AveY1/=(y>0&&y<height-1)?2:1; // Ave of above and below pixels (clip 1, other field)
int AveY2=(y>0)?(srcpY2-pitch2)[x]:0; // pixel above, other field
AveY2+=(y<height-1)?(srcpY2+pitch2)[x]:0; // add pixel below, other field
AveY2/=(y>0&&y<height-1)?2:1; // Ave of above and below pixels (clip 2,other field)
const int AveY = (AveY1+AveY2)/2; // Ave of above and below and of both clip frames.
const bool y1Best=(abs(AveY-Y1)<=abs(Y2-AveY)); // replace with nearer to both clip average
dstpY[x] = (y1Best)?Y1:Y2;
dstpU[x] = (y1Best)?U1:U2;
dstpV[x] = (y1Best)?V1:V2;
#ifdef BUG
dprintf("Y1=SuperBlack Y2=SuperWhite AveY1=%d AveY2=%d AveY=%d",AveY1,AveY2,AveY);
#endif
}
} else if(Legal_Y2==SUPERWHT_Y) { // Both SuperWhite
const bool y1Best=(Y1<=Y2); // Replace with nearer to legal
dstpY[x] = (y1Best)?Y1:Y2;
dstpU[x] = (y1Best)?U1:U2;
dstpV[x] = (y1Best)?V1:V2;
#ifdef BUG
BUGZ=false;
#endif
} else { // Y1=SuperWhite, Y2=SuperBlack
int AveY1=(y>0)?(srcpY1-pitch1)[x]:0; // pixel above, other field
AveY1+=(y<height-1)?(srcpY1+pitch1)[x]:0; // add pixel below, other field
AveY1/=(y>0&&y<height-1)?2:1; // Ave of above and below pixels (clip 1, other field)
int AveY2=(y>0)?(srcpY2-pitch2)[x]:0; // pixel above, other field
AveY2+=(y<height-1)?(srcpY2+pitch2)[x]:0; // add pixel below, other field
AveY2/=(y>0&&y<height-1)?2:1; // Ave of above and below pixels (clip 2,other field)
const int AveY = (AveY1+AveY2)/2; // Ave of above and below and of both clip frames.
const bool y1Best=(abs(AveY-Y1)<=abs(Y2-AveY)); // replace with nearer to both clip average
dstpY[x] = (y1Best)?Y1:Y2;
dstpU[x] = (y1Best)?U1:U2;
dstpV[x] = (y1Best)?V1:V2;
#ifdef BUG
dprintf("Y1=SuperWhite Y2=SuperBlack AveY1=%d AveY2=%d AveY=%d",AveY1,AveY2,AveY);
#endif
}
#ifdef BUG
if(BUGZ) {
dprintf("%d:%d:%d] a=$%02X%02X%02X : b=$%02X%02X%02X : o=b=$%02X%02X%02X",
n,y,x,
Y1,U1,V1,Y2,U2,V2,dstpY[x],dstpU[x],dstpV[x]
);
}
#endif
} // end for x
srcpY1 += pitch1;
srcpU1 += pitchUV1;
srcpV1 += pitchUV1;
srcpY2 += pitch2;
srcpU2 += pitchUV2;
srcpV2 += pitchUV2;
dstpY += dpitch;
dstpU += dpitchUV;
dstpV += dpitchUV;
} // end for y
return dst;
}
AVSValue __cdecl Create_DeCometYV24(AVSValue args, void* user_data, IScriptEnvironment* env) {
PClip child = args[0].AsClip();
PClip child2 = args[1].AsClip();
const int Blk = args[2].AsInt(16);
const int Wht = args[3].AsInt(235);
const VideoInfo &vi= child->GetVideoInfo();
if(!vi.IsYV24()) env->ThrowError("DeCometYV24: YV24 Only");
const VideoInfo &vi2 = child2->GetVideoInfo();
if(!vi.IsSameColorspace(vi2)) env->ThrowError("DeCometYV24: Differing colorspace");
if(vi.width != vi2.width) env->ThrowError("DeCometYV24: Differing width");
if(vi.height != vi2.height) env->ThrowError("DeCometYV24: Differing height");
if(vi.num_frames != vi2.num_frames) env->ThrowError("DeCometYV24: Differing FrameCount");
if(Blk<0 || Blk>126) env->ThrowError("DeCometYV24: Blk 0 -> 126(%d)",Blk);
if(Wht<129 || Wht>255) env->ThrowError("DeCometYV24: Wht 129 -> 255(%d)",Wht);
return new DeCometYV24(child,child2,Blk+1,Wht-1,env); // *** NOTE *** Blk and Wht are altered for internal use
}
// The following function is the function that actually registers the filter in AviSynth
// It is called automatically, when the plugin is loaded to see which functions this filter contains.
/* New 2.6 requirement!!! */
// Declare and initialise server pointers static storage.
const AVS_Linkage *AVS_linkage = 0;
// DLL entry point called from LoadPlugin() to setup a user plugin.
extern "C" __declspec(dllexport) const char* __stdcall
AvisynthPluginInit3(IScriptEnvironment* env, const AVS_Linkage* const vectors) {
/* New 2.6 requirment!!! */
// Save the server pointers.
AVS_linkage = vectors;
env->AddFunction("DeCometYV24", "cc[Blk]i[Wht]i", Create_DeCometYV24, 0);
// The AddFunction has the following paramters:
// AddFunction(Filtername , Arguments, Function to call,0);
// Arguments is a string that defines the types and optional names of the arguments for you filter.
// c - Video Clip
// i - Integer number
// f - Float number
// s - String
// b - boolean
return "`DeCometYV24' DeCometYV24 plugin"; // A freeform name of the plugin.
}
Enjoy :)
https://s20.postimg.org/rkvblb14t/De_Comet_YV24.jpg (https://postimg.org/image/xykeok60p/)
Zip updated to v0.01
StainlessS
23rd July 2017, 19:16
A Modifed script to the one included in original zip, shows amplified difference between result and original (pre-glitched) frame.
#Demonstration of Decomet plugin by jmac698
#Requires Decomet and avisynth_c plugins
#Usage: adjust avisynth_install_dir for your isntallation, for example C:\Program Files (x86)\AviSynth 2.5\
#and install the plugins
#About Decomet
#Decomet by jmac698 attempts to find the clean pixels based on two, separately recorded copies of an analog tape with certain defects
#I am calling these defects comets due to their appearance, but some call them dropouts. Dropouts are usually brief white lines appearing randomly in the video.
#These white lines also occur in the headswitching area, in the last few lines of a video
#Finally, another type of defect with black lines, may occur on light to dark transitions (edges). One way to see them, is to play S-VHS tapes in a
#non-S-VHS playback deck.
#How it works
#The two videos are compared, and in light regions, the darker pixel from the two clips is kept
#likewise, in darker regions, the lighter pixel is kept. The process fails when the comets are too close to normal video.
#The plugin could be improved by being more sophisticated in it's detection of comets, however even at this simple stage, it
#does improve real videos.
plugin_fn="G:\DeCometYV24.dll"
LoadPlugin(plugin_fn)
clean=colorbars(width=360, height=240, pixel_type="YV24").KillAudio.Trim(0,-1) #Clean clip
RANDOMIZE=true # True = Different each time
(Randomize) ? Rand(seed=true) : NOP
clip1=addcomets(clean) # a noisy clip1
clip2=addcomets(clean) # a different noisy clip2
DeCometYV24(clip1,clip2)
LFT=stackVertical(clip1.subtitle("Original 'A'"),clip2.subtitle("Original 'B'"))
RGT=stackVertical(last.subtitle("DecometYV24 cleaned version"),ClipDelta(Last,clean,Amp=True).subtitle("Amp'd Diff from Original Clean"))
return stackHorizontal(LFT,RGT)#.ConvertToRGB32 # if not YV24 capable player
function whiteline(clip template) {
template.blankclip(width=template.width/4, height=1,color_yuv=$EB8080) # $EB=235
}
function blackline(clip template) {
template.blankclip(width=template.width/4, height=1,color_yuv=$108080) # $10=16
}
function addcomets(clip v){
#Add three, randomly positioned, white and black lines to an existing video
v
w=width
h=height
overlay(whiteline,x=rand(w*3/4),y=rand(h))
overlay(blackline,x=rand(w*3/4),y=rand(h))
overlay(whiteline,x=rand(w*3/4),y=rand(h))
overlay(blackline,x=rand(w*3/4),y=rand(h))
overlay(whiteline,x=rand(w*3/4),y=rand(h))
overlay(blackline,x=rand(w*3/4),y=rand(h))
}
# Return Clip Difference of input clips (amp==true = Amplified, show==true = show background)
Function ClipDelta(clip clip1,clip clip2,bool "amp",bool "show") {
amp=Default(amp,false)
show=Default(show,false)
c2=clip1.levels(128-32,1.0,128+32,128-32,128+32).greyscale()
c1=clip1.subtract(clip2)
c1=(amp)?c1.levels(127,1.0,129,0,255):c1
return (show)?c1.Merge(c2):c1
}
Showing frame where two glitches coincide and not good result, (DePulse works differently using single clip and would probably fix the result frame just fine).
https://s20.postimg.org/jgn7gkepp/De_Comet_YV24_2.jpg (https://postimg.org/image/47xa2sl15/)
StainlessS
23rd July 2017, 21:58
Zip in post #28 updated to v0.01.
Fixed bug using pitch1 (for first clip) instead of pitch2(for second clip).
Here, fixed in BLUE
} else { // Y1=SuperBlack, Y2=SuperWhite
int AveY1=(y>0)?(srcpY1-pitch1)[x]:0; // pixel above, other field
AveY1+=(y<height-1)?(srcpY1+pitch1)[x]:0; // add pixel below, other field
AveY1/=(y>0&&y<height-1)?2:1; // Ave of above and below pixels (clip 1, other field)
int AveY2=(y>0)?(srcpY2-pitch2)[x]:0; // pixel above, other field
AveY2+=(y<height-1)?(srcpY2+pitch2)[x]:0; // add pixel below, other field
AveY2/=(y>0&&y<height-1)?2:1; // Ave of above and below pixels (clip 2,other field)
const int AveY = (AveY1+AveY2)/2; // Ave of above and below and of both clip frames.
const bool y1Best=(abs(AveY-Y1)<=abs(Y2-AveY)); // replace with nearer to both clip average
dstpY[x] = (y1Best)?Y1:Y2;
dstpU[x] = (y1Best)?U1:U2;
dstpV[x] = (y1Best)?V1:V2;
Same fix for the snippet concerning Y1=SuperWhite, Y2=SuperBlack, in same position.
I'll leave this now, all yours JMac.
EDIT: JMac,
Where both either SuperBlack or SuperWhite, and both luma identical, might mod to prefer one based on chroma.
(if not same, not sure how tricky that would be, best furthest from 128 maybe).
Busty
24th July 2017, 11:36
Reel.Deel, StainlessS, jmac698,
thanks for correcting "my" "script", it's opening now and I'm running a decomet script right now.
Afterwards I'll give StainlessS new version a go and compare.
I'll let you know how it works out. Thanks so far!
https://forum.doom9.org/images/smilies/thanks-t.gif
StainlessS
24th July 2017, 12:11
Busty,
was only really intended for JMac, not had much testing done at all, I was making zip including doc and avs and source + header,
and I guess just included the dll out of habit.
I dont actually have any video with comets, and deleted any that I may have downloaded in past from D9.
I dont expect any problems from it, but wait for JMac to give all clear before betting your life on it.
Having said that, post evaluation of it if you do try it out, thanx.
Busty
24th July 2017, 13:16
I inspected the outcome of the classic decomet and am somewhat disappointed. There seems to a be a minor improvement on some frames, but as one laserdisc has a problematic part with quite a bit of rod, that part looks worse than before. The outcome looks more like averaging, the comets aren't completely gone.
So I wanted to try - just for the sake of trying - StainlessS mod, but as a complete noob I don't know how to convert to YV24.
Two hours of searching didn't help, so can you guys help me on that? I'm on Avisynth 2.6.
StainlessS
24th July 2017, 13:58
http://avisynth.nl/index.php/Convert
LoadPlugin("G:\DeCometYV24.dll") # or wherever it is, or put in Plugins DIR
FileName_1 = "D:\Movie_1.avi"
FileName_2 = "D:\Movie_2.avi"
A=AviSource(FileName_1) # Or mod for your sourcefilter
B=AviSource(FileName_2)
##############
### Config ###
BLK = 0 # As Per Showchannels Min, Max accumulated.
WHT = 254
SHOW_FRMNO = TRUE # True, Show FrameNumber on Window Frame
AMP = FALSE # True, Amplify Difference in SyncTest Window
INTERLACED = True # Interlaced status
MATRIX = "PC.709" # "Rec601", "Rec709", "Rec2020", "PC.601", "PC.709"
FINAL = FALSE # Set TRUE, to return fixed without Stacked Window
##############
A=A.ConvertToYV24(interlaced=INTERLACED,matrix=MATRIX)
B=B.ConvertToYV24(interlaced=INTERLACED,matrix=MATRIX)
Fixed = DecometYV24(A, B, BLK, WHT)
Last = (FINAL) ? Fixed : Window(Fixed, A , B, SHOW_FRMNO, AMP)#.KillAudio
# Or ConvertToRGB32 or whatever to view, unless you have a YV24 capable player eg MPC-HC.
Return Last.ConvertToYV12(interlaced=INTERLACED,matrix=MATRIX)
###########
# Stack Overhead Subtitle Text, with optional FrameNumber shown.
Function Sub(clip c,string Tit,Bool "ShowFrameNo") {
c.BlankClip(height=20)
(Default(ShowFrameNo,False))?ScriptClip("""Subtitle(String(current_frame,"%.f] """+Tit+""""))"""):Subtitle(Tit)
Return StackVertical(c).AudioDubEx(c)
}
# Stacked four windows
Function Window( clip Fixed, clip A , clip B,Bool "ShowFrmNo", Bool "Amp") {
Amp=Default(Amp,False) ShowFrmNo=Default(ShowFrmNo,True)
SyncTest=ClipDelta(B, A, amp=Amp) # Difference between A and B source clips
LFT = StackVertical(A.Sub("Original 'A'",ShowFrmNo),B.Sub("Original 'B'"))
RGT = StackVertical(Fixed.Sub("DecometYV24"),SyncTest.Sub("SyncTest & show source comets"))
Return StackHorizontal(LFT,LFT.BlankClip(width=16),RGT)
}
# Return Clip Difference of input clips (amp==true = Amplified, show==true = show background)
Function ClipDelta(clip clip1,clip clip2,bool "amp",bool "show") {
amp=Default(amp,false)
show=Default(show,false)
c2=clip1.levels(128-32,1.0,128+32,128-32,128+32).greyscale()
c1=clip1.subtract(clip2)
c1=(amp)?c1.levels(127,1.0,129,0,255):c1
return (show)?c1.Merge(c2):c1
}
Above EDITED (YET, AGAIN)
If you want qwik access to Avisynth help (or offline help), Avisynth docs in searchable *.CHM compressed help file format:-
http://www.mediafire.com/file/62mphc846sdh6u0/AvisynthEngHelp%2BSDK26_FINAL-2015-05-31.zip
(about 4.5MB)
Can put somewhere, create shortcut on DeskTop, then click on Properties (of the shortcut) and give the "Shortcut Key" and key combo,
I use "CTRL-ALT-H".
EDIT: They need to be exactly in-sync.
EDIT: I've just really noticed your laser disk comment, never had one nor seen any laser disk rot that I've aware of.
Not sure if this is suitable filter. The comets this is intended for would I think be set exactly at TV levels, ie 16 and 235.
(ie captured from VHS in RGB with comets at extreme black/white values, and then converted to YV12 @ TV Levels 16->235).
The BLK, WHT args may need adjusting.
What is the input colorspace ? Is it interlaced ? (I've no idea about Laser Disk).
Can you post a single image of a typical 'comet' please (PNG format).
EDIT: ShowChannels:- https://forum.doom9.org/showthread.php?t=163829&highlight=showchannels
Shows Min/Max/Averages per frame and accumulated over video scanned so far, what does it show for
your disks at accumulated min and max (ie where do the comets live).
Also, would your sources be at Rec.709 or even PC.709 levels, that and interlaced status may be required as args for the
colorspace conversions.
We may have to wait for JMac (or someone clever) to say if this is suitable.
EDIT: I meant to say "or someone else clever". :)
EDIT: Edited as per ShowChannels min and max.
johnmeyer
24th July 2017, 17:59
I may still have some really wonderful (actually, it's really awful) video with which you can test. As I remember, it had both black as well as white comets, and they came and went.
If anyone is interested, I'll see if I still have it on one of my drives and post ten seconds.
It may be from 1" Sony 1970 reel-to-reel tape, but I think the artifacts are pretty similar to those on Beta and VHS (I think 8mm dropouts had a different character).
StainlessS
24th July 2017, 18:37
Sounds good John, thanx. I'm now a bit busy for a day or two, so no immediate hurry for me. :)
Would the comets likely be 16 and 235 ? (EDIT: on laser disk)
EDIT: Would be interesting to see what your samples look like, but would not help in this case because of the
double cap source requirement.
johnmeyer
24th July 2017, 23:21
I just took a quick look, and I deleted the original client video and he no longer has it on his Dropbox. So, I can't provide it after all.
StainlessS
25th July 2017, 01:24
OK, no sweat John, thanx anyways :)
Busty
26th July 2017, 19:11
Thanks StainlessS for all the information.
Laserdiscs are analog, composite interlaced signals, I can gather following info about the captured video:
UtVideo YUV422 BT.601 QT, 768 × 576, 16,7 Mill. FourCC: ULY2
I can’t find info about Laserdisc color space, but I ran your ShowChannels plugin, and this is what came out:
first clip:
81638 } Frames visited = 81991
Accumulated
Y U V
Ave 52.45 121.13 132.95
Min 0 0 21
Max 254 238 248
^Min 7 15 51
^Max 254 206 236
second clip
Accumulated
Y U V
Ave 49.88 121.22 132.96
Min 0 0 33
Max 254 243 249
^Min 0 12 50
^Max 254 206 240
While making the screenshots I noticed that one capture is brighter than the other (although I didn’t change anything between the recordings, just the discs). i did another pair of captures, but they still differ a bit (brightness wise).
When using the white value of 235 and even 250, some white parts of the video become grey areas. As lots of my comets are black, that’s not an issue with this video, so I set it to 255. With black set to 10, it does find comets and reduces them, but they are not gone. I increased the black number, but at about 30 wrong pixels are changed and the comets are still just better, but not gone.
I attach three screenshot of a frame, two for the source clips and one of the outcome with black set to 10.
Is it possible to tweak the script or plugin to remove the comets completely?
StainlessS
28th July 2017, 07:29
@ Moderator, can attachments be approved please, thanx :)
Busty, (love the name :) ), can only suggest settings of BLK=0 WHT=254 as per the min and max accumulated stats.
EDIT: You can show input colorspace of clip by
return Avisource(...).Info
EDIT: Png format would have been better (jpg changes pixel values [lossy compressed]).
StainlessS
28th July 2017, 10:06
Post #34 modified.
@Jmac,
I was curious to know what values of U and V are valid at both Y=16 and Y=235, so
GSCript("""
Z=5 Got=0
RT_DebugF("Lo=# Y=$10(16)")
for(ui=128-Z,128+Z) {
for(vi=128-Z,128+Z) {
q=(16*256 + ui)*256+vi
c=BlankClip(pixel_type="YV12",color_yuv=q)
c2=c.ConvertToRGB32
current_frame=0
R2=Round(c2.ShowRed(pixel_Type="YV12").AverageLuma)
G2=Round(c2.ShowGreen(pixel_Type="YV12").AverageLuma)
B2=Round(c2.ShowBlue(pixel_Type="YV12").AverageLuma)
c3=c2.ConvertToYV12
Y3=Round(c3.AverageLuma)
U3=Round(c3.AverageChromaU)
V3=Round(c3.AverageChromaV)
if(U3==ui && V3==vi && Y3==16) {
GOT=GOT+1
RT_debugF("%d] YUV = $%0.2X%0.2X%0.2X (RGB = $%0.2X%0.2X%0.2X)",GOT,Y3,U3,V3,R2,G2,B2)
}
}
}
Got2=0
RT_DebugF("Hi=# Y=$EB(235)")
for(ui=128-Z,128+Z) {
for(vi=128-Z,128+Z) {
q=(235*256 + ui)*256+vi
c=BlankClip(pixel_type="YV12",color_yuv=q)
c2=c.ConvertToRGB32
current_frame=0
R2=Round(c2.ShowRed(pixel_Type="YV12").AverageLuma)
G2=Round(c2.ShowGreen(pixel_Type="YV12").AverageLuma)
B2=Round(c2.ShowBlue(pixel_Type="YV12").AverageLuma)
c3=c2.ConvertToYV12
Y3=Round(c3.AverageLuma)
U3=Round(c3.AverageChromaU)
V3=Round(c3.AverageChromaV)
if(U3==ui && V3==vi && Y3==235) {
GOT2=GOT2+1
RT_debugF("%d] YUV = $%0.2X%0.2X%0.2X (RGB = $%0.2X%0.2X%0.2X)",GOT,Y3,U3,V3,R2,G2,B2)
}
}
}
""")
return Messageclip("Done")
00000003 1.61430311 [3680] RT_DebugF: Lo=# Y=$10(16)
00000004 3.09199762 [3680] RT_DebugF: 1] YUV = $108080 (RGB = $000000)
00000005 3.36213446 [3680] RT_DebugF: 2] YUV = $108180 (RGB = $000002)
00000006 3.64207911 [3680] RT_DebugF: 3] YUV = $108280 (RGB = $000004)
00000007 4.60943556 [3680] RT_DebugF: Hi=# Y=$EB(235)
00000008 5.66757488 [3680] RT_DebugF: 3] YUV = $EB7E80 (RGB = $FFFFFB)
00000009 5.98870993 [3680] RT_DebugF: 3] YUV = $EB7F80 (RGB = $FFFFFD)
00000010 6.32429600 [3680] RT_DebugF: 3] YUV = $EB8080 (RGB = $FFFFFF)
Ooops, bug fix (added compare on Y).
jmac698
28th July 2017, 11:17
Hi,
Thanks for ressurecting this to source.
However, I think you misunderstood a number of things about comets. Not your fault, as you haven't really worked with them. For one thing, they are not really like the demo at all. They aren't necessarily white, and they fade along the streak. The black lines aren't the same as comets really. They are more like a shadow from strong luma transitions, and not always present with the white comets. It was just that I could handle those at the same time. Finally, you should never average the frames, that just makes it worse. Also there's never meant to be two luma points. The idea was to bring the video towards the most middle value, so there's one point. Also the colour isn't really affected by the comets or the black shadows.
I will have to fix up the source. The laser disc sample might give me ideas on how to improve it, but for now I would pre-correct the brightness so the two copies look similar.
StainlessS
28th July 2017, 11:36
OK JM,
Its all in your hands, the SuperBlack/White thing will I hope be of use in deciding what to do.
I'll bow out now.
Toodle-ooooo.
Busty
29th July 2017, 12:29
@ jmac698: if I can help out with more samples or a short clip let me know what you need and I'll gladly provide them.
StainlessS
29th July 2017, 14:47
@Busty, I see that you images from post #39 have yet to be approved.
jmac698
2nd August 2017, 11:23
@busty
Yes I'll work on this in about a week, I have some ideas to make decomet better and also single frame mode. So find a fairly heavy sample or a spot where there's dozens over the clip length, so I get a lot of examples to profile. 3 recordings if possible so I can compare the true median cleaned to my plugin. Thanks :)
Link to DePulse in case anyone is looking.
https://forum.doom9.org/showthread.php?p=1800999&highlight=decomet#post1800999
Busty
4th August 2017, 15:29
@jmac698:
I can only provide two captures of the same video in this case, as I only have two copies of that laserdisc. That's also the reason why I was hoping decomet could help, otherwise I'd have checked out toot or median. I did use median on another occasion, but it didn't have that much problems to begin with.
If I come across a problematic part where I have three captures I'll upload a sample.
I extracted a ten second portion of a problematic part of said laserdisc, which results in 2 x 74 MB (utvideo interlaced PAL 768x576). If that size is too much I'll gladly provide a shorter sample, just let me know.
This is the link for the 2 files, expires on August 11.: https://we.tl/LlA4hcTZGO
@ StainlessS:
can I do something about those screencaps? Btw, I checked, and I did upload in png format. Strange that they show up as jpg.
StainlessS
4th August 2017, 22:25
TZGO[/url]
can I do something about those screencaps? Btw, I checked, and I did upload in png format. Strange that they show up as jpg.
Give time for JMac to take a peek, him da man.
jmac698
5th August 2017, 14:20
@busty
np, I forgot we were talking about laserdiscs here. The size is not a problem.
I've always felt we need some kind of generic video matching, that lines up temporally, matches colours, and matches geometry, all while being robust to comets and noise
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.