diff options
author | Andrew Mahone <andrew.mahone@gmail.com> | 2008-12-26 07:05:13 +0000 |
---|---|---|
committer | Andrew Mahone <andrew.mahone@gmail.com> | 2008-12-26 07:05:13 +0000 |
commit | 9058620849c080a404fb156915856f9d0b06e71c (patch) | |
tree | 004590b20a5ea0fa6b099f5332af162896e44098 /apps/recorder/resize.h | |
parent | f7fa7e5ad537415f1f75b3a9c1a58eb925e10d04 (diff) |
Make scaler output truly pluggable, add an 8-bit greyscale output to
pluginlib for use with greylib, and add source for a test scaled bmp
viewer using greylib.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19593 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/resize.h')
-rw-r--r-- | apps/recorder/resize.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/apps/recorder/resize.h b/apps/recorder/resize.h index 451830742e..ca7e6326d0 100644 --- a/apps/recorder/resize.h +++ b/apps/recorder/resize.h @@ -20,7 +20,6 @@ ****************************************************************************/ #ifndef _RESIZE_H_ #define _RESIZE_H_ - #include "config.h" #include "lcd.h" #include "inttypes.h" @@ -65,11 +64,35 @@ struct uint32_rgb { }; #endif +/* struct which contains various parameters shared between vertical scaler, + horizontal scaler, and row output +*/ +struct scaler_context { + uint32_t divisor; + uint32_t round; + struct bitmap *bm; + struct dim *src; + unsigned char *buf; + bool dither; + int len; + void *args; + struct img_part* (*store_part)(void *); + void (*output_row)(uint32_t,void*,struct scaler_context*); + bool (*h_scaler)(void*,struct scaler_context*, bool); +}; + +struct custom_format { + void (*output_row)(uint32_t,void*,struct scaler_context*); + unsigned int (*get_size)(struct bitmap *bm); +}; + +struct rowset; int recalc_dimension(struct dim *dst, struct dim *src); 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, struct img_part* (*store_part)(void *args), void *args); #endif /* _RESIZE_H_ */ |