[MPlayer-dev-eng] Re: ccache

Billy Biggs vektor at dumbterm.net
Mon Jan 6 05:22:27 CET 2003


Arpi (arpi at thot.banki.hu):

> and anyway, what does the whole chroma subsamplin means ?
> there are 4 pixels:
> P1 P2
> P3 P4
> 
> is U the average of P1..P4's U values, is the average of P1 & P3's
> average, is P1's U or what?

  Chroma downsampling in video is downsampling in the signal processing
sense.  So, when you have 4:2:2 video:

  P1 P2 P3 P4 P5 P6
  C1    C2    C3

  Chroma value C2 is from the 2x downsampled version of the full pixel
mesh.  If you go by the ITU-R BT.601 digital standard for 4:2:2, then
you need a _really_ wide filter to meet the standard.  I have one here
which meets it, and C2 depends on the adjacent 35 pixels in a weighted
average.

  If you look at the reference implementation for MPEG2, they have a
filter to convert from 4:2:0 to 4:2:2 that is pretty wide:

        /* New FIR filter coefficients (*256): 3 -16 67 227 -32 7 */
        dst[w*j2] =     Clip[(int)(  3*src[w*jm3]
                             -16*src[w*jm2]
                             +67*src[w*jm1]
                            +227*src[w*j]
                             -32*src[w*jp1]
                             +7*src[w*jp2]+128)>>8];

  So, each output chroma sample depends on the 6 adjacent chroma samples
vertically.  I don't know if this meets the spec for MPEG2 or not
though.

-- 
Billy Biggs
vektor at dumbterm.net


More information about the MPlayer-dev-eng mailing list