summaryrefslogtreecommitdiff
path: root/qcmsint.h
diff options
context:
space:
mode:
authorJeff Muizelaar <jmuizelaar@mozilla.com>2010-05-06 14:05:21 -0400
committerJeff Muizelaar <jmuizelaar@mozilla.com>2010-05-06 16:22:22 -0400
commitbdf1eb60305b67d457c77044e90158625a01330e (patch)
treeae5db841db6f5d45767eefa50de34ab7773fa1a2 /qcmsint.h
parent24c1e2a45daf95f7ab9f40dc7a2b75e8c8b14e44 (diff)
Reduce precision of output tables
Diffstat (limited to 'qcmsint.h')
-rw-r--r--qcmsint.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/qcmsint.h b/qcmsint.h
index b2e7bf6..217b651 100644
--- a/qcmsint.h
+++ b/qcmsint.h
@@ -1,13 +1,20 @@
#include "qcms.h"
#include "qcmstypes.h"
-/* used as a 16bit lookup table for the output transformation.
+/* used as a lookup table for the output transformation.
* we refcount them so we only need to have one around per output
* profile, instead of duplicating them per transform */
struct precache_output
{
int ref_count;
- uint8_t data[65535];
+ /* We previously used a count of 65536 here but that seems like more
+ * precision than we actually need. By reducing the size we can
+ * improve startup performance and reduce memory usage. ColorSync on
+ * 10.5 uses 4097 which is perhaps because they use a fixed point
+ * representation where 1. is represented by 0x1000. */
+#define PRECACHE_OUTPUT_SIZE 8192
+#define PRECACHE_OUTPUT_MAX (PRECACHE_OUTPUT_SIZE-1)
+ uint8_t data[PRECACHE_OUTPUT_SIZE];
};
#ifdef _MSC_VER