[vlc-devel] Re: Please help in blending routine

Sigmund Augdal sigmunau at stud.ntnu.no
Sat Jan 3 16:26:07 CET 2004


The U and V planes have half the resolution of the Y plane.

Sigmund
On Fri, Jan 02, 2004 at 01:15:37PM -0500, R. Bernstein wrote:
> Okay got it: 0x80 for the U and V planes is no color. But then this 
> leaves me confused about the x and y incrementing by 2:
> 
>   for( y = 0; y < p_glyph->bitmap.rows; y+=2 )
>    {
>       for( x = 0; x < p_glyph->bitmap.width; x+=2 )
>        {
>          pixel = ( ( pixel * ( 0xFF - alpha ) ) >> 8 ) +
>                   ( 0x80 * alpha >> 8 );
>    ...
> 
> 
> Since there is a multiplication by the no color, then I guess "pixel"
> has to reference one 8-bit quantity, not 2 4-bit quantities packed in
> a byte. And then it looks like there is sampling of only 1 pixel in 4
> -- namely pixel(x,y) and not pixel(x+1,y), pixel(x,y+1) or
> pixel(x+1,y+1).
> 
> If there is a 2x2 reduction from the font bitmap to the final
> image wouldn't it be better to average over the 4 pixels? 
> 
> -- 
> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://developers.videolan.org/lists.html
> If you are in trouble, please contact <postmaster at videolan.org>

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list