Log in

View Full Version : TomsMoComp/artifacts at edges


tbr
29th January 2003, 18:52
Hello,

I'm new to this forum. For some time I've experimented with avisynth 2.07. My application is converting DV video clips into Xvid. I've found that TomsMoComp works very well most of the time (Thanks, trbarry). The only drawback are strange artifacts around subtitles, even in still clips.

This avisynth script is to demonstrate the problem:

LoadPlugin("c:\Programme\AviSynth2\plugins\TomsMoComp.dll")
MessageClip("Test to visualize artifacts", 320, 32, false, $FFFFFF, $000000, $FFFFFF)
a=ConvertToYUY2()
b=a.TomsMoComp(0, 15, 0)
c=Subtract(a, b)
StackVertical(a.LanczosResize(640, 64), b.LanczosResize(640, 64), c.LanczosResize(640, 64))

I will attach a jpg that shows the original clip (top), the deinterlaced clip (middle) and the difference (bottom). I didn't take the first frame (which is even worse).

What causes these artifacts? As far as I understand the way TomsMoComp works, artifacts in the first frame may be caused by interpolation (WeirdBob). So far, so good - even if it would be nice when you could force a "weave" for the first frame or after scene changes. But from the second frame on, the deinterlacer should detect that there is no motion and just weave the two fields of the frame. So maybe TomsMoComp makes a wrong interpolate/weave decision? Or am I doing something wrong?

Regards,
tbr

trbarry
29th January 2003, 21:17
After months of head scratching I don't know why this happens. But you can usually (mostly) get rid of it by never using SearchEffort > 5.

I always use TomsMoComp(1,5,1) or (0,5,1) anymore. Higher search efforts also do a vertical motion search which has more false matches.

- Tom

tbr
30th January 2003, 13:07
@trbarry:

I've already played with the search effort parameter (and the other parameters, too), but can't make the artifacts disappear.

TomsMoComp is really a fine piece of software, but this bug (?) makes it almost useless for me. The only way I can think of to get rid of the artifacts is to deinterlace the raw footage (without subtitles etc.) instead of the finished DV master. But in many cases, I have already deleted the raw material.

Can you make me at least a little bit of hope that the problem may be fixed in a future version of TomsMoComp?

Regards,
tbr

drebel
30th January 2003, 15:04
Experiencing artifacts at edges with (1,5,1) in yv12 mode that look like inversed luma (or something ).Btw,is it now safe to use s. effort>5 ?I remember an old bug there...

regards,
george

trbarry
30th January 2003, 16:59
But in many cases, I have already deleted the raw material.

Can you make me at least a little bit of hope that the problem may be fixed in a future version of TomsMoComp?

tbr -

Frankly I don't know how. Trying to deinterlace video with high contrast overlayed text totally screws up any motion comp efforts at the text borders. This would be even much much worse if the material had been telecined (not pure video) first before the text overlay. It's like trying to do motion comp on 2 simultaneous overlayed pictures moving at different rates.

For this case I'd probably try SE=1 (or even 0) and if this fails I'm afraid you'll have to choose a diffent filter. I'm open to ideas but TomsMoComp figures that any given pixel should be moving in only one direction at a time.

And by all means, if you have the chance to deinterlace first before overlaying text you should definitely always do it. Deinterlacing should almost always be done first before modifying the video in any way.

drebel -

I'm not sure about using SE > 5. I still don't know if that is a bug or just a basic design flaw in the TomsMoComp fast approach to motion search that it can't search very far without too many false matches. Anyway, I didn't change it. I recommend SE=5 for most things. YMMV.

And could you post a screen shot of the YV12 artifacts?

- Tom