static void gray_to_rgb24(AVPicture *dst, AVPicture *src, int width, int height) { const unsigned char *p; unsigned char *q; int r, dst_wrap, src_wrap; int x, y;  p = src->data[0]; src_wrap = src->linesize[0] - width;  q = dst->data[0]; dst_wrap = dst->linesize[0] - 3 * width;  for(y=0;y<height;y++) { for(x=0;x<width;x++) { r = p[0];  q[0] = r; q[1] = r; q[2] = r;  q += 3; p ++; } p += src_wrap; q += dst_wrap; } }
RGB_FUNCTIONS(rgb24)
static void gray_to_rgb24(AVPicture *dst, AVPicture *src,                          int width, int height){    const unsigned char *p;    unsigned char *q;    int r, dst_wrap, src_wrap;    int x, y;    p = src->data[0];    src_wrap = src->linesize[0] - width;    q = dst->data[0];    dst_wrap = dst->linesize[0] - 3 * width;    for(y=0;y<height;y++) {        for(x=0;x<width;x++) {            r = p[0];            q[0] = r;            q[1] = r;            q[2] = r;                        q += 3;            p ++;        }        p += src_wrap;        q += dst_wrap;    }}