View Full Version : Problem with Yadif or TomsMoComp
stax76
25th June 2008, 21:05
Cropping top 2 bottom 2 causes a issue seen on the screenshot using Yadif and TomsMoComp, no problem using FieldDeinterlace. Cropping top 4 bottom 4 fixes the problem. More about the issue can be found here (http://www.planetdvb.net/node/523#comment-1258).
Script:
MPEG2Source("D:\Desktop\Neuer Ordner (2)\sample.demuxed.d2v")
Crop(2,2,-2,-2)
TomsMoComp(-1,5,1)
BilinearResize(592,320)
sample clip:
http://www.mediafire.com/?e1jg3jng3v1
http://i27.tinypic.com/2d0l5xj.jpg
jeffy
25th June 2008, 21:25
Unless I'm wrong, you should crop after the deinterlacing.
Blue_MiSfit
25th June 2008, 21:38
I second the motion. You're borking chroma :)
~MiSfit
Tack
25th June 2008, 22:50
As the others have noted, you have to either crop after deinterlacing, or crop by multiples of 4 (as you discovered).
At least, this is so for 4:2:0 material, since a row in the chroma plane is interpolated across two corresponding luma rows. It might be easier to see the problem when you consider that cropping 2 rows of an interlaced frame is equivalent to cropping 1 row of a progressive frame.
Didée
25th June 2008, 23:18
No bug, no mystery. It's a technical necessity. Interlaced YV12 can only be vertically cropped in 4-pixel steps. If you try to crop vertically by a non-mod4 margin, then you're effectively swapping the phase of the chroma channels: cropping 2 luma pixels from the top corresponds to cropping 1 chroma sample from the top, which means that the formerly odd/bottom chroma samples suddenly become even/top chroma samples. Hello phase shift, there you are.
... And with fielddeinterlace, too, the issue is exactly the same. You probably won't see it when using "blend" mode, because then the phase shift is covered by the ghosting that fieldblending produces. But when using "interpolate" mode, you'll see the phase shift again.
So, there's nothing that needs fixing. Interlaced YV12 just is like that. :)
stax76
25th June 2008, 23:31
Thanks for explaining.
ankurs
26th June 2008, 18:04
pakistan playing sf eh :P ?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.