Lines Matching full:box
98 jp2_box_t *box; in jp2_decode() local
120 box = 0; in jp2_decode()
127 /* Get the first box. This should be a JP box. */ in jp2_decode()
128 if (!(box = jp2_box_get(in))) { in jp2_decode()
129 jas_eprintf("error: cannot get box\n"); in jp2_decode()
132 if (box->type != JP2_BOX_JP) { in jp2_decode()
133 jas_eprintf("error: expecting signature box\n"); in jp2_decode()
136 if (box->data.jp.magic != JP2_JP_MAGIC) { in jp2_decode()
140 jp2_box_destroy(box); in jp2_decode()
141 box = 0; in jp2_decode()
143 /* Get the second box. This should be a FTYP box. */ in jp2_decode()
144 if (!(box = jp2_box_get(in))) { in jp2_decode()
147 if (box->type != JP2_BOX_FTYP) { in jp2_decode()
148 jas_eprintf("expecting file type box\n"); in jp2_decode()
151 jp2_box_destroy(box); in jp2_decode()
152 box = 0; in jp2_decode()
156 while ((box = jp2_box_get(in))) { in jp2_decode()
158 jas_eprintf("box type %s\n", box->info->name); in jp2_decode()
160 switch (box->type) { in jp2_decode()
166 dec->ihdr = box; in jp2_decode()
167 box = 0; in jp2_decode()
172 dec->bpcc = box; in jp2_decode()
173 box = 0; in jp2_decode()
178 dec->cdef = box; in jp2_decode()
179 box = 0; in jp2_decode()
184 dec->pclr = box; in jp2_decode()
185 box = 0; in jp2_decode()
190 dec->cmap = box; in jp2_decode()
191 box = 0; in jp2_decode()
196 dec->colr = box; in jp2_decode()
197 box = 0; in jp2_decode()
201 if (box) { in jp2_decode()
202 jp2_box_destroy(box); in jp2_decode()
203 box = 0; in jp2_decode()
220 /* An IHDR box must be present. */ in jp2_decode()
222 jas_eprintf("error: missing IHDR box\n"); in jp2_decode()
226 /* Does the number of components indicated in the IHDR box match in jp2_decode()
248 /* Is the component data type indicated in the IHDR box consistent in jp2_decode()
262 /* Is the number of components indicated in the BPCC box in jp2_decode()
269 box consistent with the code stream data? */ in jp2_decode()
277 jas_eprintf("warning: superfluous BPCC box\n"); in jp2_decode()
281 /* A COLR box must be present. */ in jp2_decode()
283 jas_eprintf("error: no COLR box\n"); in jp2_decode()
304 /* If a CMAP box is present, a PCLR box must also be present. */ in jp2_decode()
306 jas_eprintf("warning: missing PCLR box or superfluous CMAP box\n"); in jp2_decode()
311 /* If a CMAP box is not present, a PCLR box must not be present. */ in jp2_decode()
313 jas_eprintf("warning: missing CMAP box or superfluous PCLR box\n"); in jp2_decode()
322 /* Perform a basic sanity check on the CMAP box if present. */ in jp2_decode()
327 jas_eprintf("error: invalid component number in CMAP box\n"); in jp2_decode()
426 if (box) { in jp2_decode()
427 jp2_box_destroy(box); in jp2_decode()
442 jp2_box_t *box; in jp2_validate()
466 /* Is the box type correct? */ in jp2_validate()