As far as a computer is concerned YUV is no different to RGB. Even
more so if it's YUV 444.
Unless you are doing some form of colour interpretation you shouldn't
need to worry about it.
On 07/05/2009, at 11:23 PM, slippyr4 wrote:
I've considered this a little more this morning. My limited
experience of
this topic had gotten me confused.
It seems to me that the kind of deinterlace I require is trivial in
all
pixel formats where there is no chroma subsampling in the height
axis. I'd
become confused and was thinking that YUV422p was a format like
that, but it
isn't.
Correct 422 is half width, full height.
However, YUV420p does have vertical chroma subsampling, and thus,
unless i'm
still horribly confused, would be considerably more complex to
deinterlace,
because the output chroma channels will need to be computed from 2
different
input channels. I'm not sure how to do that (is it as simple as
Uoutput =
(Ua + Ub) / 2 ??).
At first you might assume that an interlaced 420 format might be quite
difficult to work with.
However the designers of the format thought that it is stupid to have
the same chroma pixel refer to 2 luma pixels in different times, so
the chroma on line 1 refers to the Luma on line 1 and 3 (rather than
in progressive line 1 and 2) the chroma on line 2 refers to the luma
on line 2 and 4. Playback programs (including DVD players) must be
aware of this interlaced chroma and interpret it correctly.
I remember a web page dedicated to Movie players and DVD players that
interpreted interlaced 420 as progressive, showing the artefacts they
produce.
So even with 420 it is a matter of copying every second line to your
de-interlaced frame. Knowing which second line is the tricky part,
requiring a few modulo and +1 *2 /4 type operations to calculate which
line of chroma refers to this line of luma :-)
Hope I haven't confused things too much.
Mark
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user