diff options
Diffstat (limited to 'apps/recorder/resize.c')
-rw-r--r-- | apps/recorder/resize.c | 19 |
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 |
520 | static void output_row_native(uint32_t row, void * row_in, struct scaler_context *ctx) | 520 | void 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 | ||
611 | unsigned int get_size_native(struct bitmap *bm) | ||
612 | { | ||
613 | return BM_SIZE(bm->width,bm->height,FORMAT_NATIVE,FALSE); | ||
614 | } | ||
615 | |||
616 | const struct custom_format format_native = { | ||
617 | .output_row = output_row_native, | ||
618 | .get_size = get_size_native | ||
619 | }; | ||
620 | #endif | ||
621 | |||
609 | int resize_on_load(struct bitmap *bm, bool dither, struct dim *src, | 622 | int 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 |