From 12f3ed1699d6bef25bed90ba95cbcc1a6bb4934a Mon Sep 17 00:00:00 2001 From: Moshe Piekarski Date: Tue, 6 Oct 2020 13:34:04 -0500 Subject: make the plugin API frambuffer agnostic Change-Id: I5abdc231093054c517ff53b9a456997e440e3f6e --- apps/plugins/imageviewer/imageviewer.c | 4 ++-- apps/plugins/imageviewer/jpeg/yuv2rgb.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/plugins/imageviewer') diff --git a/apps/plugins/imageviewer/imageviewer.c b/apps/plugins/imageviewer/imageviewer.c index 8e23787704..37c5838d73 100644 --- a/apps/plugins/imageviewer/imageviewer.c +++ b/apps/plugins/imageviewer/imageviewer.c @@ -526,7 +526,7 @@ static void pan_view_down(struct image_info *info) */ move++, info->y--; rb->memcpy(rgb_linebuf, - rb->lcd_framebuffer + (LCD_HEIGHT - move)*LCD_WIDTH, + *rb->lcd_framebuffer + (LCD_HEIGHT - move)*LCD_WIDTH, LCD_WIDTH*sizeof (fb_data)); } #endif @@ -539,7 +539,7 @@ static void pan_view_down(struct image_info *info) && settings.jpeg_dither_mode == DITHER_DIFFUSION) { /* Cover the first row drawn with previous image data. */ - rb->memcpy(rb->lcd_framebuffer + (LCD_HEIGHT - move)*LCD_WIDTH, + rb->memcpy(*rb->lcd_framebuffer + (LCD_HEIGHT - move)*LCD_WIDTH, rgb_linebuf, LCD_WIDTH*sizeof (fb_data)); info->y++; } diff --git a/apps/plugins/imageviewer/jpeg/yuv2rgb.c b/apps/plugins/imageviewer/jpeg/yuv2rgb.c index 764dc71a47..5504e425e6 100644 --- a/apps/plugins/imageviewer/jpeg/yuv2rgb.c +++ b/apps/plugins/imageviewer/jpeg/yuv2rgb.c @@ -239,12 +239,12 @@ static fb_data (* const pixel_funcs[COLOUR_NUM_MODES][DITHER_NUM_MODES])(void) = /* These defines are used fornormal horizontal strides and vertical strides. */ #if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE -#define LCDADDR(x, y) (rb->lcd_framebuffer + LCD_HEIGHT*(x) + (y)) +#define LCDADDR(x, y) (*rb->lcd_framebuffer + LCD_HEIGHT*(x) + (y)) #define ROWENDOFFSET (width*LCD_HEIGHT) #define ROWOFFSET (1) #define COLOFFSET (LCD_HEIGHT) #else -#define LCDADDR(x, y) (rb->lcd_framebuffer + LCD_WIDTH*(y) + (x)) +#define LCDADDR(x, y) (*rb->lcd_framebuffer + LCD_WIDTH*(y) + (x)) #define ROWENDOFFSET (width) #define ROWOFFSET (LCD_WIDTH) #define COLOFFSET (1) -- cgit v1.2.3