From eef7945a970e4da69b95c638a44a8ee1a9205430 Mon Sep 17 00:00:00 2001 From: Andrew Mahone Date: Wed, 6 May 2009 04:53:56 +0000 Subject: Move YUV->RGB in JPEG load from before scaler to after scaler. Required change to struct custom_format, so sorted the plugin API as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20856 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/resize.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'apps/recorder/resize.h') diff --git a/apps/recorder/resize.h b/apps/recorder/resize.h index de9e8a9ab0..f7cda15254 100644 --- a/apps/recorder/resize.h +++ b/apps/recorder/resize.h @@ -143,8 +143,18 @@ struct scaler_context { bool (*h_scaler)(void*,struct scaler_context*, bool); }; +#if defined(HAVE_LCD_COLOR) && (defined(HAVE_JPEG) || defined(PLUGIN)) +#define IF_PIX_FMT(...) __VA_ARGS__ +#else +#define IF_PIX_FMT(...) +#endif + struct custom_format { +#if defined(HAVE_LCD_COLOR) + void (*output_row[2])(uint32_t,void*,struct scaler_context*); +#else void (*output_row)(uint32_t,void*,struct scaler_context*); +#endif unsigned int (*get_size)(struct bitmap *bm); }; @@ -161,6 +171,7 @@ int resize_on_load(struct bitmap *bm, bool dither, struct dim *src, struct rowset *tmp_row, unsigned char *buf, unsigned int len, const struct custom_format *cformat, + IF_PIX_FMT(int format_index,) struct img_part* (*store_part)(void *args), void *args); -- cgit v1.2.3