Log in

View Full Version : Does deinterlacing reduce video quality ?


St Devious
28th March 2010, 22:04
I shoot video with my Sony HDR-HC3 HDV 1080i camera. I create an avisynth script before encoding it. The video is interlaced, top field first as shown by mediainfo.

So I deinterlace using Yadif and top field first order. But the deinterlaced video seems to have less quality. Am i doing something wrong or does deinterlacing reduce quality ?

wonkey_monkey
28th March 2010, 22:15
How are you viewing the interlaced/deinterlaced videos?

David

St Devious
28th March 2010, 22:31
How are you viewing the interlaced/deinterlaced videos?

David

MPCHC and VLC

wonkey_monkey
28th March 2010, 22:44
I should have added: is the interlaced video being deinterlaced on playback, and if so, by what method? Can you post some screenshots of each?

David

osgZach
28th March 2010, 23:12
A screenshot of the output would probably help too. Or even a small source clip

2Bdecided
29th March 2010, 11:13
So I deinterlace using Yadif and top field first order. But the deinterlaced video seems to have less quality. Am i doing something wrong or does deinterlacing reduce quality ?Deinterlacing with Yadif reduces quality when anything moves at all.

It also reduces temporal resolution if you deinterlace to 25p / 30p. You can use doing double-rate deinterlacing to get 50p / 60p to solve this problem, if your playback hardware supports it.

There are lots of deinterlacers available. The better ones are quite slow - especially on HD content.

Cheers,
David.

FredThompson
30th March 2010, 19:59
Think about it. Interlaced video has twice the frame rate of progressive video. Deinterlacing throws out half the temporal information by replacing alternating interleaved fields with calculated guesses of what would be in those fields.

Go to a store which has 60 Hz and 120 Hz displays next to each other. If deinterlacing was "perfect" there would not be a need for 120 Hz, would there?

FWIW, 120 Hz displays also use "educated" guesses to create the "missing" fields but they keep far more of the temporal information.

wonkey_monkey
30th March 2010, 20:12
Go to a store which has 60 Hz and 120 Hz displays next to each other. If deinterlacing was "perfect" there would not be a need for 120 Hz, would there?

I don't follow you - it seems like you're mixing up motion interpolation (which >60Hz displays may or may not use) with deinterlacing (which all flat displays do), or I'm just missing your point...

David

FredThompson
30th March 2010, 20:40
An interlaced frame has 2 interwoven images recorded at 2 different times. Deinterlacing involves halving the temporal information. Interpolation is, in essence, a calculated guess of the value of pixels.

Motion interpolation is a method of calculating those "missing" pixels. Those are 2 different things.

Look at an interlaced frame of an object in motion. The upper and lower frames record different periods in time.

Interlaced video has twice the number of "pictures" and half the "resolution" as progressive video.

Once you've deinterlaced you cannot reconstruct the original data so you throw away half the temporal data which means the appearance of motion during playback is less.

To illustrate: use a screen capture utility set to 15 fps and record a non-linear motion (move your mouse, for example.) Then repeat at 30 fps then at 60 fps. Which is smoohter during playback?

Real world objects in motion almost never move in a linear motion in a perfect arc around a video camera.

A flat screen is a progressive display device, true. However, that does not change the result of modifying a data set. Once you reduce the accuracy of your data, you can't recover the original data.

The human eye is better at discerning motion than color, better at edge detection than shade, right?

If you double the frame rate and interpolate the "missing" pixels the result is far more pleasing to view than if you throw away half the temporal information.

Remember, video is a projection of a 3-dimensional data set onto a plane.

GodofaGap
30th March 2010, 20:51
FWIW, 120 Hz displays also use "educated" guesses to create the "missing" fields but they keep far more of the temporal information.
There is no video broadcasting done that has 120 Hz of temporal information at the moment. The issue of de(interlacing) and 60 versus 120 Hz is not really related.

FredThompson
30th March 2010, 21:01
There is no video broadcasting done that has 120 Hz of temporal information at the moment. The issue of de(interlacing) and 60 versus 120 Hz is not really related.Yes. I was trying to think of an easily reproduced way to explain the difference between 30 and 60. Sorry for any unintentional confusion I added.

There is (was?) a fantastic site which compared interlaced, deinterlace and double-rate to illustrate the motion and interpolation things I'm trying to describe. I remember the site but can't seem to find it right now. It might have also been a bobbing comparison.

Here are a few links I found but not the bob site.
http://renomath.org/ejolson/video/interlace/
http://www.slashcam.com/EN/info/1920x1080-50i-or-25p--394672.html

Didée
30th March 2010, 21:35
Are you by any chance thinking of www.100fps.com ? If so, it's not that great. 100fps.com is okay to give starters an idea of the general topic. But it also draws lots of conclusions of the kind "IF we had beaming technology, then we COULD go anywhere" ...

wonkey_monkey
30th March 2010, 21:46
I was just thinking yesterday how it would be nice if YouTube supported 50/60Hz.

I recently bought a new satellite receiver which can also connect via the internet to the BBC's iPlayer, and does so with resulting 50Hz interlaced video :D

I don't mean to rant, but it really disappoints me when some providers seem to think smooth motion just isn't important, and likewise with games... I gave up on Wipeout Pulse after 5 minutes for exactly this reason...

So I deinterlace using Yadif and top field first order. But the deinterlaced video seems to have less quality. Am i doing something wrong or does deinterlacing reduce quality ?

Going back to the OP, does it sound like the lack of smooth motion is part of what you're perceiving as less quality?

David

FredThompson
31st March 2010, 01:09
No, 100fps isn't the site I remember but it does show some good stuff. I like to point to WWE Wrestling, too. Lots of flashing lights, long swinging hair, etc. Ivo (anyone remember him?) likes to illustrate with motor sports.

Similarly, there's a scene in Heavy Metal where a robot's head is spinning. Every other frame is a duplicate for about 2 seconds. Temporal noise reduction yields lots of corruption.

Another example I've seen was artificial scan lines in part of the frame. Deinterlacing mucks that up. Well, pretty much anything with thin lines or things like highly anti-aliased text can also get corrupted. I've got a few frames showing very thin lines in window dividers which get screwed up by most deinterlacing.

Hmm...do any of the temporal analysis methods commonly used include persistance of vision? IOW, are they assuming the calculated pixel is static or do they include "fade" as the object is in motion, sort of time-based anti-aliasing, for lack of a better term.

Good question, David. The word, "quality" can be interpreted many ways.

2Bdecided
1st April 2010, 14:50
Once you've deinterlaced you cannot reconstruct the original data so you throw away half the temporal data which means the appearance of motion during playback is less.I think you're assuming that when people say "deinterlacing", they don't mean bobbing.

I don't think people are so careful with the terms.

E.g. with a "PAL" signal, you can deinterlace to 25p or 50p. The process which delivers 50p could also be called bobbing, or double-rate deinterlacing - but enough people call it deinterlacing that it's fine.

EDIT: Didée just put this far better than me...
http://forum.doom9.org/showthread.php?p=1388023#post1388023


On the more general point: if nothing moves, interlacing doesn't lose any information, and neither does deinterlacing! The same is true for horizontal-only movement.

Vertical movement, and/or fine vertical details, clearly cause a loss of information when interlaced which any deinterlacer is going to struggle to guess at.

But apart from pathological cases like these (and sometimes even including pathological cases like these!), I think you'll find tgmc (for example ;) ) does pretty well.

So the answer to the OP remain: in general, if done very well, your camcorder footage should lose almost nothing when (double-rate) deinterlaced using a good deinterlacer (bobber!).

Cheers,
David.

aegisofrime
1st April 2010, 15:12
I dunno about you guys, but TempGaussMC deinterlaced DVDs look far better than they would stock. Maybe quality is reduced to a computer, but perceived quality, to me at least is way better.

osgZach
1st April 2010, 16:33
TGMC is about the only thing I use these days.

Alex_ander
1st April 2010, 16:37
On the more general point: if nothing moves, interlacing doesn't lose any information, and neither does deinterlacing! The same is true for horizontal-only movement.

Probably you kept in mind the safety of horizontal resizing. In interlaced those horizontally moving parts will be spatially shifted between the 2 fields.

2Bdecided
1st April 2010, 16:44
Probably you kept in mind the safety of horizontal resizing.No, I meant what I said! ;)

In interlaced those horizontally moving parts will be spatially shifted between the 2 fields.Shifted. Not lost. All the information is there. Decent motion compensated deinterlacing can stitch it back together again. Theoretically without loss.

In practice, with so little loss that it doesn't matter. e.g. see TGMC deinterlacing "Stockholm Pan".

Cheers,
David.

FredThompson
1st April 2010, 17:07
Yes, words have definitions and they're used a little too loosely here.

Yes, double frame rate and a non-destructive calculation of the resultant "missing" fields saves all the source data and looks far nicer.

However, the playback equipment must support the frame rate to get the full benefit. 30 interlaced fps converted to 60 fps progressive needs 60 fps display to see the full information. I do this a lot with interlaced source of moving machinery (lots of reflective surfaces, rotary motion, etc.) then throw away every other frame for Internet playback or keep the 60 fps for computer playback. It can save a lot of time compared to intensive motion-compensated conversion to 30 fps progressive (common usage word: deinterlace.)

IMNSHO, storage costs are so low that it's best to save the source because tech improves over time. I DO compress NTSC DV to 4:2:2 at 8000 CBR with TMPGEnc to preserve temporal information and reduce size.

Blue_MiSfit
1st April 2010, 19:32
YADIF is quick and decent quality :)

TGMC is slow and superb quality!

The only time you should NOT deinterlace IMO is if you plan on displaying on an interlaced CRT. Otherwise, AviSynth deinterlacing usually outperforms playback deinterlacing.

~MiSfit

FredThompson
1st April 2010, 19:58
The only time you should NOT deinterlace IMO is if you plan on displaying on an interlaced CRT......and you don't expect any tech changes or need to ever access the source material.

Once you've changed the data, it's changed, irrevocably.

wonkey_monkey
1st April 2010, 20:37
The only time you should NOT deinterlace IMO is if you plan on displaying on an interlaced CRT. Otherwise, AviSynth deinterlacing usually outperforms playback deinterlacing.

That depends what's doing the interlacing. I haven't done any actual tests (which would only be subjective) but I always advocate Samsung TVs as brilliant deinterlacers.

David

Blue_MiSfit
2nd April 2010, 01:16
Of course. Hence IMO :)

I've never been anything but disappointed by the deinterlacing / IVTC capabilities of TVs.

~MiSfit

IanB
2nd April 2010, 06:16
The goal of deinterlacing on modern LCD and Plasma televisions is to present interlaced program material without the visual artefacts that are present when you use a simple progressive display device. i.e. so it looks as good as a quality interlaced CRT.

Proper deinterlacing and IVTC done in Avisynth can be subject to people examining individual frames in isolation and is held to a much higher standard. With a TV you have 1/50th or 1/60th of a second to see an artefact in a single frame. Most visible artefacts are visible because they keep repeating on subsequent frames and the flicker element associated draws your attention.

When dealing with interlaced material, you really need to evaluate it while watching it at normal display speed. Part of the interlaced compromise is spatial resolution is traded for temporal resolution. When interlacing was invented freeze frame and slow motion were not a consideration.
________________________________

Done correctly double rate deinterlacing (bobbing), especially if the original input lines are preserved should not reduce the inherent quality of the video being saved (because you can still retrieve the original data). However the double rate deinterlaced result may not look that great.

2Bdecided
2nd April 2010, 10:18
IMNSHO, storage costs are so low that it's best to save the source because tech improves over time. I DO compress NTSC DV to 4:2:2 at 8000 CBR with TMPGEnc to preserve temporal information and reduce size.I always keep the source.

However, for watching it on a PC, or processing it into some other format, I want to use the highest quality software deinterlacers available. These cannot run in real time, and hence are not built into media players.

Cheers,
David.

2Bdecided
2nd April 2010, 10:23
YADIF is quick and decent quality :)It depends on what your benchmark is. My benchmark is watching interlaced content on a native interlaced display. That will flicker (50Hz CRT) and twitter (fine interlaced detail). Other than these artefacts, the image will be sharp and artefact-free (as long as the source is! ;) ).

You can't say that of any deinterlacer. They all go "wrong" on something.

Also, all the dumb-bob based ones (and most resort to dumb-bob as a last resort - some as a second resort!) soften the source horribly.

Cheers,
David.

Manao
2nd April 2010, 11:57
Just a quick correction :
On the more general point: if nothing moves, interlacing doesn't lose any information, and neither does deinterlacing! The same is true for horizontal-only movement.
No. Interlacing loses information, because it does a vertical low pass on the video. Interlacing a 50p video isn't equivalent to separatefields.selectevery(4,0,3).weave, but closer to resize(width, height / x).resize(width, height).separatefields.selectevery(4,0,3).weave, with x around 1.5.

2Bdecided
2nd April 2010, 13:24
Interlacing loses information, because it does a vertical low pass on the video.It doesn't have to. It typically should (to avoid twitter on interlaced displays), but plenty of cameras and standards converters don't apply a specific vertical low pass filter.

Cheers,
David.

Manao
3rd April 2010, 11:54
I think we already argued that subject here (http://forum.doom9.org/showthread.php?t=138426&page=2). I guess the only way to resolve that disagreement will be to get our hand on a 2160p50 video, and test what happens when you downsize it to 1080p50, then interlace it without downpassing. I still think I'm right, because last time I did that with 720p50 -> 576p50 -> 576i50 without downpassing on the last step, the content was unwatchable on both CRT SD TVs, and flat HD ones.

Regards,

Mathieu

swiego
5th April 2010, 04:43
Right now you have to compromise with modern equipment.

If you deinterlace and encode to some modern format, then you have lost some quality. However, you have gained convenience of playback on any device, and no longer have to worry about the capability of its deinterlacer.

If you try to send the original interlaced material to a display or processor with deinterlacing capabilities, and your source material is not a DVD from Blockbuster, then you take advantage of modern deinterlacers if and only if you can figure out how to get that video stream to the deinterlacer in a way that it can understand what to do with it. I have a player with a ABT2010 and a receiver with a Reon HQV and it's one heck of a challenge trying to get either to recognize a proper interlaced signal over HDMI... heck, it's a challenge just generating that signal.

As a result, I keep my source material and I also keep a highly compressed deinterlaced mp4 or x264 version as well.

2Bdecided
5th April 2010, 18:37
@Manao,

You should low pass. Much modern equipment doesn't. Where's the confusion?

I certainly find my own HD>SD encodings twitter horribly if I don't low pass filter.

Cheers,
David.

hydra3333
6th April 2010, 11:31
Heck. downpass, low pass... any links to a glossary ? :)

Guest
6th April 2010, 13:14
Heck. downpass, low pass... any links to a glossary ? :) Google.com

wonkey_monkey
6th April 2010, 18:06
Heck. downpass, low pass... any links to a glossary ? :)

"blurs it a little bit" ;)

David

knutinh
7th April 2010, 05:53
Just a quick correction :

No. Interlacing loses information, because it does a vertical low pass on the video. Interlacing a 50p video isn't equivalent to separatefields.selectevery(4,0,3).weave, but closer to resize(width, height / x).resize(width, height).separatefields.selectevery(4,0,3).weave, with x around 1.5.
Just a quick correction:
No. As I have told you before (?) non-filtered interlacing is common enough that professional cameras even have a name for that mode.

This does not mean that all interlaced video is non-filtered, just like you are wrong in stating that it is. The truth seems to be that both possibilities happen.

-k

Manao
7th April 2010, 06:25
No. As I have told you before (?) non-filtered interlacing is common enough that professional cameras even have a name for that mode.I must admit I had overlooked your link the first time. I just read it, then searched a bit about frame integration. And I have two remarks :
- I never found one link speaking about frame integration in a real use case. All the links I found were talking about frame integration for particle tracking in research experiment, for night vision shoots, or for video security.
- A lot of the links I found referred to old cameras shooting in SD. Now, I have tested SD without any lowpassing, and the video is unwatchable that way (take any bluray and make the experience yourself by downsizing it and interlacing it without lowpassing, you'll see).

So, the only case we're disagreeing is HD content. As I said, we will need a 2160p video to make the test, and that isn't that easy to come by. If I'm able to find one, I'll keep you informed.

knutinh
7th April 2010, 06:44
Think about it. Interlaced video has twice the frame rate of progressive video. Deinterlacing throws out half the temporal information by replacing alternating interleaved fields with calculated guesses of what would be in those fields.

Go to a store which has 60 Hz and 120 Hz displays next to each other. If deinterlacing was "perfect" there would not be a need for 120 Hz, would there?

FWIW, 120 Hz displays also use "educated" guesses to create the "missing" fields but they keep far more of the temporal information.
I think that this post is confusing the reader rather than enlighting.

Progressive is a method for representing/capturing/reproducing video information in which all pixel sites are available at a number of times per second (framerate)

Interlacing is a method for representing/capturing/reproducing video information in which only half the pixel sites are available at a number of times per second (fieldrate)

Assuming no further data compression:

One motivation for interlacing seems to be simple lossy video compression, ala h264 and MPEG2 (although much cruder). Compared to 50p, 50i gives a 50% bandwidth-reduction at a moderate visual loss.

The table below gives examples.

method field/framerate normalized bandwidth
progressive 25 1
progressive 50 2
interlaced 50 1


If one assumes further data compression, I think that interlacing is, for most cases in 2010 useless.

Interlacing has nothing at all to do with 60Hz and 120Hz displays. That technology is there to mask problems that lcd-technology has with reproducing believable motion (constant illumination).

To the thread-starter:
I would always try to keep the source or the original for backup purposes. If I was to do any processing of the video (recompression, scaling,...) I would deinterlace it as early as possible.

People tend to forget that the whole point of MPEG2, h264 and friends is to produce the best possible (the best that the codec developers were able to at that time) video for a given bitrate. Most codecs works best with progressive video. True interlaced displays are a dying breed, and hopefully interlaced cameras will go with them. My moral then when encountering interlaced material is to convert interlaced material to "double-rate" progressive (keeping all spatial and temporal information in the source, using a deinterlacer that introduce as few artifacts as possible), compress at whatever bitrate you can afford, using the best encoder that you have the time for.

Panasonic has recently released a nice hand-held "AVCHD"-type consumer video camera that records in 1080p60 using AVC/h264/MPEG4 codec at 28mbps. Bluray standards are going "3D" and with that may come the possibility of 1080p60 for regular video (if not, 720p60 is an excellent, if often overlooked option. Scaling spatially is a lot easier than scaling spatio-temporally).

-k