On Fri, 4 Jan 2002, Billy Biggs wrote:

>   Please, please correct me if I'm wrong here.  In MPEG sampling, the
> chrominance sample is halfway between the two luminance samples on the
> same vertical scanline (by is138182):
>
>    o   o      where   o == luma sample
>    x                  x == chroma sample
>    o   o
Note that this depends on which version of MPEG you're talking about.  I
forget which (I can look it up if anyone's interested), but one of the
MPEG standards specifies that the chroma samples are located between the
lumas in both dimensions, i.e.:

o   o
  x
o   o

>   So, are not the chroma samples above and below the same distance away?
> I thought this was the purpose of MPEG sampling, that is, it's
> reasonable to convert to 4:2:2 sampling by doubling the scanlines.
Possibly, but you have to beware what the chroma position is for the 4:2:2
as well.  If the 4:2:2 specifies colocated first luma and chroma, it will
work nicely for the first form (above).  If in the middle, it'll work for
the second form.

>   What do you mean by shifting the chroma by one pixel?
If a chroma sample is colocated with a luma sample (in either dimension),
you get the following:

o    o    o    o    o
     x         x
|----^----|----^----|

Where a single chroma sample impacts three adjacent pixels (note the
difference between pixel and sample...), and the luma samples in the
middle actually get chroma from two different chroma samples.  In this
case you have to give differing amounts to each new (resampled) sample,
according to the percentages mentioned previously.

      Erik Walthinsen <[EMAIL PROTECTED]> - System Administrator
        __
       /  \                GStreamer - The only way to stream!
      |    | M E G A        ***** http://gstreamer.net/ *****
      _\  /_

_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to