static void decode_audio_s16(int16_t *out, const uint8_t *buf, int buf_size,
                             int channels)
{
    int ch;
    const uint8_t *buf_end = buf + buf_size;
    int predictor[2];
    int st = channels - 1;
    for (ch = 0; ch < channels; ch++) {
        predictor[ch] = (int16_t)AV_RL16(buf);
        buf += 2;
        *out++ = predictor[ch];
    }
    ch = 0;
    while (buf < buf_end) {
        uint8_t b = *buf++;
        if (b & 0x80)
            predictor[ch] -= vmdaudio_table[b & 0x7F];
        else
            predictor[ch] += vmdaudio_table[b];
        predictor[ch] = av_clip_int16(predictor[ch]);
        *out++ = predictor[ch];
        ch ^= st;
    }
}
['static void decode_audio_s16(int16_t *out, const uint8_t *buf, int buf_size,\n                             int channels)\n{\n    int ch;\n    const uint8_t *buf_end = buf + buf_size;\n    int predictor[2];\n    int st = channels - 1;\n    for (ch = 0; ch < channels; ch++) {\n        predictor[ch] = (int16_t)AV_RL16(buf);\n        buf += 2;\n        *out++ = predictor[ch];\n    }\n    ch = 0;\n    while (buf < buf_end) {\n        uint8_t b = *buf++;\n        if (b & 0x80)\n            predictor[ch] -= vmdaudio_table[b & 0x7F];\n        else\n            predictor[ch] += vmdaudio_table[b];\n        predictor[ch] = av_clip_int16(predictor[ch]);\n        *out++ = predictor[ch];\n        ch ^= st;\n    }\n}']