a80ae4a0 |
1 | #include "cspace.h" |
2 | |
55b0eeea |
3 | void bgr555_to_rgb565(void *dst_, const void *src_, int bytes) |
4 | { |
5 | unsigned int *src = (unsigned int *)src_; |
6 | unsigned int *dst = (unsigned int *)dst_; |
7 | unsigned int p; |
8 | int x; |
9 | |
10 | for (x = 0; x < bytes / 4; x++) { |
11 | p = src[x]; |
12 | p = ((p & 0x7c007c00) >> 10) | ((p & 0x03e003e0) << 1) |
13 | | ((p & 0x001f001f) << 11); |
14 | dst[x] = p; |
15 | } |
16 | } |
17 | |
a80ae4a0 |
18 | // TODO? |
a80ae4a0 |
19 | void bgr888_to_rgb888(void *dst, const void *src, int bytes) {} |
20 | void bgr888_to_rgb565(void *dst, const void *src, int bytes) {} |
21 | |