Lines Matching refs:reslevel
228 comp->reslevel = av_mallocz_array(codsty->nreslevels, sizeof(*comp->reslevel));
229 if (!comp->reslevel)
234 Jpeg2000ResLevel *reslevel = comp->reslevel + reslevelno;
241 reslevel->coord[i][j] =
244 reslevel->log2_prec_width = codsty->log2_prec_widths[reslevelno];
245 reslevel->log2_prec_height = codsty->log2_prec_heights[reslevelno];
249 reslevel->nbands = 1;
251 reslevel->nbands = 3;
260 if (reslevel->coord[0][1] == reslevel->coord[0][0])
261 reslevel->num_precincts_x = 0;
263 reslevel->num_precincts_x =
264 ff_jpeg2000_ceildivpow2(reslevel->coord[0][1],
265 reslevel->log2_prec_width) -
266 (reslevel->coord[0][0] >> reslevel->log2_prec_width);
268 if (reslevel->coord[1][1] == reslevel->coord[1][0])
269 reslevel->num_precincts_y = 0;
271 reslevel->num_precincts_y =
272 ff_jpeg2000_ceildivpow2(reslevel->coord[1][1],
273 reslevel->log2_prec_height) -
274 (reslevel->coord[1][0] >> reslevel->log2_prec_height);
276 reslevel->band = av_mallocz_array(reslevel->nbands, sizeof(*reslevel->band));
277 if (!reslevel->band)
280 for (bandno = 0; bandno < reslevel->nbands; bandno++, gbandno++) {
281 Jpeg2000Band *band = reslevel->band + bandno;
337 log2_band_prec_width = reslevel->log2_prec_width;
338 log2_band_prec_height = reslevel->log2_prec_height;
341 reslevel->log2_prec_width);
343 reslevel->log2_prec_height);
359 reslevel->log2_prec_width - 1);
361 reslevel->log2_prec_height - 1);
363 log2_band_prec_width = reslevel->log2_prec_width - 1;
364 log2_band_prec_height = reslevel->log2_prec_height - 1;
372 band->prec = av_mallocz_array(reslevel->num_precincts_x *
373 (uint64_t)reslevel->num_precincts_y,
378 nb_precincts = reslevel->num_precincts_x * reslevel->num_precincts_y;
387 prec->coord[0][0] = (precno % reslevel->num_precincts_x) *
392 prec->coord[1][0] = (precno / reslevel->num_precincts_x) *
457 cblk->coord[0][0] += comp->reslevel[reslevelno-1].coord[0][1] -
458 comp->reslevel[reslevelno-1].coord[0][0];
459 cblk->coord[0][1] += comp->reslevel[reslevelno-1].coord[0][1] -
460 comp->reslevel[reslevelno-1].coord[0][0];
463 cblk->coord[1][0] += comp->reslevel[reslevelno-1].coord[1][1] -
464 comp->reslevel[reslevelno-1].coord[1][0];
465 cblk->coord[1][1] += comp->reslevel[reslevelno-1].coord[1][1] -
466 comp->reslevel[reslevelno-1].coord[1][0];
485 Jpeg2000ResLevel *rlevel = comp->reslevel + reslevelno;
506 comp->reslevel && reslevelno < codsty->nreslevels;
508 Jpeg2000ResLevel *reslevel;
510 if (!comp->reslevel)
513 reslevel = comp->reslevel + reslevelno;
514 for (bandno = 0; bandno < reslevel->nbands; bandno++) {
517 if (!reslevel->band)
520 band = reslevel->band + bandno;
521 for (precno = 0; precno < reslevel->num_precincts_x * reslevel->num_precincts_y; precno++) {
532 av_freep(&reslevel->band);
536 av_freep(&comp->reslevel);