summaryrefslogtreecommitdiff
path: root/apps/plugins/imageviewer
diff options
context:
space:
mode:
authorMoshe Piekarski <dev.rockbox@melachim.net>2020-10-06 13:34:04 -0500
committerWilliam Wilgus <wilgus.william@gmail.com>2020-10-26 12:28:48 -0400
commit12f3ed1699d6bef25bed90ba95cbcc1a6bb4934a (patch)
treecb9850c2c4ea68b7acc816828c4d53dd7c8391f9 /apps/plugins/imageviewer
parent5d5f8169b53fc989b456b0f0d7940bcf9415cbeb (diff)
downloadrockbox-12f3ed1699d6bef25bed90ba95cbcc1a6bb4934a.tar.gz
rockbox-12f3ed1699d6bef25bed90ba95cbcc1a6bb4934a.zip
make the plugin API frambuffer agnostic
Change-Id: I5abdc231093054c517ff53b9a456997e440e3f6e
Diffstat (limited to 'apps/plugins/imageviewer')
-rw-r--r--apps/plugins/imageviewer/imageviewer.c4
-rw-r--r--apps/plugins/imageviewer/jpeg/yuv2rgb.c4
2 files changed, 4 insertions, 4 deletions
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)
526 */ 526 */
527 move++, info->y--; 527 move++, info->y--;
528 rb->memcpy(rgb_linebuf, 528 rb->memcpy(rgb_linebuf,
529 rb->lcd_framebuffer + (LCD_HEIGHT - move)*LCD_WIDTH, 529 *rb->lcd_framebuffer + (LCD_HEIGHT - move)*LCD_WIDTH,
530 LCD_WIDTH*sizeof (fb_data)); 530 LCD_WIDTH*sizeof (fb_data));
531 } 531 }
532#endif 532#endif
@@ -539,7 +539,7 @@ static void pan_view_down(struct image_info *info)
539 && settings.jpeg_dither_mode == DITHER_DIFFUSION) 539 && settings.jpeg_dither_mode == DITHER_DIFFUSION)
540 { 540 {
541 /* Cover the first row drawn with previous image data. */ 541 /* Cover the first row drawn with previous image data. */
542 rb->memcpy(rb->lcd_framebuffer + (LCD_HEIGHT - move)*LCD_WIDTH, 542 rb->memcpy(*rb->lcd_framebuffer + (LCD_HEIGHT - move)*LCD_WIDTH,
543 rgb_linebuf, LCD_WIDTH*sizeof (fb_data)); 543 rgb_linebuf, LCD_WIDTH*sizeof (fb_data));
544 info->y++; 544 info->y++;
545 } 545 }
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) =
239 239
240/* These defines are used fornormal horizontal strides and vertical strides. */ 240/* These defines are used fornormal horizontal strides and vertical strides. */
241#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 241#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE
242#define LCDADDR(x, y) (rb->lcd_framebuffer + LCD_HEIGHT*(x) + (y)) 242#define LCDADDR(x, y) (*rb->lcd_framebuffer + LCD_HEIGHT*(x) + (y))
243#define ROWENDOFFSET (width*LCD_HEIGHT) 243#define ROWENDOFFSET (width*LCD_HEIGHT)
244#define ROWOFFSET (1) 244#define ROWOFFSET (1)
245#define COLOFFSET (LCD_HEIGHT) 245#define COLOFFSET (LCD_HEIGHT)
246#else 246#else
247#define LCDADDR(x, y) (rb->lcd_framebuffer + LCD_WIDTH*(y) + (x)) 247#define LCDADDR(x, y) (*rb->lcd_framebuffer + LCD_WIDTH*(y) + (x))
248#define ROWENDOFFSET (width) 248#define ROWENDOFFSET (width)
249#define ROWOFFSET (LCD_WIDTH) 249#define ROWOFFSET (LCD_WIDTH)
250#define COLOFFSET (1) 250#define COLOFFSET (1)