Subject: [E-devel] [evas] Add RGBA -> grayscale 64 entries palette conversion This is needed for E-Ink devices outta there. Names of new files, configure.ac variables and macros are awful, suggestions are welcome. SVN revision: 41825devs/devilhorns/wayland_egl
parent
90f801d31c
commit
226e4e5e16
5 changed files with 66 additions and 0 deletions
@ -0,0 +1,27 @@ |
||||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 |
||||
*/ |
||||
|
||||
#include "evas_common.h" |
||||
#include "evas_convert_grypal_6.h" |
||||
|
||||
#ifdef BUILD_CONVERT_8_GRAYSCALE_64 |
||||
void evas_common_convert_rgba_to_8bpp_pal_gray64 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) |
||||
{ |
||||
DATA32 *src_ptr; |
||||
DATA8 *dst_ptr; |
||||
int x, y; |
||||
DATA8 Y; |
||||
|
||||
dst_ptr = dst; |
||||
CONVERT_LOOP_START_ROT_0(); |
||||
|
||||
/* RGB -> YUV conversion */ |
||||
Y = ((R_VAL(src_ptr) * 76) +
|
||||
(G_VAL(src_ptr) * 151) +
|
||||
(B_VAL(src_ptr) * 29)) >> 10; |
||||
*dst_ptr = pal[Y]; |
||||
|
||||
CONVERT_LOOP_END_ROT_0(); |
||||
} |
||||
#endif |
@ -0,0 +1,10 @@ |
||||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 |
||||
*/ |
||||
|
||||
#ifndef _EVAS_CONVERT_GRY_4_H |
||||
#define _EVAS_CONVERT_GRY_4_H |
||||
|
||||
void evas_common_convert_rgba_to_8bpp_pal_gray64 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); |
||||
|
||||
#endif /* _EVAS_CONVERT_GRY_4_H */ |
Loading…
Reference in new issue