Log in

View Full Version : Is this aliasing? How to remove it?


Itness
23rd October 2007, 01:12
I have an NTSC interlaced DVD source that has some strange distortion I can't seem to get rid of. Here (http://rapidshare.com/files/64468445/clip_Itness22-10-07.m2v) is a small clip.

Note the flickering diagonal lines at the left edge of the open window:

http://i205.photobucket.com/albums/bb28/barronovsky/naughty%20pix/Itness22-10-07.png

I am deinterlacing and encoding with XviD, btw. I tried various methods of deinterlacing, and TDeint/EEDI2 seemed to work best, but i'm open to other suggestions.

Tried a number of things to reduce or remove the distortion, to no avail.

1. The "double-edi" thingy buried in MCBob, suggested by Didee in this (http://forum.doom9.org/showthread.php?t=118784) thread.

2. Reduceflicker: no go.

3. Mocomp with mvtools like this:

AssumeTFF()
Interp = SeparateFields().SelectEven().EEDI2(field=1)
Deinted=TDeint(order=1,field=1,edeint=Interp)
TFM(mode=6,order=1,PP=7,slow=2,mChroma=true,Clip2=Deinted)
TDecimate(mode=1)

pre=last
BlkSize= 8

vf3=pre.MvAnalyse(BlkSize = BlkSize, isB = False, idx = 1, Overlap = BlkSize/2, Delta=3)
vf2=pre.MvAnalyse(BlkSize = BlkSize, isB = False, idx = 1, Overlap = BlkSize/2, Delta=2)
vf1=pre.MvAnalyse(BlkSize = BlkSize, isB = False, idx = 1, Overlap = BlkSize/2, Delta=1)
vb1=pre.MvAnalyse(BlkSize = BlkSize, isB = True , idx = 1, Overlap = BlkSize/2, Delta=1)
vb2=pre.MvAnalyse(BlkSize = BlkSize, isB = True , idx = 1, Overlap = BlkSize/2, Delta=2)
vb3=pre.MvAnalyse(BlkSize = BlkSize, isB = True , idx = 1, Overlap = BlkSize/2, Delta=3)

cf3=pre.MvCompensate(vf3, idx=1)
cf2=pre.MvCompensate(vf2, idx=1)
cf1=pre.MvCompensate(vf1, idx=1)
cb1=pre.MvCompensate(vb1, idx=1)
cb2=pre.MvCompensate(vb2, idx=1)
cb3=pre.MvCompensate(vb3, idx=1)

interleave(cf3, cf2, cf1, pre, cb1, cb2, cb3)
ttempsmooth(maxr=2)
selectevery(7,3)

I would be very appreciative of any suggestions. Cheers.

[P]ako
23rd October 2007, 02:39
Try something like:

pointresize(width,height/2).aaa().eedi2().warpsharp().lanczosresize(width,height)

AAA is a function: http://forum.doom9.org/showthread.php?p=884555#post884555

Itness
23rd October 2007, 05:42
Thanks, [P]ako. I tried that filter chain -- before and after deinterlacing, and in lieu of deinterlacing, and it still could not reduce or remove that diagonal line distortion.

Any other ideas, anyone? TIA

foxyshadis
23rd October 2007, 07:26
That's dot crawl, mostly, and fft3dfilter can help reduce that substantially. The other frequency artifacts - and there are a lot of them - are really pretty intractable. A heavy mo-comp'd fft3dfilter might help (though there's hardly any motion to comp in this scene anyway) more than ttempsmooth does. If you can, have it retransferred with a better VCR through s-video or component; there's a good chance it's already baked into the tape, which is a shame, but at least that'll stop the dot crawl from making it worse. A timebase correcting might help stabilize the picture, too, if that was the transfer's fault, otherwise depanstabilize is good for that.

This is a very bad idea though:
TFM(mode=6,order=1,PP=7,slow=2,mChroma=true,Clip2=Deinted)
TDecimate(mode=1)
Just use Tdeint (or Tdeint+eedi2/nnedi) alone.

midelic
23rd October 2007, 10:00
Try this:
leakkerneldeint(1,0,sharp=true)
for removing combing artifacts.The others you cannot remove without affecting the information on the video.

[P]ako
24th October 2007, 07:30
Oh, dot crawl... for some hard dot crawling I used once:

DeDot(20,100,1,15).degrainmedian(limitY=8, limitUV=15)

Though, it could be very harsh on your source.

Itness
25th October 2007, 21:50
Well, thanks for all your suggestions, folks. I tried all of them separately and in combination and nothing seems to work. :(

Here are a few examples of what i tried (in all of these cases, i just used TDeint for deinterlacing, no TFM or TDecimate this time):

1.

TDeint()

pre=last
BlkSize=8

vf3=pre.MvAnalyse(BlkSize = BlkSize, isB = False, idx = 1, Overlap = BlkSize/2, Delta=3)
vf2=pre.MvAnalyse(BlkSize = BlkSize, isB = False, idx = 1, Overlap = BlkSize/2, Delta=2)
vf1=pre.MvAnalyse(BlkSize = BlkSize, isB = False, idx = 1, Overlap = BlkSize/2, Delta=1)
vb1=pre.MvAnalyse(BlkSize = BlkSize, isB = True , idx = 1, Overlap = BlkSize/2, Delta=1)
vb2=pre.MvAnalyse(BlkSize = BlkSize, isB = True , idx = 1, Overlap = BlkSize/2, Delta=2)
vb3=pre.MvAnalyse(BlkSize = BlkSize, isB = True , idx = 1, Overlap = BlkSize/2, Delta=3)

cf3=pre.MvCompensate(vf3, idx=1)
cf2=pre.MvCompensate(vf2, idx=1)
cf1=pre.MvCompensate(vf1, idx=1)
cb1=pre.MvCompensate(vb1, idx=1)
cb2=pre.MvCompensate(vb2, idx=1)
cb3=pre.MvCompensate(vb3, idx=1)

interleave(cf3, cf2, cf1, pre, cb1, cb2, cb3)
fft3dfilter(sigma=3, plane=4, bt=5, bw=32, bh=32, ow=16, oh=16)
selectevery(7,3)


2. Same as above, but two instances of fft3d at different blocksizes:

fft3dfilter(sigma=3, plane=4, bt=5, bw=32, bh=32, ow=16, oh=16)
fft3dfilter(sigma=3, plane=4, bt=5, bw=8, bh=8, ow=4, oh=4)


3. Similar to above, but with Depan instead of MVtools:

TDeint()

Motion=DepanEstimate(trust=2.5, fftw=true)
DepanInterleave(data=Motion, prev=2, next=2)
MergeChroma(fft3dfilter(sigma=2, plane=0, bw=32, bh=32),\
fft3dfilter(sigma=3, plane=3, bw=32, bh=32))
MergeChroma(fft3dfilter(sigma=2, plane=0, bw=4, bh=4),\
fft3dfilter(sigma=3, plane=3, bw=32, bh=32))
SelectEvery(5,2)


4. DeDot before TDeint, adusting the luma spatial threshhold and temporal change tolerance individually. Even at the extremes for each, there was no improvement:

DeDot(luma2d=1,lumaT=255)
TDeint()

5. Tcomb before TDeint, likewise adjusting luma threshholds individually from 1 to 255 -- even at the max, the diagonal lines (dot crawl?) were not reduced:

Tcomb(mode=0,fthreshL=255,othreshL=255)
TDeint()


If you can, have it retransferred with a better VCR through s-video or component; there's a good chance it's already baked into the tape, which is a shame...

I think you nailed, it, foxy: it's baked into the tape.

Thanks again for all your suggestions. I learned a lot, even if it didn't solve this particular problem. Cheers.

foxyshadis
26th October 2007, 06:11
To be clear, dot crawl is the patterned speckles, those come from a bad capture, frequency interference is the thick diagonal lines that cut through the crawl. There's probably also aliasing contributing to it. Something you might try is after removing the dot crawl with fft3d or tcomb, use fanfilter or defreq to try to manually lessen the diagonal strokes. They're not so simple to set up, though.