Lines Matching refs:fmtinfo

354     jas_image_fmtinfo_t *fmtinfo;  in jas_image_decode()  local
366 if (!(fmtinfo = jas_image_lookupfmtbyid(fmt))) in jas_image_decode()
368 if (!fmtinfo->ops.decode) in jas_image_decode()
372 if (!(image = (*fmtinfo->ops.decode)(in, optstr))) in jas_image_decode()
392 jas_image_fmtinfo_t *fmtinfo; in jas_image_encode() local
393 if (!(fmtinfo = jas_image_lookupfmtbyid(fmt))) { in jas_image_encode()
396 return (fmtinfo->ops.encode) ? (*fmtinfo->ops.encode)(image, out, in jas_image_encode()
517 jas_image_fmtinfo_t *fmtinfo; in jas_image_clearfmts() local
519 fmtinfo = &jas_image_fmtinfos[i]; in jas_image_clearfmts()
520 if (fmtinfo->name) { in jas_image_clearfmts()
521 jas_free(fmtinfo->name); in jas_image_clearfmts()
522 fmtinfo->name = 0; in jas_image_clearfmts()
524 if (fmtinfo->ext) { in jas_image_clearfmts()
525 jas_free(fmtinfo->ext); in jas_image_clearfmts()
526 fmtinfo->ext = 0; in jas_image_clearfmts()
528 if (fmtinfo->desc) { in jas_image_clearfmts()
529 jas_free(fmtinfo->desc); in jas_image_clearfmts()
530 fmtinfo->desc = 0; in jas_image_clearfmts()
539 jas_image_fmtinfo_t *fmtinfo; in jas_image_addfmt() local
544 fmtinfo = &jas_image_fmtinfos[jas_image_numfmts]; in jas_image_addfmt()
545 fmtinfo->id = id; in jas_image_addfmt()
546 if (!(fmtinfo->name = jas_strdup(name))) { in jas_image_addfmt()
549 if (!(fmtinfo->ext = jas_strdup(ext))) { in jas_image_addfmt()
550 jas_free(fmtinfo->name); in jas_image_addfmt()
553 if (!(fmtinfo->desc = jas_strdup(desc))) { in jas_image_addfmt()
554 jas_free(fmtinfo->name); in jas_image_addfmt()
555 jas_free(fmtinfo->ext); in jas_image_addfmt()
558 fmtinfo->ops = *ops; in jas_image_addfmt()
565 jas_image_fmtinfo_t *fmtinfo; in jas_image_strtofmt() local
566 if (!(fmtinfo = jas_image_lookupfmtbyname(name))) { in jas_image_strtofmt()
569 return fmtinfo->id; in jas_image_strtofmt()
574 jas_image_fmtinfo_t *fmtinfo; in jas_image_fmttostr() local
575 if (!(fmtinfo = jas_image_lookupfmtbyid(fmt))) { in jas_image_fmttostr()
578 return fmtinfo->name; in jas_image_fmttostr()
583 jas_image_fmtinfo_t *fmtinfo; in jas_image_getfmt() local
589 for (i = 0, fmtinfo = jas_image_fmtinfos; i < jas_image_numfmts; ++i, in jas_image_getfmt()
590 ++fmtinfo) { in jas_image_getfmt()
591 if (fmtinfo->ops.validate) { in jas_image_getfmt()
593 if (!(*fmtinfo->ops.validate)(in)) { in jas_image_getfmt()
599 return found ? fmtinfo->id : (-1); in jas_image_getfmt()
606 jas_image_fmtinfo_t *fmtinfo; in jas_image_fmtfromname() local
613 for (i = 0, fmtinfo = jas_image_fmtinfos; i < jas_image_numfmts; ++i, in jas_image_fmtfromname()
614 ++fmtinfo) { in jas_image_fmtfromname()
616 if (!strcmp(ext, fmtinfo->ext)) { in jas_image_fmtfromname()
617 return fmtinfo->id; in jas_image_fmtfromname()
690 jas_image_fmtinfo_t *fmtinfo; in jas_image_lookupfmtbyid() local
692 for (i = 0, fmtinfo = jas_image_fmtinfos; i < jas_image_numfmts; ++i, ++fmtinfo) { in jas_image_lookupfmtbyid()
693 if (fmtinfo->id == id) { in jas_image_lookupfmtbyid()
694 return fmtinfo; in jas_image_lookupfmtbyid()
703 jas_image_fmtinfo_t *fmtinfo; in jas_image_lookupfmtbyname() local
705 for (i = 0, fmtinfo = jas_image_fmtinfos; i < jas_image_numfmts; ++i, ++fmtinfo) { in jas_image_lookupfmtbyname()
706 if (!strcmp(fmtinfo->name, name)) { in jas_image_lookupfmtbyname()
707 return fmtinfo; in jas_image_lookupfmtbyname()