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
This commit is contained in:
Jens Arnold 2008-01-09 23:48:26 +00:00
parent 75380fd27d
commit 6a56c14e17
13 changed files with 462 additions and 313 deletions

View file

@ -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 */