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
This commit is contained in:
Andrew Mahone 2009-05-04 15:46:41 +00:00
parent dfb24d6cee
commit 20f76d61ae
46 changed files with 318 additions and 79 deletions

View file

@ -88,8 +88,6 @@ gui/viewport.c
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) #if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
gui/backdrop.c gui/backdrop.c
recorder/resize.c
recorder/jpeg_load.c
#endif #endif
#ifdef HAVE_LCD_CHARCELLS #ifdef HAVE_LCD_CHARCELLS
@ -101,6 +99,12 @@ recorder/bmp.c
recorder/icons.c recorder/icons.c
recorder/keyboard.c recorder/keyboard.c
recorder/peakmeter.c recorder/peakmeter.c
#if defined(HAVE_ALBUMART) || defined(HAVE_JPEG)
recorder/resize.c
#endif
#ifdef HAVE_JPEG
recorder/jpeg_load.c
#endif
#ifdef HAVE_ALBUMART #ifdef HAVE_ALBUMART
recorder/albumart.c recorder/albumart.c
#endif #endif

View file

@ -834,7 +834,6 @@ static bool fill_buffer(void)
static int load_image(int fd, const char *path) static int load_image(int fd, const char *path)
{ {
int rc; int rc;
int pathlen = strlen(path);
struct bitmap *bmp = (struct bitmap *)&buffer[buf_widx]; struct bitmap *bmp = (struct bitmap *)&buffer[buf_widx];
/* FIXME: alignment may be needed for the data buffer. */ /* FIXME: alignment may be needed for the data buffer. */
bmp->data = &buffer[buf_widx + sizeof(struct bitmap)]; bmp->data = &buffer[buf_widx + sizeof(struct bitmap)];
@ -848,10 +847,13 @@ static int load_image(int fd, const char *path)
get_albumart_size(bmp); get_albumart_size(bmp);
#ifdef HAVE_JPEG
int pathlen = strlen(path);
if (strcmp(path + pathlen - 4, ".bmp")) if (strcmp(path + pathlen - 4, ".bmp"))
rc = read_jpeg_fd(fd, bmp, free, FORMAT_NATIVE|FORMAT_DITHER| rc = read_jpeg_fd(fd, bmp, free, FORMAT_NATIVE|FORMAT_DITHER|
FORMAT_RESIZE|FORMAT_KEEP_ASPECT, NULL); FORMAT_RESIZE|FORMAT_KEEP_ASPECT, NULL);
else else
#endif
rc = read_bmp_fd(fd, bmp, free, FORMAT_NATIVE|FORMAT_DITHER| rc = read_bmp_fd(fd, bmp, free, FORMAT_NATIVE|FORMAT_DITHER|
FORMAT_RESIZE|FORMAT_KEEP_ASPECT, NULL); FORMAT_RESIZE|FORMAT_KEEP_ASPECT, NULL);
return rc + (rc > 0 ? sizeof(struct bitmap) : 0); return rc + (rc > 0 ? sizeof(struct bitmap) : 0);

View file

@ -644,7 +644,7 @@ static const struct plugin_api rockbox_api = {
#endif #endif
#endif #endif
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
#if LCD_DEPTH > 1 #ifdef HAVE_JPEG
read_jpeg_file, read_jpeg_file,
read_jpeg_fd, read_jpeg_fd,
#endif #endif

View file

@ -805,7 +805,7 @@ struct plugin_api {
#endif #endif
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
#if LCD_DEPTH > 1 #ifdef HAVE_JPEG
int (*read_jpeg_file)(const char* filename, struct bitmap *bm, int maxsize, int (*read_jpeg_file)(const char* filename, struct bitmap *bm, int maxsize,
int format, const struct custom_format *cformat); int format, const struct custom_format *cformat);
int (*read_jpeg_fd)(int fd, struct bitmap *bm, int maxsize, int (*read_jpeg_fd)(int fd, struct bitmap *bm, int maxsize,

View file

@ -5,15 +5,13 @@ fixedpoint.c
playback_control.c playback_control.c
rgb_hsv.c rgb_hsv.c
buflib.c buflib.c
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) #if !defined(HAVE_BMP_SCALING) || !defined(HAVE_JPEG)
/*
The scaler is not provided in core on mono targets, but is built in
pluginlib for use with greylib overlay output
*/
#if LCD_DEPTH == 1
pluginlib_resize.c pluginlib_resize.c
#endif
#ifndef HAVE_JPEG
pluginlib_jpeg_load.c pluginlib_jpeg_load.c
#endif #endif
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4)
grey_core.c grey_core.c
grey_draw.c grey_draw.c
grey_parm.c grey_parm.c
@ -45,7 +43,7 @@ read_image.c
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
bmp_smooth_scale.c bmp_smooth_scale.c
#endif #endif
#ifndef HAVE_ALBUMART #if !defined(HAVE_ALBUMART) || !defined(HAVE_JPEG)
pluginlib_albumart.c pluginlib_albumart.c
#endif #endif
#endif #endif

View file

@ -30,24 +30,27 @@
* but can easily be implement in pluginlib as long as the database is * but can easily be implement in pluginlib as long as the database is
* available. * available.
*/ */
#ifdef HAVE_ALBUMART #if defined(HAVE_ALBUMART) && defined(HAVE_JPEG)
#define search_albumart_files rb->search_albumart_files #define search_albumart_files rb->search_albumart_files
#endif #endif
/* This should only be used when loading scaled bitmaps, or using custom output /* This should only be used when loading scaled bitmaps, or using custom output
* plugins. The pluginlib loader does not support loading bitmaps unscaled in * plugins. A native output plugin for the scaler is available as format_native
* native format, so rb->read_bmp_file should always be used directly to load * on targets with LCD_DEPTH > 1
* such images.
*/ */
#if LCD_DEPTH > 1 #ifdef HAVE_BMP_SCALING
#define scaled_read_bmp_file rb->read_bmp_file #define scaled_read_bmp_file rb->read_bmp_file
#define scaled_read_bmp_fd rb->read_bmp_fd #define scaled_read_bmp_fd rb->read_bmp_fd
#define read_jpeg_file rb->read_jpeg_file
#define read_jpeg_fd rb->read_jpeg_fd
#else #else
#define scaled_read_bmp_file read_bmp_file #define scaled_read_bmp_file read_bmp_file
#define scaled_read_bmp_fd read_bmp_fd #define scaled_read_bmp_fd read_bmp_fd
#endif #endif
#ifdef HAVE_JPEG
#define read_jpeg_file rb->read_jpeg_file
#define read_jpeg_fd rb->read_jpeg_fd
#else
#endif
#endif #endif

View file

@ -122,10 +122,16 @@ void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst)
} }
} }
#else /* LCD_DEPTH == 1 */ #endif /* LCD_DEPTH > 1 */
#ifndef HAVE_BMP_SCALING
#include "wrappers.h" #include "wrappers.h"
/* import the core bmp loader */ /* import the core bmp loader */
#include "../../recorder/bmp.c" #include "recorder/bmp.c"
#else
/* the full 16x16 Bayer dither matrix may be calculated quickly with this table
*/
const unsigned char dither_table[16] =
{ 0,192, 48,240, 12,204, 60,252, 3,195, 51,243, 15,207, 63,255 };
#endif #endif

View file

@ -28,12 +28,10 @@
int read_image_file(const char* filename, struct bitmap *bm, int maxsize, int read_image_file(const char* filename, struct bitmap *bm, int maxsize,
int format, const struct custom_format *cformat) int format, const struct custom_format *cformat)
{ {
#if LCD_DEPTH > 1
int namelen = rb->strlen(filename); int namelen = rb->strlen(filename);
if (rb->strcmp(filename + namelen - 4, ".bmp")) if (rb->strcmp(filename + namelen - 4, ".bmp"))
return read_jpeg_file(filename, bm, maxsize, format, cformat); return read_jpeg_file(filename, bm, maxsize, format, cformat);
else else
#endif
return scaled_read_bmp_file(filename, bm, maxsize, format, cformat); return scaled_read_bmp_file(filename, bm, maxsize, format, cformat);
} }
@ -46,11 +44,9 @@ int read_image_file_offset(int offset, const char* filename, struct bitmap *bm,
return fd; return fd;
if (offset != rb->lseek(fd, offset, SEEK_SET)) if (offset != rb->lseek(fd, offset, SEEK_SET))
return -1; return -1;
#if LCD_DEPTH > 1
int namelen = rb->strlen(filename); int namelen = rb->strlen(filename);
if (rb->strcmp(filename + namelen - 4, ".bmp")) if (rb->strcmp(filename + namelen - 4, ".bmp"))
return read_jpeg_fd(fd, bm, maxsize, format, cformat); return read_jpeg_fd(fd, bm, maxsize, format, cformat);
else else
#endif
return scaled_read_bmp_fd(fd, bm, maxsize, format, cformat); return scaled_read_bmp_fd(fd, bm, maxsize, format, cformat);
} }

View file

@ -927,8 +927,13 @@ bool create_albumart_cache(void)
input_bmp.data = buf; input_bmp.data = buf;
input_bmp.width = DISPLAY_WIDTH; input_bmp.width = DISPLAY_WIDTH;
input_bmp.height = DISPLAY_HEIGHT; input_bmp.height = DISPLAY_HEIGHT;
#if PLUGIN_BUFFER_SIZE > 0x10000
ret = read_image_file(albumart_file, &input_bmp, ret = read_image_file(albumart_file, &input_bmp,
buf_size, format, &format_transposed); buf_size, format, &format_transposed);
#else
ret = scaled_read_bmp_file(albumart_file, &input_bmp,
buf_size, format, &format_transposed);
#endif
if (ret <= 0) { if (ret <= 0) {
rb->splash(HZ, "Could not read bmp"); rb->splash(HZ, "Could not read bmp");
continue; /* skip missing/broken files */ continue; /* skip missing/broken files */

View file

@ -91,7 +91,7 @@ static void fix_path_part(char* path, int offset, int count)
} }
} }
#if LCD_DEPTH > 1 #if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
const char * extensions[] = { "jpeg", "jpg", "bmp" }; const char * extensions[] = { "jpeg", "jpg", "bmp" };
int extension_lens[] = { 4, 3, 3 }; int extension_lens[] = { 4, 3, 3 };
/* Try checking for several file extensions, return true if a file is found and /* 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,
const char *artist; const char *artist;
int dirlen; int dirlen;
int albumlen; int albumlen;
#if LCD_DEPTH > 1 #if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
int pathlen; int pathlen;
#endif #endif
@ -153,7 +153,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
/* the first file we look for is one specific to the track playing */ /* the first file we look for is one specific to the track playing */
strip_extension(path, sizeof(path) - strlen(size_string) - 4, trackname); strip_extension(path, sizeof(path) - strlen(size_string) - 4, trackname);
strcat(path, size_string); strcat(path, size_string);
#if LCD_DEPTH > 1 #if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
strcat(path, "."); strcat(path, ".");
pathlen = strlen(path); pathlen = strlen(path);
found = try_exts(path, pathlen); found = try_exts(path, pathlen);
@ -165,7 +165,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
{ {
/* if it doesn't exist, /* if it doesn't exist,
* we look for a file specific to the track's album name */ * we look for a file specific to the track's album name */
#if LCD_DEPTH > 1 #if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
pathlen = snprintf(path, sizeof(path), pathlen = snprintf(path, sizeof(path),
"%s%s%s.", dir, id3->album, size_string); "%s%s%s.", dir, id3->album, size_string);
fix_path_part(path, dirlen, albumlen); fix_path_part(path, dirlen, albumlen);
@ -181,7 +181,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
if (!found) if (!found)
{ {
/* if it still doesn't exist, we look for a generic file */ /* if it still doesn't exist, we look for a generic file */
#if LCD_DEPTH > 1 #if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
pathlen = snprintf(path, sizeof(path), pathlen = snprintf(path, sizeof(path),
"%scover%s.", dir, size_string); "%scover%s.", dir, size_string);
found = try_exts(path, pathlen); found = try_exts(path, pathlen);
@ -192,7 +192,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
#endif #endif
} }
#if LCD_DEPTH > 1 #if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
if (!found) if (!found)
{ {
snprintf (path, sizeof(path), "%sfolder.jpg", dir); snprintf (path, sizeof(path), "%sfolder.jpg", dir);
@ -205,7 +205,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
if (!found && artist && id3->album) if (!found && artist && id3->album)
{ {
/* look in the albumart subdir of .rockbox */ /* look in the albumart subdir of .rockbox */
#if LCD_DEPTH > 1 #if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
pathlen = snprintf(path, sizeof(path), pathlen = snprintf(path, sizeof(path),
ROCKBOX_DIR "/albumart/%s-%s%s.", ROCKBOX_DIR "/albumart/%s-%s%s.",
artist, artist,
@ -241,7 +241,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
{ {
/* we look in the parent directory /* we look in the parent directory
* for a file specific to the track's album name */ * for a file specific to the track's album name */
#if LCD_DEPTH > 1 #if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
pathlen = snprintf(path, sizeof(path), pathlen = snprintf(path, sizeof(path),
"%s%s%s.", dir, id3->album, size_string); "%s%s%s.", dir, id3->album, size_string);
fix_path_part(path, dirlen, albumlen); fix_path_part(path, dirlen, albumlen);
@ -258,7 +258,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
{ {
/* if it still doesn't exist, we look in the parent directory /* if it still doesn't exist, we look in the parent directory
* for a generic file */ * for a generic file */
#if LCD_DEPTH > 1 #if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
pathlen = snprintf(path, sizeof(path), pathlen = snprintf(path, sizeof(path),
"%scover%s.", dir, size_string); "%scover%s.", dir, size_string);
found = try_exts(path, pathlen); found = try_exts(path, pathlen);
@ -278,7 +278,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
return true; return true;
} }
#ifdef HAVE_ALBUMART #ifndef PLUGIN
/* Look for albumart bitmap in the same dir as the track and in its parent dir. /* Look for albumart bitmap in the same dir as the track and in its parent dir.
* Stores the found filename in the buf parameter. * Stores the found filename in the buf parameter.
* Returns true if a bitmap was found, false otherwise */ * Returns true if a bitmap was found, false otherwise */
@ -386,4 +386,4 @@ void get_albumart_size(struct bitmap *bmp)
bmp->width = data->albumart_max_width; bmp->width = data->albumart_max_width;
bmp->height = data->albumart_max_height; bmp->height = data->albumart_max_height;
} }
#endif /* HAVE_ALBUMART */ #endif /* PLUGIN */

View file

@ -184,8 +184,8 @@ struct bmp_args {
short depth; short depth;
unsigned char buf[BM_MAX_WIDTH * 4]; unsigned char buf[BM_MAX_WIDTH * 4];
struct uint8_rgb *palette; struct uint8_rgb *palette;
#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ #if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
defined(PLUGIN) defined(HAVE_BMP_SCALING) || defined(PLUGIN)
int cur_row; int cur_row;
int cur_col; int cur_col;
struct img_part part; struct img_part part;
@ -198,8 +198,8 @@ static unsigned int read_part_line(struct bmp_args *ba)
const int read_width = ba->read_width; const int read_width = ba->read_width;
const int width = ba->width; const int width = ba->width;
const int depth = ba->depth; const int depth = ba->depth;
#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ #if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
defined(PLUGIN) defined(HAVE_BMP_SCALING) || defined(PLUGIN)
int cur_row = ba->cur_row; int cur_row = ba->cur_row;
int cur_col = ba->cur_col; int cur_col = ba->cur_col;
#endif #endif
@ -211,8 +211,8 @@ static unsigned int read_part_line(struct bmp_args *ba)
int ret; int ret;
int i, cols, len; int i, cols, len;
#if (LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) || \ #if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
defined(PLUGIN) defined(HAVE_BMP_SCALING) || defined(PLUGIN)
cols = MIN(width - cur_col,(int)BM_MAX_WIDTH); cols = MIN(width - cur_col,(int)BM_MAX_WIDTH);
BDEBUGF("reading %d cols (width: %d, max: %d)\n",cols,width,BM_MAX_WIDTH); BDEBUGF("reading %d cols (width: %d, max: %d)\n",cols,width,BM_MAX_WIDTH);
len = (cols * (depth == 15 ? 16 : depth) + 7) >> 3; len = (cols * (depth == 15 ? 16 : depth) + 7) >> 3;
@ -227,8 +227,8 @@ static unsigned int read_part_line(struct bmp_args *ba)
{ {
DEBUGF("read_part_line: error reading image, read returned %d " DEBUGF("read_part_line: error reading image, read returned %d "
"expected %d\n", ret, len); "expected %d\n", ret, len);
#if (LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) || \ #if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
defined(PLUGIN) defined(HAVE_BMP_SCALING) || defined(PLUGIN)
BDEBUGF("cur_row: %d cur_col: %d cols: %d len: %d\n", cur_row, cur_col, BDEBUGF("cur_row: %d cur_col: %d cols: %d len: %d\n", cur_row, cur_col,
cols, len); cols, len);
#endif #endif
@ -290,17 +290,17 @@ static unsigned int read_part_line(struct bmp_args *ba)
} }
} }
#if (!defined(HAVE_LCD_COLOR) && \ #if !defined(HAVE_LCD_COLOR) && \
(LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1))) || \ ((LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) || \
defined(PLUGIN) defined(PLUGIN))
ibuf = ba->buf; ibuf = ba->buf;
buf = (struct uint8_rgb*)ba->buf; buf = (struct uint8_rgb*)ba->buf;
while (ibuf < ba->buf + cols) while (ibuf < ba->buf + cols)
*ibuf++ = brightness(*buf++); *ibuf++ = brightness(*buf++);
#endif #endif
#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ #if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
defined(PLUGIN) defined(HAVE_BMP_SCALING) || defined(PLUGIN)
cur_col += cols; cur_col += cols;
if (cur_col == width) if (cur_col == width)
{ {
@ -311,8 +311,8 @@ static unsigned int read_part_line(struct bmp_args *ba)
BDEBUGF("seeking %d bytes to next line\n",pad); BDEBUGF("seeking %d bytes to next line\n",pad);
lseek(fd, pad, SEEK_CUR); lseek(fd, pad, SEEK_CUR);
} }
#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ #if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
defined(PLUGIN) defined(HAVE_BMP_SCALING) || defined(PLUGIN)
cur_col = 0; cur_col = 0;
BDEBUGF("read_part_line: completed row %d\n", cur_row); BDEBUGF("read_part_line: completed row %d\n", cur_row);
cur_row += 1; cur_row += 1;
@ -324,8 +324,8 @@ static unsigned int read_part_line(struct bmp_args *ba)
return cols; return cols;
} }
#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ #if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
defined(PLUGIN) defined(HAVE_BMP_SCALING) || defined(PLUGIN)
static struct img_part *store_part_bmp(void *args) static struct img_part *store_part_bmp(void *args)
{ {
struct bmp_args *ba = (struct bmp_args *)args; struct bmp_args *ba = (struct bmp_args *)args;
@ -375,10 +375,13 @@ int read_bmp_fd(int fd,
struct uint8_rgb palette[256]; struct uint8_rgb palette[256];
struct rowset rset; struct rowset rset;
struct dim src_dim; struct dim src_dim;
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) \ #if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) || \
|| defined(PLUGIN) defined(PLUGIN)
unsigned int resize = IMG_NORESIZE;
bool dither = false; bool dither = false;
#endif
#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
defined(HAVE_BMP_SCALING) || defined(PLUGIN)
unsigned int resize = IMG_NORESIZE;
bool transparent = false; bool transparent = false;
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
@ -398,14 +401,16 @@ int read_bmp_fd(int fd,
if (format & FORMAT_TRANSPARENT) { if (format & FORMAT_TRANSPARENT) {
transparent = true; transparent = true;
} }
if (format & FORMAT_DITHER) {
dither = true;
}
#else #else
(void)format; (void)format;
#endif /*(LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)*/ #endif /*(LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)*/
#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) || \
defined(PLUGIN)
if (format & FORMAT_DITHER) {
dither = true;
}
#endif
/* read fileheader */ /* read fileheader */
ret = read(fd, &bmph, sizeof(struct bmp_header)); ret = read(fd, &bmph, sizeof(struct bmp_header));
if (ret < 0) { if (ret < 0) {
@ -444,8 +449,11 @@ int read_bmp_fd(int fd,
bm->format = format & 1; bm->format = format & 1;
if ((format & 1) == FORMAT_MONO) if ((format & 1) == FORMAT_MONO)
{ {
#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
defined(HAVE_BMP_SCALING) || defined(PLUGIN)
resize &= ~IMG_RESIZE; resize &= ~IMG_RESIZE;
resize |= IMG_NORESIZE; resize |= IMG_NORESIZE;
#endif
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
remote = 0; remote = 0;
#endif #endif
@ -455,8 +463,8 @@ int read_bmp_fd(int fd,
return -6; return -6;
#endif /*(LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)*/ #endif /*(LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)*/
#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ #if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
defined(PLUGIN) defined(HAVE_BMP_SCALING) || defined(PLUGIN)
if (resize & IMG_RESIZE) { if (resize & IMG_RESIZE) {
if(format & FORMAT_KEEP_ASPECT) { if(format & FORMAT_KEEP_ASPECT) {
/* keep aspect ratio.. */ /* keep aspect ratio.. */
@ -471,19 +479,19 @@ int read_bmp_fd(int fd,
} }
} }
format &= 1;
if (!(resize & IMG_RESIZE)) { if (!(resize & IMG_RESIZE)) {
#endif #endif
/* returning image size */ /* returning image size */
bm->width = src_dim.width; bm->width = src_dim.width;
bm->height = src_dim.height; bm->height = src_dim.height;
#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ #if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
defined(PLUGIN) defined(HAVE_BMP_SCALING) || defined(PLUGIN)
} }
#endif #endif
#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)
format &= 1;
#endif
if (rset.rowstep > 0) { /* Top-down BMP file */ if (rset.rowstep > 0) { /* Top-down BMP file */
rset.rowstart = 0; rset.rowstart = 0;
rset.rowstop = bm->height; rset.rowstop = bm->height;
@ -581,15 +589,15 @@ int read_bmp_fd(int fd,
struct bmp_args ba = { struct bmp_args ba = {
.fd = fd, .padded_width = padded_width, .read_width = read_width, .fd = fd, .padded_width = padded_width, .read_width = read_width,
.width = src_dim.width, .depth = depth, .palette = palette, .width = src_dim.width, .depth = depth, .palette = palette,
#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ #if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
defined(PLUGIN) defined(HAVE_BMP_SCALING) || defined(PLUGIN)
.cur_row = 0, .cur_col = 0, .part = {0,0} .cur_row = 0, .cur_col = 0, .part = {0,0}
#endif #endif
}; };
#if LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) || \ #if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
defined(PLUGIN) defined(HAVE_BMP_SCALING) || defined(PLUGIN)
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1 && defined(HAVE_BMP_SCALING)
if (resize || cformat) if (resize || cformat)
#endif #endif
{ {
@ -600,12 +608,12 @@ int read_bmp_fd(int fd,
else else
return 0; return 0;
} }
#ifndef PLUGIN
int fb_width = BM_WIDTH(bm->width,bm->format,remote);
#endif
#endif /* LCD_DEPTH */ #endif /* LCD_DEPTH */
#ifndef PLUGIN #ifndef PLUGIN
#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1))
int fb_width = BM_WIDTH(bm->width,bm->format,remote);
#endif
int col, row; int col, row;
/* loop to read rows and put them to buffer */ /* loop to read rows and put them to buffer */

View file

@ -516,8 +516,9 @@ static inline bool scale_v_linear(struct rowset *rset,
} }
#endif /* HAVE_UPSCALER */ #endif /* HAVE_UPSCALER */
#ifndef PLUGIN #if !defined(PLUGIN) || LCD_DEPTH > 1
static void output_row_native(uint32_t row, void * row_in, struct scaler_context *ctx) void output_row_native(uint32_t row, void * row_in,
struct scaler_context *ctx)
{ {
int col; int col;
int fb_width = BM_WIDTH(ctx->bm->width,FORMAT_NATIVE,0); 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
} }
#endif #endif
#if defined(PLUGIN) && LCD_DEPTH > 1
unsigned int get_size_native(struct bitmap *bm)
{
return BM_SIZE(bm->width,bm->height,FORMAT_NATIVE,FALSE);
}
const struct custom_format format_native = {
.output_row = output_row_native,
.get_size = get_size_native
};
#endif
int resize_on_load(struct bitmap *bm, bool dither, struct dim *src, int resize_on_load(struct bitmap *bm, bool dither, struct dim *src,
struct rowset *rset, unsigned char *buf, unsigned int len, struct rowset *rset, unsigned char *buf, unsigned int len,
const struct custom_format *format, const struct custom_format *format,
@ -669,7 +682,7 @@ int resize_on_load(struct bitmap *bm, bool dither, struct dim *src,
ctx.bm = bm; ctx.bm = bm;
ctx.src = src; ctx.src = src;
ctx.dither = dither; ctx.dither = dither;
#ifndef PLUGIN #if !defined(PLUGIN)
ctx.output_row = output_row_native; ctx.output_row = output_row_native;
if (format) if (format)
#endif #endif

View file

@ -149,6 +149,12 @@ struct custom_format {
}; };
struct rowset; struct rowset;
void output_row_native(uint32_t row, void * row_in,
struct scaler_context *ctx);
extern const struct custom_format format_native;
int recalc_dimension(struct dim *dst, struct dim *src); int recalc_dimension(struct dim *dst, struct dim *src);
int resize_on_load(struct bitmap *bm, bool dither, int resize_on_load(struct bitmap *bm, bool dither,

View file

@ -29,6 +29,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have a light associated with the buttons */ /* define this if you have a light associated with the buttons */
#define HAVE_BUTTON_LIGHT #define HAVE_BUTTON_LIGHT

View file

@ -31,6 +31,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have a light associated with the buttons */ /* define this if you have a light associated with the buttons */
#define HAVE_BUTTON_LIGHT #define HAVE_BUTTON_LIGHT

View file

@ -41,6 +41,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have access to the quickscreen */ /* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN #define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */ /* define this if you have access to the pitchscreen */

View file

@ -29,6 +29,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have a light associated with the buttons */ /* define this if you have a light associated with the buttons */
#define HAVE_BUTTON_LIGHT #define HAVE_BUTTON_LIGHT

View file

@ -31,6 +31,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have a light associated with the buttons */ /* define this if you have a light associated with the buttons */
#define HAVE_BUTTON_LIGHT #define HAVE_BUTTON_LIGHT

View file

@ -35,6 +35,12 @@
#ifndef BOOTLOADER/* define this if you want album art for this target */ #ifndef BOOTLOADER/* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have a light associated with the buttons */ /* define this if you have a light associated with the buttons */
#define HAVE_BUTTON_LIGHT #define HAVE_BUTTON_LIGHT

View file

@ -23,6 +23,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have access to the quickscreen */ /* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN #define HAVE_QUICKSCREEN

View file

@ -22,6 +22,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have access to the quickscreen */ /* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN #define HAVE_QUICKSCREEN

View file

@ -34,6 +34,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have access to the quickscreen */ /* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN #define HAVE_QUICKSCREEN

View file

@ -23,6 +23,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can flip your LCD */ /* define this if you can flip your LCD */
#define HAVE_LCD_FLIP #define HAVE_LCD_FLIP

View file

@ -34,6 +34,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have access to the quickscreen */ /* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN #define HAVE_QUICKSCREEN

View file

@ -18,6 +18,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can flip your LCD */ /* define this if you can flip your LCD */
#define HAVE_LCD_FLIP #define HAVE_LCD_FLIP

View file

@ -21,6 +21,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can flip your LCD */ /* define this if you can flip your LCD */
#define HAVE_LCD_FLIP #define HAVE_LCD_FLIP

View file

@ -35,6 +35,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have access to the quickscreen */ /* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN #define HAVE_QUICKSCREEN

View file

@ -42,6 +42,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have access to the quickscreen */ /* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN #define HAVE_QUICKSCREEN

View file

@ -30,6 +30,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can flip your LCD */ /* define this if you can flip your LCD */
#define HAVE_LCD_FLIP #define HAVE_LCD_FLIP

View file

@ -30,6 +30,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can flip your LCD */ /* define this if you can flip your LCD */
#define HAVE_LCD_FLIP #define HAVE_LCD_FLIP

View file

@ -36,6 +36,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can invert the colours on your LCD */ /* define this if you can invert the colours on your LCD */
#define HAVE_LCD_INVERT #define HAVE_LCD_INVERT

View file

@ -30,6 +30,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can invert the colours on your LCD */ /* define this if you can invert the colours on your LCD */
#define HAVE_LCD_INVERT #define HAVE_LCD_INVERT

View file

@ -31,6 +31,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can invert the colours on your LCD */ /* define this if you can invert the colours on your LCD */
#define HAVE_LCD_INVERT #define HAVE_LCD_INVERT

View file

@ -32,6 +32,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can invert the colours on your LCD */ /* define this if you can invert the colours on your LCD */
#define HAVE_LCD_INVERT #define HAVE_LCD_INVERT

View file

@ -35,6 +35,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have access to the quickscreen */ /* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN #define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */ /* define this if you have access to the pitchscreen */

View file

@ -30,6 +30,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can invert the colours on your LCD */ /* define this if you can invert the colours on your LCD */
#define HAVE_LCD_INVERT #define HAVE_LCD_INVERT

View file

@ -30,6 +30,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can invert the colours on your LCD */ /* define this if you can invert the colours on your LCD */
#define HAVE_LCD_INVERT #define HAVE_LCD_INVERT

View file

@ -35,6 +35,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have access to the quickscreen */ /* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN #define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */ /* define this if you have access to the pitchscreen */

View file

@ -37,6 +37,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have access to the quickscreen */ /* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN #define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */ /* define this if you have access to the pitchscreen */

View file

@ -52,6 +52,12 @@
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
#define CONFIG_KEYPAD LYRE_PROTO1_PAD #define CONFIG_KEYPAD LYRE_PROTO1_PAD
/* Define this if you do software codec */ /* Define this if you do software codec */

View file

@ -33,6 +33,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can invert the colours on your LCD */ /* define this if you can invert the colours on your LCD */
//#define HAVE_LCD_INVERT //#define HAVE_LCD_INVERT

View file

@ -33,6 +33,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can invert the colours on your LCD */ /* define this if you can invert the colours on your LCD */
//#define HAVE_LCD_INVERT //#define HAVE_LCD_INVERT

View file

@ -33,6 +33,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you can invert the colours on your LCD */ /* define this if you can invert the colours on your LCD */
//#define HAVE_LCD_INVERT //#define HAVE_LCD_INVERT

View file

@ -44,6 +44,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have access to the quickscreen */ /* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN #define HAVE_QUICKSCREEN

View file

@ -54,6 +54,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have access to the quickscreen */ /* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN #define HAVE_QUICKSCREEN

View file

@ -18,6 +18,12 @@
/* define this if you want album art for this target */ /* define this if you want album art for this target */
#define HAVE_ALBUMART #define HAVE_ALBUMART
/* define this to enable bitmap scaling */
#define HAVE_BMP_SCALING
/* define this to enable JPEG decoding */
#define HAVE_JPEG
/* define this if you have a light associated with the buttons */ /* define this if you have a light associated with the buttons */
#define HAVE_BUTTON_LIGHT #define HAVE_BUTTON_LIGHT