Home | History | Annotate | Download | only in libopenjpeg20

Lines Matching full:jp2_cdef

427 	{JP2_CDEF,opj_jp2_read_cdef}
718 assert(jp2->color.jp2_cdef != 00);
719 assert(jp2->color.jp2_cdef->info != 00);
720 assert(jp2->color.jp2_cdef->n > 0U);
722 l_cdef_size += 6U * jp2->color.jp2_cdef->n;
734 opj_write_bytes(l_current_cdef_ptr,JP2_CDEF,4); /* BPCC */
737 l_value = jp2->color.jp2_cdef->n;
741 for (i = 0U; i < jp2->color.jp2_cdef->n; ++i) {
742 l_value = jp2->color.jp2_cdef->info[i].cn;
745 l_value = jp2->color.jp2_cdef->info[i].typ;
748 l_value = jp2->color.jp2_cdef->info[i].asoc;
837 if (color->jp2_cdef) {
838 opj_jp2_cdef_info_t *info = color->jp2_cdef->info;
839 OPJ_UINT16 n = color->jp2_cdef->n;
1224 info = color->jp2_cdef->info;
1225 n = color->jp2_cdef->n;
1277 if(color->jp2_cdef->info) opj_free(color->jp2_cdef->info);
1279 opj_free(color->jp2_cdef); color->jp2_cdef = NULL;
1301 if(jp2->color.jp2_cdef) return OPJ_FALSE;
1325 jp2->color.jp2_cdef = (opj_jp2_cdef_t*)opj_malloc(sizeof(opj_jp2_cdef_t));
1326 if(!jp2->color.jp2_cdef)
1331 jp2->color.jp2_cdef->info = cdef_info;
1332 jp2->color.jp2_cdef->n = (OPJ_UINT16) l_value;
1334 for(i = 0; i < jp2->color.jp2_cdef->n; ++i) {
1520 if(jp2->color.jp2_cdef) {
1569 if (jp2->color.jp2_cdef != NULL) {
1896 jp2->color.jp2_cdef = (opj_jp2_cdef_t*)opj_malloc(sizeof(opj_jp2_cdef_t));
1897 if(!jp2->color.jp2_cdef) {
1901 /* no memset needed, all values will be overwritten except if jp2->color.jp2_cdef->info allocation fails, */
1902 /* in which case jp2->color.jp2_cdef->info will be NULL => valid for destruction */
1903 jp2->color.jp2_cdef->info = (opj_jp2_cdef_info_t*) opj_malloc(image->numcomps * sizeof(opj_jp2_cdef_info_t));
1904 if (!jp2->color.jp2_cdef->info) {
1909 jp2->color.jp2_cdef->n = (OPJ_UINT16) image->numcomps; /* cast is valid : image->numcomps [1,16384] */
1911 jp2->color.jp2_cdef->info[i].cn = (OPJ_UINT16)i; /* cast is valid : image->numcomps [1,16384] */
1912 jp2->color.jp2_cdef->info[i].typ = 0U;
1913 jp2->color.jp2_cdef->info[i].asoc = (OPJ_UINT16)(i+1U); /* No overflow + cast is valid : image->numcomps [1,16384] */
1917 jp2->color.jp2_cdef->info[i].cn = (OPJ_UINT16)i; /* cast is valid : image->numcomps [1,16384] */
1918 jp2->color.jp2_cdef->info[i].typ = 1U; /* Opacity channel */
1919 jp2->color.jp2_cdef->info[i].asoc = 0U; /* Apply alpha channel to the whole image */
1922 jp2->color.jp2_cdef->info[i].cn = (OPJ_UINT16)i; /* cast is valid : image->numcomps [1,16384] */
1923 jp2->color.jp2_cdef->info[i].typ = 65535U;
1924 jp2->color.jp2_cdef->info[i].asoc = 65535U;
2796 if (jp2->color.jp2_cdef) {
2797 if (jp2->color.jp2_cdef->info) {
2798 opj_free(jp2->color.jp2_cdef->info);
2799 jp2->color.jp2_cdef->info = NULL;
2802 opj_free(jp2->color.jp2_cdef);
2803 jp2->color.jp2_cdef = 00;
2896 if(p_jp2->color.jp2_cdef) {
2934 jp2->color.jp2_cdef = NULL;