[MPlayer-users] -vf ilpack

D Richard Felker III dalias at aerifal.cx
Sat Mar 6 02:24:17 CET 2004


On Fri, Mar 05, 2004 at 07:55:38PM +0200, Ville Saari wrote:
> On Thu, Mar 04, 2004 at 06:42:37PM -0500, D Richard Felker III wrote:
> 
> > Nope, that's what I thought when I originally wrote the filter. Then I
> > read a proper explanation of how interlaced 4:2:0 works. It's really
> > quite clever. :)
> 
> Is this explanation available on-line?

Yes but I can't seem to find the url anymore. I think I posted it to
the list once (probably mplayer-dev-eng).

> My undestanding of the thing has been that interlaced 4:2:0 would be
> equivalent to doing progressive 4:2:0-sampling for each field separately
> and then interlacing the results. The artifact that results from playing
> such video without deinterlacing and without ilpack seems to support
> this theory.
> 
> Am I wrong?

Yes, you're wrong. That's what I used to think. If you 4:2:0 sampled
the fields separately, then chroma line 0 would come from midway
between luma lines 0 and 2, i.e. lined up with luma line 1 (from the
other field). This is wrong. Instead, chroma line 0 is sampled halfway
between luma lines 0 and 1, JUST LIKE PROGRESSIVE VIDEO, except that
only the image from the top field is used. In other words, it's
sampled 1/4 the way between luma line 0 and line 2. And chroma line 1
is sampled 3/4 the way between luma line 1 and line 3.

If you think about it, it's actually NECESSARY that sampling be done
this way, since there's no way to tell reliably if a frame is
interlaced or progressive. So DVD players would play progressive video
wrong if interlaced and progressive video didn't use the same spacial
locations for chroma sampling.

This also means that if you interpolate chroma back for each line on a
weighted per-field basis, you'll get minimal artifacts even if the
video was already progressive. Whoever designed this was very smart.
:)

Rich




More information about the MPlayer-users mailing list