Log in

View Full Version : Correct order for deblocking with de-blended material


Morte66
27th October 2007, 13:28
If I'm deblending a PAL DVD (which has been blended from NTSC) like this...

DGDecode_mpeg2source("Sympathy For Lady Vengeance.d2v",info=3)

tdeint(mode=1, full=false, tryweave=true)
changefps(23.976*10)
selectevery(10,10) #selected by experiment

crop(2,72,-2,-72)
spline36resize(720,352)

#denoise/deband/sharpen/whatever
... where would I put a call to deblock_QED_mt2?

My best guess is just before the crop, where the video is deinterlaced/deblended but it still has the full set of PAL encoder blocks. But frankly, I'm reaching. So I'd love to hear from anybody who actually understands this stuff. :)

Didée
27th October 2007, 14:37
That's indeed a problem. You can put it in that place, but there is danger that the used Deblock() filter will miss some blocks. Why? Because:

Blocking will occur mostly when there is motion. When there is motion, the deinterlacer can't match fields, but will have to interpolate. When the deinterlacer interpolates, the top/bottom borders of a block are not "sharp" anymore. When the sharp boundaries of a block have been blurred, the deblocker is more likely to not reckognize the block as being blocky, thus not processing it.

Try this way: deblocking the "point-bobbed" interlaced stream before any other processing:

i=last
AssumeBFF().SeparateFields()
PointResize(i.width,i.height)
Deblock_qed()
AssumeFrameBased().AssumeBFF()
Separatefields().Selectevery(4,0,3).Weave() (Attention: Change BFF to TFF if needed!)

and see if it makes a difference compaired to the more simple method (deblocking after the deinterlacing).

Morte66
27th October 2007, 15:49
That seems usefully better during motion. Thanks. :)