projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSP construction debugging
[dosdemo]
/
src
/
gfxutil.c
diff --git
a/src/gfxutil.c
b/src/gfxutil.c
index
b82a612
..
37eb4c5
100644
(file)
--- a/
src/gfxutil.c
+++ b/
src/gfxutil.c
@@
-202,3
+202,16
@@
void blur_grey_vert(uint16_t *dest, uint16_t *src, int xsz, int ysz, int rad, in
BLUR(ysz, xsz, pixel_step, scanline_step);
}
BLUR(ysz, xsz, pixel_step, scanline_step);
}
+
+void convimg_rgb24_rgb16(uint16_t *dest, unsigned char *src, int xsz, int ysz)
+{
+ int i;
+ int npixels = xsz * ysz;
+
+ for(i=0; i<npixels; i++) {
+ int r = *src++;
+ int g = *src++;
+ int b = *src++;
+ *dest++ = PACK_RGB16(r, g, b);
+ }
+}