View Single Post
Old 15th April 2005, 11:23   #11  |  Link
Dimwitted
Registered User
 
Join Date: Apr 2005
Posts: 5
That's the way MPEG 4:2:0 works. PAL DV is a bit more peculiar. Assuming we put the samples into a 720 x 576 frame:

The first row of pixels gets 360 2-pixels-wide V (Cr) blocks, and no U (Cb) samples.

The second row of pixels gets another 360 2-pixels-wide V blocks (because it's the first row of the next field) and no U samples.

The third row of pixels (the second row of the upper field) gets 360 2-pixels-wide U blocks and no V samples.

The fourth row of pixels gets another 360 2-pixels-wide U blocks and no V samples.

Hope that makes sense; it's hard to describe. The way that DV codecs generally deal with the absense of U and V samples is to either duplicate the samples from two rows above in the case of V and two rows below in the case of U (the Panasonic codec does this, as does Quicktime) or interpolate the missing samples (as far as I'm aware, though, they all do this on a field by field basis, which is why my method gives better results for progressive footage).

Anyway, if you could have a stab at it, that'd be marvellous! I've been looking over the example code and it's pretty baffling to me...
Dimwitted is offline   Reply With Quote