First batch of gen config changes
[gfxprim.git] / gfxprim_config.py
blob157f93c8931c4f5fadddd682f11a39037c56407b
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 config = GfxPrimConfig(
17 # C name and bit-size of the GP_pixel type
18 pixel_type = "uint32_t",
19 pixel_size = 32,
21 # List of pixel sizes (bpp), explicit on purpose
22 sizes = [1, 2, 4, 8, 16, 32]
24 # bit endians to generate, keep this fixed to LE, BE for now
25 bit_endians = ['LE', 'BE']
27 # List of PixelTypes, order defines the numbering.
28 # The "Undefined" type is added automatically.
29 types = [
32 # Standard RGB types
35 PixelType(name='RGBx8888', size=32, chanslist=[
36 ('R', 16, 8),
37 ('G', 8, 8),
38 ('B', 0, 8)]),
40 PixelType(name='RGBA8888', size=32, chanslist=[
41 ('R', 24, 8),
42 ('G', 16, 8),
43 ('B', 8, 8),
44 ('A', 0, 8)]),
46 PixelType(name='RGB888', size=24, chanslist=[
47 ('R', 16, 8),
48 ('G', 8, 8),
49 ('B', 0, 8)]),
51 PixelType(name='RGB565', size=16, chanslist=[
52 ('R', 11, 5),
53 ('G', 5, 6),
54 ('B', 0, 5)]),
57 # Palette types
60 PixelType(name='P2', size=2, bit_endian='LE', chanslist=[
61 ('P', 0, 2)]),
63 PixelType(name='P4', size=4, bit_endian='LE', chanslist=[
64 ('P', 0, 4)]),
66 PixelType(name='P8', size=8, bit_endian='LE', chanslist=[
67 ('P', 0, 8)]),
70 # Gray-only pixel types
73 PixelType(name='V1', size=1, bit_endian='LE', chanslist=[
74 ('V', 0, 1)]),
76 PixelType(name='V2', size=2, bit_endian='LE', chanslist=[
77 ('V', 0, 2)]),
79 PixelType(name='V4', size=4, bit_endian='LE', chanslist=[
80 ('V', 0, 4)]),
82 PixelType(name='V8', size=8, bit_endian='LE', chanslist=[
83 ('V', 0, 8)]),
86 # Experiments
89 PixelType(name='VA12', size=4, bit_endian='BE', chanslist=[
90 ('A', 1, 2),
91 ('V', 3, 1)]),