Log in

View Full Version : Weird interlacing


izolight
2nd December 2010, 23:02
I have a source were I at first thought the broadcaster was just frameblending an interlaced video, but after looking more closely at it I believe it is just interlaced in a weird way. Because the interlace lines are clearly visible but really thick, by looking at it closely they are 2 pixels thick. I mean by normal frameblending the lines shouldn't really be exact lines all the time should they?

To explain what I mean, this is the pattern within a single frame:
(a is what field 1 should be and b what field 2 should be)

a1
a2
b1
b2
a3
a4
b3
b4

Now I need some way to make it
a1
b1
a2
b2
a3
b3
a4
b4

so I can properly deinterlace it.

edit: picture of the source
http://img690.imageshack.us/img690/1946/testhr.png

creaothceann
3rd December 2010, 00:13
Maybe something like this?

# source lines: a0 a1 b0 b1 a2 a3 b2 b3 ...
# dest lines: a0 b0 a1 b1 a2 b2 a3 b3 ...

AVISource(...)
Assert(Height % 4 == 0, "Height must be a multiple of 4")

even_lines = SeparateFields.SelectEven # a0 b0 a2 b2
odd_lines = SeparateFields.SelectOdd # a1 b1 a3 b3

even_lines.AssumeFrameBased
even_a = SeparateFields.SelectEven # a0 a2
even_b = SeparateFields.SelectOdd # b0 b2

odd_lines.AssumeFrameBased
odd_a = SeparateFields.SelectEven # a1 a3
odd_b = SeparateFields.SelectOdd # b1 b3

a = Interleave(even_a, odd_a) .Weave
b = Interleave(even_b, odd_b) .Weave
Interleave( a, b).AssumeFieldBased.Weave

izolight
3rd December 2010, 00:59
Thanks for this Script, but when I try to use it I get the error message "Invalid arguments for function Weave" and when I just use Weave() instead of Weave(a, b) it works, but seems to just Weave b again.

creaothceann
3rd December 2010, 02:00
I changed the script, have you tried this version?

I tried it on the picture you posted, but there seem to be more problems than a double-line interlace.

cretindesalpes
3rd December 2010, 11:40
My impression : luma and chroma have been processed differently. Chroma has been kept interlaced, while luma fields have been bobbed with a simple PointResize then blended.

izolight
4th December 2010, 17:54
I've uploaded a small sample of it to help figure out what the problem might be and what would be the best way to process it.

http://www.mediafire.com/?sqoc59jx755racu