summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-05-04 15:46:41 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-05-04 15:46:41 +0000
commit20f76d61ae58bd47b647d79e40beebbbe747e480 (patch)
treed37569a127b02fdd051c6a3da77c70ac2d72e8ab
parentdfb24d6ceee703361b8120d689d8d77cfc15830d (diff)
downloadrockbox-20f76d61ae58bd47b647d79e40beebbbe747e480.tar.gz
rockbox-20f76d61ae58bd47b647d79e40beebbbe747e480.zip
Make JPEG and BMP scaler optional with HAVE_JPEG and HAVE_BMP_SCALING, both defined for all targets that have HAVE_ALBUMART. Disable JPEG in PictureFlow and pluginlib album art search with 32KiB plugin buffer until PictureFlow
gets overlay support. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20851 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/SOURCES8
-rw-r--r--apps/buffering.c4
-rw-r--r--apps/plugin.c2
-rw-r--r--apps/plugin.h2
-rw-r--r--apps/plugins/lib/SOURCES12
-rw-r--r--apps/plugins/lib/feature_wrappers.h17
-rw-r--r--apps/plugins/lib/pluginlib_bmp.c12
-rw-r--r--apps/plugins/lib/read_image.c4
-rw-r--r--apps/plugins/pictureflow.c5
-rw-r--r--apps/recorder/albumart.c22
-rw-r--r--apps/recorder/bmp.c86
-rw-r--r--apps/recorder/resize.c19
-rw-r--r--apps/recorder/resize.h6
-rw-r--r--firmware/export/config-c200.h6
-rw-r--r--firmware/export/config-c200v2.h6
-rw-r--r--firmware/export/config-cowond2.h6
-rw-r--r--firmware/export/config-e200.h6
-rw-r--r--firmware/export/config-e200v2.h6
-rw-r--r--firmware/export/config-fuze.h6
-rw-r--r--firmware/export/config-gigabeat-s.h6
-rw-r--r--firmware/export/config-gigabeat.h6
-rw-r--r--firmware/export/config-h10.h6
-rw-r--r--firmware/export/config-h100.h6
-rw-r--r--firmware/export/config-h10_5gb.h6
-rw-r--r--firmware/export/config-h120.h6
-rw-r--r--firmware/export/config-h300.h6
-rwxr-xr-xfirmware/export/config-hdd1630.h6
-rw-r--r--firmware/export/config-iaudio7.h6
-rw-r--r--firmware/export/config-iaudiom3.h6
-rw-r--r--firmware/export/config-iaudiom5.h6
-rw-r--r--firmware/export/config-iaudiox5.h6
-rw-r--r--firmware/export/config-ipod1g2g.h6
-rw-r--r--firmware/export/config-ipod3g.h6
-rw-r--r--firmware/export/config-ipod4g.h6
-rw-r--r--firmware/export/config-ipodcolor.h6
-rw-r--r--firmware/export/config-ipodmini.h6
-rw-r--r--firmware/export/config-ipodmini2g.h6
-rw-r--r--firmware/export/config-ipodnano.h6
-rw-r--r--firmware/export/config-ipodvideo.h6
-rw-r--r--firmware/export/config-lyre_proto1.h6
-rw-r--r--firmware/export/config-meizu-m3.h6
-rw-r--r--firmware/export/config-meizu-m6sl.h6
-rw-r--r--firmware/export/config-meizu-m6sp.h6
-rw-r--r--firmware/export/config-mrobe500.h6
-rw-r--r--firmware/export/config-ondavx747.h6
-rwxr-xr-xfirmware/export/config-sa9200.h6
46 files changed, 318 insertions, 79 deletions
diff --git a/apps/SOURCES b/apps/SOURCES
index 13ca913a39..62bb78a473 100644
--- a/apps/SOURCES
+++ b/apps/SOURCES
@@ -88,8 +88,6 @@ gui/viewport.c
88 88
89#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) 89#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
90gui/backdrop.c 90gui/backdrop.c
91recorder/resize.c
92recorder/jpeg_load.c
93#endif 91#endif
94 92
95#ifdef HAVE_LCD_CHARCELLS 93#ifdef HAVE_LCD_CHARCELLS
@@ -101,6 +99,12 @@ recorder/bmp.c
101recorder/icons.c 99recorder/icons.c
102recorder/keyboard.c 100recorder/keyboard.c
103recorder/peakmeter.c 101recorder/peakmeter.c
102#if defined(HAVE_ALBUMART) || defined(HAVE_JPEG)
103recorder/resize.c
104#endif
105#ifdef HAVE_JPEG
106recorder/jpeg_load.c
107#endif
104#ifdef HAVE_ALBUMART 108#ifdef HAVE_ALBUMART
105recorder/albumart.c 109recorder/albumart.c
106#endif 110#endif
diff --git a/apps/buffering.c b/apps/buffering.c
index 66bd22f12d..3bcd790c35 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -834,7 +834,6 @@ static bool fill_buffer(void)
834static int load_image(int fd, const char *path) 834static int load_image(int fd, const char *path)
835{ 835{
836 int rc; 836 int rc;
837 int pathlen = strlen(path);
838 struct bitmap *bmp = (struct bitmap *)&buffer[buf_widx]; 837 struct bitmap *bmp = (struct bitmap *)&buffer[buf_widx];
839 /* FIXME: alignment may be needed for the data buffer. */ 838 /* FIXME: alignment may be needed for the data buffer. */
840 bmp->data = &buffer[buf_widx + sizeof(struct bitmap)]; 839 bmp->data = &buffer[buf_widx + sizeof(struct bitmap)];
@@ -848,10 +847,13 @@ static int load_image(int fd, const char *path)
848 847
849 get_albumart_size(bmp); 848 get_albumart_size(bmp);
850 849
850#ifdef HAVE_JPEG
851 int pathlen = strlen(path);
851 if (strcmp(path + pathlen - 4, ".bmp")) 852 if (strcmp(path + pathlen - 4, ".bmp"))
852 rc = read_jpeg_fd(fd, bmp, free, FORMAT_NATIVE|FORMAT_DITHER| 853 rc = read_jpeg_fd(fd, bmp, free, FORMAT_NATIVE|FORMAT_DITHER|
853 FORMAT_RESIZE|FORMAT_KEEP_ASPECT, NULL); 854 FORMAT_RESIZE|FORMAT_KEEP_ASPECT, NULL);
854 else 855 else
856#endif
855 rc = read_bmp_fd(fd, bmp, free, FORMAT_NATIVE|FORMAT_DITHER| 857 rc = read_bmp_fd(fd, bmp, free, FORMAT_NATIVE|FORMAT_DITHER|
856 FORMAT_RESIZE|FORMAT_KEEP_ASPECT, NULL); 858 FORMAT_RESIZE|FORMAT_KEEP_ASPECT, NULL);
857 return rc + (rc > 0 ? sizeof(struct bitmap) : 0); 859 return rc + (rc > 0 ? sizeof(struct bitmap) : 0);
diff --git a/apps/plugin.c b/apps/plugin.c
index 33a6194c53..2d996a404e 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -644,7 +644,7 @@ static const struct plugin_api rockbox_api = {
644#endif 644#endif
645#endif 645#endif
646#ifdef HAVE_LCD_BITMAP 646#ifdef HAVE_LCD_BITMAP
647#if LCD_DEPTH > 1 647#ifdef HAVE_JPEG
648 read_jpeg_file, 648 read_jpeg_file,
649 read_jpeg_fd, 649 read_jpeg_fd,
650#endif 650#endif
diff --git a/apps/plugin.h b/apps/plugin.h
index 19eb962588..72d71b6e93 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -805,7 +805,7 @@ struct plugin_api {
805#endif 805#endif
806 806
807#ifdef HAVE_LCD_BITMAP 807#ifdef HAVE_LCD_BITMAP
808#if LCD_DEPTH > 1 808#ifdef HAVE_JPEG
809 int (*read_jpeg_file)(const char* filename, struct bitmap *bm, int maxsize, 809 int (*read_jpeg_file)(const char* filename, struct bitmap *bm, int maxsize,
810 int format, const struct custom_format *cformat); 810 int format, const struct custom_format *cformat);
811 int (*read_jpeg_fd)(int fd, struct bitmap *bm, int maxsize, 811 int (*read_jpeg_fd)(int fd, struct bitmap *bm, int maxsize,
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES
index dfdd569843..dc4d41c35c 100644
--- a/apps/plugins/lib/SOURCES
+++ b/apps/plugins/lib/SOURCES
@@ -5,15 +5,13 @@ fixedpoint.c
5playback_control.c 5playback_control.c
6rgb_hsv.c 6rgb_hsv.c
7buflib.c 7buflib.c
8#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) 8#if !defined(HAVE_BMP_SCALING) || !defined(HAVE_JPEG)
9/*
10 The scaler is not provided in core on mono targets, but is built in
11 pluginlib for use with greylib overlay output
12*/
13#if LCD_DEPTH == 1
14pluginlib_resize.c 9pluginlib_resize.c
10#endif
11#ifndef HAVE_JPEG
15pluginlib_jpeg_load.c 12pluginlib_jpeg_load.c
16#endif 13#endif
14#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4)
17grey_core.c 15grey_core.c
18grey_draw.c 16grey_draw.c
19grey_parm.c 17grey_parm.c
@@ -45,7 +43,7 @@ read_image.c
45#ifdef HAVE_LCD_COLOR 43#ifdef HAVE_LCD_COLOR
46bmp_smooth_scale.c 44bmp_smooth_scale.c
47#endif 45#endif
48#ifndef HAVE_ALBUMART 46#if !defined(HAVE_ALBUMART) || !defined(HAVE_JPEG)
49pluginlib_albumart.c 47pluginlib_albumart.c
50#endif 48#endif
51#endif 49#endif
diff --git a/apps/plugins/lib/feature_wrappers.h b/apps/plugins/lib/feature_wrappers.h
index 3f47f23c00..50552fbda4 100644
--- a/apps/plugins/lib/feature_wrappers.h
+++ b/apps/plugins/lib/feature_wrappers.h
@@ -30,24 +30,27 @@
30 * but can easily be implement in pluginlib as long as the database is 30 * but can easily be implement in pluginlib as long as the database is
31 * available. 31 * available.
32 */ 32 */
33#ifdef HAVE_ALBUMART 33#if defined(HAVE_ALBUMART) && defined(HAVE_JPEG)
34#define search_albumart_files rb->search_albumart_files 34#define search_albumart_files rb->search_albumart_files
35#endif 35#endif
36 36
37/* This should only be used when loading scaled bitmaps, or using custom output 37/* This should only be used when loading scaled bitmaps, or using custom output
38 * plugins. The pluginlib loader does not support loading bitmaps unscaled in 38 * plugins. A native output plugin for the scaler is available as format_native
39 * native format, so rb->read_bmp_file should always be used directly to load 39 * on targets with LCD_DEPTH > 1
40 * such images.
41 */ 40 */
42#if LCD_DEPTH > 1 41#ifdef HAVE_BMP_SCALING
43#define scaled_read_bmp_file rb->read_bmp_file 42#define scaled_read_bmp_file rb->read_bmp_file
44#define scaled_read_bmp_fd rb->read_bmp_fd 43#define scaled_read_bmp_fd rb->read_bmp_fd
45#define read_jpeg_file rb->read_jpeg_file
46#define read_jpeg_fd rb->read_jpeg_fd
47#else 44#else
48#define scaled_read_bmp_file read_bmp_file 45#define scaled_read_bmp_file read_bmp_file
49#define scaled_read_bmp_fd read_bmp_fd 46#define scaled_read_bmp_fd read_bmp_fd
50#endif 47#endif
51 48
49#ifdef HAVE_JPEG
50#define read_jpeg_file rb->read_jpeg_file
51#define read_jpeg_fd rb->read_jpeg_fd
52#else
53#endif
54
52#endif 55#endif
53 56
diff --git a/apps/plugins/lib/pluginlib_bmp.c b/apps/plugins/lib/pluginlib_bmp.c
index b9cfc4ded3..110e534be0 100644
--- a/apps/plugins/lib/pluginlib_bmp.c
+++ b/apps/plugins/lib/pluginlib_bmp.c
@@ -122,10 +122,16 @@ void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst)
122 } 122 }
123} 123}
124 124
125#else /* LCD_DEPTH == 1 */ 125#endif /* LCD_DEPTH > 1 */
126
127#ifndef HAVE_BMP_SCALING
126#include "wrappers.h" 128#include "wrappers.h"
127 129
128/* import the core bmp loader */ 130/* import the core bmp loader */
129#include "../../recorder/bmp.c" 131#include "recorder/bmp.c"
130 132#else
133/* the full 16x16 Bayer dither matrix may be calculated quickly with this table
134*/
135const unsigned char dither_table[16] =
136 { 0,192, 48,240, 12,204, 60,252, 3,195, 51,243, 15,207, 63,255 };
131#endif 137#endif
diff --git a/apps/plugins/lib/read_image.c b/apps/plugins/lib/read_image.c
index 8b6d784213..5b07882764 100644
--- a/apps/plugins/lib/read_image.c
+++ b/apps/plugins/lib/read_image.c
@@ -28,12 +28,10 @@
28int read_image_file(const char* filename, struct bitmap *bm, int maxsize, 28int read_image_file(const char* filename, struct bitmap *bm, int maxsize,
29 int format, const struct custom_format *cformat) 29 int format, const struct custom_format *cformat)
30{ 30{
31#if LCD_DEPTH > 1
32 int namelen = rb->strlen(filename); 31 int namelen = rb->strlen(filename);
33 if (rb->strcmp(filename + namelen - 4, ".bmp")) 32 if (rb->strcmp(filename + namelen - 4, ".bmp"))
34 return read_jpeg_file(filename, bm, maxsize, format, cformat); 33 return read_jpeg_file(filename, bm, maxsize, format, cformat);
35 else 34 else
36#endif
37 return scaled_read_bmp_file(filename, bm, maxsize, format, cformat); 35 return scaled_read_bmp_file(filename, bm, maxsize, format, cformat);
38} 36}
39 37
@@ -46,11 +44,9 @@ int read_image_file_offset(int offset, const char* filename, struct bitmap *bm,
46 return fd; 44 return fd;
47 if (offset != rb->lseek(fd, offset, SEEK_SET)) 45 if (offset != rb->lseek(fd, offset, SEEK_SET))
48 return -1; 46 return -1;
49#if LCD_DEPTH > 1
50 int namelen = rb->strlen(filename); 47 int namelen = rb->strlen(filename);
51 if (rb->strcmp(filename + namelen - 4, ".bmp")) 48 if (rb->strcmp(filename + namelen - 4, ".bmp"))
52 return read_jpeg_fd(fd, bm, maxsize, format, cformat); 49 return read_jpeg_fd(fd, bm, maxsize, format, cformat);
53 else 50 else
54#endif
55 return scaled_read_bmp_fd(fd, bm, maxsize, format, cformat); 51 return scaled_read_bmp_fd(fd, bm, maxsize, format, cformat);
56} 52}
diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c
index f0931820d5..b78b953f13 100644
--- a/apps/plugins/pictureflow.c
+++ b/apps/plugins/pictureflow.c
@@ -927,8 +927,13 @@ bool create_albumart_cache(void)
927 input_bmp.data = buf; 927 input_bmp.data = buf;
928 input_bmp.width = DISPLAY_WIDTH; 928 input_bmp.width = DISPLAY_WIDTH;
929 input_bmp.height = DISPLAY_HEIGHT; 929 input_bmp.height = DISPLAY_HEIGHT;
930#if PLUGIN_BUFFER_SIZE > 0x10000
930 ret = read_image_file(albumart_file, &input_bmp, 931 ret = read_image_file(albumart_file, &input_bmp,
931 buf_size, format, &format_transposed); 932 buf_size, format, &format_transposed);
933#else
934 ret = scaled_read_bmp_file(albumart_file, &input_bmp,
935 buf_size, format, &format_transposed);
936#endif
932 if (ret <= 0) { 937 if (ret <= 0) {
933 rb->splash(HZ, "Could not read bmp"); 938 rb->splash(HZ, "Could not read bmp");
934 continue; /* skip missing/broken files */ 939 continue; /* skip missing/broken files */
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c
index 3adedc8159..da85f99bbc 100644
--- a/apps/recorder/albumart.c
+++ b/apps/recorder/albumart.c
@@ -91,7 +91,7 @@ static void fix_path_part(char* path, int offset, int count)
91 } 91 }
92} 92}
93 93
94#if LCD_DEPTH > 1 94#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
95const char * extensions[] = { "jpeg", "jpg", "bmp" }; 95const char * extensions[] = { "jpeg", "jpg", "bmp" };
96int extension_lens[] = { 4, 3, 3 }; 96int extension_lens[] = { 4, 3, 3 };
97/* Try checking for several file extensions, return true if a file is found and 97/* Try checking for several file extensions, return true if a file is found and
@@ -134,7 +134,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
134 const char *artist; 134 const char *artist;
135 int dirlen; 135 int dirlen;
136 int albumlen; 136 int albumlen;
137#if LCD_DEPTH > 1 137#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
138 int pathlen; 138 int pathlen;
139#endif 139#endif
140 140
@@ -153,7 +153,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
153 /* the first file we look for is one specific to the track playing */ 153 /* the first file we look for is one specific to the track playing */
154 strip_extension(path, sizeof(path) - strlen(size_string) - 4, trackname); 154 strip_extension(path, sizeof(path) - strlen(size_string) - 4, trackname);
155 strcat(path, size_string); 155 strcat(path, size_string);
156#if LCD_DEPTH > 1 156#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
157 strcat(path, "."); 157 strcat(path, ".");
158 pathlen = strlen(path); 158 pathlen = strlen(path);
159 found = try_exts(path, pathlen); 159 found = try_exts(path, pathlen);
@@ -165,7 +165,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
165 { 165 {
166 /* if it doesn't exist, 166 /* if it doesn't exist,
167 * we look for a file specific to the track's album name */ 167 * we look for a file specific to the track's album name */
168#if LCD_DEPTH > 1 168#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
169 pathlen = snprintf(path, sizeof(path), 169 pathlen = snprintf(path, sizeof(path),
170 "%s%s%s.", dir, id3->album, size_string); 170 "%s%s%s.", dir, id3->album, size_string);
171 fix_path_part(path, dirlen, albumlen); 171 fix_path_part(path, dirlen, albumlen);
@@ -181,7 +181,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
181 if (!found) 181 if (!found)
182 { 182 {
183 /* if it still doesn't exist, we look for a generic file */ 183 /* if it still doesn't exist, we look for a generic file */
184#if LCD_DEPTH > 1 184#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
185 pathlen = snprintf(path, sizeof(path), 185 pathlen = snprintf(path, sizeof(path),
186 "%scover%s.", dir, size_string); 186 "%scover%s.", dir, size_string);
187 found = try_exts(path, pathlen); 187 found = try_exts(path, pathlen);
@@ -192,7 +192,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
192#endif 192#endif
193 } 193 }
194 194
195#if LCD_DEPTH > 1 195#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
196 if (!found) 196 if (!found)
197 { 197 {
198 snprintf (path, sizeof(path), "%sfolder.jpg", dir); 198 snprintf (path, sizeof(path), "%sfolder.jpg", dir);
@@ -205,7 +205,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
205 if (!found && artist && id3->album) 205 if (!found && artist && id3->album)
206 { 206 {
207 /* look in the albumart subdir of .rockbox */ 207 /* look in the albumart subdir of .rockbox */
208#if LCD_DEPTH > 1 208#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
209 pathlen = snprintf(path, sizeof(path), 209 pathlen = snprintf(path, sizeof(path),
210 ROCKBOX_DIR "/albumart/%s-%s%s.", 210 ROCKBOX_DIR "/albumart/%s-%s%s.",
211 artist, 211 artist,
@@ -241,7 +241,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
241 { 241 {
242 /* we look in the parent directory 242 /* we look in the parent directory
243 * for a file specific to the track's album name */ 243 * for a file specific to the track's album name */
244#if LCD_DEPTH > 1 244#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
245 pathlen = snprintf(path, sizeof(path), 245 pathlen = snprintf(path, sizeof(path),
246 "%s%s%s.", dir, id3->album, size_string); 246 "%s%s%s.", dir, id3->album, size_string);
247 fix_path_part(path, dirlen, albumlen); 247 fix_path_part(path, dirlen, albumlen);
@@ -258,7 +258,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
258 { 258 {
259 /* if it still doesn't exist, we look in the parent directory 259 /* if it still doesn't exist, we look in the parent directory
260 * for a generic file */ 260 * for a generic file */
261#if LCD_DEPTH > 1 261#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
262 pathlen = snprintf(path, sizeof(path), 262 pathlen = snprintf(path, sizeof(path),
263 "%scover%s.", dir, size_string); 263 "%scover%s.", dir, size_string);
264 found = try_exts(path, pathlen); 264 found = try_exts(path, pathlen);
@@ -278,7 +278,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
278 return true; 278 return true;
279} 279}
280 280
281#ifdef HAVE_ALBUMART 281#ifndef PLUGIN
282/* Look for albumart bitmap in the same dir as the track and in its parent dir. 282/* Look for albumart bitmap in the same dir as the track and in its parent dir.
283 * Stores the found filename in the buf parameter. 283 * Stores the found filename in the buf parameter.
284 * Returns true if a bitmap was found, false otherwise */ 284 * Returns true if a bitmap was found, false otherwise */
@@ -386,4 +386,4 @@ void get_albumart_size(struct bitmap *bmp)
386 bmp->width = data->albumart_max_width; 386 bmp->width = data->albumart_max_width;
387 bmp->height = data->albumart_max_height; 387 bmp->height = data->albumart_max_height;
388} 388}
389#endif /* HAVE_ALBUMART */ 389#endif /* PLUGIN */
diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c
index 3fb8a4d6c1..403c34d951 100644
--- a/apps/recorder/bmp.c
+++ b/apps/recorder/bmp.c
@@ -184,8 +184,8 @@ struct bmp_args {
184 short depth; 184 short depth;
185 unsigned char buf[BM_MAX_WIDTH * 4]; 185 unsigned char buf[BM_MAX_WIDTH * 4];
186 struct uint8_rgb *palette; 186 struct uint8_rgb *palette;
187#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ 187#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
188 defined(PLUGIN) 188 defined(HAVE_BMP_SCALING) || defined(PLUGIN)
189 int cur_row; 189 int cur_row;
190 int cur_col; 190 int cur_col;
191 struct img_part part; 191 struct img_part part;
@@ -198,8 +198,8 @@ static unsigned int read_part_line(struct bmp_args *ba)
198 const int read_width = ba->read_width; 198 const int read_width = ba->read_width;
199 const int width = ba->width; 199 const int width = ba->width;
200 const int depth = ba->depth; 200 const int depth = ba->depth;
201#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ 201#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
202 defined(PLUGIN) 202 defined(HAVE_BMP_SCALING) || defined(PLUGIN)
203 int cur_row = ba->cur_row; 203 int cur_row = ba->cur_row;
204 int cur_col = ba->cur_col; 204 int cur_col = ba->cur_col;
205#endif 205#endif
@@ -211,8 +211,8 @@ static unsigned int read_part_line(struct bmp_args *ba)
211 int ret; 211 int ret;
212 int i, cols, len; 212 int i, cols, len;
213 213
214#if (LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) || \ 214#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
215 defined(PLUGIN) 215 defined(HAVE_BMP_SCALING) || defined(PLUGIN)
216 cols = MIN(width - cur_col,(int)BM_MAX_WIDTH); 216 cols = MIN(width - cur_col,(int)BM_MAX_WIDTH);
217 BDEBUGF("reading %d cols (width: %d, max: %d)\n",cols,width,BM_MAX_WIDTH); 217 BDEBUGF("reading %d cols (width: %d, max: %d)\n",cols,width,BM_MAX_WIDTH);
218 len = (cols * (depth == 15 ? 16 : depth) + 7) >> 3; 218 len = (cols * (depth == 15 ? 16 : depth) + 7) >> 3;
@@ -227,8 +227,8 @@ static unsigned int read_part_line(struct bmp_args *ba)
227 { 227 {
228 DEBUGF("read_part_line: error reading image, read returned %d " 228 DEBUGF("read_part_line: error reading image, read returned %d "
229 "expected %d\n", ret, len); 229 "expected %d\n", ret, len);
230#if (LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) || \ 230#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
231 defined(PLUGIN) 231 defined(HAVE_BMP_SCALING) || defined(PLUGIN)
232 BDEBUGF("cur_row: %d cur_col: %d cols: %d len: %d\n", cur_row, cur_col, 232 BDEBUGF("cur_row: %d cur_col: %d cols: %d len: %d\n", cur_row, cur_col,
233 cols, len); 233 cols, len);
234#endif 234#endif
@@ -290,17 +290,17 @@ static unsigned int read_part_line(struct bmp_args *ba)
290 } 290 }
291 } 291 }
292 292
293#if (!defined(HAVE_LCD_COLOR) && \ 293#if !defined(HAVE_LCD_COLOR) && \
294 (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1))) || \ 294 ((LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) || \
295 defined(PLUGIN) 295 defined(PLUGIN))
296 ibuf = ba->buf; 296 ibuf = ba->buf;
297 buf = (struct uint8_rgb*)ba->buf; 297 buf = (struct uint8_rgb*)ba->buf;
298 while (ibuf < ba->buf + cols) 298 while (ibuf < ba->buf + cols)
299 *ibuf++ = brightness(*buf++); 299 *ibuf++ = brightness(*buf++);
300#endif 300#endif
301 301
302#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ 302#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
303 defined(PLUGIN) 303 defined(HAVE_BMP_SCALING) || defined(PLUGIN)
304 cur_col += cols; 304 cur_col += cols;
305 if (cur_col == width) 305 if (cur_col == width)
306 { 306 {
@@ -311,8 +311,8 @@ static unsigned int read_part_line(struct bmp_args *ba)
311 BDEBUGF("seeking %d bytes to next line\n",pad); 311 BDEBUGF("seeking %d bytes to next line\n",pad);
312 lseek(fd, pad, SEEK_CUR); 312 lseek(fd, pad, SEEK_CUR);
313 } 313 }
314#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ 314#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
315 defined(PLUGIN) 315 defined(HAVE_BMP_SCALING) || defined(PLUGIN)
316 cur_col = 0; 316 cur_col = 0;
317 BDEBUGF("read_part_line: completed row %d\n", cur_row); 317 BDEBUGF("read_part_line: completed row %d\n", cur_row);
318 cur_row += 1; 318 cur_row += 1;
@@ -324,8 +324,8 @@ static unsigned int read_part_line(struct bmp_args *ba)
324 return cols; 324 return cols;
325} 325}
326 326
327#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ 327#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
328 defined(PLUGIN) 328 defined(HAVE_BMP_SCALING) || defined(PLUGIN)
329static struct img_part *store_part_bmp(void *args) 329static struct img_part *store_part_bmp(void *args)
330{ 330{
331 struct bmp_args *ba = (struct bmp_args *)args; 331 struct bmp_args *ba = (struct bmp_args *)args;
@@ -375,10 +375,13 @@ int read_bmp_fd(int fd,
375 struct uint8_rgb palette[256]; 375 struct uint8_rgb palette[256];
376 struct rowset rset; 376 struct rowset rset;
377 struct dim src_dim; 377 struct dim src_dim;
378#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) \ 378#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) || \
379 || defined(PLUGIN) 379 defined(PLUGIN)
380 unsigned int resize = IMG_NORESIZE;
381 bool dither = false; 380 bool dither = false;
381#endif
382#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
383 defined(HAVE_BMP_SCALING) || defined(PLUGIN)
384 unsigned int resize = IMG_NORESIZE;
382 bool transparent = false; 385 bool transparent = false;
383 386
384#ifdef HAVE_REMOTE_LCD 387#ifdef HAVE_REMOTE_LCD
@@ -398,14 +401,16 @@ int read_bmp_fd(int fd,
398 if (format & FORMAT_TRANSPARENT) { 401 if (format & FORMAT_TRANSPARENT) {
399 transparent = true; 402 transparent = true;
400 } 403 }
401 if (format & FORMAT_DITHER) {
402 dither = true;
403 }
404#else 404#else
405 405
406 (void)format; 406 (void)format;
407#endif /*(LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)*/ 407#endif /*(LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)*/
408 408#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) || \
409 defined(PLUGIN)
410 if (format & FORMAT_DITHER) {
411 dither = true;
412 }
413#endif
409 /* read fileheader */ 414 /* read fileheader */
410 ret = read(fd, &bmph, sizeof(struct bmp_header)); 415 ret = read(fd, &bmph, sizeof(struct bmp_header));
411 if (ret < 0) { 416 if (ret < 0) {
@@ -444,8 +449,11 @@ int read_bmp_fd(int fd,
444 bm->format = format & 1; 449 bm->format = format & 1;
445 if ((format & 1) == FORMAT_MONO) 450 if ((format & 1) == FORMAT_MONO)
446 { 451 {
452#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
453 defined(HAVE_BMP_SCALING) || defined(PLUGIN)
447 resize &= ~IMG_RESIZE; 454 resize &= ~IMG_RESIZE;
448 resize |= IMG_NORESIZE; 455 resize |= IMG_NORESIZE;
456#endif
449#ifdef HAVE_REMOTE_LCD 457#ifdef HAVE_REMOTE_LCD
450 remote = 0; 458 remote = 0;
451#endif 459#endif
@@ -455,8 +463,8 @@ int read_bmp_fd(int fd,
455 return -6; 463 return -6;
456#endif /*(LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)*/ 464#endif /*(LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)*/
457 465
458#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ 466#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
459 defined(PLUGIN) 467 defined(HAVE_BMP_SCALING) || defined(PLUGIN)
460 if (resize & IMG_RESIZE) { 468 if (resize & IMG_RESIZE) {
461 if(format & FORMAT_KEEP_ASPECT) { 469 if(format & FORMAT_KEEP_ASPECT) {
462 /* keep aspect ratio.. */ 470 /* keep aspect ratio.. */
@@ -471,19 +479,19 @@ int read_bmp_fd(int fd,
471 } 479 }
472 } 480 }
473 481
474 format &= 1;
475
476 if (!(resize & IMG_RESIZE)) { 482 if (!(resize & IMG_RESIZE)) {
477#endif 483#endif
478 /* returning image size */ 484 /* returning image size */
479 bm->width = src_dim.width; 485 bm->width = src_dim.width;
480 bm->height = src_dim.height; 486 bm->height = src_dim.height;
481 487
482#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ 488#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
483 defined(PLUGIN) 489 defined(HAVE_BMP_SCALING) || defined(PLUGIN)
484 } 490 }
485#endif 491#endif
486 492#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)
493 format &= 1;
494#endif
487 if (rset.rowstep > 0) { /* Top-down BMP file */ 495 if (rset.rowstep > 0) { /* Top-down BMP file */
488 rset.rowstart = 0; 496 rset.rowstart = 0;
489 rset.rowstop = bm->height; 497 rset.rowstop = bm->height;
@@ -581,15 +589,15 @@ int read_bmp_fd(int fd,
581 struct bmp_args ba = { 589 struct bmp_args ba = {
582 .fd = fd, .padded_width = padded_width, .read_width = read_width, 590 .fd = fd, .padded_width = padded_width, .read_width = read_width,
583 .width = src_dim.width, .depth = depth, .palette = palette, 591 .width = src_dim.width, .depth = depth, .palette = palette,
584#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ 592#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
585 defined(PLUGIN) 593 defined(HAVE_BMP_SCALING) || defined(PLUGIN)
586 .cur_row = 0, .cur_col = 0, .part = {0,0} 594 .cur_row = 0, .cur_col = 0, .part = {0,0}
587#endif 595#endif
588 }; 596 };
589 597
590#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ 598#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
591 defined(PLUGIN) 599 defined(HAVE_BMP_SCALING) || defined(PLUGIN)
592#if LCD_DEPTH > 1 600#if LCD_DEPTH > 1 && defined(HAVE_BMP_SCALING)
593 if (resize || cformat) 601 if (resize || cformat)
594#endif 602#endif
595 { 603 {
@@ -600,12 +608,12 @@ int read_bmp_fd(int fd,
600 else 608 else
601 return 0; 609 return 0;
602 } 610 }
603#ifndef PLUGIN
604 int fb_width = BM_WIDTH(bm->width,bm->format,remote);
605#endif
606#endif /* LCD_DEPTH */ 611#endif /* LCD_DEPTH */
607 612
608#ifndef PLUGIN 613#ifndef PLUGIN
614#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1))
615 int fb_width = BM_WIDTH(bm->width,bm->format,remote);
616#endif
609 int col, row; 617 int col, row;
610 618
611 /* loop to read rows and put them to buffer */ 619 /* loop to read rows and put them to buffer */
diff --git a/apps/recorder/resize.c b/apps/recorder/resize.c
index 79be59804a..7000c448e6 100644
--- a/apps/recorder/resize.c
+++ b/apps/recorder/resize.c
@@ -516,8 +516,9 @@ static inline bool scale_v_linear(struct rowset *rset,
516} 516}
517#endif /* HAVE_UPSCALER */ 517#endif /* HAVE_UPSCALER */
518 518
519#ifndef PLUGIN 519#if !defined(PLUGIN) || LCD_DEPTH > 1
520static void output_row_native(uint32_t row, void * row_in, struct scaler_context *ctx) 520void output_row_native(uint32_t row, void * row_in,
521 struct scaler_context *ctx)
521{ 522{
522 int col; 523 int col;
523 int fb_width = BM_WIDTH(ctx->bm->width,FORMAT_NATIVE,0); 524 int fb_width = BM_WIDTH(ctx->bm->width,FORMAT_NATIVE,0);
@@ -606,6 +607,18 @@ static void output_row_native(uint32_t row, void * row_in, struct scaler_context
606} 607}
607#endif 608#endif
608 609
610#if defined(PLUGIN) && LCD_DEPTH > 1
611unsigned int get_size_native(struct bitmap *bm)
612{
613 return BM_SIZE(bm->width,bm->height,FORMAT_NATIVE,FALSE);
614}
615
616const struct custom_format format_native = {
617 .output_row = output_row_native,
618 .get_size = get_size_native
619};
620#endif
621
609int resize_on_load(struct bitmap *bm, bool dither, struct dim *src, 622int resize_on_load(struct bitmap *bm, bool dither, struct dim *src,
610 struct rowset *rset, unsigned char *buf, unsigned int len, 623 struct rowset *rset, unsigned char *buf, unsigned int len,
611 const struct custom_format *format, 624 const struct custom_format *format,
@@ -669,7 +682,7 @@ int resize_on_load(struct bitmap *bm, bool dither, struct dim *src,
669 ctx.bm = bm; 682 ctx.bm = bm;
670 ctx.src = src; 683 ctx.src = src;
671 ctx.dither = dither; 684 ctx.dither = dither;
672#ifndef PLUGIN 685#if !defined(PLUGIN)
673 ctx.output_row = output_row_native; 686 ctx.output_row = output_row_native;
674 if (format) 687 if (format)
675#endif 688#endif
diff --git a/apps/recorder/resize.h b/apps/recorder/resize.h
index dc93585a08..de9e8a9ab0 100644
--- a/apps/recorder/resize.h
+++ b/apps/recorder/resize.h
@@ -149,6 +149,12 @@ struct custom_format {
149}; 149};
150 150
151struct rowset; 151struct rowset;
152
153void output_row_native(uint32_t row, void * row_in,
154 struct scaler_context *ctx);
155
156extern const struct custom_format format_native;
157
152int recalc_dimension(struct dim *dst, struct dim *src); 158int recalc_dimension(struct dim *dst, struct dim *src);
153 159
154int resize_on_load(struct bitmap *bm, bool dither, 160int resize_on_load(struct bitmap *bm, bool dither,
diff --git a/firmware/export/config-c200.h b/firmware/export/config-c200.h
index ed16fb0473..5c2b37dd19 100644
--- a/firmware/export/config-c200.h
+++ b/firmware/export/config-c200.h
@@ -29,6 +29,12 @@
29/* define this if you want album art for this target */ 29/* define this if you want album art for this target */
30#define HAVE_ALBUMART 30#define HAVE_ALBUMART
31 31
32/* define this to enable bitmap scaling */
33#define HAVE_BMP_SCALING
34
35/* define this to enable JPEG decoding */
36#define HAVE_JPEG
37
32/* define this if you have a light associated with the buttons */ 38/* define this if you have a light associated with the buttons */
33#define HAVE_BUTTON_LIGHT 39#define HAVE_BUTTON_LIGHT
34 40
diff --git a/firmware/export/config-c200v2.h b/firmware/export/config-c200v2.h
index 1e58573a9c..b47ba73610 100644
--- a/firmware/export/config-c200v2.h
+++ b/firmware/export/config-c200v2.h
@@ -31,6 +31,12 @@
31/* define this if you want album art for this target */ 31/* define this if you want album art for this target */
32#define HAVE_ALBUMART 32#define HAVE_ALBUMART
33 33
34/* define this to enable bitmap scaling */
35#define HAVE_BMP_SCALING
36
37/* define this to enable JPEG decoding */
38#define HAVE_JPEG
39
34/* define this if you have a light associated with the buttons */ 40/* define this if you have a light associated with the buttons */
35#define HAVE_BUTTON_LIGHT 41#define HAVE_BUTTON_LIGHT
36 42
diff --git a/firmware/export/config-cowond2.h b/firmware/export/config-cowond2.h
index 85e46f9b30..bef4bf4992 100644
--- a/firmware/export/config-cowond2.h
+++ b/firmware/export/config-cowond2.h
@@ -41,6 +41,12 @@
41/* define this if you want album art for this target */ 41/* define this if you want album art for this target */
42#define HAVE_ALBUMART 42#define HAVE_ALBUMART
43 43
44/* define this to enable bitmap scaling */
45#define HAVE_BMP_SCALING
46
47/* define this to enable JPEG decoding */
48#define HAVE_JPEG
49
44/* define this if you have access to the quickscreen */ 50/* define this if you have access to the quickscreen */
45#define HAVE_QUICKSCREEN 51#define HAVE_QUICKSCREEN
46/* define this if you have access to the pitchscreen */ 52/* define this if you have access to the pitchscreen */
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h
index fd481d9e63..59ac564c01 100644
--- a/firmware/export/config-e200.h
+++ b/firmware/export/config-e200.h
@@ -29,6 +29,12 @@
29/* define this if you want album art for this target */ 29/* define this if you want album art for this target */
30#define HAVE_ALBUMART 30#define HAVE_ALBUMART
31 31
32/* define this to enable bitmap scaling */
33#define HAVE_BMP_SCALING
34
35/* define this to enable JPEG decoding */
36#define HAVE_JPEG
37
32/* define this if you have a light associated with the buttons */ 38/* define this if you have a light associated with the buttons */
33#define HAVE_BUTTON_LIGHT 39#define HAVE_BUTTON_LIGHT
34 40
diff --git a/firmware/export/config-e200v2.h b/firmware/export/config-e200v2.h
index dbd3b0c0ee..9ee8572fbd 100644
--- a/firmware/export/config-e200v2.h
+++ b/firmware/export/config-e200v2.h
@@ -31,6 +31,12 @@
31/* define this if you want album art for this target */ 31/* define this if you want album art for this target */
32#define HAVE_ALBUMART 32#define HAVE_ALBUMART
33 33
34/* define this to enable bitmap scaling */
35#define HAVE_BMP_SCALING
36
37/* define this to enable JPEG decoding */
38#define HAVE_JPEG
39
34/* define this if you have a light associated with the buttons */ 40/* define this if you have a light associated with the buttons */
35#define HAVE_BUTTON_LIGHT 41#define HAVE_BUTTON_LIGHT
36 42
diff --git a/firmware/export/config-fuze.h b/firmware/export/config-fuze.h
index 4cef71ed58..4f943580a7 100644
--- a/firmware/export/config-fuze.h
+++ b/firmware/export/config-fuze.h
@@ -35,6 +35,12 @@
35#ifndef BOOTLOADER/* define this if you want album art for this target */ 35#ifndef BOOTLOADER/* define this if you want album art for this target */
36#define HAVE_ALBUMART 36#define HAVE_ALBUMART
37 37
38/* define this to enable bitmap scaling */
39#define HAVE_BMP_SCALING
40
41/* define this to enable JPEG decoding */
42#define HAVE_JPEG
43
38/* define this if you have a light associated with the buttons */ 44/* define this if you have a light associated with the buttons */
39#define HAVE_BUTTON_LIGHT 45#define HAVE_BUTTON_LIGHT
40 46
diff --git a/firmware/export/config-gigabeat-s.h b/firmware/export/config-gigabeat-s.h
index 17ee39352c..d122edbf74 100644
--- a/firmware/export/config-gigabeat-s.h
+++ b/firmware/export/config-gigabeat-s.h
@@ -23,6 +23,12 @@
23/* define this if you want album art for this target */ 23/* define this if you want album art for this target */
24#define HAVE_ALBUMART 24#define HAVE_ALBUMART
25 25
26/* define this to enable bitmap scaling */
27#define HAVE_BMP_SCALING
28
29/* define this to enable JPEG decoding */
30#define HAVE_JPEG
31
26/* define this if you have access to the quickscreen */ 32/* define this if you have access to the quickscreen */
27#define HAVE_QUICKSCREEN 33#define HAVE_QUICKSCREEN
28 34
diff --git a/firmware/export/config-gigabeat.h b/firmware/export/config-gigabeat.h
index 72b8c3d79d..a6ec25d34f 100644
--- a/firmware/export/config-gigabeat.h
+++ b/firmware/export/config-gigabeat.h
@@ -22,6 +22,12 @@
22/* define this if you want album art for this target */ 22/* define this if you want album art for this target */
23#define HAVE_ALBUMART 23#define HAVE_ALBUMART
24 24
25/* define this to enable bitmap scaling */
26#define HAVE_BMP_SCALING
27
28/* define this to enable JPEG decoding */
29#define HAVE_JPEG
30
25/* define this if you have access to the quickscreen */ 31/* define this if you have access to the quickscreen */
26#define HAVE_QUICKSCREEN 32#define HAVE_QUICKSCREEN
27 33
diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h
index 011c1316de..04a61238bf 100644
--- a/firmware/export/config-h10.h
+++ b/firmware/export/config-h10.h
@@ -34,6 +34,12 @@
34/* define this if you want album art for this target */ 34/* define this if you want album art for this target */
35#define HAVE_ALBUMART 35#define HAVE_ALBUMART
36 36
37/* define this to enable bitmap scaling */
38#define HAVE_BMP_SCALING
39
40/* define this to enable JPEG decoding */
41#define HAVE_JPEG
42
37/* define this if you have access to the quickscreen */ 43/* define this if you have access to the quickscreen */
38#define HAVE_QUICKSCREEN 44#define HAVE_QUICKSCREEN
39 45
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h
index 1a3c75ebf8..e860538ec6 100644
--- a/firmware/export/config-h100.h
+++ b/firmware/export/config-h100.h
@@ -23,6 +23,12 @@
23/* define this if you want album art for this target */ 23/* define this if you want album art for this target */
24#define HAVE_ALBUMART 24#define HAVE_ALBUMART
25 25
26/* define this to enable bitmap scaling */
27#define HAVE_BMP_SCALING
28
29/* define this to enable JPEG decoding */
30#define HAVE_JPEG
31
26/* define this if you can flip your LCD */ 32/* define this if you can flip your LCD */
27#define HAVE_LCD_FLIP 33#define HAVE_LCD_FLIP
28 34
diff --git a/firmware/export/config-h10_5gb.h b/firmware/export/config-h10_5gb.h
index ef53e02ab4..806ce0cdc3 100644
--- a/firmware/export/config-h10_5gb.h
+++ b/firmware/export/config-h10_5gb.h
@@ -34,6 +34,12 @@
34/* define this if you want album art for this target */ 34/* define this if you want album art for this target */
35#define HAVE_ALBUMART 35#define HAVE_ALBUMART
36 36
37/* define this to enable bitmap scaling */
38#define HAVE_BMP_SCALING
39
40/* define this to enable JPEG decoding */
41#define HAVE_JPEG
42
37/* define this if you have access to the quickscreen */ 43/* define this if you have access to the quickscreen */
38#define HAVE_QUICKSCREEN 44#define HAVE_QUICKSCREEN
39 45
diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h
index bb8e1f7184..b772a36323 100644
--- a/firmware/export/config-h120.h
+++ b/firmware/export/config-h120.h
@@ -18,6 +18,12 @@
18/* define this if you want album art for this target */ 18/* define this if you want album art for this target */
19#define HAVE_ALBUMART 19#define HAVE_ALBUMART
20 20
21/* define this to enable bitmap scaling */
22#define HAVE_BMP_SCALING
23
24/* define this to enable JPEG decoding */
25#define HAVE_JPEG
26
21/* define this if you can flip your LCD */ 27/* define this if you can flip your LCD */
22#define HAVE_LCD_FLIP 28#define HAVE_LCD_FLIP
23 29
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h
index e6e07e0bbc..91f54f5479 100644
--- a/firmware/export/config-h300.h
+++ b/firmware/export/config-h300.h
@@ -21,6 +21,12 @@
21/* define this if you want album art for this target */ 21/* define this if you want album art for this target */
22#define HAVE_ALBUMART 22#define HAVE_ALBUMART
23 23
24/* define this to enable bitmap scaling */
25#define HAVE_BMP_SCALING
26
27/* define this to enable JPEG decoding */
28#define HAVE_JPEG
29
24/* define this if you can flip your LCD */ 30/* define this if you can flip your LCD */
25#define HAVE_LCD_FLIP 31#define HAVE_LCD_FLIP
26 32
diff --git a/firmware/export/config-hdd1630.h b/firmware/export/config-hdd1630.h
index 9b33f6a08e..d588b3bb60 100755
--- a/firmware/export/config-hdd1630.h
+++ b/firmware/export/config-hdd1630.h
@@ -35,6 +35,12 @@
35/* define this if you want album art for this target */ 35/* define this if you want album art for this target */
36#define HAVE_ALBUMART 36#define HAVE_ALBUMART
37 37
38/* define this to enable bitmap scaling */
39#define HAVE_BMP_SCALING
40
41/* define this to enable JPEG decoding */
42#define HAVE_JPEG
43
38/* define this if you have access to the quickscreen */ 44/* define this if you have access to the quickscreen */
39#define HAVE_QUICKSCREEN 45#define HAVE_QUICKSCREEN
40 46
diff --git a/firmware/export/config-iaudio7.h b/firmware/export/config-iaudio7.h
index 601ff5491f..8886b18633 100644
--- a/firmware/export/config-iaudio7.h
+++ b/firmware/export/config-iaudio7.h
@@ -42,6 +42,12 @@
42/* define this if you want album art for this target */ 42/* define this if you want album art for this target */
43#define HAVE_ALBUMART 43#define HAVE_ALBUMART
44 44
45/* define this to enable bitmap scaling */
46#define HAVE_BMP_SCALING
47
48/* define this to enable JPEG decoding */
49#define HAVE_JPEG
50
45/* define this if you have access to the quickscreen */ 51/* define this if you have access to the quickscreen */
46#define HAVE_QUICKSCREEN 52#define HAVE_QUICKSCREEN
47 53
diff --git a/firmware/export/config-iaudiom3.h b/firmware/export/config-iaudiom3.h
index a09be04c17..5eb7fb891b 100644
--- a/firmware/export/config-iaudiom3.h
+++ b/firmware/export/config-iaudiom3.h
@@ -30,6 +30,12 @@
30/* define this if you want album art for this target */ 30/* define this if you want album art for this target */
31#define HAVE_ALBUMART 31#define HAVE_ALBUMART
32 32
33/* define this to enable bitmap scaling */
34#define HAVE_BMP_SCALING
35
36/* define this to enable JPEG decoding */
37#define HAVE_JPEG
38
33/* define this if you can flip your LCD */ 39/* define this if you can flip your LCD */
34#define HAVE_LCD_FLIP 40#define HAVE_LCD_FLIP
35 41
diff --git a/firmware/export/config-iaudiom5.h b/firmware/export/config-iaudiom5.h
index d186895b45..0df8414fe9 100644
--- a/firmware/export/config-iaudiom5.h
+++ b/firmware/export/config-iaudiom5.h
@@ -30,6 +30,12 @@
30/* define this if you want album art for this target */ 30/* define this if you want album art for this target */
31#define HAVE_ALBUMART 31#define HAVE_ALBUMART
32 32
33/* define this to enable bitmap scaling */
34#define HAVE_BMP_SCALING
35
36/* define this to enable JPEG decoding */
37#define HAVE_JPEG
38
33/* define this if you can flip your LCD */ 39/* define this if you can flip your LCD */
34#define HAVE_LCD_FLIP 40#define HAVE_LCD_FLIP
35 41
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h
index 218e1657dd..e048ebefb9 100644
--- a/firmware/export/config-iaudiox5.h
+++ b/firmware/export/config-iaudiox5.h
@@ -36,6 +36,12 @@
36/* define this if you want album art for this target */ 36/* define this if you want album art for this target */
37#define HAVE_ALBUMART 37#define HAVE_ALBUMART
38 38
39/* define this to enable bitmap scaling */
40#define HAVE_BMP_SCALING
41
42/* define this to enable JPEG decoding */
43#define HAVE_JPEG
44
39/* define this if you can invert the colours on your LCD */ 45/* define this if you can invert the colours on your LCD */
40#define HAVE_LCD_INVERT 46#define HAVE_LCD_INVERT
41 47
diff --git a/firmware/export/config-ipod1g2g.h b/firmware/export/config-ipod1g2g.h
index b4acd38b5b..e642dfd930 100644
--- a/firmware/export/config-ipod1g2g.h
+++ b/firmware/export/config-ipod1g2g.h
@@ -30,6 +30,12 @@
30/* define this if you want album art for this target */ 30/* define this if you want album art for this target */
31#define HAVE_ALBUMART 31#define HAVE_ALBUMART
32 32
33/* define this to enable bitmap scaling */
34#define HAVE_BMP_SCALING
35
36/* define this to enable JPEG decoding */
37#define HAVE_JPEG
38
33/* define this if you can invert the colours on your LCD */ 39/* define this if you can invert the colours on your LCD */
34#define HAVE_LCD_INVERT 40#define HAVE_LCD_INVERT
35 41
diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h
index 57773750f2..c13070a805 100644
--- a/firmware/export/config-ipod3g.h
+++ b/firmware/export/config-ipod3g.h
@@ -31,6 +31,12 @@
31/* define this if you want album art for this target */ 31/* define this if you want album art for this target */
32#define HAVE_ALBUMART 32#define HAVE_ALBUMART
33 33
34/* define this to enable bitmap scaling */
35#define HAVE_BMP_SCALING
36
37/* define this to enable JPEG decoding */
38#define HAVE_JPEG
39
34/* define this if you can invert the colours on your LCD */ 40/* define this if you can invert the colours on your LCD */
35#define HAVE_LCD_INVERT 41#define HAVE_LCD_INVERT
36 42
diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h
index 7cbe2145f2..599c4c254e 100644
--- a/firmware/export/config-ipod4g.h
+++ b/firmware/export/config-ipod4g.h
@@ -32,6 +32,12 @@
32/* define this if you want album art for this target */ 32/* define this if you want album art for this target */
33#define HAVE_ALBUMART 33#define HAVE_ALBUMART
34 34
35/* define this to enable bitmap scaling */
36#define HAVE_BMP_SCALING
37
38/* define this to enable JPEG decoding */
39#define HAVE_JPEG
40
35/* define this if you can invert the colours on your LCD */ 41/* define this if you can invert the colours on your LCD */
36#define HAVE_LCD_INVERT 42#define HAVE_LCD_INVERT
37 43
diff --git a/firmware/export/config-ipodcolor.h b/firmware/export/config-ipodcolor.h
index adb0f0ba1c..11edc9893f 100644
--- a/firmware/export/config-ipodcolor.h
+++ b/firmware/export/config-ipodcolor.h
@@ -35,6 +35,12 @@
35/* define this if you want album art for this target */ 35/* define this if you want album art for this target */
36#define HAVE_ALBUMART 36#define HAVE_ALBUMART
37 37
38/* define this to enable bitmap scaling */
39#define HAVE_BMP_SCALING
40
41/* define this to enable JPEG decoding */
42#define HAVE_JPEG
43
38/* define this if you have access to the quickscreen */ 44/* define this if you have access to the quickscreen */
39#define HAVE_QUICKSCREEN 45#define HAVE_QUICKSCREEN
40/* define this if you have access to the pitchscreen */ 46/* define this if you have access to the pitchscreen */
diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h
index 76c81bd86d..d4fdc2eb2a 100644
--- a/firmware/export/config-ipodmini.h
+++ b/firmware/export/config-ipodmini.h
@@ -30,6 +30,12 @@
30/* define this if you want album art for this target */ 30/* define this if you want album art for this target */
31#define HAVE_ALBUMART 31#define HAVE_ALBUMART
32 32
33/* define this to enable bitmap scaling */
34#define HAVE_BMP_SCALING
35
36/* define this to enable JPEG decoding */
37#define HAVE_JPEG
38
33/* define this if you can invert the colours on your LCD */ 39/* define this if you can invert the colours on your LCD */
34#define HAVE_LCD_INVERT 40#define HAVE_LCD_INVERT
35 41
diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h
index 3f37ce940f..c6a0cfa368 100644
--- a/firmware/export/config-ipodmini2g.h
+++ b/firmware/export/config-ipodmini2g.h
@@ -30,6 +30,12 @@
30/* define this if you want album art for this target */ 30/* define this if you want album art for this target */
31#define HAVE_ALBUMART 31#define HAVE_ALBUMART
32 32
33/* define this to enable bitmap scaling */
34#define HAVE_BMP_SCALING
35
36/* define this to enable JPEG decoding */
37#define HAVE_JPEG
38
33/* define this if you can invert the colours on your LCD */ 39/* define this if you can invert the colours on your LCD */
34#define HAVE_LCD_INVERT 40#define HAVE_LCD_INVERT
35 41
diff --git a/firmware/export/config-ipodnano.h b/firmware/export/config-ipodnano.h
index 7947997ee0..bd6228b6ff 100644
--- a/firmware/export/config-ipodnano.h
+++ b/firmware/export/config-ipodnano.h
@@ -35,6 +35,12 @@
35/* define this if you want album art for this target */ 35/* define this if you want album art for this target */
36#define HAVE_ALBUMART 36#define HAVE_ALBUMART
37 37
38/* define this to enable bitmap scaling */
39#define HAVE_BMP_SCALING
40
41/* define this to enable JPEG decoding */
42#define HAVE_JPEG
43
38/* define this if you have access to the quickscreen */ 44/* define this if you have access to the quickscreen */
39#define HAVE_QUICKSCREEN 45#define HAVE_QUICKSCREEN
40/* define this if you have access to the pitchscreen */ 46/* define this if you have access to the pitchscreen */
diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h
index e115f2d786..bd93f8fb36 100644
--- a/firmware/export/config-ipodvideo.h
+++ b/firmware/export/config-ipodvideo.h
@@ -37,6 +37,12 @@
37/* define this if you want album art for this target */ 37/* define this if you want album art for this target */
38#define HAVE_ALBUMART 38#define HAVE_ALBUMART
39 39
40/* define this to enable bitmap scaling */
41#define HAVE_BMP_SCALING
42
43/* define this to enable JPEG decoding */
44#define HAVE_JPEG
45
40/* define this if you have access to the quickscreen */ 46/* define this if you have access to the quickscreen */
41#define HAVE_QUICKSCREEN 47#define HAVE_QUICKSCREEN
42/* define this if you have access to the pitchscreen */ 48/* define this if you have access to the pitchscreen */
diff --git a/firmware/export/config-lyre_proto1.h b/firmware/export/config-lyre_proto1.h
index 58a9350bb9..d157f5be2d 100644
--- a/firmware/export/config-lyre_proto1.h
+++ b/firmware/export/config-lyre_proto1.h
@@ -52,6 +52,12 @@
52 52
53#define HAVE_ALBUMART 53#define HAVE_ALBUMART
54 54
55/* define this to enable bitmap scaling */
56#define HAVE_BMP_SCALING
57
58/* define this to enable JPEG decoding */
59#define HAVE_JPEG
60
55#define CONFIG_KEYPAD LYRE_PROTO1_PAD 61#define CONFIG_KEYPAD LYRE_PROTO1_PAD
56 62
57/* Define this if you do software codec */ 63/* Define this if you do software codec */
diff --git a/firmware/export/config-meizu-m3.h b/firmware/export/config-meizu-m3.h
index 74fe9fd990..2ad20550d0 100644
--- a/firmware/export/config-meizu-m3.h
+++ b/firmware/export/config-meizu-m3.h
@@ -33,6 +33,12 @@
33/* define this if you want album art for this target */ 33/* define this if you want album art for this target */
34#define HAVE_ALBUMART 34#define HAVE_ALBUMART
35 35
36/* define this to enable bitmap scaling */
37#define HAVE_BMP_SCALING
38
39/* define this to enable JPEG decoding */
40#define HAVE_JPEG
41
36/* define this if you can invert the colours on your LCD */ 42/* define this if you can invert the colours on your LCD */
37//#define HAVE_LCD_INVERT 43//#define HAVE_LCD_INVERT
38 44
diff --git a/firmware/export/config-meizu-m6sl.h b/firmware/export/config-meizu-m6sl.h
index b7b50c6dd2..a8e387150d 100644
--- a/firmware/export/config-meizu-m6sl.h
+++ b/firmware/export/config-meizu-m6sl.h
@@ -33,6 +33,12 @@
33/* define this if you want album art for this target */ 33/* define this if you want album art for this target */
34#define HAVE_ALBUMART 34#define HAVE_ALBUMART
35 35
36/* define this to enable bitmap scaling */
37#define HAVE_BMP_SCALING
38
39/* define this to enable JPEG decoding */
40#define HAVE_JPEG
41
36/* define this if you can invert the colours on your LCD */ 42/* define this if you can invert the colours on your LCD */
37//#define HAVE_LCD_INVERT 43//#define HAVE_LCD_INVERT
38 44
diff --git a/firmware/export/config-meizu-m6sp.h b/firmware/export/config-meizu-m6sp.h
index 993c535a92..2325b479b1 100644
--- a/firmware/export/config-meizu-m6sp.h
+++ b/firmware/export/config-meizu-m6sp.h
@@ -33,6 +33,12 @@
33/* define this if you want album art for this target */ 33/* define this if you want album art for this target */
34#define HAVE_ALBUMART 34#define HAVE_ALBUMART
35 35
36/* define this to enable bitmap scaling */
37#define HAVE_BMP_SCALING
38
39/* define this to enable JPEG decoding */
40#define HAVE_JPEG
41
36/* define this if you can invert the colours on your LCD */ 42/* define this if you can invert the colours on your LCD */
37//#define HAVE_LCD_INVERT 43//#define HAVE_LCD_INVERT
38 44
diff --git a/firmware/export/config-mrobe500.h b/firmware/export/config-mrobe500.h
index f8f3502152..f9e8d9ebf6 100644
--- a/firmware/export/config-mrobe500.h
+++ b/firmware/export/config-mrobe500.h
@@ -44,6 +44,12 @@
44/* define this if you want album art for this target */ 44/* define this if you want album art for this target */
45#define HAVE_ALBUMART 45#define HAVE_ALBUMART
46 46
47/* define this to enable bitmap scaling */
48#define HAVE_BMP_SCALING
49
50/* define this to enable JPEG decoding */
51#define HAVE_JPEG
52
47/* define this if you have access to the quickscreen */ 53/* define this if you have access to the quickscreen */
48#define HAVE_QUICKSCREEN 54#define HAVE_QUICKSCREEN
49 55
diff --git a/firmware/export/config-ondavx747.h b/firmware/export/config-ondavx747.h
index e47a8c1702..176a35f4e9 100644
--- a/firmware/export/config-ondavx747.h
+++ b/firmware/export/config-ondavx747.h
@@ -54,6 +54,12 @@
54/* define this if you want album art for this target */ 54/* define this if you want album art for this target */
55#define HAVE_ALBUMART 55#define HAVE_ALBUMART
56 56
57/* define this to enable bitmap scaling */
58#define HAVE_BMP_SCALING
59
60/* define this to enable JPEG decoding */
61#define HAVE_JPEG
62
57/* define this if you have access to the quickscreen */ 63/* define this if you have access to the quickscreen */
58#define HAVE_QUICKSCREEN 64#define HAVE_QUICKSCREEN
59 65
diff --git a/firmware/export/config-sa9200.h b/firmware/export/config-sa9200.h
index cbe92bb99c..e35c27e15e 100755
--- a/firmware/export/config-sa9200.h
+++ b/firmware/export/config-sa9200.h
@@ -18,6 +18,12 @@
18/* define this if you want album art for this target */ 18/* define this if you want album art for this target */
19#define HAVE_ALBUMART 19#define HAVE_ALBUMART
20 20
21/* define this to enable bitmap scaling */
22#define HAVE_BMP_SCALING
23
24/* define this to enable JPEG decoding */
25#define HAVE_JPEG
26
21/* define this if you have a light associated with the buttons */ 27/* define this if you have a light associated with the buttons */
22#define HAVE_BUTTON_LIGHT 28#define HAVE_BUTTON_LIGHT
23 29