Lines Matching refs:prof
98 static int mono(jas_iccprof_t *prof, int op, jas_cmpxformseq_t **pxformseq);
99 static int triclr(jas_iccprof_t *prof, int op, jas_cmpxformseq_t **retpxformseq);
114 #define fwdpxformseq(prof, intent) \ argument
115 (((prof)->pxformseqs[SEQFWD(intent)]) ? \
116 ((prof)->pxformseqs[SEQFWD(intent)]) : \
117 ((prof)->pxformseqs[SEQFWD(0)]))
119 #define revpxformseq(prof, intent) \ argument
120 (((prof)->pxformseqs[SEQREV(intent)]) ? \
121 ((prof)->pxformseqs[SEQREV(intent)]) : \
122 ((prof)->pxformseqs[SEQREV(0)]))
124 #define simpxformseq(prof, intent) \ argument
125 (((prof)->pxformseqs[SEQSIM(intent)]) ? \
126 ((prof)->pxformseqs[SEQSIM(intent)]) : \
127 ((prof)->pxformseqs[SEQSIM(0)]))
129 #define gampxformseq(prof) ((prof)->pxformseqs[SEQGAM]) argument
147 jas_cmprof_t *prof; in jas_cmprof_createfromclrspc() local
150 prof = 0; in jas_cmprof_createfromclrspc()
153 if (!(prof = jas_cmprof_createsycc())) in jas_cmprof_createfromclrspc()
159 if (!(prof = jas_cmprof_createfromiccprof(iccprof))) in jas_cmprof_createfromclrspc()
164 prof->clrspc = clrspc; in jas_cmprof_createfromclrspc()
167 return prof; in jas_cmprof_createfromclrspc()
176 jas_cmprof_t *prof; in jas_cmprof_createsycc() local
184 if (!(prof = jas_cmprof_createfromclrspc(JAS_CLRSPC_SRGB))) in jas_cmprof_createsycc()
186 prof->clrspc = JAS_CLRSPC_SYCBCR; in jas_cmprof_createsycc()
187 assert(prof->numchans == 3 && prof->numrefchans == 3); in jas_cmprof_createsycc()
188 assert(prof->refclrspc == JAS_CLRSPC_CIEXYZ); in jas_cmprof_createsycc()
223 if (prof->pxformseqs[j]) { in jas_cmprof_createsycc()
224 if (jas_cmpxformseq_insertpxform(prof->pxformseqs[j], 0, in jas_cmprof_createsycc()
229 if (prof->pxformseqs[j]) { in jas_cmprof_createsycc()
230 if (jas_cmpxformseq_insertpxform(prof->pxformseqs[j], in jas_cmprof_createsycc()
238 return prof; in jas_cmprof_createsycc()
245 jas_cmprof_t *prof; in jas_cmprof_createfromiccprof() local
250 prof = 0; in jas_cmprof_createfromiccprof()
254 if (!(prof = jas_cmprof_create())) in jas_cmprof_createfromiccprof()
257 if (!(prof->iccprof = jas_iccprof_copy(iccprof))) in jas_cmprof_createfromiccprof()
259 prof->clrspc = icctoclrspc(icchdr.colorspc, 0); in jas_cmprof_createfromiccprof()
260 prof->refclrspc = icctoclrspc(icchdr.refcolorspc, 1); in jas_cmprof_createfromiccprof()
261 prof->numchans = jas_clrspc_numchans(prof->clrspc); in jas_cmprof_createfromiccprof()
262 prof->numrefchans = jas_clrspc_numchans(prof->refclrspc); in jas_cmprof_createfromiccprof()
264 if (prof->numchans == 1) { in jas_cmprof_createfromiccprof()
265 if (mono(prof->iccprof, 0, &fwdpxformseq)) in jas_cmprof_createfromiccprof()
267 if (mono(prof->iccprof, 1, &revpxformseq)) in jas_cmprof_createfromiccprof()
269 } else if (prof->numchans == 3) { in jas_cmprof_createfromiccprof()
270 if (triclr(prof->iccprof, 0, &fwdpxformseq)) in jas_cmprof_createfromiccprof()
272 if (triclr(prof->iccprof, 1, &revpxformseq)) in jas_cmprof_createfromiccprof()
275 prof->pxformseqs[SEQFWD(0)] = fwdpxformseq; in jas_cmprof_createfromiccprof()
276 prof->pxformseqs[SEQREV(0)] = revpxformseq; in jas_cmprof_createfromiccprof()
279 if (prof->numchans > 1) { in jas_cmprof_createfromiccprof()
280 lut(prof->iccprof, 0, PER, &pxformseq); in jas_cmprof_createfromiccprof()
281 pxformseqs_set(prof, SEQFWD(PER), pxformseq); in jas_cmprof_createfromiccprof()
282 lut(prof->iccprof, 1, PER, &pxformseq); in jas_cmprof_createfromiccprof()
283 pxformseqs_set(prof, SEQREV(PER), pxformseq); in jas_cmprof_createfromiccprof()
284 lut(prof->iccprof, 0, CLR, &pxformseq); in jas_cmprof_createfromiccprof()
285 pxformseqs_set(prof, SEQREV(CLR), pxformseq); in jas_cmprof_createfromiccprof()
286 lut(prof->iccprof, 1, CLR, &pxformseq); in jas_cmprof_createfromiccprof()
287 pxformseqs_set(prof, SEQREV(CLR), pxformseq); in jas_cmprof_createfromiccprof()
288 lut(prof->iccprof, 0, SAT, &pxformseq); in jas_cmprof_createfromiccprof()
289 pxformseqs_set(prof, SEQREV(SAT), pxformseq); in jas_cmprof_createfromiccprof()
290 lut(prof->iccprof, 1, SAT, &pxformseq); in jas_cmprof_createfromiccprof()
291 pxformseqs_set(prof, SEQREV(SAT), pxformseq); in jas_cmprof_createfromiccprof()
295 return prof; in jas_cmprof_createfromiccprof()
304 if (prof) { in jas_cmprof_createfromiccprof()
305 jas_cmprof_destroy(prof); in jas_cmprof_createfromiccprof()
314 jas_cmprof_t *prof; in jas_cmprof_create() local
315 if (!(prof = jas_malloc(sizeof(jas_cmprof_t)))) in jas_cmprof_create()
317 memset(prof, 0, sizeof(jas_cmprof_t)); in jas_cmprof_create()
318 prof->iccprof = 0; in jas_cmprof_create()
320 prof->pxformseqs[i] = 0; in jas_cmprof_create()
321 return prof; in jas_cmprof_create()
324 void jas_cmprof_destroy(jas_cmprof_t *prof) in jas_cmprof_destroy() argument
328 if (prof->pxformseqs[i]) { in jas_cmprof_destroy()
329 jas_cmpxformseq_destroy(prof->pxformseqs[i]); in jas_cmprof_destroy()
330 prof->pxformseqs[i] = 0; in jas_cmprof_destroy()
333 if (prof->iccprof) in jas_cmprof_destroy()
334 jas_iccprof_destroy(prof->iccprof); in jas_cmprof_destroy()
335 jas_free(prof); in jas_cmprof_destroy()
338 jas_cmprof_t *jas_cmprof_copy(jas_cmprof_t *prof) in jas_cmprof_copy() argument
345 newprof->clrspc = prof->clrspc; in jas_cmprof_copy()
346 newprof->numchans = prof->numchans; in jas_cmprof_copy()
347 newprof->refclrspc = prof->refclrspc; in jas_cmprof_copy()
348 newprof->numrefchans = prof->numrefchans; in jas_cmprof_copy()
349 newprof->iccprof = jas_iccprof_copy(prof->iccprof); in jas_cmprof_copy()
351 if (prof->pxformseqs[i]) { in jas_cmprof_copy()
352 if (!(newprof->pxformseqs[i] = jas_cmpxformseq_copy(prof->pxformseqs[i]))) in jas_cmprof_copy()
1277 jas_iccprof_t *jas_iccprof_createfromcmprof(jas_cmprof_t *prof) in jas_iccprof_createfromcmprof() argument
1279 return jas_iccprof_copy(prof->iccprof); in jas_iccprof_createfromcmprof()