summaryrefslogtreecommitdiffstats
path: root/apps/plugins/fft
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-06-18 07:15:00 +0200
committerThomas Martitz <kugel@rockbox.org>2014-06-21 00:15:53 +0200
commita1842c04f9cb73210d4cacde61a9e4b115050765 (patch)
treea37af61ef9285b763a42cd33797e2f3d634fbf9f /apps/plugins/fft
parent0250be1d6799db7b5ddc99cb33f31bf9cff01ed2 (diff)
downloadrockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.tar.gz
rockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.zip
lcd-24bit: Introduce a 24-bit mid-level LCD driver
With LCD driver all calculation will be performed on RGB888 and the hardware/OS can display from our 24bit framebuffer. It is not yet as performance optimized as the existing drivers but should be good enough.The vast number of small changes is due to the fact that fb_data can be a struct type now, while most of the code expected a scalar type. lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit it enforces the generic C code. All plugins are ported over. Except for rockpaint. It uses so much memory that it wouldnt fit into the 512k plugin buffer anymore (patches welcome). Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
Diffstat (limited to 'apps/plugins/fft')
-rw-r--r--apps/plugins/fft/fft.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/plugins/fft/fft.c b/apps/plugins/fft/fft.c
index e591954664..2b7f6a4fbe 100644
--- a/apps/plugins/fft/fft.c
+++ b/apps/plugins/fft/fft.c
@@ -929,13 +929,15 @@ static void draw_spectrogram_vertical(unsigned this_max, unsigned graph_max)
if(bins_acc >= ARRAYLEN_PLOT)
{
unsigned index = (SHADES-1)*bins_max / graph_max;
+ unsigned color;
/* These happen because we exaggerate the graph a little for
* linear mode */
if(index >= SHADES)
index = SHADES-1;
- mylcd_set_foreground(SPECTROGRAPH_PALETTE(index));
+ color = FB_UNPACK_SCALAR_LCD(SPECTROGRAPH_PALETTE(index));
+ mylcd_set_foreground(color);
mylcd_drawpixel(fft_spectrogram_pos, y);
if(--y < 0)
@@ -973,13 +975,15 @@ static void draw_spectrogram_horizontal(unsigned this_max, unsigned graph_max)
if(bins_acc >= ARRAYLEN_PLOT)
{
unsigned index = (SHADES-1)*bins_max / graph_max;
+ unsigned color;
/* These happen because we exaggerate the graph a little for
* linear mode */
if(index >= SHADES)
index = SHADES-1;
- mylcd_set_foreground(SPECTROGRAPH_PALETTE(index));
+ color = FB_UNPACK_SCALAR_LCD(SPECTROGRAPH_PALETTE(index));
+ mylcd_set_foreground(color);
mylcd_drawpixel(x, fft_spectrogram_pos);
if(++x >= LCD_WIDTH)