static void decode_component(DiracContext *s, int comp)

{

    AVCodecContext *avctx = s->avctx;

    SubBand *bands[3*MAX_DWT_LEVELS+1];

    enum dirac_subband orientation;

    int level, num_bands = 0;



    /* Unpack all subbands at all levels. */

    for (level = 0; level < s->wavelet_depth; level++) {

        for (orientation = !!level; orientation < 4; orientation++) {

            SubBand *b = &s->plane[comp].band[level][orientation];

            bands[num_bands++] = b;



            align_get_bits(&s->gb);

            /* [DIRAC_STD] 13.4.2 subband() */

            b->length = svq3_get_ue_golomb(&s->gb);

            if (b->length) {

                b->quant = svq3_get_ue_golomb(&s->gb);

                align_get_bits(&s->gb);

                b->coeff_data = s->gb.buffer + get_bits_count(&s->gb)/8;

                b->length = FFMIN(b->length, get_bits_left(&s->gb)/8);

                skip_bits_long(&s->gb, b->length*8);

            }

        }

        /* arithmetic coding has inter-level dependencies, so we can only execute one level at a time */

        if (s->is_arith)

            avctx->execute(avctx, decode_subband_arith, &s->plane[comp].band[level][!!level],

                           NULL, 4-!!level, sizeof(SubBand));

    }

    /* golomb coding has no inter-level dependencies, so we can execute all subbands in parallel */

    if (!s->is_arith)

        avctx->execute(avctx, decode_subband_golomb, bands, NULL, num_bands, sizeof(SubBand*));

}

static void decode_component(DiracContext *s, int comp)

{

    AVCodecContext *avctx = s->avctx;

    SubBand *bands[3*MAX_DWT_LEVELS+1];

    enum dirac_subband orientation;

    int level, num_bands = 0;



    

    for (level = 0; level < s->wavelet_depth; level++) {

        for (orientation = !!level; orientation < 4; orientation++) {

            SubBand *b = &s->plane[comp].band[level][orientation];

            bands[num_bands++] = b;



            align_get_bits(&s->gb);

            

            b->length = svq3_get_ue_golomb(&s->gb);

            if (b->length) {

                b->quant = svq3_get_ue_golomb(&s->gb);

                align_get_bits(&s->gb);

                b->coeff_data = s->gb.buffer + get_bits_count(&s->gb)/8;

                b->length = FFMIN(b->length, get_bits_left(&s->gb)/8);

                skip_bits_long(&s->gb, b->length*8);

            }

        }

        

        if (s->is_arith)

            avctx->execute(avctx, decode_subband_arith, &s->plane[comp].band[level][!!level],

                           NULL, 4-!!level, sizeof(SubBand));

    }

    

    if (!s->is_arith)

        avctx->execute(avctx, decode_subband_golomb, bands, NULL, num_bands, sizeof(SubBand*));

}

                b->length = FFMIN(b->length, get_bits_left(&s->gb)/8);
static void FUNC_0(DiracContext *VAR_0, int VAR_1)

{

    AVCodecContext *avctx = VAR_0->avctx;

    SubBand *bands[3*MAX_DWT_LEVELS+1];

    enum dirac_subband VAR_2;

    int VAR_3, VAR_4 = 0;



    

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

        for (VAR_2 = !!VAR_3; VAR_2 < 4; VAR_2++) {

            SubBand *b = &VAR_0->plane[VAR_1].band[VAR_3][VAR_2];

            bands[VAR_4++] = b;



            align_get_bits(&VAR_0->gb);

            

            b->length = svq3_get_ue_golomb(&VAR_0->gb);

            if (b->length) {

                b->quant = svq3_get_ue_golomb(&VAR_0->gb);

                align_get_bits(&VAR_0->gb);

                b->coeff_data = VAR_0->gb.buffer + get_bits_count(&VAR_0->gb)/8;

                b->length = FFMIN(b->length, get_bits_left(&VAR_0->gb)/8);

                skip_bits_long(&VAR_0->gb, b->length*8);

            }

        }

        

        if (VAR_0->is_arith)

            avctx->execute(avctx, decode_subband_arith, &VAR_0->plane[VAR_1].band[VAR_3][!!VAR_3],

                           NULL, 4-!!VAR_3, sizeof(SubBand));

    }

    

    if (!VAR_0->is_arith)

        avctx->execute(avctx, decode_subband_golomb, bands, NULL, VAR_4, sizeof(SubBand*));

}

static void FUNC_0(DiracContext *VAR_0, int VAR_1)
{ AVCodecContext *avctx = VAR_0->avctx; SubBand *bands[3*MAX_DWT_LEVELS+1]; enum dirac_subband VAR_2; int VAR_3, VAR_4 = 0; for (VAR_3 = 0; VAR_3 < VAR_0->wavelet_depth; VAR_3++) { for (VAR_2 = !!VAR_3; VAR_2 < 4; VAR_2++) { SubBand *b = &VAR_0->plane[VAR_1].band[VAR_3][VAR_2]; bands[VAR_4++] = b; align_get_bits(&VAR_0->gb); b->length = svq3_get_ue_golomb(&VAR_0->gb); if (b->length) { b->quant = svq3_get_ue_golomb(&VAR_0->gb); align_get_bits(&VAR_0->gb); b->coeff_data = VAR_0->gb.buffer + get_bits_count(&VAR_0->gb)/8; b->length = FFMIN(b->length, get_bits_left(&VAR_0->gb)/8); skip_bits_long(&VAR_0->gb, b->length*8); } } if (VAR_0->is_arith)
avctx->execute(avctx, decode_subband_arith, &VAR_0->plane[VAR_1].band[VAR_3][!!VAR_3],
NULL, 4-!!VAR_3, sizeof(SubBand)); } if (!VAR_0->is_arith)
avctx->execute(avctx, decode_subband_golomb, bands, NULL, VAR_4, sizeof(SubBand*)); }