bruno321
9th October 2020, 15:46
I'm encoding an NTSC DVD which displays an ugly phenomenon of repeating vertical lines, here's a couple of examples, in images:
https://imgur.com/a/dSHf1rp
and here's a link to a short video snippet https://fex.net/s/vzyadof
How can I get rid of them? I'm using QTGMC().srestore() which seems to work pretty nicely in addressing the blend interlacing, but it doesn't help with those lines.
SaurusX
9th October 2020, 18:06
I'm encoding an NTSC DVD which displays an ugly phenomenon of repeating vertical lines, here's a couple of examples, in images:
https://imgur.com/a/dSHf1rp
and here's a link to a short video snippet https://fex.net/s/vzyadof
How can I get rid of them? I'm using QTGMC().srestore() which seems to work pretty nicely in addressing the blend interlacing, but it doesn't help with those lines.
Look up FIR filters here on doom9 and on videohelp. I was able to piece together a fix for some animation projects I have and they actually worked incredible well. Some pieces of code seem to be lost to time, but they weren't crucial from what I could tell.
SaurusX
9th October 2020, 18:24
Here are the results (with all credit to the original script writer):
https://mega.nz/file/tANTHQjQ#xxH1Ojd3iu0izxH7Bvp1HKSVWmUhP7H9DyBeiD77q3c
The code needs to be optimized for this source, but I just dropped it in.
And here's the code used along with the extra plugins / scripts that were necessary to make it run.
FIR Depedencies:
https://mega.nz/file/xMdTEQaS#qqsiqNE1-UarnjkVzVzLGkeX9riKxbtEKnfDQ0dHuj8
MPEG2SOURCE("E:\Media\Video Editing Tools\MeGUI-2913-64\scripts\!FIR FILTER TEST\ex2 snip.demuxed.d2v")
FIR = mt_convolution(horizontal="-1 0 -3 -6 0 -16 64 -24 128 -24 64 -16 0 -6 -3 0 -1 ", vertical=" 1 ", u=2, v=2)
#FIR = mt_convolution(horizontal="-1 0 -3 -6 0 -16 64 -24 128 -24 64 -16 0 -6 -3 0 -1 ", vertical=" 1 ", u=2, v=2)
FIR_DIFF = mt_makediff(FIR, last)
THR=string(1000)
Median = MT_Luts(FIR_DIFF, FIR_DIFF, mode="med", pixels = " 0 0 1 0 -1 0 2 0 -2 0 " , expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1)
ReconstructedMedian = mt_makediff(FIR_DIFF, Median)
out = mt_makediff(FIR, ReconstructedMedian)
FIR_DIFF = mt_makediff(FIR, out)
THR=string(200)
Median = MT_Luts(FIR_DIFF, FIR_DIFF, mode="med", pixels = " 0 0 1 0 -1 0 2 0 -2 0 " , expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1)
ReconstructedMedian = mt_makediff(FIR_DIFF, Median)
out = mt_makediff(FIR, ReconstructedMedian)
out
#mt_convolution(horizontal=" 64 0 128 0 64", vertical=" 1 ", u=2, v=2)
dx=320
dy=320
dx2=720
dy2=480
#threshh=16
#threshv=16
lanczosresize(dx*2, dy*2, taps=7)
#MV = Mt_LutXY(last.mt_convolution(horizontal=" 1 ", vertical=" 4 0 -10 0 42 -14 -14 168 -14 -14 42 0 -10 0 4 ", u=1, v=1), last, " X Y - Abs 64 * ", U=-128, V=-128)
##Mt_Merge(mt_convolution(horizontal=" 1 ", vertical=" 4 0 -10 0 42 -14 -14 772 -14 -14 42 0 -10 0 4 ", u=3, v=3), last.TNLHV(threshv).TNLHV(threshv), MV)
#Mt_Merge(mt_convolution(horizontal=" 1 ", vertical=" 4 0 -10 0 42 -14 -14 772 -14 -14 42 0 -10 0 4 ", u=3, v=3), last, MV)
MH = Mt_LutXY(last.mt_convolution(horizontal=" 4 0 -10 0 42 -14 -14 168 -14 -14 42 0 -10 0 4 ", vertical=" 1 ", u=1, v=1), last, " X Y - Abs 64 * ", U=-128, V=-128)
#Mt_Merge(mt_convolution(horizontal=" 4 0 -10 0 42 -14 -14 772 -14 -14 42 0 -10 0 4 ", vertical=" 1 ", u=3, v=3), last.TNLHH(threshh).TNLHH(threshh).tblur4(16), MH)
Mt_Merge(mt_convolution(horizontal=" 4 0 -10 0 42 -14 -14 772 -14 -14 42 0 -10 0 4 ", vertical=" 1 ", u=3, v=3), last.tblur4(16), MH)
lanczosresize(dx2*2, dy2*2, taps=7)
pointresize(width/2, height/2)
Recon(strv=0.5, radv=1, lmode=0, radh=2, strh=3)
awarpsharp2(depth=4)
knlmeanscl(D=4, A=2, h=2.2, S=1, device_type="GPU")
AnimeIVTC(mode=2,bbob=4,cache=5,normconv=true)
assumefps(25000,1000)
real.finder
9th October 2020, 19:45
http://www.avisynth.nl/users/vcmohan/manyPlus/SaltPepper.html
bruno321
10th October 2020, 07:42
@SaurusX: that gives pretty nice results, thanks a lot!
@real.finder: I tried it out (as a vanilla SaltPepper()) and it didn't do much. Using a higher "feedback" number also didn't look too good. But thanks for the suggestion, I'll keep it in mind.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.