static void put_subframe_samples(DCAEncContext *c, int ss, int band, int ch)

{

    if (c->abits[band][ch] <= 7) {

        int sum, i, j;

        for (i = 0; i < 8; i += 4) {

            sum = 0;

            for (j = 3; j >= 0; j--) {

                sum *= ff_dca_quant_levels[c->abits[band][ch]];

                sum += c->quantized[ss * 8 + i + j][band][ch];

                sum += (ff_dca_quant_levels[c->abits[band][ch]] - 1) / 2;

            }

            put_bits(&c->pb, bit_consumption[c->abits[band][ch]] / 4, sum);

        }

    } else {

        int i;

        for (i = 0; i < 8; i++) {

            int bits = bit_consumption[c->abits[band][ch]] / 16;

            put_sbits(&c->pb, bits, c->quantized[ss * 8 + i][band][ch]);

        }

    }

}

static void put_subframe_samples(DCAEncContext *c, int ss, int band, int ch)

{

    if (c->abits[band][ch] <= 7) {

        int sum, i, j;

        for (i = 0; i < 8; i += 4) {

            sum = 0;

            for (j = 3; j >= 0; j--) {

                sum *= ff_dca_quant_levels[c->abits[band][ch]];

                sum += c->quantized[ss * 8 + i + j][band][ch];

                sum += (ff_dca_quant_levels[c->abits[band][ch]] - 1) / 2;

            }

            put_bits(&c->pb, bit_consumption[c->abits[band][ch]] / 4, sum);

        }

    } else {

        int i;

        for (i = 0; i < 8; i++) {

            int bits = bit_consumption[c->abits[band][ch]] / 16;

            put_sbits(&c->pb, bits, c->quantized[ss * 8 + i][band][ch]);

        }

    }

}

static void FUNC_0(DCAEncContext *VAR_0, int VAR_1, int VAR_2, int VAR_3)

{

    if (VAR_0->abits[VAR_2][VAR_3] <= 7) {

        int VAR_4, VAR_7, VAR_6;

        for (VAR_7 = 0; VAR_7 < 8; VAR_7 += 4) {

            VAR_4 = 0;

            for (VAR_6 = 3; VAR_6 >= 0; VAR_6--) {

                VAR_4 *= ff_dca_quant_levels[VAR_0->abits[VAR_2][VAR_3]];

                VAR_4 += VAR_0->quantized[VAR_1 * 8 + VAR_7 + VAR_6][VAR_2][VAR_3];

                VAR_4 += (ff_dca_quant_levels[VAR_0->abits[VAR_2][VAR_3]] - 1) / 2;

            }

            put_bits(&VAR_0->pb, bit_consumption[VAR_0->abits[VAR_2][VAR_3]] / 4, VAR_4);

        }

    } else {

        int VAR_7;

        for (VAR_7 = 0; VAR_7 < 8; VAR_7++) {

            int VAR_7 = bit_consumption[VAR_0->abits[VAR_2][VAR_3]] / 16;

            put_sbits(&VAR_0->pb, VAR_7, VAR_0->quantized[VAR_1 * 8 + VAR_7][VAR_2][VAR_3]);

        }

    }

}

static void FUNC_0(DCAEncContext *VAR_0, int VAR_1, int VAR_2, int VAR_3)
{ if (VAR_0->abits[VAR_2][VAR_3] <= 7) { int VAR_4, VAR_7, VAR_6; for (VAR_7 = 0; VAR_7 < 8; VAR_7 += 4) { VAR_4 = 0; for (VAR_6 = 3; VAR_6 >= 0; VAR_6--) { VAR_4 *= ff_dca_quant_levels[VAR_0->abits[VAR_2][VAR_3]]; VAR_4 += VAR_0->quantized[VAR_1 * 8 + VAR_7 + VAR_6][VAR_2][VAR_3]; VAR_4 += (ff_dca_quant_levels[VAR_0->abits[VAR_2][VAR_3]] - 1) / 2; } put_bits(&VAR_0->pb, bit_consumption[VAR_0->abits[VAR_2][VAR_3]] / 4, VAR_4); } } else { int VAR_7; for (VAR_7 = 0; VAR_7 < 8; VAR_7++) { int VAR_7 = bit_consumption[VAR_0->abits[VAR_2][VAR_3]] / 16; put_sbits(&VAR_0->pb, VAR_7, VAR_0->quantized[VAR_1 * 8 + VAR_7][VAR_2][VAR_3]); } } }