Home | History | Annotate | Download | only in libjasper

Lines Matching full:pass

195     jpc_enc_pass_t *pass;
228 for (pass = cblk->passes; pass != endpasses; ++pass) {
229 pass->start = 0;
230 pass->end = 0;
231 pass->term = JPC_ISTERMINATED(pass - cblk->passes, 0, cblk->numpasses, (tcmpt->cblksty & JPC_COX_TERMALL) != 0, (tcmpt->cblksty & JPC_COX_LAZY) != 0);
232 pass->type = JPC_SEGTYPE(pass - cblk->passes, 0, (tcmpt->cblksty & JPC_COX_LAZY) != 0);
233 pass->lyrno = -1;
234 if (pass == endpasses - 1) {
235 assert(pass->term == 1);
236 pass->term = 1;
246 pass = cblk->passes;
250 if (pass->type == JPC_SEG_MQ) {
253 assert(pass->type == JPC_SEG_RAW);
261 passtype = (pass - cblk->passes + 2) % 3;
263 passtype = JPC_PASSTYPE(pass - cblk->passes + 2);
265 pass->start = jas_stream_tell(cblk->stream);
272 if (pass->term) {
280 ret = (pass->type == JPC_SEG_MQ) ? jpc_encsigpass(cblk->mqenc,
282 cblk->data, termmode, &pass->nmsedec) :
284 cblk->data, termmode, &pass->nmsedec);
287 ret = (pass->type == JPC_SEG_MQ) ? jpc_encrefpass(cblk->mqenc,
289 &pass->nmsedec) : jpc_encrawrefpass(bout, bitpos,
291 &pass->nmsedec);
294 assert(pass->type == JPC_SEG_MQ);
297 &pass->nmsedec);
304 if (pass->type == JPC_SEG_MQ) {
305 if (pass->term) {
308 jpc_mqenc_getstate(cblk->mqenc, &pass->mqencstate);
309 pass->end = jas_stream_tell(cblk->stream);
314 if (pass->term) {
320 pass->end = jas_stream_tell(cblk->stream);
322 pass->end = jas_stream_tell(cblk->stream) +
333 pass->wmsedec = jpc_fixtodbl(band->rlvl->tcmpt->synweight) *
339 jpc_fixtodbl(pass->nmsedec);
340 pass->cumwmsedec = pass->wmsedec;
341 if (pass != cblk->passes) {
342 pass->cumwmsedec += pass[-1].cumwmsedec;
347 ++pass;
356 for (pass = cblk->passes; pass != endpasses; ++pass) {
357 if (pass->start < n) {
358 pass->start = n;
360 if (pass->end < n) {
361 pass->end = n;
363 if (!pass->term) {
364 termpass = pass;
365 while (termpass - pass < cblk->numpasses &&
369 if (pass->type == JPC_SEG_MQ) {
370 t = (pass->mqencstate.lastbyte == 0xff) ? 1 : 0;
371 if (pass->mqencstate.ctreg >= 5) {
376 pass->end += adjust;
378 if (pass->end > termpass->end) {
379 pass->end = termpass->end;
381 if ((c = getthebyte(cblk->stream, pass->end - 1)) == EOF) {
385 ++pass->end;
387 n = JAS_MAX(n, pass->end);
389 n = JAS_MAX(n, pass->end);
405 * Code for significance pass.
614 * Code for refinement pass.
801 * Code for cleanup pass.