diff options
author | Jeff Muizelaar <jmuizelaar@mozilla.com> | 2010-05-06 14:05:21 -0400 |
---|---|---|
committer | Jeff Muizelaar <jmuizelaar@mozilla.com> | 2010-05-06 16:22:22 -0400 |
commit | bdf1eb60305b67d457c77044e90158625a01330e (patch) | |
tree | ae5db841db6f5d45767eefa50de34ab7773fa1a2 /qcmsint.h | |
parent | 24c1e2a45daf95f7ab9f40dc7a2b75e8c8b14e44 (diff) |
Reduce precision of output tables
Diffstat (limited to 'qcmsint.h')
-rw-r--r-- | qcmsint.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 |