Log in

View Full Version : Linear Deinterlacing: What is it?/Avisynth Plugin?


moviefan
30th January 2007, 23:28
Hello,

I have an interlaced video captured from the TV which seems to be deinterlaced best quality enabling the mode "Linear" in VideoLAN. What exactly does this mode do and is there an Avisynth plugin which processes the video equally/similarly?

Regards

foxyshadis
30th January 2007, 23:45
Bob().SelectEven() is linear deinterlacing - throw away one field of each frame and interpolate it from the other. If it's stair-steppy and looks about half the vertical resolution it should be, that's probably what it is.

moviefan
31st January 2007, 08:49
Hm, I can't recognize the characteristics you described in the clip when deinterlacing linearly - it looks like full resolution without stair-steps.

wonkey_monkey
31st January 2007, 11:01
I agree, I can't see much if any difference between bob and linear deinterlace modes in VLC, both of which look equivalent to an AviSynth bob(), without selecteven().

David

spanky123
31st January 2007, 12:43
Doesn't SelectEven() remove every second frame ?

Guest
31st January 2007, 15:07
Doesn't SelectEven() remove every second frame ? Yes, but Bob() doubled the number of frames.

spanky123
31st January 2007, 15:17
Yes, but Bob() doubled the number of frames.

Oh. Ok

moviefan
1st February 2007, 11:30
Since my video is a true interlaced source can't I somehow put the field back together in their original order and place? I read the wikipedia article about deinterlacing/interlaced material and it says something like the field of truely interlaced material are shifted in time. So can't I just put the correct fields together to get a progressive picture without loss of detail?

foxyshadis
1st February 2007, 11:35
No, because each bottom field is halfway in time between each top field. You can definitely try to weave - TFM(pp=0) will do that - but you'll get a lot of residual combing. True deinterlacers tend to handle the problem better than weaving w/pp.

A certain form of PAL progressive, called field-shifted, works that way however. One field is just the delayed match of the opposite field in the last frame.

Hm, I can't recognize the characteristics you described in the clip when deinterlacing linearly - it looks like full resolution without stair-steps.

It's most obvious on animation or anything with very sharp diagonals, but it irritates different people to different degrees, I guess.

Didée
1st February 2007, 12:56
Real-World input:

Frame A Frame B Frame C Frame D

11111111 11111111 11111111 11111111
22222222 22222222 22222222 22222222
33333333 33333333 33333333 33333333
44444444 44444444 44444444 44444444
55555555 55555555 55555555 55555555
66666666 66666666 66666666 66666666
77777777 77777777 77777777 77777777
88888888 88888888 88888888 88888888

0 ms 20 ms 40 ms 60 ms
( 50 fps )


To produce "interlacing", from each fullsized frame we take alternatingly
the even/odd/even/odd etc. Scanlines ...
(i.e. 50% of original resolution is kicked to never-never-land ...)

TopField A BotField B TopField C BotField D

11111111 -------- 11111111 --------
-------- 22222222 -------- 22222222
33333333 -------- 33333333 --------
-------- 44444444 -------- 44444444
55555555 -------- 55555555 --------
-------- 66666666 -------- 66666666
77777777 -------- 77777777 --------
-------- 88888888 -------- 88888888

0 ms 20 ms 40 ms 60 ms
( 50 fps )


... and build new fullsized frames by "weaving" pairs of subsequent TopFields/BottomFields:

Top(A)+Bot(B) Top(C)+Bot(D)
11111111 11111111
22222222 22222222
33333333 33333333
44444444 44444444
55555555 55555555
66666666 66666666
77777777 77777777
88888888 88888888

0 + 20 ms -------- 40 + 60 ms --------
(25fps)


The trick is that each frame of an interlaced source contains information of two frames from the "realworld input". (i.e. one half from each original frame ... the other half has been trashed while "producing" the interlacing. It is lost.)

An "interlaced" display device will automagically put everything in correct order again (middle part of code above).


So, fact is that spatial resolutions has been halved. But it is necessary to realize that this kind of "half resolution" is of a different kind than what you're getting by common downsizing.


Imagine there is the letter XXXXX
X
XXXXX
X
XXXXX

By using some usual resizer algorithm, the letter would still appear "readable" (or at least "imaginable"/"interpretable"), because of area averaging / blurring.

But the interlacing process (usually) is a "decimation" process ... when splitting that letter in its even & odd field, it looks like TopField: XXXXX
XXXXX
XXXXX

BotField: X
X

What formerly has been a letter, now falls apart into a vacant block and a meaningless spot. Not a problem when the letter stays at a static position, but a big problem when the letter moves.

The funny part is that this kind of interlaced artefacting is hard to spot at all when dealing with low-quality, blurry & fuzzy footage.
It's the hi-quality, sharp & pristine footage that suffers, and shows the artefacting in all its glory.