adjust to match the uname changes.
[AROS-Contrib.git] / Demo / Galaxy / opti_cvrt.h
blob75331596db854775ca367a37c8cd8550a8e34c79
1 /***************************************
2 *
3 * opti_cvrt.h
5 * http://optimum.citeweb.net/index.html
6 *
7 ***************************************/
9 #ifndef OPTI_CVRT_H
10 #define OPTI_CVRT_H
15 /* quelques routines de conversion...
16 * ne pas vous affoler en voyant toutes ces declaration:
17 * Un meme codage couleur peut posseder 4 noms differents, selon
18 * le point de vue ou on le decrit :
19 * par exemple pour un mode RGB (depth 24bits, mais alignement 32 bits):
20 * lARGB pour un int [ARGB] sur une machine Less significant byte first
21 * mBGRA pour un int [BGRA] Most
22 * bBGRA pour 4 octets B-G-R-A
23 * ARGB pour un int [ARGB] sur la machine actuellement utilisee
24 * => les 3 premieres denominations sont identiques, ainsi que la 4eme sur un PC
26 * Donc en pratique, on utilisera plutot le nom sans prefixe "par defaut"
27 * sauf pour specifier sans ambiguité un format(enfin c'est vous qui voyez,
28 * et puis de toute facon tout sera bien explique dans l'optilib finale... ;) )
30 * Evidemment ca se casse la gueule pour le 16bits, vu qu'une composante est
31 * a cheval sur 2octets... donc ici RGB_565 = un short [RGB] vu par un PC
34 /* 24/32 bits vers 16 bits */
35 extern void SOpti_cvrt_RGB_888_RGB_565(unsigned char *src, unsigned char *dst, int nbpixels); /* not optimized yet ! */
36 extern void SOpti_cvrt_BGR_888_RGB_565(unsigned char *src, unsigned char *dst, int nbpixels); /* not optimized yet ! */
39 extern void SOpti_cvrt_ARGB_8888_RGB_565(unsigned char *src, unsigned char *dst, int nbpixels);
40 extern void SOpti_cvrt_bBGRA_8888_RGB_565(unsigned char *src, unsigned char *dst, int nbpixels);
41 extern void SOpti_cvrt_mBGRA_8888_RGB_565(unsigned char *src, unsigned char *dst, int nbpixels);
42 extern void SOpti_cvrt_lARGB_8888_RGB_565(unsigned char *src, unsigned char *dst, int nbpixels);
44 /* 16 bits vers 24/32 */
45 extern void SOpti_cvrt_RGB_565_ARGB_8888(unsigned char *src, unsigned char *dst, int nbpixels);
46 extern void SOpti_cvrt_RGB_565_bBGRA_8888(unsigned char *src, unsigned char *dst, int nbpixels);
47 extern void SOpti_cvrt_RGB_565_mBGRA_8888(unsigned char *src, unsigned char *dst, int nbpixels);
48 extern void SOpti_cvrt_RGB_565_lARGB_8888(unsigned char *src, unsigned char *dst, int nbpixels);
50 /* 24/32 bits exotique ? */
51 extern void SOpti_cvrt_ABGR_8888_RGB_565(unsigned char *src, unsigned char *dst, int nbpixels);
52 extern void SOpti_cvrt_bRGBA_8888_RGB_565(unsigned char *src, unsigned char *dst, int nbpixels);
53 extern void SOpti_cvrt_mRGBA_8888_RGB_565(unsigned char *src, unsigned char *dst, int nbpixels);
54 extern void SOpti_cvrt_lABGR_8888_RGB_565(unsigned char *src, unsigned char *dst, int nbpixels);
56 /* convertit du 8 bits en 16 bits a partir d'une palette 16b */
57 extern void SOpti_cvrt_PAL_8_RGB_565(unsigned char *src, unsigned char *dst, int nbpixels, unsigned short *palette);
59 /* convertit du 8 bits en 32 bits a partir d'une palette 32b */
60 extern void SOpti_cvrt_PAL_8_RGBA_8888(unsigned char *src, unsigned char *dst, int nbpixels, unsigned int *palette);
62 #endif