Lines Matching refs:cblk
280 bytestream_put_byte(&s->buf, codsty->log2_cblk_width-2); // cblk width
281 bytestream_put_byte(&s->buf, codsty->log2_cblk_height-2); // cblk height
282 bytestream_put_byte(&s->buf, 0); // cblk style
574 static void encode_cblk(Jpeg2000EncoderContext *s, Jpeg2000T1Context *t1, Jpeg2000Cblk *cblk, Jpeg2000Tile *tile,
594 cblk->nonzerobits = 0;
597 cblk->nonzerobits = av_log2(max) + 1 - NMSEDEC_FRACBITS;
598 bpno = cblk->nonzerobits - 1;
601 ff_mqc_initenc(&t1->mqc, cblk->data);
615 cblk->passes[passno].rate = 3 + ff_mqc_length(&t1->mqc);
617 cblk->passes[passno].disto = wmsedec;
624 cblk->npasses = passno;
625 cblk->ninclpasses = passno;
628 cblk->passes[passno-1].rate = ff_mqc_flush(&t1->mqc);
686 prec->cblkincl[pos].val = prec->cblk[yi * cblknw + xi].ninclpasses == 0;
688 prec->zerobits[pos].val = expn[bandno] + numgbits - 1 - prec->cblk[yi * cblknw + xi].nonzerobits;
696 Jpeg2000Cblk *cblk = prec->cblk + yi * cblknw + xi;
703 if (!cblk->ninclpasses)
708 putnumpasses(s, cblk->ninclpasses);
710 length = cblk->passes[cblk->ninclpasses-1].rate;
711 llen = av_log2(length) - av_log2(cblk->ninclpasses) - 2;
731 Jpeg2000Cblk *cblk = prec->cblk + yi * cblknw + xi;
732 if (cblk->ninclpasses){
733 if (s->buf_end - s->buf < cblk->passes[cblk->ninclpasses-1].rate)
735 bytestream_put_buffer(&s->buf, cblk->data, cblk->passes[cblk->ninclpasses-1].rate);
766 static int getcut(Jpeg2000Cblk *cblk, int64_t lambda, int dwt_norm)
769 for (passno = 0; passno < cblk->npasses; passno++){
773 dr = cblk->passes[passno].rate
774 - (res ? cblk->passes[res-1].rate:0);
775 dd = cblk->passes[passno].disto
776 - (res ? cblk->passes[res-1].disto:0);
802 Jpeg2000Cblk *cblk = prec->cblk + cblkno;
804 cblk->ninclpasses = getcut(cblk, s->lambda,
871 encode_cblk(s, &t1, prec->cblk + cblkno, tile, xx1 - xx0, yy1 - yy0,