From 20f76d61ae58bd47b647d79e40beebbbe747e480 Mon Sep 17 00:00:00 2001 From: Andrew Mahone Date: Mon, 4 May 2009 15:46:41 +0000 Subject: 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 --- apps/recorder/resize.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'apps/recorder/resize.c') 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, } #endif /* HAVE_UPSCALER */ -#ifndef PLUGIN -static void output_row_native(uint32_t row, void * row_in, struct scaler_context *ctx) +#if !defined(PLUGIN) || LCD_DEPTH > 1 +void output_row_native(uint32_t row, void * row_in, + struct scaler_context *ctx) { int col; 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 +#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, struct rowset *rset, unsigned char *buf, unsigned int len, 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.src = src; ctx.dither = dither; -#ifndef PLUGIN +#if !defined(PLUGIN) ctx.output_row = output_row_native; if (format) #endif -- cgit v1.2.3