diff options
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4lconvert/rgbyuv.c')
-rw-r--r-- | v4l2-apps/lib/libv4l/libv4lconvert/rgbyuv.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/v4l2-apps/lib/libv4l/libv4lconvert/rgbyuv.c b/v4l2-apps/lib/libv4l/libv4lconvert/rgbyuv.c index bda4cc342..742dd06ce 100644 --- a/v4l2-apps/lib/libv4l/libv4lconvert/rgbyuv.c +++ b/v4l2-apps/lib/libv4l/libv4lconvert/rgbyuv.c @@ -127,3 +127,18 @@ void v4lconvert_yuv420_to_rgb24(const unsigned char *src, unsigned char *dest, } } } + +void v4lconvert_swap_rgb(const unsigned char *src, unsigned char *dst, + int width, int height) +{ + int i; + + for (i = 0; i < (width * height); i++) { + unsigned char tmp0, tmp1; + tmp0 = *src++; + tmp1 = *src++; + *dst++ = *src++; + *dst++ = tmp1; + *dst++ = tmp0; + } +} |