From 59e70b50d8532568b5df09b01b9f0df042766267 Mon Sep 17 00:00:00 2001 From: Andrew Mahone Date: Sat, 9 May 2009 10:32:07 +0000 Subject: Inline output_row_8_native when building bmp.c in core without HAVE_JPEG or HAVE_BMP_SCALING. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20886 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/bmp.c | 9 +++++++++ apps/recorder/bmp.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c index 4897b2db18..eef425fb25 100644 --- a/apps/recorder/bmp.c +++ b/apps/recorder/bmp.c @@ -352,6 +352,9 @@ static inline int rgbcmp(struct uint8_rgb rgb1, struct uint8_rgb rgb2) return 1; } #if LCD_DEPTH > 1 +#if !defined(PLUGIN) && !defined(HAVE_JPEG) && !defined(HAVE_BMP_SCALING) +static inline +#endif void output_row_8_native(uint32_t row, void * row_in, struct scaler_context *ctx) { @@ -703,6 +706,7 @@ int read_bmp_fd(int fd, .dither = dither, }; #endif +#if defined(PLUGIN) || defined(HAVE_JPEG) || defined(HAVE_BMP_SCALING) #if LCD_DEPTH > 1 void (*output_row_8)(uint32_t, void*, struct scaler_context*) = output_row_8_native; @@ -712,6 +716,7 @@ int read_bmp_fd(int fd, #if LCD_DEPTH > 1 || defined(PLUGIN) if (cformat) output_row_8 = cformat->output_row_8; +#endif #endif int row; @@ -762,7 +767,11 @@ int read_bmp_fd(int fd, (LCD_REMOTE_DEPTH > 1) */ #if LCD_DEPTH > 1 || defined(PLUGIN) { +#if !defined(PLUGIN) && !defined(HAVE_JPEG) && !defined(HAVE_BMP_SCALING) + output_row_8_native(row, ba.buf, &ctx); +#else output_row_8(row, ba.buf, &ctx); +#endif } #endif #if ((LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) && \ diff --git a/apps/recorder/bmp.h b/apps/recorder/bmp.h index 6437e42d26..c6a34dfd94 100644 --- a/apps/recorder/bmp.h +++ b/apps/recorder/bmp.h @@ -212,7 +212,7 @@ int read_bmp_fd(int fd, int format, const struct custom_format *cformat); -#if LCD_DEPTH > 1 +#if LCD_DEPTH > 1 && (defined(PLUGIN) || defined(HAVE_BMP_SCALING) || defined(HAVE_JPEG)) void output_row_8_native(uint32_t row, void * row_in, struct scaler_context *ctx); #endif -- cgit v1.2.3