summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/grey.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-01-09 23:48:26 +0000
committerJens Arnold <amiconn@rockbox.org>2008-01-09 23:48:26 +0000
commit6a56c14e17f6ba113ec0d4d40e75bffd61b293cc (patch)
tree64bcdd8d5d4afa2ca6dd1aa0976cdafa9a346b26 /apps/plugins/lib/grey.h
parent75380fd27d175bab1818ef35a9100e74fc6a461b (diff)
downloadrockbox-6a56c14e17f6ba113ec0d4d40e75bffd61b293cc.tar.gz
rockbox-6a56c14e17f6ba113ec0d4d40e75bffd61b293cc.zip
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
Diffstat (limited to 'apps/plugins/lib/grey.h')
-rw-r--r--apps/plugins/lib/grey.h9
1 files changed, 5 insertions, 4 deletions
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);
121#endif 121#endif
122 122
123#if LCD_PIXELFORMAT == HORIZONTAL_PACKING 123#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
124#define _GREY_X_ADVANCE sizeof(struct grey_data) 124#define _GREY_X_ADVANCE 1
125#else 125#else
126#if LCD_DEPTH == 1 126#if LCD_DEPTH == 1
127#define _GREY_X_ADVANCE (8*sizeof(struct grey_data)) 127#define _GREY_X_ADVANCE 8
128#elif LCD_DEPTH == 2 128#elif LCD_DEPTH == 2
129#define _GREY_X_ADVANCE (4*sizeof(struct grey_data)) 129#define _GREY_X_ADVANCE 4
130#endif 130#endif
131#endif /* LCD_PIXELFORMAT */ 131#endif /* LCD_PIXELFORMAT */
132 132
@@ -146,7 +146,8 @@ struct _grey_info
146#endif 146#endif
147 unsigned long flags; /* various flags, see #defines */ 147 unsigned long flags; /* various flags, see #defines */
148#ifndef SIMULATOR 148#ifndef SIMULATOR
149 struct grey_data *data; /* start of greyscale display data */ 149 unsigned char *values; /* start of greyscale pixel values */
150 unsigned char *phases; /* start of greyscale pixel phases */
150#endif 151#endif
151 unsigned char *buffer; /* start of chunky pixel buffer (for buffered mode) */ 152 unsigned char *buffer; /* start of chunky pixel buffer (for buffered mode) */
152 unsigned char gvalue[256]; /* calculated brightness -> greyvalue table */ 153 unsigned char gvalue[256]; /* calculated brightness -> greyvalue table */