2 Copyright © 2013, The AROS Development Team. All rights reserved.
6 #include <exec/types.h>
7 #include <hidd/graphics.h>
9 #include "colorconv/rgbconv_macros.h"
10 #include "colorconv/rgbconv_rgbswap.h"
12 #define UNUSED(a,b) static ULONG __attribute__((unused)) convert_ ## a ## _ ## b ## _generic \
13 (APTR srcPixels, ULONG srcMod, HIDDT_StdPixFmt srcPixFmt, \
14 APTR dstPixels, ULONG dstMod, HIDDT_StdPixFmt dstPixFmt, \
15 UWORD width, UWORD height);
17 UNUSED(RGB16
,RGB15
) UNUSED(RGB16
,BGR16
) UNUSED(RGB16
,BGR15
) /* -- */
18 UNUSED(RGB16
,BGRA32
) UNUSED(RGB16
,RGBA32
) UNUSED(RGB16
,ABGR32
) UNUSED(RGB16
,RGB24
)
19 UNUSED(RGB16
,BGR24
) UNUSED(RGB16
,RGB16OE
) UNUSED(RGB16
,RGB15OE
) UNUSED(RGB16
,BGR16OE
)
20 UNUSED(RGB16
,BGR15OE
) UNUSED(RGB16
,XRGB32
) UNUSED(RGB16
,BGRX32
) UNUSED(RGB16
,RGBX32
)
23 UNUSED(BGRA32
,RGB16
) UNUSED(BGRA32
,BGR16
) UNUSED(BGRA32
,RGB15
) UNUSED(BGRA32
,BGR15
)
24 /* -- */ UNUSED(BGRA32
,RGBA32
) UNUSED(BGRA32
,ABGR32
) UNUSED(BGRA32
,RGB24
)
25 UNUSED(BGRA32
,BGR24
) UNUSED(BGRA32
,RGB16OE
) UNUSED(BGRA32
,BGR16OE
) UNUSED(BGRA32
,RGB15OE
)
26 UNUSED(BGRA32
,BGR15OE
) UNUSED(BGRA32
,XRGB32
) UNUSED(BGRA32
,BGRX32
) UNUSED(BGRA32
,RGBX32
)
29 /* -- */ UNUSED(ARGB32
,BGR16
) UNUSED(ARGB32
,RGB15
) UNUSED(ARGB32
,BGR15
)
30 /* -- */ UNUSED(ARGB32
,RGBA32
) UNUSED(ARGB32
,ABGR32
) UNUSED(ARGB32
,RGB24
)
31 UNUSED(ARGB32
,BGR24
) UNUSED(ARGB32
,RGB16OE
) UNUSED(ARGB32
,BGR16OE
) UNUSED(ARGB32
,RGB15OE
)
32 UNUSED(ARGB32
,BGR15OE
) UNUSED(ARGB32
,XRGB32
) UNUSED(ARGB32
,BGRX32
) UNUSED(ARGB32
,RGBX32
)
35 #include "colorconv/rgbconv_argb32.h"
36 #include "colorconv/rgbconv_bgra32.h"
37 #include "colorconv/rgbconv_rgb16.h"
39 #define SCCF(SRCPIXFMT, DSTPIXFMT) \
40 rgbconvertfuncs[FMT_##SRCPIXFMT - FIRST_RGB_STDPIXFMT][FMT_##DSTPIXFMT - FIRST_RGB_STDPIXFMT] = convert_##SRCPIXFMT##_##DSTPIXFMT##_generic;
42 void SetRGBConversionFunctions(HIDDT_RGBConversionFunction rgbconvertfuncs
[NUM_RGB_STDPIXFMT
][NUM_RGB_STDPIXFMT
])
44 /* Include only those conversions to save ROM space */