val = (code - 1) << shift; if (shift > 0)
val = code; if (shift) { val = (val - 1) << shift;
static int h263_decode_motion(MpegEncContext * s, int pred, int f_code){    int code, val, sign, shift, l;    code = get_vlc2(&s->gb, mv_vlc.table, MV_VLC_BITS, 2);    if (code == 0)        return pred;    if (code < 0)        return 0xffff;    sign = get_bits1(&s->gb);    shift = f_code - 1;    val = (code - 1) << shift;    if (shift > 0)        val |= get_bits(&s->gb, shift);    val++;    if (sign)        val = -val;    val += pred;    /* modulo decoding */    if (!s->h263_long_vectors) {        l = 1 << (f_code + 4);        if (val < -l) {            val += l<<1;        } else if (val >= l) {            val -= l<<1;        }    } else {        /* horrible h263 long vector mode */        if (pred < -31 && val < -63)            val += 64;        if (pred > 32 && val > 63)            val -= 64;            }    return val;}