From f501b8d7c5e02da4ad56b85aa06403e078814b94 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 21 Jul 2011 23:55:11 +0000 Subject: Documentation Updates git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3810 42af7a65-404d-4744-a932-0658087f49c3 --- apps/examples/nximage/nximage_bitmap.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/examples/nximage/nximage_bitmap.c b/apps/examples/nximage/nximage_bitmap.c index 17bfd4c8e..f672ce3fe 100644 --- a/apps/examples/nximage/nximage_bitmap.c +++ b/apps/examples/nximage/nximage_bitmap.c @@ -144,11 +144,18 @@ static const nxgl_mxpixel_t g_lut[IMAGE_NLUTCODES] = 0x53fc /* Codes 140-140 */ }; -/* RGB8 (332) Colors */ +/* 8-bit color lookups. NOTE: This is really dumb! The lookup index is 8-bits and it used + * to lookup an 8-bit value. There is no savings in that! It would be better to just put + * the 8-bit color/greyscale value in the run-length encoded image and save the cost of these + * pointless lookups. But these p;ointless lookups do make the logic compatible with the + * 16- and 24-bit types. + */ #elif CONFIG_EXAMPLES_NXIMAGE_BPP == 8 # ifdef CONFIG_EXAMPLES_NXIMAGE_GREYSCALE +/* 8-bit Greyscale */ + static const uint8_t g_lut[IMAGE_NLUTCODES] = { 0x00, 0x19, 0x8b, 0x46, 0x4a, 0x0b, 0x8d, 0x41, 0x44, 0x27, 0x32, 0x92, 0x59, 0x34, 0x6d, 0xdb, /* Codes 0-15 */ @@ -163,6 +170,8 @@ static const uint8_t g_lut[IMAGE_NLUTCODES] = # else /* CONFIG_EXAMPLES_NXIMAGE_GREYSCALE */ +/* RGB8 (332) Colors */ + static const nxgl_mxpixel_t g_lut[IMAGE_NLUTCODES] = { 0x00, 0x25, 0x77, 0x4b, 0x01, 0x47, 0x26, 0x4a, 0x4f, 0x72, 0xdf, 0x93, 0xff, 0x27, 0xbb, 0xdb, /* Codes 0-15 */ -- cgit v1.2.3