static void qdm2_synthesis_filter (QDM2Context *q, int index)
{
    OUT_INT samples[MPA_MAX_CHANNELS * MPA_FRAME_SIZE];
    int i, k, ch, sb_used, sub_sampling, dither_state = 0;
    sb_used = QDM2_SB_USED(q->sub_sampling);
    for (ch = 0; ch < q->channels; ch++)
        for (i = 0; i < 8; i++)
            for (k=sb_used; k < SBLIMIT; k++)
                q->sb_samples[ch][(8 * index) + i][k] = 0;
    for (ch = 0; ch < q->nb_channels; ch++) {
        OUT_INT *samples_ptr = samples + ch;
        for (i = 0; i < 8; i++) {
            ff_mpa_synth_filter(q->synth_buf[ch], &(q->synth_buf_offset[ch]),
                mpa_window, &dither_state,
                samples_ptr, q->nb_channels,
                q->sb_samples[ch][(8 * index) + i]);
            samples_ptr += 32 * q->nb_channels;
        }
    }
    sub_sampling = (4 >> q->sub_sampling);
    for (ch = 0; ch < q->channels; ch++)
        for (i = 0; i < q->frame_size; i++)
            q->output_buffer[q->channels * i + ch] += (float)(samples[q->nb_channels * sub_sampling * i + ch] >> (sizeof(OUT_INT)*8-16));
}
['static void qdm2_synthesis_filter (QDM2Context *q, int index)\n{\n    OUT_INT samples[MPA_MAX_CHANNELS * MPA_FRAME_SIZE];\n    int i, k, ch, sb_used, sub_sampling, dither_state = 0;\n    sb_used = QDM2_SB_USED(q->sub_sampling);\n    for (ch = 0; ch < q->channels; ch++)\n        for (i = 0; i < 8; i++)\n            for (k=sb_used; k < SBLIMIT; k++)\n                q->sb_samples[ch][(8 * index) + i][k] = 0;\n    for (ch = 0; ch < q->nb_channels; ch++) {\n        OUT_INT *samples_ptr = samples + ch;\n        for (i = 0; i < 8; i++) {\n            ff_mpa_synth_filter(q->synth_buf[ch], &(q->synth_buf_offset[ch]),\n                mpa_window, &dither_state,\n                samples_ptr, q->nb_channels,\n                q->sb_samples[ch][(8 * index) + i]);\n            samples_ptr += 32 * q->nb_channels;\n        }\n    }\n    sub_sampling = (4 >> q->sub_sampling);\n    for (ch = 0; ch < q->channels; ch++)\n        for (i = 0; i < q->frame_size; i++)\n            q->output_buffer[q->channels * i + ch] += (float)(samples[q->nb_channels * sub_sampling * i + ch] >> (sizeof(OUT_INT)*8-16));\n}']