d[0] = (s1[0] + s1[1] + s2[0] + s2[1] + 2) >> 1;
d[0] = (s1[0] + s1[1] + s2[0] + s2[1] + 2) >> 2;
static void shrink22(uint8_t *dst, int dst_wrap,                      const uint8_t *src, int src_wrap,                     int width, int height){    int w;    const uint8_t *s1, *s2;    uint8_t *d;    for(;height > 0; height--) {        s1 = src;        s2 = s1 + src_wrap;        d = dst;        for(w = width;w >= 4; w-=4) {            d[0] = (s1[0] + s1[1] + s2[0] + s2[1] + 2) >> 1;            d[1] = (s1[2] + s1[3] + s2[2] + s2[3] + 2) >> 1;            d[2] = (s1[4] + s1[5] + s2[4] + s2[5] + 2) >> 1;            d[3] = (s1[6] + s1[7] + s2[6] + s2[7] + 2) >> 1;            s1 += 8;            s2 += 8;            d += 4;        }        for(;w > 0; w--) {            d[0] = (s1[0] + s1[1] + s2[0] + s2[1] + 2) >> 1;            s1 += 2;            s2 += 2;            d++;        }        src += 2 * src_wrap;        dst += dst_wrap;    }}