static void decode_subband(DiracContext *s, GetBitContext *gb, int quant,

                           int slice_x, int slice_y, int bits_end,

                           SubBand *b1, SubBand *b2)

{

    int left   = b1->width  * slice_x    / s->num_x;

    int right  = b1->width  *(slice_x+1) / s->num_x;

    int top    = b1->height * slice_y    / s->num_y;

    int bottom = b1->height *(slice_y+1) / s->num_y;



    int qfactor = qscale_tab[quant & 0x7f];

    int qoffset = qoffset_intra_tab[quant & 0x7f] + 2;



    uint8_t *buf1 =      b1->ibuf + top * b1->stride;

    uint8_t *buf2 = b2 ? b2->ibuf + top * b2->stride: NULL;

    int x, y;

    /* we have to constantly check for overread since the spec explicitly

       requires this, with the meaning that all remaining coeffs are set to 0 */

    if (get_bits_count(gb) >= bits_end)

        return;



    if (s->pshift) {

        for (y = top; y < bottom; y++) {

            for (x = left; x < right; x++) {

                PARSE_VALUES(int32_t, x, gb, bits_end, buf1, buf2);

            }

            buf1 += b1->stride;

            if (buf2)

                buf2 += b2->stride;

        }

    }

    else {

        for (y = top; y < bottom; y++) {

            for (x = left; x < right; x++) {

                PARSE_VALUES(int16_t, x, gb, bits_end, buf1, buf2);

            }

            buf1 += b1->stride;

            if (buf2)

                buf2 += b2->stride;

        }

    }

}

static void decode_subband(DiracContext *s, GetBitContext *gb, int quant,

                           int slice_x, int slice_y, int bits_end,

                           SubBand *b1, SubBand *b2)

{

    int left   = b1->width  * slice_x    / s->num_x;

    int right  = b1->width  *(slice_x+1) / s->num_x;

    int top    = b1->height * slice_y    / s->num_y;

    int bottom = b1->height *(slice_y+1) / s->num_y;



    int qfactor = qscale_tab[quant & 0x7f];

    int qoffset = qoffset_intra_tab[quant & 0x7f] + 2;



    uint8_t *buf1 =      b1->ibuf + top * b1->stride;

    uint8_t *buf2 = b2 ? b2->ibuf + top * b2->stride: NULL;

    int x, y;

    



    if (get_bits_count(gb) >= bits_end)

        return;



    if (s->pshift) {

        for (y = top; y < bottom; y++) {

            for (x = left; x < right; x++) {

                PARSE_VALUES(int32_t, x, gb, bits_end, buf1, buf2);

            }

            buf1 += b1->stride;

            if (buf2)

                buf2 += b2->stride;

        }

    }

    else {

        for (y = top; y < bottom; y++) {

            for (x = left; x < right; x++) {

                PARSE_VALUES(int16_t, x, gb, bits_end, buf1, buf2);

            }

            buf1 += b1->stride;

            if (buf2)

                buf2 += b2->stride;

        }

    }

}

    int qfactor = qscale_tab[quant & 0x7f];     int qoffset = qoffset_intra_tab[quant & 0x7f] + 2;
static void FUNC_0(DiracContext *VAR_0, GetBitContext *VAR_1, int VAR_2,

                           int VAR_3, int VAR_4, int VAR_5,

                           SubBand *VAR_6, SubBand *VAR_7)

{

    int VAR_8   = VAR_6->width  * VAR_3    / VAR_0->num_x;

    int VAR_9  = VAR_6->width  *(VAR_3+1) / VAR_0->num_x;

    int VAR_10    = VAR_6->height * VAR_4    / VAR_0->num_y;

    int VAR_11 = VAR_6->height *(VAR_4+1) / VAR_0->num_y;



    int VAR_12 = qscale_tab[VAR_2 & 0x7f];

    int VAR_13 = qoffset_intra_tab[VAR_2 & 0x7f] + 2;



    uint8_t *buf1 =      VAR_6->ibuf + VAR_10 * VAR_6->stride;

    uint8_t *buf2 = VAR_7 ? VAR_7->ibuf + VAR_10 * VAR_7->stride: NULL;

    int VAR_14, VAR_15;

    



    if (get_bits_count(VAR_1) >= VAR_5)

        return;



    if (VAR_0->pshift) {

        for (VAR_15 = VAR_10; VAR_15 < VAR_11; VAR_15++) {

            for (VAR_14 = VAR_8; VAR_14 < VAR_9; VAR_14++) {

                PARSE_VALUES(int32_t, VAR_14, VAR_1, VAR_5, buf1, buf2);

            }

            buf1 += VAR_6->stride;

            if (buf2)

                buf2 += VAR_7->stride;

        }

    }

    else {

        for (VAR_15 = VAR_10; VAR_15 < VAR_11; VAR_15++) {

            for (VAR_14 = VAR_8; VAR_14 < VAR_9; VAR_14++) {

                PARSE_VALUES(int16_t, VAR_14, VAR_1, VAR_5, buf1, buf2);

            }

            buf1 += VAR_6->stride;

            if (buf2)

                buf2 += VAR_7->stride;

        }

    }

}

static void FUNC_0(DiracContext *VAR_0, GetBitContext *VAR_1, int VAR_2,
int VAR_3, int VAR_4, int VAR_5,
SubBand *VAR_6, SubBand *VAR_7)
{ int VAR_8   = VAR_6->width  * VAR_3    / VAR_0->num_x; int VAR_9  = VAR_6->width  *(VAR_3+1) / VAR_0->num_x; int VAR_10    = VAR_6->height * VAR_4    / VAR_0->num_y; int VAR_11 = VAR_6->height *(VAR_4+1) / VAR_0->num_y; int VAR_12 = qscale_tab[VAR_2 & 0x7f]; int VAR_13 = qoffset_intra_tab[VAR_2 & 0x7f] + 2; uint8_t *buf1 =      VAR_6->ibuf + VAR_10 * VAR_6->stride; uint8_t *buf2 = VAR_7 ? VAR_7->ibuf + VAR_10 * VAR_7->stride: NULL; int VAR_14, VAR_15; if (get_bits_count(VAR_1) >= VAR_5)
return; if (VAR_0->pshift) { for (VAR_15 = VAR_10; VAR_15 < VAR_11; VAR_15++) { for (VAR_14 = VAR_8; VAR_14 < VAR_9; VAR_14++) { PARSE_VALUES(int32_t, VAR_14, VAR_1, VAR_5, buf1, buf2); } buf1 += VAR_6->stride; if (buf2)
buf2 += VAR_7->stride; } } else { for (VAR_15 = VAR_10; VAR_15 < VAR_11; VAR_15++) { for (VAR_14 = VAR_8; VAR_14 < VAR_9; VAR_14++) { PARSE_VALUES(int16_t, VAR_14, VAR_1, VAR_5, buf1, buf2); } buf1 += VAR_6->stride; if (buf2)
buf2 += VAR_7->stride; } } }