static void truncpasses(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile)

{

    int precno, compno, reslevelno, bandno, cblkno, lev;

    Jpeg2000CodingStyle *codsty = &s->codsty;



    for (compno = 0; compno < s->ncomponents; compno++){

        Jpeg2000Component *comp = tile->comp + compno;



        for (reslevelno = 0, lev = codsty->nreslevels-1; reslevelno < codsty->nreslevels; reslevelno++, lev--){

            Jpeg2000ResLevel *reslevel = comp->reslevel + reslevelno;



            for (precno = 0; precno < reslevel->num_precincts_x * reslevel->num_precincts_y; precno++){

                for (bandno = 0; bandno < reslevel->nbands ; bandno++){

                    int bandpos = bandno + (reslevelno > 0);

                    Jpeg2000Band *band = reslevel->band + bandno;

                    Jpeg2000Prec *prec = band->prec + precno;



                    for (cblkno = 0; cblkno < prec->nb_codeblocks_height * prec->nb_codeblocks_width; cblkno++){

                        Jpeg2000Cblk *cblk = prec->cblk + cblkno;



                        cblk->ninclpasses = getcut(cblk, s->lambda,

                                (int64_t)dwt_norms[codsty->transform == FF_DWT53][bandpos][lev] * (int64_t)band->i_stepsize >> 16);

                    }

                }

            }

        }

    }

}

static void truncpasses(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile)

{

    int precno, compno, reslevelno, bandno, cblkno, lev;

    Jpeg2000CodingStyle *codsty = &s->codsty;



    for (compno = 0; compno < s->ncomponents; compno++){

        Jpeg2000Component *comp = tile->comp + compno;



        for (reslevelno = 0, lev = codsty->nreslevels-1; reslevelno < codsty->nreslevels; reslevelno++, lev--){

            Jpeg2000ResLevel *reslevel = comp->reslevel + reslevelno;



            for (precno = 0; precno < reslevel->num_precincts_x * reslevel->num_precincts_y; precno++){

                for (bandno = 0; bandno < reslevel->nbands ; bandno++){

                    int bandpos = bandno + (reslevelno > 0);

                    Jpeg2000Band *band = reslevel->band + bandno;

                    Jpeg2000Prec *prec = band->prec + precno;



                    for (cblkno = 0; cblkno < prec->nb_codeblocks_height * prec->nb_codeblocks_width; cblkno++){

                        Jpeg2000Cblk *cblk = prec->cblk + cblkno;



                        cblk->ninclpasses = getcut(cblk, s->lambda,

                                (int64_t)dwt_norms[codsty->transform == FF_DWT53][bandpos][lev] * (int64_t)band->i_stepsize >> 16);

                    }

                }

            }

        }

    }

}

                                (int64_t)dwt_norms[codsty->transform == FF_DWT53][bandpos][lev] * (int64_t)band->i_stepsize >> 16);
static void FUNC_0(Jpeg2000EncoderContext *VAR_0, Jpeg2000Tile *VAR_1)

{

    int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;

    Jpeg2000CodingStyle *codsty = &VAR_0->codsty;



    for (VAR_3 = 0; VAR_3 < VAR_0->ncomponents; VAR_3++){

        Jpeg2000Component *comp = VAR_1->comp + VAR_3;



        for (VAR_4 = 0, VAR_7 = codsty->nreslevels-1; VAR_4 < codsty->nreslevels; VAR_4++, VAR_7--){

            Jpeg2000ResLevel *reslevel = comp->reslevel + VAR_4;



            for (VAR_2 = 0; VAR_2 < reslevel->num_precincts_x * reslevel->num_precincts_y; VAR_2++){

                for (VAR_5 = 0; VAR_5 < reslevel->nbands ; VAR_5++){

                    int bandpos = VAR_5 + (VAR_4 > 0);

                    Jpeg2000Band *band = reslevel->band + VAR_5;

                    Jpeg2000Prec *prec = band->prec + VAR_2;



                    for (VAR_6 = 0; VAR_6 < prec->nb_codeblocks_height * prec->nb_codeblocks_width; VAR_6++){

                        Jpeg2000Cblk *cblk = prec->cblk + VAR_6;



                        cblk->ninclpasses = getcut(cblk, VAR_0->lambda,

                                (int64_t)dwt_norms[codsty->transform == FF_DWT53][bandpos][VAR_7] * (int64_t)band->i_stepsize >> 16);

                    }

                }

            }

        }

    }

}

static void FUNC_0(Jpeg2000EncoderContext *VAR_0, Jpeg2000Tile *VAR_1)
{ int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7; Jpeg2000CodingStyle *codsty = &VAR_0->codsty; for (VAR_3 = 0; VAR_3 < VAR_0->ncomponents; VAR_3++){ Jpeg2000Component *comp = VAR_1->comp + VAR_3; for (VAR_4 = 0, VAR_7 = codsty->nreslevels-1; VAR_4 < codsty->nreslevels; VAR_4++, VAR_7--){ Jpeg2000ResLevel *reslevel = comp->reslevel + VAR_4; for (VAR_2 = 0; VAR_2 < reslevel->num_precincts_x * reslevel->num_precincts_y; VAR_2++){ for (VAR_5 = 0; VAR_5 < reslevel->nbands ; VAR_5++){ int bandpos = VAR_5 + (VAR_4 > 0); Jpeg2000Band *band = reslevel->band + VAR_5; Jpeg2000Prec *prec = band->prec + VAR_2; for (VAR_6 = 0; VAR_6 < prec->nb_codeblocks_height * prec->nb_codeblocks_width; VAR_6++){ Jpeg2000Cblk *cblk = prec->cblk + VAR_6; cblk->ninclpasses = getcut(cblk, VAR_0->lambda,
(int64_t)dwt_norms[codsty->transform == FF_DWT53][bandpos][VAR_7] * (int64_t)band->i_stepsize >> 16); } } } } } }