static void gray_to_mono(AVPicture *dst, AVPicture *src,
static void gray_to_mono(AVPicture *dst, const AVPicture *src,
static void gray_to_mono(AVPicture *dst, AVPicture *src,                         int width, int height, int xor_mask){    int n;    const uint8_t *s;    uint8_t *d;    int j, b, v, n1, src_wrap, dst_wrap, y;    s = src->data[0];    src_wrap = src->linesize[0] - width;    d = dst->data[0];    dst_wrap = dst->linesize[0] - ((width + 7) >> 3);    for(y=0;y<height;y++) {        n = width;        while (n >= 8) {            v = 0;            for(j=0;j<8;j++) {                b = s[0];                s++;                v = (v << 1) | (b >> 7);            }            d[0] = v ^ xor_mask;            d++;            n -= 8;        }        if (n > 0) {            n1 = n;            v = 0;            while (n > 0) {                b = s[0];                s++;                v = (v << 1) | (b >> 7);                n--;            }            d[0] = (v << (8 - (n1 & 7))) ^ xor_mask;            d++;        }        s += src_wrap;        d += dst_wrap;    }}