path: root/firmware/export/lcd-remote.h
diff options
authorAndrew Mahone <>2008-12-26 07:03:22 +0000
committerAndrew Mahone <>2008-12-26 07:03:22 +0000
commitf7fa7e5ad537415f1f75b3a9c1a58eb925e10d04 (patch)
treeea469e428a756e4f4979be1b6f5a84179a2cc80f /firmware/export/lcd-remote.h
parent7428c7cc5b8462ed95683f707fe78609ce8208bf (diff)
Latest work on the bmp on-load scaler:
Macros for calculating size needed for bitmap load and scaling, so that these can be compile-time constant when their inputs are. Reduce size of bayer dither by chopping all but first row of dither matrix, and replacing 2D lookup with 1D lookup and small calculation. Move some functions not related to actual bmp file loading out of bmp.c. A smaller brightness() for mono targets, and a higher-quality one for greyscale targets, both replacing the division by 10 with a shift. Port of the linear and area scalers to greyscale targets, this costs some binsize but produces better output even when dithered to 2bpp. Move duplicated row output code from inside vertical scalers to a separate row output function. Move some multiplies out of the line scaler, for a small speedup and code size reduction, as well as a small improvement in accuracy for the upscaling case. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/lcd-remote.h')
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/export/lcd-remote.h b/firmware/export/lcd-remote.h
index 3c013d657a..01df5a7eab 100644
--- a/firmware/export/lcd-remote.h
+++ b/firmware/export/lcd-remote.h
@@ -48,13 +48,17 @@ int remote_type(void);
typedef unsigned short fb_remote_data;
+#define FB_RDATA_SZ 2
typedef unsigned char fb_remote_data;
+#define FB_RDATA_SZ 1
#elif LCD_DEPTH <= 16
typedef unsigned short fb_remote_data;
+#define FB_RDATA_SZ 2
typedef unsigned long fb_remote_data;
+#define FB_RDATA_SZ 4
/* common functions */