[MPlayer-dev-eng] [PATCH] vf_osd updates - fully baked?

Rich Felker dalias at aerifal.cx
Tue Sep 13 05:37:16 CEST 2005


On Mon, Sep 12, 2005 at 11:59:56AM -0400, Jason Tackaberry wrote:
> > Also after extracting the alpha to a seperate plane you should be able
> > to scale it by using the scaler for IMGFMT_Y800.
> 
> This is an interesting idea, but I'm not sure if it would work for the
> chroma alpha plane.  Given pixels of the luma alpha plane:
> 
>      A   B
>      C   D
> 
> The chroma alpha is (A+C)>>1.  (In other words, this is just how chroma
> is subsampled for YV12: the chroma alpha is done the same way.)  I could

This is NOT the definition. The definition is that the chroma sample
point is halfway between the two luma sample points, not that it's the
average of chroma samples at the two luma sample points. Averaging
neighbors is one way to try to approximate what the sample at the
missing point should be.

> take the luma alpha plane (which is equivalent the the alpha channel of
> the BGRA image) and scale it down to w/2 by h/2, and the resulting plane
> might be suitable for use as the chroma alpha plane, but I'm not sure if
> it's technically correct given the above definition.  Would any of the
> scaler algorithms yield this?

Theoretically the most correct is the sinc scaler, but bilinear
(averaging) will give you the best results I think.. :)

Rich




More information about the MPlayer-dev-eng mailing list