~ubuntu-branches/ubuntu/saucy/pixman/saucy-security

« back to all changes in this revision

Viewing changes to pixman/pixman-sse2.h

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2009-09-28 18:12:47 UTC
  • mfrom: (1.1.8 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090928181247-3iehog63i50htejf
Tags: 0.16.2-1
* New upstream release (closes: #546849).
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright © 2008 Rodrigo Kumpera
3
 
 * Copyright © 2008 André Tupinambá
4
 
 *
5
 
 * Permission to use, copy, modify, distribute, and sell this software and its
6
 
 * documentation for any purpose is hereby granted without fee, provided that
7
 
 * the above copyright notice appear in all copies and that both that
8
 
 * copyright notice and this permission notice appear in supporting
9
 
 * documentation, and that the name of Red Hat not be used in advertising or
10
 
 * publicity pertaining to distribution of the software without specific,
11
 
 * written prior permission.  Red Hat makes no representations about the
12
 
 * suitability of this software for any purpose.  It is provided "as is"
13
 
 * without express or implied warranty.
14
 
 *
15
 
 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
16
 
 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17
 
 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
 
 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19
 
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
20
 
 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
21
 
 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22
 
 * SOFTWARE.
23
 
 *
24
 
 * Author:  Rodrigo Kumpera (kumpera@gmail.com)
25
 
 *          André Tupinambá (andrelrt@gmail.com)
26
 
 * 
27
 
 * Based on work by Owen Taylor and Søren Sandmann
28
 
 */
29
 
#ifndef _PIXMAN_SSE_H_
30
 
#define _PIXMAN_SSE_H_
31
 
 
32
 
#ifdef HAVE_DIX_CONFIG_H
33
 
#include <dix-config.h>
34
 
#endif
35
 
 
36
 
#include "pixman-private.h"
37
 
 
38
 
#ifdef USE_SSE2
39
 
 
40
 
#if !defined(__amd64__) && !defined(__x86_64__)
41
 
pixman_bool_t pixman_have_sse2(void);
42
 
#else
43
 
#define pixman_have_sse2() TRUE
44
 
#endif
45
 
 
46
 
#else
47
 
#define pixman_have_sse2() FALSE
48
 
#endif
49
 
 
50
 
#ifdef USE_SSE2
51
 
 
52
 
void fbComposeSetupSSE2(void);
53
 
 
54
 
pixman_bool_t
55
 
pixmanFillsse2 (uint32_t *bits,
56
 
                 int stride,
57
 
                 int bpp,
58
 
                 int x,
59
 
                 int y,
60
 
                 int width,
61
 
                 int height,
62
 
                 uint32_t data);
63
 
 
64
 
pixman_bool_t
65
 
pixmanBltsse2 (uint32_t *src_bits,
66
 
                uint32_t *dst_bits,
67
 
                int src_stride,
68
 
                int dst_stride,
69
 
                int src_bpp,
70
 
                int dst_bpp,
71
 
                int src_x, int src_y,
72
 
                int dst_x, int dst_y,
73
 
                int width, int height);
74
 
 
75
 
void
76
 
fbCompositeSolid_nx8888sse2 (pixman_op_t op,
77
 
                            pixman_image_t * pSrc,
78
 
                            pixman_image_t * pMask,
79
 
                            pixman_image_t * pDst,
80
 
                            int16_t     xSrc,
81
 
                            int16_t     ySrc,
82
 
                            int16_t     xMask,
83
 
                            int16_t     yMask,
84
 
                            int16_t     xDst,
85
 
                            int16_t     yDst,
86
 
                            uint16_t    width,
87
 
                            uint16_t    height);
88
 
 
89
 
void
90
 
fbCompositeSolid_nx0565sse2 (pixman_op_t op,
91
 
                            pixman_image_t * pSrc,
92
 
                            pixman_image_t * pMask,
93
 
                            pixman_image_t * pDst,
94
 
                            int16_t     xSrc,
95
 
                            int16_t     ySrc,
96
 
                            int16_t     xMask,
97
 
                            int16_t     yMask,
98
 
                            int16_t     xDst,
99
 
                            int16_t     yDst,
100
 
                            uint16_t    width,
101
 
                            uint16_t    height);
102
 
 
103
 
void
104
 
fbCompositeSolidMask_nx8888x8888Csse2 (pixman_op_t op,
105
 
                                      pixman_image_t * pSrc,
106
 
                                      pixman_image_t * pMask,
107
 
                                      pixman_image_t * pDst,
108
 
                                      int16_t   xSrc,
109
 
                                      int16_t   ySrc,
110
 
                                      int16_t   xMask,
111
 
                                      int16_t   yMask,
112
 
                                      int16_t   xDst,
113
 
                                      int16_t   yDst,
114
 
                                      uint16_t  width,
115
 
                                      uint16_t  height);
116
 
 
117
 
void
118
 
fbCompositeSrc_8888x8x8888sse2 (pixman_op_t op,
119
 
                               pixman_image_t * pSrc,
120
 
                               pixman_image_t * pMask,
121
 
                               pixman_image_t * pDst,
122
 
                               int16_t  xSrc,
123
 
                               int16_t  ySrc,
124
 
                               int16_t      xMask,
125
 
                               int16_t      yMask,
126
 
                               int16_t      xDst,
127
 
                               int16_t      yDst,
128
 
                               uint16_t     width,
129
 
                               uint16_t     height);
130
 
 
131
 
void
132
 
fbCompositeSrc_x888xnx8888sse2 (pixman_op_t op,
133
 
                               pixman_image_t * pSrc,
134
 
                               pixman_image_t * pMask,
135
 
                               pixman_image_t * pDst,
136
 
                               int16_t  xSrc,
137
 
                               int16_t  ySrc,
138
 
                               int16_t      xMask,
139
 
                               int16_t      yMask,
140
 
                               int16_t      xDst,
141
 
                               int16_t      yDst,
142
 
                               uint16_t     width,
143
 
                               uint16_t     height);
144
 
 
145
 
void
146
 
fbCompositeSrc_8888x8888sse2 (pixman_op_t op,
147
 
                 pixman_image_t * pSrc,
148
 
                 pixman_image_t * pMask,
149
 
                 pixman_image_t * pDst,
150
 
                 int16_t    xSrc,
151
 
                 int16_t    ySrc,
152
 
                 int16_t      xMask,
153
 
                 int16_t      yMask,
154
 
                 int16_t      xDst,
155
 
                 int16_t      yDst,
156
 
                 uint16_t     width,
157
 
                 uint16_t     height);
158
 
 
159
 
void
160
 
fbCompositeSrc_8888x0565sse2 (pixman_op_t op,
161
 
                 pixman_image_t * pSrc,
162
 
                 pixman_image_t * pMask,
163
 
                 pixman_image_t * pDst,
164
 
                 int16_t      xSrc,
165
 
                 int16_t      ySrc,
166
 
                 int16_t      xMask,
167
 
                 int16_t      yMask,
168
 
                 int16_t      xDst,
169
 
                 int16_t      yDst,
170
 
                 uint16_t     width,
171
 
                 uint16_t     height);
172
 
 
173
 
void
174
 
fbCompositeSolidMask_nx8x8888sse2 (pixman_op_t op,
175
 
                                  pixman_image_t * pSrc,
176
 
                                  pixman_image_t * pMask,
177
 
                                  pixman_image_t * pDst,
178
 
                                  int16_t      xSrc,
179
 
                                  int16_t      ySrc,
180
 
                                  int16_t      xMask,
181
 
                                  int16_t      yMask,
182
 
                                  int16_t      xDst,
183
 
                                  int16_t      yDst,
184
 
                                  uint16_t     width,
185
 
                                  uint16_t     height);
186
 
 
187
 
void
188
 
fbCompositeSolidMaskSrc_nx8x8888sse2 (pixman_op_t op,
189
 
                                     pixman_image_t * pSrc,
190
 
                                     pixman_image_t * pMask,
191
 
                                     pixman_image_t * pDst,
192
 
                                     int16_t      xSrc,
193
 
                                     int16_t      ySrc,
194
 
                                     int16_t      xMask,
195
 
                                     int16_t      yMask,
196
 
                                     int16_t      xDst,
197
 
                                     int16_t      yDst,
198
 
                                     uint16_t     width,
199
 
                                     uint16_t     height);
200
 
 
201
 
void
202
 
fbCompositeSolidMask_nx8x0565sse2 (pixman_op_t op,
203
 
                                  pixman_image_t * pSrc,
204
 
                                  pixman_image_t * pMask,
205
 
                                  pixman_image_t * pDst,
206
 
                                  int16_t      xSrc,
207
 
                                  int16_t      ySrc,
208
 
                                  int16_t      xMask,
209
 
                                  int16_t      yMask,
210
 
                                  int16_t      xDst,
211
 
                                  int16_t      yDst,
212
 
                                  uint16_t     width,
213
 
                                  uint16_t     height);
214
 
 
215
 
void
216
 
fbCompositeSrc_8888RevNPx0565sse2 (pixman_op_t op,
217
 
                                  pixman_image_t * pSrc,
218
 
                                  pixman_image_t * pMask,
219
 
                                  pixman_image_t * pDst,
220
 
                                  int16_t      xSrc,
221
 
                                  int16_t      ySrc,
222
 
                                  int16_t      xMask,
223
 
                                  int16_t      yMask,
224
 
                                  int16_t      xDst,
225
 
                                  int16_t      yDst,
226
 
                                  uint16_t     width,
227
 
                                  uint16_t     height);
228
 
 
229
 
void
230
 
fbCompositeSrc_8888RevNPx8888sse2 (pixman_op_t op,
231
 
                                  pixman_image_t * pSrc,
232
 
                                  pixman_image_t * pMask,
233
 
                                  pixman_image_t * pDst,
234
 
                                  int16_t      xSrc,
235
 
                                  int16_t      ySrc,
236
 
                                  int16_t      xMask,
237
 
                                  int16_t      yMask,
238
 
                                  int16_t      xDst,
239
 
                                  int16_t      yDst,
240
 
                                  uint16_t     width,
241
 
                                  uint16_t     height);
242
 
 
243
 
void
244
 
fbCompositeSolidMask_nx8888x0565Csse2 (pixman_op_t op,
245
 
                                      pixman_image_t * pSrc,
246
 
                                      pixman_image_t * pMask,
247
 
                                      pixman_image_t * pDst,
248
 
                                      int16_t      xSrc,
249
 
                                      int16_t      ySrc,
250
 
                                      int16_t      xMask,
251
 
                                      int16_t      yMask,
252
 
                                      int16_t      xDst,
253
 
                                      int16_t      yDst,
254
 
                                      uint16_t     width,
255
 
                                      uint16_t     height);
256
 
 
257
 
void
258
 
fbCompositeIn_nx8x8sse2 (pixman_op_t op,
259
 
                        pixman_image_t * pSrc,
260
 
                        pixman_image_t * pMask,
261
 
                        pixman_image_t * pDst,
262
 
                        int16_t      xSrc,
263
 
                        int16_t      ySrc,
264
 
                        int16_t      xMask,
265
 
                        int16_t      yMask,
266
 
                        int16_t      xDst,
267
 
                        int16_t      yDst,
268
 
                        uint16_t     width,
269
 
                        uint16_t     height);
270
 
 
271
 
void
272
 
fbCompositeIn_8x8sse2 (pixman_op_t op,
273
 
                      pixman_image_t * pSrc,
274
 
                      pixman_image_t * pMask,
275
 
                      pixman_image_t * pDst,
276
 
                      int16_t      xSrc,
277
 
                      int16_t      ySrc,
278
 
                      int16_t      xMask,
279
 
                      int16_t      yMask,
280
 
                      int16_t      xDst,
281
 
                      int16_t      yDst,
282
 
                      uint16_t     width,
283
 
                      uint16_t     height);
284
 
 
285
 
void
286
 
fbCompositeSrcAdd_8888x8x8sse2 (pixman_op_t op,
287
 
                               pixman_image_t * pSrc,
288
 
                               pixman_image_t * pMask,
289
 
                               pixman_image_t * pDst,
290
 
                               int16_t      xSrc,
291
 
                               int16_t      ySrc,
292
 
                               int16_t      xMask,
293
 
                               int16_t      yMask,
294
 
                               int16_t      xDst,
295
 
                               int16_t      yDst,
296
 
                               uint16_t     width,
297
 
                               uint16_t     height);
298
 
 
299
 
 
300
 
void
301
 
fbCompositeSrcAdd_8000x8000sse2 (pixman_op_t op,
302
 
                pixman_image_t * pSrc,
303
 
                pixman_image_t * pMask,
304
 
                pixman_image_t * pDst,
305
 
                int16_t      xSrc,
306
 
                int16_t      ySrc,
307
 
                int16_t      xMask,
308
 
                int16_t      yMask,
309
 
                int16_t      xDst,
310
 
                int16_t      yDst,
311
 
                uint16_t     width,
312
 
                uint16_t     height);
313
 
 
314
 
void
315
 
fbCompositeSrcAdd_8888x8888sse2 (pixman_op_t    op,
316
 
                pixman_image_t *    pSrc,
317
 
                pixman_image_t *    pMask,
318
 
                pixman_image_t *     pDst,
319
 
                int16_t      xSrc,
320
 
                int16_t      ySrc,
321
 
                int16_t      xMask,
322
 
                int16_t      yMask,
323
 
                int16_t      xDst,
324
 
                int16_t      yDst,
325
 
                uint16_t     width,
326
 
                uint16_t     height);
327
 
 
328
 
void
329
 
fbCompositeCopyAreasse2 (pixman_op_t       op,
330
 
                        pixman_image_t *        pSrc,
331
 
                        pixman_image_t *        pMask,
332
 
                        pixman_image_t *        pDst,
333
 
                        int16_t         xSrc,
334
 
                        int16_t         ySrc,
335
 
                        int16_t         xMask,
336
 
                        int16_t         yMask,
337
 
                        int16_t         xDst,
338
 
                        int16_t         yDst,
339
 
                        uint16_t                width,
340
 
                        uint16_t                height);
341
 
 
342
 
void
343
 
fbCompositeOver_x888x8x8888sse2 (pixman_op_t      op,
344
 
                                pixman_image_t * pSrc,
345
 
                                pixman_image_t * pMask,
346
 
                                pixman_image_t * pDst,
347
 
                                int16_t      xSrc,
348
 
                                int16_t      ySrc,
349
 
                                int16_t      xMask,
350
 
                                int16_t      yMask,
351
 
                                int16_t      xDst,
352
 
                                int16_t      yDst,
353
 
                                uint16_t     width,
354
 
                                uint16_t     height);
355
 
 
356
 
#endif /* USE_SSE2 */
357
 
 
358
 
#endif /* _PIXMAN_SSE_H_ */