Lines Matching full:cblk
137 static jpc_enc_cblk_t *cblk_create(jpc_enc_cblk_t *cblk, jpc_enc_cp_t *cp,
148 int dump_passes(jpc_enc_pass_t *passes, int numpasses, jpc_enc_cblk_t *cblk);
149 void calcrdslopes(jpc_enc_cblk_t *cblk);
1465 int dump_passes(jpc_enc_pass_t *passes, int numpasses, jpc_enc_cblk_t *cblk)
1471 smo = cblk->stream->obj_;
1513 void calcrdslopes(jpc_enc_cblk_t *cblk)
1524 endpasses = &cblk->passes[cblk->numpasses];
1525 pass2 = cblk->passes;
1529 for (pass1 = cblk->passes; pass1 != endpasses; ++pass1) {
1566 for (pass0 = cblk->passes; pass0 != endpasses; ++pass0) {
1568 jas_eprintf("pass %02d nmsedec=%lf dec=%lf end=%d %lf\n", pass0 - cblk->passes,
1586 jpc_enc_cblk_t *cblk;
1614 for (cblkno = 0, cblk = prc->cblks; cblkno <
1615 prc->numcblks; ++cblkno, ++cblk) {
1616 for (passno = 0, pass = cblk->passes; passno <
1617 cblk->numpasses && pass->lyrno == lyrno;
1649 jpc_enc_cblk_t *cblk;
1693 for (cblk = prc->cblks; cblk != endcblks; ++cblk) {
1694 calcrdslopes(cblk);
1695 endpasses = &cblk->passes[cblk->numpasses];
1696 for (pass = cblk->passes; pass != endpasses; ++pass) {
1764 for (cblk = prc->cblks; cblk != endcblks; ++cblk) {
1765 if (cblk->curpass) {
1766 endpasses = &cblk->passes[cblk->numpasses];
1767 pass1 = cblk->curpass;
1768 for (pass = cblk->curpass; pass != endpasses; ++pass) {
1773 for (pass = cblk->curpass; pass != pass1; ++pass) {
1858 for (cblk = prc->cblks; cblk != endcblks; ++cblk) {
1859 if (cblk->curpass) {
1860 endpasses = &cblk->passes[cblk->numpasses];
1861 pass1 = cblk->curpass;
1863 for (pass = cblk->curpass; pass != endpasses; ++pass) {
1869 for (pass = cblk->curpass; pass != pass1; ++pass) {
2357 jpc_enc_cblk_t *cblk;
2428 for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks;
2429 ++cblkno, ++cblk) {
2430 cblk->passes = 0;
2431 cblk->stream = 0;
2432 cblk->mqenc = 0;
2433 cblk->data = 0;
2434 cblk->flags = 0;
2435 cblk->prc = prc;
2437 for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks;
2438 ++cblkno, ++cblk) {
2439 if (!cblk_create(cblk, cp, prc)) {
2466 jpc_enc_cblk_t *cblk;
2470 for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks;
2471 ++cblkno, ++cblk) {
2472 cblk_destroy(cblk);
2490 static jpc_enc_cblk_t *cblk_create(jpc_enc_cblk_t *cblk, jpc_enc_cp_t *cp, jpc_enc_prc_t *prc)
2504 cblkno = cblk - prc->cblks;
2508 cblk->prc = prc;
2510 cblk->numpasses = 0;
2511 cblk->passes = 0;
2512 cblk->numencpasses = 0;
2513 cblk->numimsbs = 0;
2514 cblk->numlenbits = 0;
2515 cblk->stream = 0;
2516 cblk->mqenc = 0;
2517 cblk->flags = 0;
2518 cblk->numbps = 0;
2519 cblk->curpass = 0;
2520 cblk->data = 0;
2521 cblk->savedcurpass = 0;
2522 cblk->savednumlenbits = 0;
2523 cblk->savednumencpasses = 0;
2536 if (!(cblk->data = jas_seq2d_create(0, 0, 0, 0))) {
2539 jas_seq2d_bindsub(cblk->data, band->data, cblktlx, cblktly, cblkbrx, cblkbry);
2541 return cblk;
2544 cblk_destroy(cblk);
2548 static void cblk_destroy(jpc_enc_cblk_t *cblk)
2552 if (cblk->passes) {
2553 for (passno = 0, pass = cblk->passes; passno < cblk->numpasses;
2557 jas_free(cblk->passes);
2559 if (cblk->stream) {
2560 jas_stream_close(cblk->stream);
2562 if (cblk->mqenc) {
2563 jpc_mqenc_destroy(cblk->mqenc);
2565 if (cblk->data) {
2566 jas_seq2d_destroy(cblk->data);
2568 if (cblk->flags) {
2569 jas_seq2d_destroy(cblk->flags);
2585 jpc_enc_cblk_t *cblk;
2612 for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks;
2613 ++cblkno, ++cblk) {
2614 jas_eprintf(" cblk %5d %5d %5d %5d\n", jas_seq2d_xstart(cblk->data), jas_seq2d_ystart(cblk->data), jas_seq2d_xend(cblk->data), jas_seq2d_yend(cblk->data));