Log in

View Full Version : Need advice to eliminate Jaggies in deinterlaced source


Alcacia
20th August 2005, 03:13
I am backing up DVD to XviD. The DVD source is already deinterlaced. Apparently, they used a poor deinterlacing method, since there are horrible jagged edges throughout the entire DVD. It looks like the effect you get when you don't anti-alias text. Ugh!

http://home.earthlink.net/~runner3734/images/jwg.jpg

The above frame is taken directly from the DVD source. I would like advice on an AVISynth filter to smooth out the jagged edges before encoding to XviD.

What I find most irritating about the jagged edges is the horrible effect on compressibility. This is just a documentary video, so I am not looking for perfection (i.e., I don't care too much about retaining sharpness). I just want something that will improve the compressibility.

Even using a relatively strong denoiser, FluxsmoothST(10,15), I still had excessive bitrate for the quantizer I was using. I'm sure this is because of the jagged edges, which Fluxsmooth can't do much about.

Thanks for any advice.

p.s. - I did some searches on this forum, but it seems that much of the discussion about "jagged edges" or jaggies is focused on how to properly deinterlace so that they don't occur in the first place. Here, my source is already deinterlaced, and I have no way of going back to the original pure interlace source.

Chainmax
20th August 2005, 03:37
I think that both SangNom (http://jourdan.madism.org/~manao/SangNom.zip) and AAA are supposed to do antialiasing. They were originally created for animated content if I'm not mistaken, but they might help.

AAA is a function created by Soulhunter, here's the code:

function AAA(clip clp, int "Xres", int "Yres", int "Xshrp", int "Yshrp", int "mode", bool "chroma")
{
clp = clp.isYV12() ? clp : clp.ConvertToYV12()
ox = clp.width
oy = clp.height
Xres = default(Xres, ox)
Yres = default(Yres, oy)
mode = default(mode, 1)
Xshrp = default(Xshrp, 0)
Yshrp = default(Yshrp, 0)
chroma = default(chroma, false)

mode==0 ? clp.PointResize(ox*2,oy*2) : clp.LanczosResize(ox*2,oy*2)

TurnLeft()
SangNom()

TurnRight()
SangNom()

BilinearResize(Xres,Yres)
Unfilter(Xshrp,Yshrp)

chroma ? MergeChroma(clp.Lanczosresize(Xres,Yres)) : last

}

Mug Funky
20th August 2005, 03:47
this deinterlace technique should be shoot-on-sight. so much stuff gets this treatment, and it makes me sick. you can see it on TV as a vertical jumpy effect with choppy motion (or "film look" as the perpetrators like to call it).

you can help it out somewhat by re-deinterlacing it with something decent. try run tomsmocomp or Tdeint on it.

for added speed, try separatefields().selecteven() then run tomsmocomp in it's -1 mode (ie 2x vertical scale). i think tdeint has a similar mode.

this kind of thing annoys me more than field-blended standards conversion, which at least keeps motion intact and doesn't cause that disgusting vertical jumping effect (unless you use something sub-standard with no motion-adaptation to convert, like premiere or after-effects, and even then it'll look better). i suppose i can say that because i spend a lot of my time running things through a standards-converter :)

scharfis_brain
20th August 2005, 08:23
tomsmocomp(0,-1,0) => tdeint(mode=-1)

krieger2005
20th August 2005, 13:44
So far i know trictical did a filter which can remove that... maybe not so fine... however... i never tried this filter and don't know how good it is. The filter's name: TIsophote. Try to download it from here (http://www.missouri.edu/~kes25c/).

BTW: Next time, when i got a movie with such jagged edges i will try scharfis... Never seen this approach and it's effort.

Alcacia
20th August 2005, 15:21
scharfis, do you mean that I should use both filters in my filter chain? In other words, do you think I should use tomsmocomp followed by tdeint?

I tried the following script:

mpeg2source("G:\JOURNEYS_WITH_GEORGE_VTS_01_1\JOURNEYS_WITH_GEORGE.d2v")
tomsmocomp(0,-1,0)
tdeint(mode=-1)
BicubicResize(608,448,0,0.5)

The results look really good, I just hope I am using these filters in the appropriate and intended way.

scharfis_brain
20th August 2005, 21:45
decide!

either TomsMoComp or TDeint.

but never both.

Didée
20th August 2005, 22:12
either TomsMoComp or TDeint.

but never both.
Never say never. This is spatial upsampling, not deinterlacing. I've had a case where only the subsequent combination of TomsMoComp and TDeint's ELA-2 were able to produce (almost) perfectly smooth edges. Much overhead, yes, but was worth it. (LimitedSharpen can show you if the resampling really produced smooth edges or not ... ;) )