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

R. Bernstein rocky at panix.com
Fri Jan 2 19:15:37 CET 2004

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

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>

More information about the vlc-devel mailing list