From 6a56c14e17f6ba113ec0d4d40e75bffd61b293cc Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 9 Jan 2008 23:48:26 +0000 Subject: Greyscale library: Changed the internal data format once more (separated pixel values and phases), allowing for further optimisation of drawing, scrolling etc. * Optimised grey phase blitting in the core reduces CPU load on all architectures, most significantly on coldfire. Previous version was too slow to keep up at 45MHz, leading to unwanted graininess (update frequency was halved). Also fixed screendump on 2bpp targets with vertical pixel packing. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16043 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lib/grey.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'apps/plugins/lib/grey.h') diff --git a/apps/plugins/lib/grey.h b/apps/plugins/lib/grey.h index 136794bd26..9a3bd7d3f8 100644 --- a/apps/plugins/lib/grey.h +++ b/apps/plugins/lib/grey.h @@ -121,12 +121,12 @@ void grey_ub_scroll_down(int count); #endif #if LCD_PIXELFORMAT == HORIZONTAL_PACKING -#define _GREY_X_ADVANCE sizeof(struct grey_data) +#define _GREY_X_ADVANCE 1 #else #if LCD_DEPTH == 1 -#define _GREY_X_ADVANCE (8*sizeof(struct grey_data)) +#define _GREY_X_ADVANCE 8 #elif LCD_DEPTH == 2 -#define _GREY_X_ADVANCE (4*sizeof(struct grey_data)) +#define _GREY_X_ADVANCE 4 #endif #endif /* LCD_PIXELFORMAT */ @@ -146,7 +146,8 @@ struct _grey_info #endif unsigned long flags; /* various flags, see #defines */ #ifndef SIMULATOR - struct grey_data *data; /* start of greyscale display data */ + unsigned char *values; /* start of greyscale pixel values */ + unsigned char *phases; /* start of greyscale pixel phases */ #endif unsigned char *buffer; /* start of chunky pixel buffer (for buffered mode) */ unsigned char gvalue[256]; /* calculated brightness -> greyvalue table */ -- cgit v1.2.3