Lines Matching refs:pclr
816 jp2_pclr_t *pclr = &box->data.pclr; in jp2_pclr_destroy() local
817 if (pclr->lutdata) { in jp2_pclr_destroy()
818 jas_free(pclr->lutdata); in jp2_pclr_destroy()
820 if (pclr->bpc) in jp2_pclr_destroy()
821 jas_free(pclr->bpc); in jp2_pclr_destroy()
826 jp2_pclr_t *pclr = &box->data.pclr; in jp2_pclr_getdata() local
832 pclr->lutdata = 0; in jp2_pclr_getdata()
834 if (jp2_getuint16(in, &pclr->numlutents) || in jp2_pclr_getdata()
835 jp2_getuint8(in, &pclr->numchans)) { in jp2_pclr_getdata()
838 lutsize = pclr->numlutents * pclr->numchans; in jp2_pclr_getdata()
839 if (!(pclr->lutdata = jas_alloc2(lutsize, sizeof(int_fast32_t)))) { in jp2_pclr_getdata()
842 if (!(pclr->bpc = jas_alloc2(pclr->numchans, sizeof(uint_fast8_t)))) { in jp2_pclr_getdata()
845 for (i = 0; i < pclr->numchans; ++i) { in jp2_pclr_getdata()
846 if (jp2_getuint8(in, &pclr->bpc[i])) { in jp2_pclr_getdata()
850 for (i = 0; i < pclr->numlutents; ++i) { in jp2_pclr_getdata()
851 for (j = 0; j < pclr->numchans; ++j) { in jp2_pclr_getdata()
852 if (jp2_getint(in, (pclr->bpc[j] & 0x80) != 0, in jp2_pclr_getdata()
853 (pclr->bpc[j] & 0x7f) + 1, &x)) { in jp2_pclr_getdata()
856 pclr->lutdata[i * pclr->numchans + j] = x; in jp2_pclr_getdata()
865 jp2_pclr_t *pclr = &box->data.pclr; in jp2_pclr_putdata()
875 jp2_pclr_t *pclr = &box->data.pclr; in jp2_pclr_dumpdata() local
878 fprintf(out, "numents=%d; numchans=%d\n", (int) pclr->numlutents, in jp2_pclr_dumpdata()
879 (int) pclr->numchans); in jp2_pclr_dumpdata()
880 for (i = 0; i < pclr->numlutents; ++i) { in jp2_pclr_dumpdata()
881 for (j = 0; j < pclr->numchans; ++j) { in jp2_pclr_dumpdata()
882 fprintf(out, "LUT[%d][%d]=%d\n", i, j, (int)pclr->lutdata[i * pclr->numchans + j]); in jp2_pclr_dumpdata()