diff options
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 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #ifndef _RESIZE_H_ | 21 | #ifndef _RESIZE_H_ |
22 | #define _RESIZE_H_ | 22 | #define _RESIZE_H_ |
23 | |||
24 | #include "config.h" | 23 | #include "config.h" |
25 | #include "lcd.h" | 24 | #include "lcd.h" |
26 | #include "inttypes.h" | 25 | #include "inttypes.h" |
@@ -65,11 +64,35 @@ struct uint32_rgb { | |||
65 | }; | 64 | }; |
66 | #endif | 65 | #endif |
67 | 66 | ||
67 | /* struct which contains various parameters shared between vertical scaler, | ||
68 | horizontal scaler, and row output | ||
69 | */ | ||
70 | struct scaler_context { | ||
71 | uint32_t divisor; | ||
72 | uint32_t round; | ||
73 | struct bitmap *bm; | ||
74 | struct dim *src; | ||
75 | unsigned char *buf; | ||
76 | bool dither; | ||
77 | int len; | ||
78 | void *args; | ||
79 | struct img_part* (*store_part)(void *); | ||
80 | void (*output_row)(uint32_t,void*,struct scaler_context*); | ||
81 | bool (*h_scaler)(void*,struct scaler_context*, bool); | ||
82 | }; | ||
83 | |||
84 | struct custom_format { | ||
85 | void (*output_row)(uint32_t,void*,struct scaler_context*); | ||
86 | unsigned int (*get_size)(struct bitmap *bm); | ||
87 | }; | ||
88 | |||
89 | struct rowset; | ||
68 | int recalc_dimension(struct dim *dst, struct dim *src); | 90 | int recalc_dimension(struct dim *dst, struct dim *src); |
69 | 91 | ||
70 | int resize_on_load(struct bitmap *bm, bool dither, | 92 | int resize_on_load(struct bitmap *bm, bool dither, |
71 | struct dim *src, struct rowset *tmp_row, | 93 | struct dim *src, struct rowset *tmp_row, |
72 | unsigned char *buf, unsigned int len, | 94 | unsigned char *buf, unsigned int len, |
95 | const struct custom_format *cformat, | ||
73 | struct img_part* (*store_part)(void *args), | 96 | struct img_part* (*store_part)(void *args), |
74 | void *args); | 97 | void *args); |
75 | #endif /* _RESIZE_H_ */ | 98 | #endif /* _RESIZE_H_ */ |