static inline void filter_samples(G722Context *c, const int16_t *samples,
                                  int *xlow, int *xhigh)
{
    int xout1, xout2;
    c->prev_samples[c->prev_samples_pos++] = samples[0];
    c->prev_samples[c->prev_samples_pos++] = samples[1];
    ff_g722_apply_qmf(c->prev_samples + c->prev_samples_pos - 24, &xout1, &xout2);
    *xlow  = xout1 + xout2 >> 14;
    *xhigh = xout1 - xout2 >> 14;
    if (c->prev_samples_pos >= PREV_SAMPLES_BUF_SIZE) {
        memmove(c->prev_samples,
                c->prev_samples + c->prev_samples_pos - 22,
                22 * sizeof(c->prev_samples[0]));
        c->prev_samples_pos = 22;
    }
}
['static void g722_encode_no_trellis(G722Context *c,\n                                   uint8_t *dst, int nb_samples,\n                                   const int16_t *samples)\n{\n    int i;\n    for (i = 0; i < nb_samples; i += 2)\n        encode_byte(c, dst++, &samples[i]);\n}', 'static av_always_inline void encode_byte(G722Context *c, uint8_t *dst,\n                                         const int16_t *samples)\n{\n    int xlow, xhigh, ilow, ihigh;\n    filter_samples(c, samples, &xlow, &xhigh);\n    ihigh = encode_high(&c->band[1], xhigh);\n    ilow  = encode_low (&c->band[0], xlow);\n    ff_g722_update_high_predictor(&c->band[1], c->band[1].scale_factor *\n                                ff_g722_high_inv_quant[ihigh] >> 10, ihigh);\n    ff_g722_update_low_predictor(&c->band[0], ilow >> 2);\n    *dst = ihigh << 6 | ilow;\n}', 'static inline void filter_samples(G722Context *c, const int16_t *samples,\n                                  int *xlow, int *xhigh)\n{\n    int xout1, xout2;\n    c->prev_samples[c->prev_samples_pos++] = samples[0];\n    c->prev_samples[c->prev_samples_pos++] = samples[1];\n    ff_g722_apply_qmf(c->prev_samples + c->prev_samples_pos - 24, &xout1, &xout2);\n    *xlow  = xout1 + xout2 >> 14;\n    *xhigh = xout1 - xout2 >> 14;\n    if (c->prev_samples_pos >= PREV_SAMPLES_BUF_SIZE) {\n        memmove(c->prev_samples,\n                c->prev_samples + c->prev_samples_pos - 22,\n                22 * sizeof(c->prev_samples[0]));\n        c->prev_samples_pos = 22;\n    }\n}']