1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Andrew Mahone 2008-12-26 07:05:13 +00:00
parent f7fa7e5ad5
commit 9058620849
17 changed files with 88 additions and 42 deletions

View file

@ -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_ */