| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } qcms_output_type; | 76 } qcms_output_type; |
| 77 | 77 |
| 78 /* Output data format for qcms_transform_get_input|output_trc_rgba() */ | 78 /* Output data format for qcms_transform_get_input|output_trc_rgba() */ |
| 79 typedef enum { | 79 typedef enum { |
| 80 QCMS_TRC_PARAMETRIC, // Not implemented. | 80 QCMS_TRC_PARAMETRIC, // Not implemented. |
| 81 QCMS_TRC_FLOAT, // Not implemented. | 81 QCMS_TRC_FLOAT, // Not implemented. |
| 82 QCMS_TRC_HALF_FLOAT, // IEE754: binary16. | 82 QCMS_TRC_HALF_FLOAT, // IEE754: binary16. |
| 83 QCMS_TRC_USHORT, // 0.16 fixed point. | 83 QCMS_TRC_USHORT, // 0.16 fixed point. |
| 84 } qcms_trc_type; | 84 } qcms_trc_type; |
| 85 | 85 |
| 86 /* Output data of specific channel curve for qcms_profile_get_parametric_curve()
*/ |
| 87 typedef enum { |
| 88 QCMS_TRC_RED, |
| 89 QCMS_TRC_GREEN, |
| 90 QCMS_TRC_BLUE, |
| 91 } qcms_trc_channel; |
| 92 |
| 86 typedef struct { | 93 typedef struct { |
| 87 double x; | 94 double x; |
| 88 double y; | 95 double y; |
| 89 double Y; | 96 double Y; |
| 90 } qcms_CIE_xyY; | 97 } qcms_CIE_xyY; |
| 91 | 98 |
| 92 typedef struct { | 99 typedef struct { |
| 93 qcms_CIE_xyY red; | 100 qcms_CIE_xyY red; |
| 94 qcms_CIE_xyY green; | 101 qcms_CIE_xyY green; |
| 95 qcms_CIE_xyY blue; | 102 qcms_CIE_xyY blue; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 qcms_bool qcms_profile_match(qcms_profile *p1, qcms_profile *p2); | 134 qcms_bool qcms_profile_match(qcms_profile *p1, qcms_profile *p2); |
| 128 const char* qcms_profile_get_description(qcms_profile *profile); | 135 const char* qcms_profile_get_description(qcms_profile *profile); |
| 129 | 136 |
| 130 void qcms_profile_precache_output_transform(qcms_profile *profile); | 137 void qcms_profile_precache_output_transform(qcms_profile *profile); |
| 131 | 138 |
| 132 size_t qcms_profile_get_vcgt_channel_length(qcms_profile *profile); | 139 size_t qcms_profile_get_vcgt_channel_length(qcms_profile *profile); |
| 133 qcms_bool qcms_profile_get_vcgt_rgb_channels(qcms_profile *profile, unsigned sho
rt *data); | 140 qcms_bool qcms_profile_get_vcgt_rgb_channels(qcms_profile *profile, unsigned sho
rt *data); |
| 134 | 141 |
| 135 float qcms_profile_ntsc_relative_gamut_size(qcms_profile *profile); | 142 float qcms_profile_ntsc_relative_gamut_size(qcms_profile *profile); |
| 136 | 143 |
| 144 size_t qcms_profile_get_parametric_curve(qcms_profile *profile, qcms_trc_channel
channel, float data[7]); |
| 145 |
| 137 qcms_transform* qcms_transform_create( | 146 qcms_transform* qcms_transform_create( |
| 138 qcms_profile *in, qcms_data_type in_type, | 147 qcms_profile *in, qcms_data_type in_type, |
| 139 qcms_profile *out, qcms_data_type out_type, | 148 qcms_profile *out, qcms_data_type out_type, |
| 140 qcms_intent intent); | 149 qcms_intent intent); |
| 141 | 150 |
| 142 size_t qcms_transform_get_input_trc_rgba( | 151 size_t qcms_transform_get_input_trc_rgba( |
| 143 qcms_transform *transform, qcms_profile *in, qcms_trc_type type,
unsigned short *data); | 152 qcms_transform *transform, qcms_profile *in, qcms_trc_type type,
unsigned short *data); |
| 144 size_t qcms_transform_get_output_trc_rgba( | 153 size_t qcms_transform_get_output_trc_rgba( |
| 145 qcms_transform *transform, qcms_profile *out, qcms_trc_type type
, unsigned short *data); | 154 qcms_transform *transform, qcms_profile *out, qcms_trc_type type
, unsigned short *data); |
| 146 | 155 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 162 } | 171 } |
| 163 #endif | 172 #endif |
| 164 | 173 |
| 165 /* | 174 /* |
| 166 * In general, QCMS is not threadsafe. However, it should be safe to create | 175 * In general, QCMS is not threadsafe. However, it should be safe to create |
| 167 * profile and transformation objects on different threads, so long as you | 176 * profile and transformation objects on different threads, so long as you |
| 168 * don't use the same objects on different threads at the same time. | 177 * don't use the same objects on different threads at the same time. |
| 169 */ | 178 */ |
| 170 | 179 |
| 171 #endif | 180 #endif |
| OLD | NEW |