From 00a8b13b5bf8cf2c367a0db3ae09086e45230968 Mon Sep 17 00:00:00 2001 From: Henning Makholm Date: Sat, 11 Feb 2006 18:00:00 -0500 Subject: Import of release 0.9 --- (limited to 'pixels.h') diff --git a/pixels.h b/pixels.h index 8d8ea2e..1ee5219 100644 --- a/pixels.h +++ b/pixels.h @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef PIXELS_H @@ -53,7 +53,17 @@ typedef uint32_t rgba ; #define NULLALPHA(rgba) ((uint8_t)(rgba) == 0) #define NEWALPHA(rgb,a) (((rgba)(rgb) & 0xFFFFFF00) + (a)) +#ifdef PRECOMPUTED_SCALETABLE extern const uint8_t scaletable[256][256] ; +#define INIT_SCALETABLE_IF(foo) ((void)0) +#else +extern uint8_t scaletable[256][256] ; +extern int ok_scaletable ; +void mk_scaletable(void); +#define INIT_SCALETABLE_IF(foo) \ + (ok_scaletable || !(foo) || (mk_scaletable(),0) ) +#endif + extern const rgba graytable[256] ; extern rgba colormap[256] ; extern unsigned colormapLength ; -- cgit v0.9.1