diff options
Diffstat (limited to 'src/draw/sw/lv_draw_sw_transform.c')
-rw-r--r-- | src/draw/sw/lv_draw_sw_transform.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/draw/sw/lv_draw_sw_transform.c b/src/draw/sw/lv_draw_sw_transform.c index c3ad2b08a..f38894522 100644 --- a/src/draw/sw/lv_draw_sw_transform.c +++ b/src/draw/sw/lv_draw_sw_transform.c @@ -50,20 +50,20 @@ typedef struct { static void transform_point_upscaled(point_transform_dsc_t * t, int32_t xin, int32_t yin, int32_t * xout, int32_t * yout); -static void transform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, +static void transform_rgb888(const uint8_t * src, int32_t src_w, int32_t src_h, int32_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, int32_t x_end, uint8_t * dest_buf, bool aa, uint32_t px_size); -static void transform_argb8888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, +static void transform_argb8888(const uint8_t * src, int32_t src_w, int32_t src_h, int32_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, int32_t x_end, uint8_t * dest_buf, bool aa); -static void transform_rgb565a8(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, +static void transform_rgb565a8(const uint8_t * src, int32_t src_w, int32_t src_h, int32_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, int32_t x_end, uint16_t * cbuf, uint8_t * abuf, bool src_has_a8, bool aa); -static void transform_a8(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, +static void transform_a8(const uint8_t * src, int32_t src_w, int32_t src_h, int32_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, int32_t x_end, uint8_t * abuf, bool aa); @@ -80,7 +80,7 @@ static void transform_a8(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h **********************/ void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_area, const void * src_buf, - lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, + int32_t src_w, int32_t src_h, int32_t src_stride, const lv_draw_image_dsc_t * draw_dsc, const lv_draw_image_sup_t * sup, lv_color_format_t src_cf, void * dest_buf) { LV_UNUSED(draw_unit); @@ -110,12 +110,12 @@ void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_are tr_dsc.pivot_y_256 = tr_dsc.pivot.y * 256; - lv_coord_t dest_w = lv_area_get_width(dest_area); - lv_coord_t dest_h = lv_area_get_height(dest_area); + int32_t dest_w = lv_area_get_width(dest_area); + int32_t dest_h = lv_area_get_height(dest_area); - lv_coord_t dest_stride_a8 = dest_w; - lv_coord_t dest_stride; - lv_coord_t src_stride_px; + int32_t dest_stride_a8 = dest_w; + int32_t dest_stride; + int32_t src_stride_px; if(src_cf == LV_COLOR_FORMAT_RGB888) { dest_stride = lv_draw_buf_width_to_stride(dest_w, LV_COLOR_FORMAT_ARGB8888); src_stride_px = src_stride / lv_color_format_get_size(LV_COLOR_FORMAT_RGB888); @@ -140,7 +140,7 @@ void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_are bool aa = draw_dsc->antialias; - lv_coord_t y; + int32_t y; for(y = 0; y < dest_h; y++) { int32_t xs1_ups, ys1_ups, xs2_ups, ys2_ups; @@ -197,7 +197,7 @@ void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_are * STATIC FUNCTIONS **********************/ -static void transform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, +static void transform_rgb888(const uint8_t * src, int32_t src_w, int32_t src_h, int32_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, int32_t x_end, uint8_t * dest_buf, bool aa, uint32_t px_size) { @@ -205,7 +205,7 @@ static void transform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t s int32_t ys_ups_start = ys_ups; lv_color32_t * dest_c32 = (lv_color32_t *) dest_buf; - lv_coord_t x; + int32_t x; for(x = 0; x < x_end; x++) { xs_ups = xs_ups_start + ((xs_step * x) >> 8); ys_ups = ys_ups_start + ((ys_step * x) >> 8); @@ -298,7 +298,7 @@ static void transform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t s #include "../../stdlib/lv_string.h" -static void transform_argb8888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, +static void transform_argb8888(const uint8_t * src, int32_t src_w, int32_t src_h, int32_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, int32_t x_end, uint8_t * dest_buf, bool aa) { @@ -307,7 +307,7 @@ static void transform_argb8888(const uint8_t * src, lv_coord_t src_w, lv_coord_t int32_t ys_ups_start = ys_ups; lv_color32_t * dest_c32 = (lv_color32_t *) dest_buf; - lv_coord_t x; + int32_t x; for(x = 0; x < x_end; x++) { xs_ups = xs_ups_start + ((xs_step * x) >> 8); ys_ups = ys_ups_start + ((ys_step * x) >> 8); @@ -392,7 +392,7 @@ static void transform_argb8888(const uint8_t * src, lv_coord_t src_w, lv_coord_t } } -static void transform_rgb565a8(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, +static void transform_rgb565a8(const uint8_t * src, int32_t src_w, int32_t src_h, int32_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, int32_t x_end, uint16_t * cbuf, uint8_t * abuf, bool src_has_a8, bool aa) { @@ -402,7 +402,7 @@ static void transform_rgb565a8(const uint8_t * src, lv_coord_t src_w, lv_coord_t const uint16_t * src_rgb = (const uint16_t *)src; const lv_opa_t * src_alpha = src + src_stride * src_h * 2; - lv_coord_t x; + int32_t x; for(x = 0; x < x_end; x++) { xs_ups = xs_ups_start + ((xs_step * x) >> 8); ys_ups = ys_ups_start + ((ys_step * x) >> 8); @@ -503,14 +503,14 @@ static void transform_rgb565a8(const uint8_t * src, lv_coord_t src_w, lv_coord_t } } -static void transform_a8(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, +static void transform_a8(const uint8_t * src, int32_t src_w, int32_t src_h, int32_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, int32_t x_end, uint8_t * abuf, bool aa) { int32_t xs_ups_start = xs_ups; int32_t ys_ups_start = ys_ups; - lv_coord_t x; + int32_t x; for(x = 0; x < x_end; x++) { xs_ups = xs_ups_start + ((xs_step * x) >> 8); ys_ups = ys_ups_start + ((ys_step * x) >> 8); |