summaryrefslogtreecommitdiff
path: root/apps/recorder/resize.c
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 /apps/recorder/resize.c
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
Diffstat (limited to 'apps/recorder/resize.c')
-rw-r--r--apps/recorder/resize.c19
1 files changed, 16 insertions, 3 deletions
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