From c9315f4157a9c1e0100c8ecd34e297374e05fe09 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Thu, 18 Apr 2019 22:21:54 -0700 Subject: fix yuv typeo --- src/rfxencode_rgb_to_yuv.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/rfxencode_rgb_to_yuv.c b/src/rfxencode_rgb_to_yuv.c index 76b5c14..40f785d 100644 --- a/src/rfxencode_rgb_to_yuv.c +++ b/src/rfxencode_rgb_to_yuv.c @@ -84,9 +84,9 @@ rfx_encode_format_rgb(const char *rgb_data, int width, int height, } while (x < 64) { - *lr_buf++ = r; + *lb_buf++ = b; *lg_buf++ = g; - *lb_buf++ = r; + *lr_buf++ = r; x++; } } @@ -155,9 +155,9 @@ rfx_encode_format_rgb(const char *rgb_data, int width, int height, } while (x < 64) { - *lr_buf++ = r; - *lg_buf++ = g; *lb_buf++ = b; + *lg_buf++ = g; + *lr_buf++ = r; x++; } } @@ -257,10 +257,10 @@ rfx_encode_format_argb(const char *argb_data, int width, int height, } while (x < 64) { - *la_buf++ = a; - *lr_buf++ = r; + *lb_buf++ = b; *lg_buf++ = g; - *lb_buf++ = r; + *lr_buf++ = r; + *la_buf++ = a; x++; } } @@ -298,10 +298,10 @@ rfx_encode_format_argb(const char *argb_data, int width, int height, } while (x < 64) { - *la_buf++ = a; *lr_buf++ = r; *lg_buf++ = g; *lb_buf++ = b; + *la_buf++ = a; x++; } } @@ -336,9 +336,9 @@ rfx_encode_format_argb(const char *argb_data, int width, int height, } while (x < 64) { - *lr_buf++ = r; - *lg_buf++ = g; *lb_buf++ = b; + *lg_buf++ = g; + *lr_buf++ = r; x++; } } -- cgit v1.2.3