| OLD | NEW |
| 1 /* vim: set ts=8 sw=8 noexpandtab: */ | 1 /* vim: set ts=8 sw=8 noexpandtab: */ |
| 2 // qcms | 2 // qcms |
| 3 // Copyright (C) 2009 Mozilla Foundation | 3 // Copyright (C) 2009 Mozilla Foundation |
| 4 // | 4 // |
| 5 // Permission is hereby granted, free of charge, to any person obtaining | 5 // Permission is hereby granted, free of charge, to any person obtaining |
| 6 // a copy of this software and associated documentation files (the "Software"), | 6 // a copy of this software and associated documentation files (the "Software"), |
| 7 // to deal in the Software without restriction, including without limitation | 7 // to deal in the Software without restriction, including without limitation |
| 8 // the rights to use, copy, modify, merge, publish, distribute, sublicense, | 8 // the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 9 // and/or sell copies of the Software, and to permit persons to whom the Softwar
e | 9 // and/or sell copies of the Software, and to permit persons to whom the Softwar
e |
| 10 // is furnished to do so, subject to the following conditions: | 10 // is furnished to do so, subject to the following conditions: |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 size_t output_gamma_lut_g_length; | 87 size_t output_gamma_lut_g_length; |
| 88 size_t output_gamma_lut_b_length; | 88 size_t output_gamma_lut_b_length; |
| 89 | 89 |
| 90 size_t output_gamma_lut_gray_length; | 90 size_t output_gamma_lut_gray_length; |
| 91 | 91 |
| 92 struct precache_output *output_table_r; | 92 struct precache_output *output_table_r; |
| 93 struct precache_output *output_table_g; | 93 struct precache_output *output_table_g; |
| 94 struct precache_output *output_table_b; | 94 struct precache_output *output_table_b; |
| 95 | 95 |
| 96 void (*transform_fn)(struct _qcms_transform *transform, unsigned char *s
rc, unsigned char *dest, size_t length, struct _qcms_format_type output_format); | 96 void (*transform_fn)(struct _qcms_transform *transform, unsigned char *s
rc, unsigned char *dest, size_t length, struct _qcms_format_type output_format); |
| 97 |
| 98 #define TRANSFORM_FLAG_MATRIX 0x0001 |
| 99 |
| 100 uint16_t transform_flags; |
| 97 }; | 101 }; |
| 98 | 102 |
| 99 struct matrix { | 103 struct matrix { |
| 100 float m[3][3]; | 104 float m[3][3]; |
| 101 bool invalid; | 105 bool invalid; |
| 102 }; | 106 }; |
| 103 | 107 |
| 104 struct qcms_modular_transform; | 108 struct qcms_modular_transform; |
| 105 | 109 |
| 106 typedef void (*transform_module_fn_t)(struct qcms_modular_transform *transform,
float *src, float *dest, size_t length); | 110 typedef void (*transform_module_fn_t)(struct qcms_modular_transform *transform,
float *src, float *dest, size_t length); |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 329 |
| 326 #define qcms_atomic_increment(x) _InterlockedIncrement((long volatile *)&x) | 330 #define qcms_atomic_increment(x) _InterlockedIncrement((long volatile *)&x) |
| 327 #define qcms_atomic_decrement(x) _InterlockedDecrement((long volatile*)&x) | 331 #define qcms_atomic_decrement(x) _InterlockedDecrement((long volatile*)&x) |
| 328 | 332 |
| 329 #else | 333 #else |
| 330 | 334 |
| 331 #define qcms_atomic_increment(x) __sync_add_and_fetch(&x, 1) | 335 #define qcms_atomic_increment(x) __sync_add_and_fetch(&x, 1) |
| 332 #define qcms_atomic_decrement(x) __sync_sub_and_fetch(&x, 1) | 336 #define qcms_atomic_decrement(x) __sync_sub_and_fetch(&x, 1) |
| 333 | 337 |
| 334 #endif | 338 #endif |
| OLD | NEW |