File: gimp-composite-regression.h

package info (click to toggle)
gimp 2.2.13-1etch4
  • links: PTS
  • area: main
  • in suites: etch
  • size: 94,832 kB
  • ctags: 47,113
  • sloc: ansic: 524,858; xml: 36,798; lisp: 9,870; sh: 9,409; makefile: 7,923; python: 2,674; perl: 2,589; yacc: 520; lex: 334
file content (145 lines) | stat: -rw-r--r-- 4,711 bytes parent folder | download | duplicates (2)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#ifndef gimp_composite_regression_h
#define gimp_composite_regression_h
/*
 * The following typedefs are temporary and only used in regression testing.
	*/
typedef struct
{
  guint8  v;
} gimp_v8_t;

typedef struct
{
  guint8  v;
  guint8  a;
} gimp_va8_t;

typedef struct
{
  guint8  r;
  guint8  g;
  guint8  b;
} gimp_rgb8_t;

typedef struct
{
  guint8  r;
  guint8  g;
  guint8  b;
  guint8  a;
} gimp_rgba8_t;

#ifdef GIMP_COMPOSIE_16BIT
typedef struct
{
  guint16  v;
} gimp_v16_t;

typedef struct
{
  guint16  v;
  guint16  a;
} gimp_va16_t;

typedef struct
{
  guint16  r;
  guint16  g;
  guint16  b;
} gimp_rgb16_t;

typedef struct
{
  guint16  r;
  guint16  g;
  guint16  b;
  guint16  a;
} gimp_rgba16_t;
#endif

#ifdef GIMP_COMPOSIE_32BIT
typedef struct
{
  guint32  v;
} gimp_v32_t;

typedef struct
{
  guint32  v;
  guint32  a;
} gimp_va32_t;

typedef struct
{
  guint32  r;
  guint32  g;
  guint32  b;
} gimp_rgb32_t;

typedef struct
{
  guint32  r;
  guint32  g;
  guint32  b;
  guint32  a;
} gimp_rgba32_t;
#endif

extern void gimp_composite_regression_print_vector (guchar vector[],
																																																				GimpPixelFormat format,
																																																				gulong n_pixels);

extern void gimp_composite_regression_print_vector_v8 (gimp_v8_t v[],
																																																							unsigned int n_pixels);

extern void gimp_composite_regression_print_vector_va8 (gimp_va8_t v[],
																																																								unsigned int n_pixels);

extern void gimp_composite_regression_print_vector_rgb8 (gimp_rgb8_t v[],
																																																									unsigned int n_pixels);

extern void gimp_composite_regression_print_vector_rgba8 (gimp_rgba8_t v[],
																																																										unsigned int n_pixels);


extern double gimp_composite_regression_time_function (gulong iterations,
																																																							void (*func)(),
																																																							GimpCompositeContext *ctx);
extern int gimp_composite_regression_comp_rgba8 (char *str,
																																																	gimp_rgba8_t *rgba8A,
																																																	gimp_rgba8_t *rgba8B,
																																																	gimp_rgba8_t *expected,
																																																	gimp_rgba8_t *actual,
																																																	gulong length);
extern int gimp_composite_regression_comp_va8 (char *str,
																																															gimp_va8_t *va8A,
																																															gimp_va8_t *va8B,
																																															gimp_va8_t *expected,
																																															gimp_va8_t *actual,
																																															gulong length);
extern int gimp_composite_regression_compare_contexts (char *,
																																																							GimpCompositeContext *ctx1,
																																																							GimpCompositeContext *ctx2);
extern void gimp_composite_regression_dump_rgba8 (char *str,
																																																		gimp_rgba8_t *rgba,
																																																		gulong n_pixels);
extern void gimp_composite_regression_print_rgba8 (gimp_rgba8_t *rgba8);
extern void gimp_composite_regression_print_va8 (gimp_va8_t *va8);
extern void gimp_composite_regression_timer_report (char *name,
																																																				double t1,
																																																				double t2);

extern gimp_rgba8_t *gimp_composite_regression_random_rgba8 (gulong n_pixels);
extern gimp_rgba8_t *gimp_composite_regression_fixed_rgba8 (gulong n_pixels);
extern GimpCompositeContext *gimp_composite_context_init (GimpCompositeContext *ctx,
																																																										GimpCompositeOperation op,
																																																										GimpPixelFormat a_format,
																																																										GimpPixelFormat b_format,
																																																										GimpPixelFormat d_format,
																																																										GimpPixelFormat m_format,
																																																										unsigned long n_pixels,
																																																										unsigned char *A,
																																																										unsigned char *B,
																																																										unsigned char *M,
																																																										unsigned char *D);
#endif