aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Kiss-Vamosi <kisvegabor@gmail.com>2024-08-07 07:44:21 +0100
committerGitHub <noreply@github.com>2024-08-07 08:44:21 +0200
commit1c4d84e07dbda50372170eed3b54ba4bb712cf76 (patch)
treec8e30b182d6f378cf7d01627cd5cbb4e5318ae91
parentc98fb29dea05c6783e0482c764f38c8a8606d33b (diff)
downloadlvgl-1c4d84e07dbda50372170eed3b54ba4bb712cf76.tar.gz
lvgl-1c4d84e07dbda50372170eed3b54ba4bb712cf76.zip
fix(draw_sw): fix swapped 90/270 rotation in case of RGB888 (#6642)
-rw-r--r--src/draw/sw/lv_draw_sw.c8
-rw-r--r--tests/src/test_cases/draw/test_draw_sw_post_process.c12
2 files changed, 10 insertions, 10 deletions
diff --git a/src/draw/sw/lv_draw_sw.c b/src/draw/sw/lv_draw_sw.c
index 9c2040d0b..f1ac76686 100644
--- a/src/draw/sw/lv_draw_sw.c
+++ b/src/draw/sw/lv_draw_sw.c
@@ -615,8 +615,8 @@ static void rotate90_argb8888(const uint32_t * src, uint32_t * dst, int32_t srcW
#if LV_DRAW_SW_SUPPORT_RGB888
-static void rotate270_rgb888(const uint8_t * src, uint8_t * dst, int32_t srcWidth, int32_t srcHeight, int32_t srcStride,
- int32_t dstStride)
+static void rotate90_rgb888(const uint8_t * src, uint8_t * dst, int32_t srcWidth, int32_t srcHeight, int32_t srcStride,
+ int32_t dstStride)
{
if(LV_RESULT_OK == LV_DRAW_SW_ROTATE90_RGB888(src, dst, srcWidth, srcHeight, srcStride, dstStride)) {
return ;
@@ -651,8 +651,8 @@ static void rotate180_rgb888(const uint8_t * src, uint8_t * dst, int32_t width,
}
}
-static void rotate90_rgb888(const uint8_t * src, uint8_t * dst, int32_t width, int32_t height, int32_t srcStride,
- int32_t dstStride)
+static void rotate270_rgb888(const uint8_t * src, uint8_t * dst, int32_t width, int32_t height, int32_t srcStride,
+ int32_t dstStride)
{
if(LV_RESULT_OK == LV_DRAW_SW_ROTATE270_RGB888(src, dst, srcWidth, srcHeight, srcStride, dstStride)) {
return ;
diff --git a/tests/src/test_cases/draw/test_draw_sw_post_process.c b/tests/src/test_cases/draw/test_draw_sw_post_process.c
index 51f114281..9d6e2f224 100644
--- a/tests/src/test_cases/draw/test_draw_sw_post_process.c
+++ b/tests/src/test_cases/draw/test_draw_sw_post_process.c
@@ -92,9 +92,9 @@ void test_rotate90_RGB888(void)
uint8_t dstArray[2 * 3 * 3] = {0};
uint8_t expectedArray[2 * 3 * 3] = {
- 0x44, 0x4A, 0x4B, 0x11, 0x1A, 0x1B,
- 0x55, 0x5A, 0x5B, 0x22, 0x2A, 0x2B,
- 0x66, 0x6A, 0x6B, 0x33, 0x3A, 0x3B,
+ 0x33, 0x3A, 0x3B, 0x66, 0x6A, 0x6B,
+ 0x22, 0x2A, 0x2B, 0x55, 0x5A, 0x5B,
+ 0x11, 0x1A, 0x1B, 0x44, 0x4A, 0x4B,
};
lv_draw_sw_rotate(srcArray, dstArray,
@@ -139,9 +139,9 @@ void test_rotate270_RGB888(void)
uint8_t dstArray[2 * 3 * 3] = {0};
uint8_t expectedArray[2 * 3 * 3] = {
- 0x33, 0x3A, 0x3B, 0x66, 0x6A, 0x6B,
- 0x22, 0x2A, 0x2B, 0x55, 0x5A, 0x5B,
- 0x11, 0x1A, 0x1B, 0x44, 0x4A, 0x4B,
+ 0x44, 0x4A, 0x4B, 0x11, 0x1A, 0x1B,
+ 0x55, 0x5A, 0x5B, 0x22, 0x2A, 0x2B,
+ 0x66, 0x6A, 0x6B, 0x33, 0x3A, 0x3B,
};
lv_draw_sw_rotate(srcArray, dstArray,