static void apply_window_mp3_c(MPA_INT *synth_buf, MPA_INT *window,
                               int *dither_state, OUT_INT *samples, int incr)
{
    register const MPA_INT *w, *w2, *p;
    int j;
    OUT_INT *samples2;
#if CONFIG_FLOAT
    float sum, sum2;
#elif FRAC_BITS <= 15
    int sum, sum2;
#else
    int64_t sum, sum2;
#endif
    memcpy(synth_buf + 512, synth_buf, 32 * sizeof(*synth_buf));
    samples2 = samples + 31 * incr;
    w = window;
    w2 = window + 31;
    sum = *dither_state;
    p = synth_buf + 16;
    SUM8(MACS, sum, w, p);
    p = synth_buf + 48;
    SUM8(MLSS, sum, w + 32, p);
    *samples = round_sample(&sum);
    samples += incr;
    w++;
    for(j=1;j<16;j++) {
        sum2 = 0;
        p = synth_buf + 16 + j;
        SUM8P2(sum, MACS, sum2, MLSS, w, w2, p);
        p = synth_buf + 48 - j;
        SUM8P2(sum, MLSS, sum2, MLSS, w + 32, w2 + 32, p);
        *samples = round_sample(&sum);
        samples += incr;
        sum += sum2;
        *samples2 = round_sample(&sum);
        samples2 -= incr;
        w++;
        w2--;
    }
    p = synth_buf + 32;
    SUM8(MLSS, sum, w + 32, p);
    *samples = round_sample(&sum);
    *dither_state= sum;
}
['static void mpc_synth(MPCContext *c, int16_t *out)\n{\n    int dither_state = 0;\n    int i, ch;\n    OUT_INT samples[MPA_MAX_CHANNELS * MPA_FRAME_SIZE], *samples_ptr;\n    for(ch = 0;  ch < 2; ch++){\n        samples_ptr = samples + ch;\n        for(i = 0; i < SAMPLES_PER_BAND; i++) {\n            ff_mpa_synth_filter(c->synth_buf[ch], &(c->synth_buf_offset[ch]),\n                                ff_mpa_synth_window, &dither_state,\n                                samples_ptr, 2,\n                                c->sb_samples[ch][i]);\n            samples_ptr += 64;\n        }\n    }\n    for(i = 0; i < MPC_FRAME_SIZE*2; i++)\n        *out++=samples[i];\n}', 'void ff_mpa_synth_filter(MPA_INT *synth_buf_ptr, int *synth_buf_offset,\n                         MPA_INT *window, int *dither_state,\n                         OUT_INT *samples, int incr,\n                         INTFLOAT sb_samples[SBLIMIT])\n{\n    register MPA_INT *synth_buf;\n    int offset;\n#if FRAC_BITS <= 15\n    int32_t tmp[32];\n    int j;\n#endif\n    offset = *synth_buf_offset;\n    synth_buf = synth_buf_ptr + offset;\n#if FRAC_BITS <= 15\n    dct32(tmp, sb_samples);\n    for(j=0;j<32;j++) {\n        synth_buf[j] = av_clip_int16(tmp[j]);\n    }\n#else\n    dct32(synth_buf, sb_samples);\n#endif\n    apply_window_mp3_c(synth_buf, window, dither_state, samples, incr);\n    offset = (offset - 32) & 511;\n    *synth_buf_offset = offset;\n}', 'static void apply_window_mp3_c(MPA_INT *synth_buf, MPA_INT *window,\n                               int *dither_state, OUT_INT *samples, int incr)\n{\n    register const MPA_INT *w, *w2, *p;\n    int j;\n    OUT_INT *samples2;\n#if CONFIG_FLOAT\n    float sum, sum2;\n#elif FRAC_BITS <= 15\n    int sum, sum2;\n#else\n    int64_t sum, sum2;\n#endif\n    memcpy(synth_buf + 512, synth_buf, 32 * sizeof(*synth_buf));\n    samples2 = samples + 31 * incr;\n    w = window;\n    w2 = window + 31;\n    sum = *dither_state;\n    p = synth_buf + 16;\n    SUM8(MACS, sum, w, p);\n    p = synth_buf + 48;\n    SUM8(MLSS, sum, w + 32, p);\n    *samples = round_sample(&sum);\n    samples += incr;\n    w++;\n    for(j=1;j<16;j++) {\n        sum2 = 0;\n        p = synth_buf + 16 + j;\n        SUM8P2(sum, MACS, sum2, MLSS, w, w2, p);\n        p = synth_buf + 48 - j;\n        SUM8P2(sum, MLSS, sum2, MLSS, w + 32, w2 + 32, p);\n        *samples = round_sample(&sum);\n        samples += incr;\n        sum += sum2;\n        *samples2 = round_sample(&sum);\n        samples2 -= incr;\n        w++;\n        w2--;\n    }\n    p = synth_buf + 32;\n    SUM8(MLSS, sum, w + 32, p);\n    *samples = round_sample(&sum);\n    *dither_state= sum;\n}']