
Philips Semiconductors
PNX15xx Series
Volume 1 of 1
Chapter 20: 2D Drawing Engine
PNX15XX_SER_3
Koninklijke Philips Electronics N.V. 2006. All rights reserved.
Product data sheet
Rev. 3 — 17 March 2006
20-9
Alpha values in 32-bit pixels are always in the upper byte of the DWORD.
3.1.2
Mono Expand
The Engine needs to deal with two types of monochrome data from the host: fonts
and bitmaps. The primary difference between fonts and bitmaps is how data is
padded to byte boundaries.
First, it is worthwhile to note the bit ordering of monochrome data in a DWORD.Bit7is
the left most pixel, bit 24 is the right most pixel. It is (unfortunately) a mish-mash of
data formats since pixels in a byte are big-endian, but bytes are little-endian ordered.
Thus, in a DWORD, bits are processed in the following order:
bit7, bit6, bit5,... bit0, bit15, bit4F4... bit8, bit 23... bit16, bit31... bit24
Fonts can be transferred to the drawing engine in a highly packed format with no pad
data between bits on adjacent scanlines. Pad is added after the last bits in the last
data byte. Since the font data in system memory always begins on a byte boundary,
the host processor can easily arrange to deliver a series of 32-bit aligned DWORDs to
the Engine. This font format has been widely used by Microsoft since Windows 95.
// now update the destination
if (BltCtl.A[3] == 0)
begin
Dst.red = clamp(Src.red + (1 – Src.alpha) * Dst.red) ;
Dst.green = clamp(Src.green + (1 – Src.alpha) * Dst.green) ;
Dst.blue = clamp(Src.blue + (1 – Src.alpha) * Dst.blue) ;
// optionally update the dst alpha
if (BltCtrl.A[2])
Dst.alpha = clamp(Src.alpha + (1 – Src.alpha) * Dst.alpha);
end
else
begin
Dst.red = clamp(Src.red);
Dst.green = clamp(Src.green);
Dst.blue = clamp(Src.blue);
// optionally update the dst alpha
if (BltCtrl.A[2])
Dst.alpha = clamp(Src.alpha)
end