-
Notifications
You must be signed in to change notification settings - Fork 2
/
common.h
93 lines (78 loc) · 1.32 KB
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#ifndef __common_h__
#define __common_h__
typedef unsigned long U32;
typedef signed long S32;
typedef unsigned short U16;
typedef signed short S16;
typedef unsigned char U8;
typedef signed char S8;
typedef struct _RGBA
{ U8 a;
U8 r;
U8 g;
U8 b;
} RGBA;
typedef struct _YUV
{
U8 y,u,v;
} YUV;
typedef struct _HLS
{
double h,l,s;
} HLS;
typedef struct _image
{
RGBA*data;
int width;
int height;
} image_t;
typedef struct _cxform
{
float rr,rg,rb,ra, tr;
float gr,gg,gb,ga, tg;
float br,bg,bb,ba, tb;
float ar,ag,ab,aa, ta;
} cxform_t;
typedef struct _matrix
{
double*data;
int width;
int height;
} matrix_t;
typedef struct _complex
{
double real;
double imag;
} complex_t;
typedef struct _complex_matrix
{
complex_t*data;
int width;
int height;
} complex_matrix_t;
typedef struct _matrixset
{
matrix_t**m;
int num;
} matrixset_t;
typedef struct _complex_matrixset
{
complex_matrix_t**m;
int num;
} complex_matrixset_t;
typedef struct _bytearray
{
int width, height;
unsigned char*data;
} bytearray_t;
typedef struct _bytearrayset
{
bytearray_t**m;
int num;
} bytearrayset_t;
typedef struct _window
{
int x1,y1,x2,y2;
int width, height;
} window_t;
#endif