doc: Add GP_FilterParam into filters.
[gfxprim.git] / gfxprim_config.py
blobb0aafedae552342c2bb5b31bb935acb95f0945d7
2 # gfxprim_config.py - module configuring GfxPrim code generation and
3 # known PixelTypes
4 #
7 # 2011 - Tomas Gavenciak <gavento@ucw.cz>
8 # 2011 - Cyril Hrubis <metan@ucw.cz>
10 # This file is sourced by all the generating scripts.
11 # Moreover, the generated files are sourced by almost all Gfxprim sources,
12 # so a complete recompilation is required after any change.
15 # Declared pixel sizes:
16 PS_1BPP_LE = PixelSize(1, bit_endian=LE)
17 PS_1BPP_BE = PixelSize(1, bit_endian=BE)
18 PS_2BPP_LE = PixelSize(2, bit_endian=LE)
19 PS_2BPP_BE = PixelSize(2, bit_endian=BE)
20 PS_4BPP_LE = PixelSize(4, bit_endian=LE)
21 PS_4BPP_BE = PixelSize(4, bit_endian=BE)
22 PS_8BPP = PixelSize(8)
23 PS_16BPP = PixelSize(16)
24 PS_24BPP = PixelSize(24)
25 PS_32BPP = PixelSize(32)
26 # Experimental:
27 PS_18BPP_LE = PixelSize(18, bit_endian=LE)
29 config = GfxPrimConfig(
31 # C name and bit-size of the GP_pixel type
32 pixel_type = "uint32_t",
33 pixel_size = 32,
35 # List of pixel sizes (bpp), explicit on purpose
36 pixelsizes = [PS_1BPP_LE, PS_1BPP_BE, PS_2BPP_LE, PS_2BPP_BE, PS_4BPP_LE, PS_4BPP_BE,
37 PS_8BPP, PS_16BPP, PS_24BPP, PS_32BPP,
38 PS_18BPP_LE,
41 # List of PixelTypes, order defines the numbering.
42 # The "Undefined" type is added automatically.
43 pixeltypes = [
46 # Standard RGB types
49 PixelType(name='xRGB8888', pixelsize=PS_32BPP, chanslist=[
50 ('R', 16, 8),
51 ('G', 8, 8),
52 ('B', 0, 8)]),
54 PixelType(name='RGBA8888', pixelsize=PS_32BPP, chanslist=[
55 ('R', 24, 8),
56 ('G', 16, 8),
57 ('B', 8, 8),
58 ('A', 0, 8)]),
60 PixelType(name='RGB888', pixelsize=PS_24BPP, chanslist=[
61 ('R', 16, 8),
62 ('G', 8, 8),
63 ('B', 0, 8)]),
65 PixelType(name='BGR888', pixelsize=PS_24BPP, chanslist=[
66 ('B', 16, 8),
67 ('G', 8, 8),
68 ('R', 0, 8)]),
70 PixelType(name='RGB565', pixelsize=PS_16BPP, chanslist=[
71 ('R', 11, 5),
72 ('G', 5, 6),
73 ('B', 0, 5)]),
75 PixelType(name='RGB666', pixelsize=PS_18BPP_LE, chanslist=[
76 ('R', 12, 6),
77 ('G', 6, 6),
78 ('B', 0, 6)]),
80 PixelType(name='xRGB14666', pixelsize=PS_32BPP, chanslist=[
81 ('R', 12, 6),
82 ('G', 6, 6),
83 ('B', 0, 6)]),
86 # Added for dithering tests
88 PixelType(name='xRGB7333', pixelsize=PS_16BPP, chanslist=[
89 ('R', 6, 3),
90 ('G', 3, 3),
91 ('B', 0, 3)]),
93 PixelType(name='xRGB2222', pixelsize=PS_8BPP, chanslist=[
94 ('R', 4, 2),
95 ('G', 2, 2),
96 ('B', 0, 2)]),
99 # Palette types
101 PixelType(name='P2', pixelsize=PS_2BPP_LE, chanslist=[
102 ('P', 0, 2)]),
104 PixelType(name='P4', pixelsize=PS_4BPP_LE, chanslist=[
105 ('P', 0, 4)]),
107 PixelType(name='P8', pixelsize=PS_8BPP, chanslist=[
108 ('P', 0, 8)]),
111 # Gray-only pixel types
113 PixelType(name='G1', pixelsize=PS_1BPP_LE, chanslist=[
114 ('V', 0, 1)]),
116 PixelType(name='G2', pixelsize=PS_2BPP_LE, chanslist=[
117 ('V', 0, 2)]),
119 PixelType(name='G4', pixelsize=PS_4BPP_LE, chanslist=[
120 ('V', 0, 4)]),
122 PixelType(name='G8', pixelsize=PS_8BPP, chanslist=[
123 ('V', 0, 8)]),
126 # Experiments
129 PixelType(name='VA12', pixelsize=PS_4BPP_BE, chanslist=[
130 ('A', 1, 2),
131 ('V', 3, 1)]),