Home | History | Annotate | Download | only in libjasper

Lines Matching refs:pclr

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