feat(draw/sw): added support for LV_COLOR_FORMAT_L8 (#5800)
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com> Signed-off-by: qinshijing <qinshijing@xiaomi.com> Co-authored-by: Zoltan Janosy <zjanosy@fishman.com> Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com> Co-authored-by: VIFEX <vifextech@foxmail.com> Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com> Co-authored-by: Niklas Fiekas <niklas.fiekas@sartorius.com> Co-authored-by: qinshijing <51692568+qinshijing@users.noreply.github.com> Co-authored-by: qinshijing <qinshijing@xiaomi.com> Co-authored-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* @file lv_test_assert.c
|
||||
*
|
||||
* Copyright 2002-2010 Guillaume Cottenceau.
|
||||
@@ -419,6 +419,36 @@ static void buf_to_xrgb8888(const uint8_t * buf_in, uint8_t * buf_out, lv_color_
|
||||
buf_out[x * 4 + 0] = buf_in[x * 3 + 2];
|
||||
}
|
||||
|
||||
buf_in += stride;
|
||||
buf_out += 800 * 4;
|
||||
}
|
||||
}
|
||||
else if(cf_in == LV_COLOR_FORMAT_L8) {
|
||||
uint32_t y;
|
||||
for(y = 0; y < 480; y++) {
|
||||
uint32_t x;
|
||||
for(x = 0; x < 800; x++) {
|
||||
buf_out[x * 4 + 3] = 0xff;
|
||||
buf_out[x * 4 + 2] = buf_in[x];
|
||||
buf_out[x * 4 + 1] = buf_in[x];
|
||||
buf_out[x * 4 + 0] = buf_in[x];
|
||||
}
|
||||
|
||||
buf_in += stride;
|
||||
buf_out += 800 * 4;
|
||||
}
|
||||
}
|
||||
else if (cf_in == LV_COLOR_FORMAT_AL88) {
|
||||
uint32_t y;
|
||||
for (y = 0; y < 480; y++) {
|
||||
uint32_t x;
|
||||
for (x = 0; x < 800; x++) {
|
||||
buf_out[x * 4 + 3] = buf_in[x * 2 + 1];
|
||||
buf_out[x * 4 + 2] = buf_in[x * 2 + 0];
|
||||
buf_out[x * 4 + 1] = buf_in[x * 2 + 0];
|
||||
buf_out[x * 4 + 0] = buf_in[x * 2 + 0];
|
||||
}
|
||||
|
||||
buf_in += stride;
|
||||
buf_out += 800 * 4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user