Lines Matching refs:attrval
103 static void jas_icccurv_destroy(jas_iccattrval_t *attrval);
104 static int jas_icccurv_copy(jas_iccattrval_t *attrval,
106 static int jas_icccurv_input(jas_iccattrval_t *attrval, jas_stream_t *in,
108 static int jas_icccurv_getsize(jas_iccattrval_t *attrval);
109 static int jas_icccurv_output(jas_iccattrval_t *attrval, jas_stream_t *out);
110 static void jas_icccurv_dump(jas_iccattrval_t *attrval, FILE *out);
112 static void jas_icctxtdesc_destroy(jas_iccattrval_t *attrval);
113 static int jas_icctxtdesc_copy(jas_iccattrval_t *attrval,
115 static int jas_icctxtdesc_input(jas_iccattrval_t *attrval, jas_stream_t *in,
117 static int jas_icctxtdesc_getsize(jas_iccattrval_t *attrval);
118 static int jas_icctxtdesc_output(jas_iccattrval_t *attrval, jas_stream_t *out);
119 static void jas_icctxtdesc_dump(jas_iccattrval_t *attrval, FILE *out);
121 static void jas_icctxt_destroy(jas_iccattrval_t *attrval);
122 static int jas_icctxt_copy(jas_iccattrval_t *attrval,
124 static int jas_icctxt_input(jas_iccattrval_t *attrval, jas_stream_t *in,
126 static int jas_icctxt_getsize(jas_iccattrval_t *attrval);
127 static int jas_icctxt_output(jas_iccattrval_t *attrval, jas_stream_t *out);
128 static void jas_icctxt_dump(jas_iccattrval_t *attrval, FILE *out);
130 static int jas_iccxyz_input(jas_iccattrval_t *attrval, jas_stream_t *in,
132 static int jas_iccxyz_getsize(jas_iccattrval_t *attrval);
133 static int jas_iccxyz_output(jas_iccattrval_t *attrval, jas_stream_t *out);
134 static void jas_iccxyz_dump(jas_iccattrval_t *attrval, FILE *out);
149 static void jas_icclut16_destroy(jas_iccattrval_t *attrval);
150 static int jas_icclut16_copy(jas_iccattrval_t *attrval,
152 static int jas_icclut16_input(jas_iccattrval_t *attrval, jas_stream_t *in,
154 static int jas_icclut16_getsize(jas_iccattrval_t *attrval);
155 static int jas_icclut16_output(jas_iccattrval_t *attrval, jas_stream_t *out);
156 static void jas_icclut16_dump(jas_iccattrval_t *attrval, FILE *out);
158 static void jas_icclut8_destroy(jas_iccattrval_t *attrval);
159 static int jas_icclut8_copy(jas_iccattrval_t *attrval,
161 static int jas_icclut8_input(jas_iccattrval_t *attrval, jas_stream_t *in,
163 static int jas_icclut8_getsize(jas_iccattrval_t *attrval);
164 static int jas_icclut8_output(jas_iccattrval_t *attrval, jas_stream_t *out);
165 static void jas_icclut8_dump(jas_iccattrval_t *attrval, FILE *out);
266 jas_iccattrval_t *attrval; in jas_iccprof_load() local
274 attrval = 0; in jas_iccprof_load()
298 if (!(attrval = jas_iccattrval_clone(prevattrval))) in jas_iccprof_load()
300 if (jas_iccprof_setattr(prof, tagtabent->tag, attrval)) in jas_iccprof_load()
302 jas_iccattrval_destroy(attrval); in jas_iccprof_load()
335 if (!(attrval = jas_iccattrval_create(type))) { in jas_iccprof_load()
339 if ((*attrval->ops->input)(attrval, in, len)) { in jas_iccprof_load()
343 if (jas_iccprof_setattr(prof, tagtabent->tag, attrval)) { in jas_iccprof_load()
346 prevattrval = attrval; /* This is correct, but slimey. */ in jas_iccprof_load()
347 jas_iccattrval_destroy(attrval); in jas_iccprof_load()
348 attrval = 0; in jas_iccprof_load()
356 if (attrval) in jas_iccprof_load()
357 jas_iccattrval_destroy(attrval); in jas_iccprof_load()
372 jas_iccattrval_t *attrval; in jas_iccprof_save() local
383 if (jas_iccattrtab_get(prof->attrtab, i, &attrname, &attrval)) in jas_iccprof_save()
385 assert(attrval->ops->output); in jas_iccprof_save()
387 tagtabent->data = &attrval->data; in jas_iccprof_save()
402 tagtabent->len = (*attrval->ops->getsize)(attrval) + 8; in jas_iccprof_save()
410 jas_iccattrval_destroy(attrval); in jas_iccprof_save()
421 if (jas_iccattrtab_get(prof->attrtab, i, &attrname, &attrval)) in jas_iccprof_save()
423 if (jas_iccputuint32(out, attrval->type) || jas_stream_pad(out, in jas_iccprof_save()
426 if ((*attrval->ops->output)(attrval, out)) in jas_iccprof_save()
428 jas_iccattrval_destroy(attrval); in jas_iccprof_save()
549 jas_iccattrval_t *attrval; in jas_iccprof_getattr() local
552 if (!(attrval = jas_iccattrval_clone(prof->attrtab->attrs[i].val))) in jas_iccprof_getattr()
554 return attrval; in jas_iccprof_getattr()
720 jas_iccattrval_t *attrval; in jas_iccattrtab_dump() local
727 attrval = attr->val; in jas_iccattrtab_dump()
728 info = jas_iccattrvalinfo_lookup(attrval->type); in jas_iccattrtab_dump()
734 jas_iccsigtostr(attrval->type, &buf[8]), in jas_iccattrtab_dump()
735 (unsigned)attrval->type in jas_iccattrtab_dump()
737 jas_iccattrval_dump(attrval, out); in jas_iccattrtab_dump()
847 jas_iccattrval_t *attrval; in jas_iccattrval_create() local
852 if (!(attrval = jas_iccattrval_create0())) in jas_iccattrval_create()
854 attrval->ops = &info->ops; in jas_iccattrval_create()
855 attrval->type = type; in jas_iccattrval_create()
856 ++attrval->refcnt; in jas_iccattrval_create()
857 memset(&attrval->data, 0, sizeof(attrval->data)); in jas_iccattrval_create()
858 return attrval; in jas_iccattrval_create()
863 jas_iccattrval_t *jas_iccattrval_clone(jas_iccattrval_t *attrval) in jas_iccattrval_clone() argument
865 ++attrval->refcnt; in jas_iccattrval_clone()
866 return attrval; in jas_iccattrval_clone()
869 void jas_iccattrval_destroy(jas_iccattrval_t *attrval) in jas_iccattrval_destroy() argument
872 jas_eprintf("refcnt=%d\n", attrval->refcnt); in jas_iccattrval_destroy()
874 if (--attrval->refcnt <= 0) { in jas_iccattrval_destroy()
875 if (attrval->ops->destroy) in jas_iccattrval_destroy()
876 (*attrval->ops->destroy)(attrval); in jas_iccattrval_destroy()
877 jas_free(attrval); in jas_iccattrval_destroy()
881 void jas_iccattrval_dump(jas_iccattrval_t *attrval, FILE *out) in jas_iccattrval_dump() argument
884 jas_iccsigtostr(attrval->type, buf); in jas_iccattrval_dump()
885 fprintf(out, "refcnt = %d; type = 0x%08x %s\n", attrval->refcnt, in jas_iccattrval_dump()
886 (unsigned)attrval->type, jas_iccsigtostr(attrval->type, &buf[0])); in jas_iccattrval_dump()
887 if (attrval->ops->dump) { in jas_iccattrval_dump()
888 (*attrval->ops->dump)(attrval, out); in jas_iccattrval_dump()
895 jas_iccattrval_t *attrval = *attrvalx; in jas_iccattrval_allowmodify() local
897 if (attrval->refcnt > 1) { in jas_iccattrval_allowmodify()
900 newattrval->ops = attrval->ops; in jas_iccattrval_allowmodify()
901 newattrval->type = attrval->type; in jas_iccattrval_allowmodify()
904 if ((*newattrval->ops->copy)(newattrval, attrval)) in jas_iccattrval_allowmodify()
907 memcpy(&newattrval->data, &attrval->data, in jas_iccattrval_allowmodify()
922 jas_iccattrval_t *attrval; in jas_iccattrval_create0() local
923 if (!(attrval = jas_malloc(sizeof(jas_iccattrval_t)))) in jas_iccattrval_create0()
925 memset(attrval, 0, sizeof(jas_iccattrval_t)); in jas_iccattrval_create0()
926 attrval->refcnt = 0; in jas_iccattrval_create0()
927 attrval->ops = 0; in jas_iccattrval_create0()
928 attrval->type = 0; in jas_iccattrval_create0()
929 return attrval; in jas_iccattrval_create0()
936 static int jas_iccxyz_input(jas_iccattrval_t *attrval, jas_stream_t *in, in jas_iccxyz_input() argument
940 return jas_iccgetxyz(in, &attrval->data.xyz); in jas_iccxyz_input()
943 static int jas_iccxyz_output(jas_iccattrval_t *attrval, jas_stream_t *out) in jas_iccxyz_output() argument
945 jas_iccxyz_t *xyz = &attrval->data.xyz; in jas_iccxyz_output()
953 static int jas_iccxyz_getsize(jas_iccattrval_t *attrval) in jas_iccxyz_getsize() argument
956 attrval = 0; in jas_iccxyz_getsize()
961 static void jas_iccxyz_dump(jas_iccattrval_t *attrval, FILE *out) in jas_iccxyz_dump() argument
963 jas_iccxyz_t *xyz = &attrval->data.xyz; in jas_iccxyz_dump()
971 static void jas_icccurv_destroy(jas_iccattrval_t *attrval) in jas_icccurv_destroy() argument
973 jas_icccurv_t *curv = &attrval->data.curv; in jas_icccurv_destroy()
978 static int jas_icccurv_copy(jas_iccattrval_t *attrval, in jas_icccurv_copy() argument
982 attrval = 0; in jas_icccurv_copy()
990 static int jas_icccurv_input(jas_iccattrval_t *attrval, jas_stream_t *in, in jas_icccurv_input() argument
993 jas_icccurv_t *curv = &attrval->data.curv; in jas_icccurv_input()
1013 jas_icccurv_destroy(attrval); in jas_icccurv_input()
1017 static int jas_icccurv_getsize(jas_iccattrval_t *attrval) in jas_icccurv_getsize() argument
1019 jas_icccurv_t *curv = &attrval->data.curv; in jas_icccurv_getsize()
1023 static int jas_icccurv_output(jas_iccattrval_t *attrval, jas_stream_t *out) in jas_icccurv_output() argument
1025 jas_icccurv_t *curv = &attrval->data.curv; in jas_icccurv_output()
1039 static void jas_icccurv_dump(jas_iccattrval_t *attrval, FILE *out) in jas_icccurv_dump() argument
1042 jas_icccurv_t *curv = &attrval->data.curv; in jas_icccurv_dump()
1059 static void jas_icctxtdesc_destroy(jas_iccattrval_t *attrval) in jas_icctxtdesc_destroy() argument
1061 jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc; in jas_icctxtdesc_destroy()
1068 static int jas_icctxtdesc_copy(jas_iccattrval_t *attrval, in jas_icctxtdesc_copy() argument
1071 jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc; in jas_icctxtdesc_copy()
1074 attrval = 0; in jas_icctxtdesc_copy()
1083 static int jas_icctxtdesc_input(jas_iccattrval_t *attrval, jas_stream_t *in, in jas_icctxtdesc_input() argument
1088 jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc; in jas_icctxtdesc_input()
1131 jas_icctxtdesc_destroy(attrval); in jas_icctxtdesc_input()
1135 static int jas_icctxtdesc_getsize(jas_iccattrval_t *attrval) in jas_icctxtdesc_getsize() argument
1137 jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc; in jas_icctxtdesc_getsize()
1141 static int jas_icctxtdesc_output(jas_iccattrval_t *attrval, jas_stream_t *out) in jas_icctxtdesc_output() argument
1143 jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc; in jas_icctxtdesc_output()
1165 static void jas_icctxtdesc_dump(jas_iccattrval_t *attrval, FILE *out) in jas_icctxtdesc_dump() argument
1167 jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc; in jas_icctxtdesc_dump()
1179 static void jas_icctxt_destroy(jas_iccattrval_t *attrval) in jas_icctxt_destroy() argument
1181 jas_icctxt_t *txt = &attrval->data.txt; in jas_icctxt_destroy()
1186 static int jas_icctxt_copy(jas_iccattrval_t *attrval, in jas_icctxt_copy() argument
1189 jas_icctxt_t *txt = &attrval->data.txt; in jas_icctxt_copy()
1196 static int jas_icctxt_input(jas_iccattrval_t *attrval, jas_stream_t *in, in jas_icctxt_input() argument
1199 jas_icctxt_t *txt = &attrval->data.txt; in jas_icctxt_input()
1215 static int jas_icctxt_getsize(jas_iccattrval_t *attrval) in jas_icctxt_getsize() argument
1217 jas_icctxt_t *txt = &attrval->data.txt; in jas_icctxt_getsize()
1221 static int jas_icctxt_output(jas_iccattrval_t *attrval, jas_stream_t *out) in jas_icctxt_output() argument
1223 jas_icctxt_t *txt = &attrval->data.txt; in jas_icctxt_output()
1230 static void jas_icctxt_dump(jas_iccattrval_t *attrval, FILE *out) in jas_icctxt_dump() argument
1232 jas_icctxt_t *txt = &attrval->data.txt; in jas_icctxt_dump()
1240 static void jas_icclut8_destroy(jas_iccattrval_t *attrval) in jas_icclut8_destroy() argument
1242 jas_icclut8_t *lut8 = &attrval->data.lut8; in jas_icclut8_destroy()
1255 static int jas_icclut8_copy(jas_iccattrval_t *attrval, in jas_icclut8_copy() argument
1258 jas_icclut8_t *lut8 = &attrval->data.lut8; in jas_icclut8_copy()
1260 attrval = 0; in jas_icclut8_copy()
1267 static int jas_icclut8_input(jas_iccattrval_t *attrval, jas_stream_t *in, in jas_icclut8_input() argument
1273 jas_icclut8_t *lut8 = &attrval->data.lut8; in jas_icclut8_input()
1332 jas_icclut8_destroy(attrval); in jas_icclut8_input()
1336 static int jas_icclut8_getsize(jas_iccattrval_t *attrval) in jas_icclut8_getsize() argument
1338 jas_icclut8_t *lut8 = &attrval->data.lut8; in jas_icclut8_getsize()
1344 static int jas_icclut8_output(jas_iccattrval_t *attrval, jas_stream_t *out) in jas_icclut8_output() argument
1346 jas_icclut8_t *lut8 = &attrval->data.lut8; in jas_icclut8_output()
1389 static void jas_icclut8_dump(jas_iccattrval_t *attrval, FILE *out) in jas_icclut8_dump() argument
1391 jas_icclut8_t *lut8 = &attrval->data.lut8; in jas_icclut8_dump()
1410 static void jas_icclut16_destroy(jas_iccattrval_t *attrval) in jas_icclut16_destroy() argument
1412 jas_icclut16_t *lut16 = &attrval->data.lut16; in jas_icclut16_destroy()
1425 static int jas_icclut16_copy(jas_iccattrval_t *attrval, in jas_icclut16_copy() argument
1429 attrval = 0; in jas_icclut16_copy()
1436 static int jas_icclut16_input(jas_iccattrval_t *attrval, jas_stream_t *in, in jas_icclut16_input() argument
1442 jas_icclut16_t *lut16 = &attrval->data.lut16; in jas_icclut16_input()
1501 jas_icclut16_destroy(attrval); in jas_icclut16_input()
1505 static int jas_icclut16_getsize(jas_iccattrval_t *attrval) in jas_icclut16_getsize() argument
1507 jas_icclut16_t *lut16 = &attrval->data.lut16; in jas_icclut16_getsize()
1513 static int jas_icclut16_output(jas_iccattrval_t *attrval, jas_stream_t *out) in jas_icclut16_output() argument
1515 jas_icclut16_t *lut16 = &attrval->data.lut16; in jas_icclut16_output()
1553 static void jas_icclut16_dump(jas_iccattrval_t *attrval, FILE *out) in jas_icclut16_dump() argument
1555 jas_icclut16_t *lut16 = &attrval->data.lut16; in jas_icclut16_dump()