Home | History | Annotate | Download | only in libopenjpeg20

Lines Matching refs:tcd

47 void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t * img) {
52 img->tw, img->th, tcd->image->x0, tcd->image->x1, tcd->image->y0, tcd->image->y1);
55 opj_tcd_tile_t *tile = &tcd->tcd_image->tiles[tileno];
140 @param tcd TCD handle
142 static void opj_tcd_free_tile(opj_tcd_t *tcd);
183 Create a new TCD handle
189 /* create the tcd structure */
209 void opj_tcd_rateallocate_fixed(opj_tcd_t *tcd) {
212 for (layno = 0; layno < tcd->tcp->numlayers; layno++) {
213 opj_tcd_makelayer_fixed(tcd, layno, 1);
218 void opj_tcd_makelayer( opj_tcd_t *tcd,
226 opj_tcd_tile_t *tcd_tile = tcd->tcd_image->tiles;
303 void opj_tcd_makelayer_fixed(opj_tcd_t *tcd, OPJ_UINT32 layno, OPJ_UINT32 final) {
309 opj_cp_t *cp = tcd->cp;
310 opj_tcd_tile_t *tcd_tile = tcd->tcd_image->tiles;
311 opj_tcp_t *tcd_tcp = tcd->tcp;
321 * (OPJ_FLOAT32) (tcd->image->comps[compno].prec / 16.0));
339 OPJ_INT32 imsb = (OPJ_INT32)(tcd->image->comps[compno].prec - cblk->numbps); /* number of bit-plan equal to zero */
396 OPJ_BOOL opj_tcd_rateallocate( opj_tcd_t *tcd,
409 opj_cp_t *cp = tcd->cp;
410 opj_tcd_tile_t *tcd_tile = tcd->tcd_image->tiles;
411 opj_tcp_t *tcd_tcp = tcd->tcp;
469 maxSE += (((OPJ_FLOAT64)(1 << tcd->image->comps[compno].prec) - 1.0)
470 * ((OPJ_FLOAT64)(1 << tcd->image->comps[compno].prec) -1.0))
476 opj_tile_info_t *tile_info = &cstr_info->tile[tcd->tcd_tileno];
504 opj_t2_t*t2 = opj_t2_create(tcd->image, cp);
516 opj_tcd_makelayer(tcd, layno, thresh, 0);
520 if (! opj_t2_encode_packets(t2,tcd->tcd_tileno, tcd_tile, layno + 1, dest, p_data_written, maxlen, cstr_info,tcd->cur_tp_num,tcd->tp_pos,tcd->cur_pino,THRESH_CALC)) {
549 if (! opj_t2_encode_packets(t2, tcd->tcd_tileno, tcd_tile, layno + 1, dest,p_data_written, maxlen, cstr_info,tcd->cur_tp_num,tcd->tp_pos,tcd->cur_pino,THRESH_CALC))
552 /* opj_event_msg(tcd->cinfo, EVT_INFO, "rate alloc: len=%d, max=%d\n", l, maxlen); */
576 cstr_info->tile[tcd->tcd_tileno].thresh[layno] = goodthresh;
579 opj_tcd_makelayer(tcd, layno, goodthresh, 1);
612 Destroy a previously created TCD handle
614 void opj_tcd_destroy(opj_tcd_t *tcd) {
615 if (tcd) {
616 opj_tcd_free_tile(tcd);
618 if (tcd->tcd_image) {
619 opj_free(tcd->tcd_image);
620 tcd->tcd_image = 00;
622 opj_free(tcd);
1617 if (tcd->cp->reduce != 0) {
1618 tcd->image->comps[compno].resno_decoded =
1619 tile->comps[compno].numresolutions - tcd->cp->reduce - 1;
1620 if (tcd->image->comps[compno].resno_decoded < 0)
1625 numres2decode = tcd->image->comps[compno].resno_decoded + 1;