Lines Matching refs:pxformseq

92 static int jas_cmpxformseq_append(jas_cmpxformseq_t *pxformseq,
94 static int jas_cmpxformseq_appendcnvt(jas_cmpxformseq_t *pxformseq,
96 static int jas_cmpxformseq_resize(jas_cmpxformseq_t *pxformseq, int n);
98 static int mono(jas_iccprof_t *prof, int op, jas_cmpxformseq_t **pxformseq);
101 static void jas_cmpxformseq_destroy(jas_cmpxformseq_t *pxformseq);
102 static int jas_cmpxformseq_delete(jas_cmpxformseq_t *pxformseq, int i);
104 static jas_cmpxformseq_t *jas_cmpxformseq_copy(jas_cmpxformseq_t *pxformseq);
106 static int jas_cmpxformseq_insertpxform(jas_cmpxformseq_t *pxformseq,
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()
382 if (!(xform->pxformseq = jas_cmpxformseq_create())) in jas_cmxform_create()
391 if (jas_cmpxformseq_append(xform->pxformseq, inpxformseq) || in jas_cmxform_create()
392 jas_cmpxformseq_appendcnvt(xform->pxformseq, in jas_cmxform_create()
394 jas_cmpxformseq_append(xform->pxformseq, outpxformseq)) in jas_cmxform_create()
404 if (jas_cmpxformseq_append(xform->pxformseq, outpxformseq) || in jas_cmxform_create()
405 jas_cmpxformseq_appendcnvt(xform->pxformseq, in jas_cmxform_create()
407 jas_cmpxformseq_append(xform->pxformseq, inpxformseq)) in jas_cmxform_create()
426 if (jas_cmpxformseq_append(xform->pxformseq, inpxformseq) || in jas_cmxform_create()
427 jas_cmpxformseq_appendcnvt(xform->pxformseq, in jas_cmxform_create()
431 if (jas_cmpxformseq_append(xform->pxformseq, outpxformseq) || in jas_cmxform_create()
432 jas_cmpxformseq_append(xform->pxformseq, altoutpxformseq)) in jas_cmxform_create()
435 if (jas_cmpxformseq_append(xform->pxformseq, outpxformseq)) in jas_cmxform_create()
438 if (jas_cmpxformseq_appendcnvt(xform->pxformseq, in jas_cmxform_create()
440 jas_cmpxformseq_append(xform->pxformseq, prfpxformseq)) in jas_cmxform_create()
450 if (jas_cmpxformseq_append(xform->pxformseq, inpxformseq) || in jas_cmxform_create()
451 jas_cmpxformseq_appendcnvt(xform->pxformseq, in jas_cmxform_create()
453 jas_cmpxformseq_append(xform->pxformseq, outpxformseq)) in jas_cmxform_create()
469 jas_cmpxformseq_t *pxformseq; in jas_cmxform_apply() local
508 pxformseq = xform->pxformseq; in jas_cmxform_apply()
509 for (i = 0; i < pxformseq->numpxforms; ++i) { in jas_cmxform_apply()
510 pxform = pxformseq->pxforms[i]; in jas_cmxform_apply()
544 for (i = 0; i < pxformseq->numpxforms; ++i) { in jas_cmxform_apply()
545 pxform = pxformseq->pxforms[i]; in jas_cmxform_apply()
580 if (xform->pxformseq) in jas_cmxform_destroy()
581 jas_cmpxformseq_destroy(xform->pxformseq); in jas_cmxform_destroy()
591 jas_cmpxformseq_t *pxformseq; in jas_cmpxformseq_create() local
592 pxformseq = 0; in jas_cmpxformseq_create()
593 if (!(pxformseq = jas_malloc(sizeof(jas_cmpxformseq_t)))) in jas_cmpxformseq_create()
595 pxformseq->pxforms = 0; in jas_cmpxformseq_create()
596 pxformseq->numpxforms = 0; in jas_cmpxformseq_create()
597 pxformseq->maxpxforms = 0; in jas_cmpxformseq_create()
598 if (jas_cmpxformseq_resize(pxformseq, 16)) in jas_cmpxformseq_create()
600 return pxformseq; in jas_cmpxformseq_create()
602 if (pxformseq) in jas_cmpxformseq_create()
603 jas_cmpxformseq_destroy(pxformseq); in jas_cmpxformseq_create()
607 static jas_cmpxformseq_t *jas_cmpxformseq_copy(jas_cmpxformseq_t *pxformseq) in jas_cmpxformseq_copy() argument
613 if (jas_cmpxformseq_append(newpxformseq, pxformseq)) in jas_cmpxformseq_copy()
620 static void jas_cmpxformseq_destroy(jas_cmpxformseq_t *pxformseq) in jas_cmpxformseq_destroy() argument
622 while (pxformseq->numpxforms > 0) in jas_cmpxformseq_destroy()
623 jas_cmpxformseq_delete(pxformseq, pxformseq->numpxforms - 1); in jas_cmpxformseq_destroy()
624 if (pxformseq->pxforms) in jas_cmpxformseq_destroy()
625 jas_free(pxformseq->pxforms); in jas_cmpxformseq_destroy()
626 jas_free(pxformseq); in jas_cmpxformseq_destroy()
629 static int jas_cmpxformseq_delete(jas_cmpxformseq_t *pxformseq, int i) in jas_cmpxformseq_delete() argument
631 assert(i >= 0 && i < pxformseq->numpxforms); in jas_cmpxformseq_delete()
632 if (i != pxformseq->numpxforms - 1) in jas_cmpxformseq_delete()
634 jas_cmpxform_destroy(pxformseq->pxforms[i]); in jas_cmpxformseq_delete()
635 pxformseq->pxforms[i] = 0; in jas_cmpxformseq_delete()
636 --pxformseq->numpxforms; in jas_cmpxformseq_delete()
640 static int jas_cmpxformseq_appendcnvt(jas_cmpxformseq_t *pxformseq, in jas_cmpxformseq_appendcnvt() argument
647 pxformseq = 0; in jas_cmpxformseq_appendcnvt()
651 static int jas_cmpxformseq_insertpxform(jas_cmpxformseq_t *pxformseq, in jas_cmpxformseq_insertpxform() argument
657 i = pxformseq->numpxforms; in jas_cmpxformseq_insertpxform()
658 assert(i >= 0 && i <= pxformseq->numpxforms); in jas_cmpxformseq_insertpxform()
659 if (pxformseq->numpxforms >= pxformseq->maxpxforms) { in jas_cmpxformseq_insertpxform()
660 if (jas_cmpxformseq_resize(pxformseq, pxformseq->numpxforms + in jas_cmpxformseq_insertpxform()
664 assert(pxformseq->numpxforms < pxformseq->maxpxforms); in jas_cmpxformseq_insertpxform()
667 n = pxformseq->numpxforms - i; in jas_cmpxformseq_insertpxform()
669 memmove(&pxformseq->pxforms[i + 1], &pxformseq->pxforms[i], in jas_cmpxformseq_insertpxform()
672 pxformseq->pxforms[i] = tmppxform; in jas_cmpxformseq_insertpxform()
673 ++pxformseq->numpxforms; in jas_cmpxformseq_insertpxform()
679 static int jas_cmpxformseq_append(jas_cmpxformseq_t *pxformseq, in jas_cmpxformseq_append() argument
686 n = pxformseq->numpxforms + othpxformseq->numpxforms; in jas_cmpxformseq_append()
687 if (n > pxformseq->maxpxforms) { in jas_cmpxformseq_append()
688 if (jas_cmpxformseq_resize(pxformseq, n)) in jas_cmpxformseq_append()
695 pxformseq->pxforms[pxformseq->numpxforms] = pxform; in jas_cmpxformseq_append()
696 ++pxformseq->numpxforms; in jas_cmpxformseq_append()
703 static int jas_cmpxformseq_resize(jas_cmpxformseq_t *pxformseq, int n) in jas_cmpxformseq_resize() argument
706 assert(n >= pxformseq->numpxforms); in jas_cmpxformseq_resize()
707 p = jas_realloc2(pxformseq->pxforms, n, sizeof(jas_cmpxform_t *)); in jas_cmpxformseq_resize()
711 pxformseq->pxforms = p; in jas_cmpxformseq_resize()
712 pxformseq->maxpxforms = n; in jas_cmpxformseq_resize()
1073 jas_cmpxformseq_t *pxformseq; in mono() local
1083 if (!(pxformseq = jas_cmpxformseq_create())) in mono()
1085 if (jas_cmpxformseq_insertpxform(pxformseq, -1, pxform)) in mono()
1115 *retpxformseq = pxformseq; in mono()
1128 jas_cmpxformseq_t *pxformseq; in triclr() local
1133 pxformseq = 0; in triclr()
1157 if (!(pxformseq = jas_cmpxformseq_create())) in triclr()
1159 if (jas_cmpxformseq_insertpxform(pxformseq, -1, pxform)) in triclr()
1202 *retpxformseq = pxformseq; in triclr()
1215 if (pxformseq) { in triclr()
1216 jas_cmpxformseq_destroy(pxformseq); in triclr()