w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

pixman-mips-dspr2.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012
3  * MIPS Technologies, Inc., California.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the MIPS Technologies, Inc., nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  *
29  * Author: Nemanja Lukic (nemanja.lukic@rt-rk.com)
30  */
31 
32 #ifdef HAVE_CONFIG_H
33 #include <config.h>
34 #endif
35 
36 #include "pixman-private.h"
37 #include "pixman-mips-dspr2.h"
38 
39 PIXMAN_MIPS_BIND_FAST_PATH_SRC_DST (0, src_x888_8888,
41 PIXMAN_MIPS_BIND_FAST_PATH_SRC_DST (0, src_8888_0565,
43 PIXMAN_MIPS_BIND_FAST_PATH_SRC_DST (0, src_0565_8888,
50  uint8_t, 3, uint8_t, 3)
51 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
52 PIXMAN_MIPS_BIND_FAST_PATH_SRC_DST (0, src_0888_8888_rev,
53  uint8_t, 3, uint32_t, 1)
54 PIXMAN_MIPS_BIND_FAST_PATH_SRC_DST (0, src_0888_0565_rev,
55  uint8_t, 3, uint16_t, 1)
56 #endif
57 PIXMAN_MIPS_BIND_FAST_PATH_SRC_DST (0, src_pixbuf_8888,
59 PIXMAN_MIPS_BIND_FAST_PATH_SRC_DST (0, src_rpixbuf_8888,
61 PIXMAN_MIPS_BIND_FAST_PATH_SRC_DST (0, over_8888_8888,
63 PIXMAN_MIPS_BIND_FAST_PATH_SRC_DST (0, over_8888_0565,
66  uint8_t, 1, uint8_t, 1)
67 PIXMAN_MIPS_BIND_FAST_PATH_SRC_DST (0, add_8888_8888,
69 PIXMAN_MIPS_BIND_FAST_PATH_SRC_DST (0, out_reverse_8_0565,
70  uint8_t, 1, uint16_t, 1)
71 PIXMAN_MIPS_BIND_FAST_PATH_SRC_DST (0, out_reverse_8_8888,
72  uint8_t, 1, uint32_t, 1)
73 
75  uint8_t, 1, uint32_t, 1)
77  uint8_t, 1, uint8_t, 1)
83  uint8_t, 1, uint8_t, 1)
85  uint8_t, 1, uint32_t, 1)
87  uint8_t, 1, uint16_t, 1)
89  uint8_t, 1, uint8_t, 1)
91  uint8_t, 1, uint32_t, 1)
92 
101 
106 PIXMAN_MIPS_BIND_FAST_PATH_N_DST (SKIP_ZERO_SRC, over_reverse_n_8888,
110 
112  uint8_t, 1, uint8_t, 1)
115 PIXMAN_MIPS_BIND_FAST_PATH_SRC_MASK_DST (add_8888_8888_8888, uint32_t, 1,
125 PIXMAN_MIPS_BIND_FAST_PATH_SRC_MASK_DST (over_8888_8888_8888, uint32_t, 1,
127 
134 
147 
152 
165 
168  uint32_t * bits,
169  int stride,
170  int bpp,
171  int x,
172  int y,
173  int width,
174  int height,
175  uint32_t _xor)
176 {
177  uint8_t *byte_line;
178  uint32_t byte_width;
179  switch (bpp)
180  {
181  case 16:
182  stride = stride * (int) sizeof (uint32_t) / 2;
183  byte_line = (uint8_t *)(((uint16_t *)bits) + stride * y + x);
184  byte_width = width * 2;
185  stride *= 2;
186 
187  while (height--)
188  {
189  uint8_t *dst = byte_line;
190  byte_line += stride;
191  pixman_fill_buff16_mips (dst, byte_width, _xor & 0xffff);
192  }
193  return TRUE;
194  case 32:
195  stride = stride * (int) sizeof (uint32_t) / 4;
196  byte_line = (uint8_t *)(((uint32_t *)bits) + stride * y + x);
197  byte_width = width * 4;
198  stride *= 4;
199 
200  while (height--)
201  {
202  uint8_t *dst = byte_line;
203  byte_line += stride;
204  pixman_fill_buff32_mips (dst, byte_width, _xor);
205  }
206  return TRUE;
207  default:
208  return FALSE;
209  }
210 }
211 
212 static pixman_bool_t
214  uint32_t * src_bits,
215  uint32_t * dst_bits,
216  int src_stride,
217  int dst_stride,
218  int src_bpp,
219  int dst_bpp,
220  int src_x,
221  int src_y,
222  int dest_x,
223  int dest_y,
224  int width,
225  int height)
226 {
227  if (src_bpp != dst_bpp)
228  return FALSE;
229 
230  uint8_t *src_bytes;
231  uint8_t *dst_bytes;
232  uint32_t byte_width;
233 
234  switch (src_bpp)
235  {
236  case 16:
237  src_stride = src_stride * (int) sizeof (uint32_t) / 2;
238  dst_stride = dst_stride * (int) sizeof (uint32_t) / 2;
239  src_bytes =(uint8_t *)(((uint16_t *)src_bits)
240  + src_stride * (src_y) + (src_x));
241  dst_bytes = (uint8_t *)(((uint16_t *)dst_bits)
242  + dst_stride * (dest_y) + (dest_x));
243  byte_width = width * 2;
244  src_stride *= 2;
245  dst_stride *= 2;
246 
247  while (height--)
248  {
249  uint8_t *src = src_bytes;
250  uint8_t *dst = dst_bytes;
251  src_bytes += src_stride;
252  dst_bytes += dst_stride;
253  pixman_mips_fast_memcpy (dst, src, byte_width);
254  }
255  return TRUE;
256  case 32:
257  src_stride = src_stride * (int) sizeof (uint32_t) / 4;
258  dst_stride = dst_stride * (int) sizeof (uint32_t) / 4;
259  src_bytes = (uint8_t *)(((uint32_t *)src_bits)
260  + src_stride * (src_y) + (src_x));
261  dst_bytes = (uint8_t *)(((uint32_t *)dst_bits)
262  + dst_stride * (dest_y) + (dest_x));
263  byte_width = width * 4;
264  src_stride *= 4;
265  dst_stride *= 4;
266 
267  while (height--)
268  {
269  uint8_t *src = src_bytes;
270  uint8_t *dst = dst_bytes;
271  src_bytes += src_stride;
272  dst_bytes += dst_stride;
273  pixman_mips_fast_memcpy (dst, src, byte_width);
274  }
275  return TRUE;
276  default:
277  return FALSE;
278  }
279 }
280 
282 {
283  PIXMAN_STD_FAST_PATH (SRC, r5g6b5, null, r5g6b5, mips_composite_src_0565_0565),
284  PIXMAN_STD_FAST_PATH (SRC, b5g6r5, null, b5g6r5, mips_composite_src_0565_0565),
285  PIXMAN_STD_FAST_PATH (SRC, a8r8g8b8, null, r5g6b5, mips_composite_src_8888_0565),
286  PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, r5g6b5, mips_composite_src_8888_0565),
287  PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, b5g6r5, mips_composite_src_8888_0565),
288  PIXMAN_STD_FAST_PATH (SRC, x8b8g8r8, null, b5g6r5, mips_composite_src_8888_0565),
289  PIXMAN_STD_FAST_PATH (SRC, r5g6b5, null, a8r8g8b8, mips_composite_src_0565_8888),
290  PIXMAN_STD_FAST_PATH (SRC, r5g6b5, null, x8r8g8b8, mips_composite_src_0565_8888),
291  PIXMAN_STD_FAST_PATH (SRC, b5g6r5, null, a8b8g8r8, mips_composite_src_0565_8888),
292  PIXMAN_STD_FAST_PATH (SRC, b5g6r5, null, x8b8g8r8, mips_composite_src_0565_8888),
293  PIXMAN_STD_FAST_PATH (SRC, a8r8g8b8, null, x8r8g8b8, mips_composite_src_8888_8888),
294  PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, x8r8g8b8, mips_composite_src_8888_8888),
295  PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, x8b8g8r8, mips_composite_src_8888_8888),
296  PIXMAN_STD_FAST_PATH (SRC, x8b8g8r8, null, x8b8g8r8, mips_composite_src_8888_8888),
297  PIXMAN_STD_FAST_PATH (SRC, a8r8g8b8, null, a8r8g8b8, mips_composite_src_8888_8888),
298  PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, a8b8g8r8, mips_composite_src_8888_8888),
299  PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, a8r8g8b8, mips_composite_src_x888_8888),
300  PIXMAN_STD_FAST_PATH (SRC, x8b8g8r8, null, a8b8g8r8, mips_composite_src_x888_8888),
301  PIXMAN_STD_FAST_PATH (SRC, r8g8b8, null, r8g8b8, mips_composite_src_0888_0888),
302 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
303  PIXMAN_STD_FAST_PATH (SRC, b8g8r8, null, x8r8g8b8, mips_composite_src_0888_8888_rev),
304  PIXMAN_STD_FAST_PATH (SRC, b8g8r8, null, r5g6b5, mips_composite_src_0888_0565_rev),
305 #endif
306  PIXMAN_STD_FAST_PATH (SRC, pixbuf, pixbuf, a8r8g8b8, mips_composite_src_pixbuf_8888),
307  PIXMAN_STD_FAST_PATH (SRC, pixbuf, pixbuf, a8b8g8r8, mips_composite_src_rpixbuf_8888),
308  PIXMAN_STD_FAST_PATH (SRC, rpixbuf, rpixbuf, a8r8g8b8, mips_composite_src_rpixbuf_8888),
309  PIXMAN_STD_FAST_PATH (SRC, rpixbuf, rpixbuf, a8b8g8r8, mips_composite_src_pixbuf_8888),
310  PIXMAN_STD_FAST_PATH (SRC, solid, a8, a8r8g8b8, mips_composite_src_n_8_8888),
311  PIXMAN_STD_FAST_PATH (SRC, solid, a8, x8r8g8b8, mips_composite_src_n_8_8888),
312  PIXMAN_STD_FAST_PATH (SRC, solid, a8, a8b8g8r8, mips_composite_src_n_8_8888),
313  PIXMAN_STD_FAST_PATH (SRC, solid, a8, x8b8g8r8, mips_composite_src_n_8_8888),
315 
316  PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8r8g8b8, a8r8g8b8, mips_composite_over_n_8888_8888_ca),
317  PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8r8g8b8, x8r8g8b8, mips_composite_over_n_8888_8888_ca),
318  PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8b8g8r8, a8b8g8r8, mips_composite_over_n_8888_8888_ca),
319  PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8b8g8r8, x8b8g8r8, mips_composite_over_n_8888_8888_ca),
320  PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8r8g8b8, r5g6b5, mips_composite_over_n_8888_0565_ca),
321  PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8b8g8r8, b5g6r5, mips_composite_over_n_8888_0565_ca),
322  PIXMAN_STD_FAST_PATH (OVER, solid, a8, a8, mips_composite_over_n_8_8),
323  PIXMAN_STD_FAST_PATH (OVER, solid, a8, a8r8g8b8, mips_composite_over_n_8_8888),
324  PIXMAN_STD_FAST_PATH (OVER, solid, a8, x8r8g8b8, mips_composite_over_n_8_8888),
325  PIXMAN_STD_FAST_PATH (OVER, solid, a8, a8b8g8r8, mips_composite_over_n_8_8888),
326  PIXMAN_STD_FAST_PATH (OVER, solid, a8, x8b8g8r8, mips_composite_over_n_8_8888),
327  PIXMAN_STD_FAST_PATH (OVER, solid, a8, r5g6b5, mips_composite_over_n_8_0565),
328  PIXMAN_STD_FAST_PATH (OVER, solid, a8, b5g6r5, mips_composite_over_n_8_0565),
329  PIXMAN_STD_FAST_PATH (OVER, solid, null, r5g6b5, mips_composite_over_n_0565),
330  PIXMAN_STD_FAST_PATH (OVER, solid, null, a8r8g8b8, mips_composite_over_n_8888),
331  PIXMAN_STD_FAST_PATH (OVER, solid, null, x8r8g8b8, mips_composite_over_n_8888),
332  PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, solid, a8r8g8b8, mips_composite_over_8888_n_8888),
333  PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, solid, x8r8g8b8, mips_composite_over_8888_n_8888),
334  PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, solid, r5g6b5, mips_composite_over_8888_n_0565),
335  PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, solid, b5g6r5, mips_composite_over_8888_n_0565),
336  PIXMAN_STD_FAST_PATH (OVER, r5g6b5, solid, r5g6b5, mips_composite_over_0565_n_0565),
337  PIXMAN_STD_FAST_PATH (OVER, b5g6r5, solid, b5g6r5, mips_composite_over_0565_n_0565),
338  PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, a8, a8r8g8b8, mips_composite_over_8888_8_8888),
339  PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, a8, x8r8g8b8, mips_composite_over_8888_8_8888),
340  PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, a8, a8b8g8r8, mips_composite_over_8888_8_8888),
341  PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, a8, x8b8g8r8, mips_composite_over_8888_8_8888),
342  PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, a8, r5g6b5, mips_composite_over_8888_8_0565),
343  PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, a8, b5g6r5, mips_composite_over_8888_8_0565),
344  PIXMAN_STD_FAST_PATH (OVER, r5g6b5, a8, r5g6b5, mips_composite_over_0565_8_0565),
345  PIXMAN_STD_FAST_PATH (OVER, b5g6r5, a8, b5g6r5, mips_composite_over_0565_8_0565),
346  PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, a8r8g8b8, a8r8g8b8, mips_composite_over_8888_8888_8888),
347  PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, a8r8g8b8, mips_composite_over_8888_8888),
348  PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, x8r8g8b8, mips_composite_over_8888_8888),
349  PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, a8b8g8r8, mips_composite_over_8888_8888),
350  PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, x8b8g8r8, mips_composite_over_8888_8888),
351  PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, r5g6b5, mips_composite_over_8888_0565),
352  PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, b5g6r5, mips_composite_over_8888_0565),
354  PIXMAN_STD_FAST_PATH (ADD, solid, a8, a8r8g8b8, mips_composite_add_n_8_8888),
355  PIXMAN_STD_FAST_PATH (ADD, solid, a8, a8b8g8r8, mips_composite_add_n_8_8888),
359  PIXMAN_STD_FAST_PATH (ADD, a8r8g8b8, a8, a8r8g8b8, mips_composite_add_8888_8_8888),
360  PIXMAN_STD_FAST_PATH (ADD, a8b8g8r8, a8, a8b8g8r8, mips_composite_add_8888_8_8888),
361  PIXMAN_STD_FAST_PATH (ADD, a8r8g8b8, a8r8g8b8, a8r8g8b8, mips_composite_add_8888_8888_8888),
362  PIXMAN_STD_FAST_PATH (ADD, a8r8g8b8, solid, a8r8g8b8, mips_composite_add_8888_n_8888),
363  PIXMAN_STD_FAST_PATH (ADD, a8b8g8r8, solid, a8b8g8r8, mips_composite_add_8888_n_8888),
365  PIXMAN_STD_FAST_PATH (ADD, a8r8g8b8, null, a8r8g8b8, mips_composite_add_8888_8888),
366  PIXMAN_STD_FAST_PATH (ADD, a8b8g8r8, null, a8b8g8r8, mips_composite_add_8888_8888),
367  PIXMAN_STD_FAST_PATH (OUT_REVERSE, a8, null, r5g6b5, mips_composite_out_reverse_8_0565),
368  PIXMAN_STD_FAST_PATH (OUT_REVERSE, a8, null, b5g6r5, mips_composite_out_reverse_8_0565),
369  PIXMAN_STD_FAST_PATH (OUT_REVERSE, a8, null, a8r8g8b8, mips_composite_out_reverse_8_8888),
370  PIXMAN_STD_FAST_PATH (OUT_REVERSE, a8, null, a8b8g8r8, mips_composite_out_reverse_8_8888),
371  PIXMAN_STD_FAST_PATH (OVER_REVERSE, solid, null, a8r8g8b8, mips_composite_over_reverse_n_8888),
372  PIXMAN_STD_FAST_PATH (OVER_REVERSE, solid, null, a8b8g8r8, mips_composite_over_reverse_n_8888),
373  PIXMAN_STD_FAST_PATH (IN, solid, null, a8, mips_composite_in_n_8),
374 
375  PIXMAN_MIPS_SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, a8r8g8b8, mips_8888_8888),
376  PIXMAN_MIPS_SIMPLE_NEAREST_FAST_PATH (OVER, a8b8g8r8, a8b8g8r8, mips_8888_8888),
377  PIXMAN_MIPS_SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, x8r8g8b8, mips_8888_8888),
378  PIXMAN_MIPS_SIMPLE_NEAREST_FAST_PATH (OVER, a8b8g8r8, x8b8g8r8, mips_8888_8888),
379 
380  PIXMAN_MIPS_SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, r5g6b5, mips_8888_0565),
381  PIXMAN_MIPS_SIMPLE_NEAREST_FAST_PATH (OVER, a8b8g8r8, b5g6r5, mips_8888_0565),
382 
383  PIXMAN_MIPS_SIMPLE_NEAREST_FAST_PATH (SRC, b5g6r5, x8b8g8r8, mips_0565_8888),
384  PIXMAN_MIPS_SIMPLE_NEAREST_FAST_PATH (SRC, r5g6b5, x8r8g8b8, mips_0565_8888),
385  /* Note: NONE repeat is not supported yet */
386  SIMPLE_NEAREST_FAST_PATH_COVER (SRC, r5g6b5, a8r8g8b8, mips_0565_8888),
387  SIMPLE_NEAREST_FAST_PATH_COVER (SRC, b5g6r5, a8b8g8r8, mips_0565_8888),
388  SIMPLE_NEAREST_FAST_PATH_PAD (SRC, r5g6b5, a8r8g8b8, mips_0565_8888),
389  SIMPLE_NEAREST_FAST_PATH_PAD (SRC, b5g6r5, a8b8g8r8, mips_0565_8888),
390 
391  SIMPLE_NEAREST_A8_MASK_FAST_PATH (OVER, a8r8g8b8, r5g6b5, mips_8888_8_0565),
392  SIMPLE_NEAREST_A8_MASK_FAST_PATH (OVER, a8b8g8r8, b5g6r5, mips_8888_8_0565),
393 
394  SIMPLE_NEAREST_A8_MASK_FAST_PATH (OVER, r5g6b5, r5g6b5, mips_0565_8_0565),
395  SIMPLE_NEAREST_A8_MASK_FAST_PATH (OVER, b5g6r5, b5g6r5, mips_0565_8_0565),
396 
397  SIMPLE_BILINEAR_FAST_PATH (SRC, a8r8g8b8, a8r8g8b8, mips_8888_8888),
398  SIMPLE_BILINEAR_FAST_PATH (SRC, a8r8g8b8, x8r8g8b8, mips_8888_8888),
399  SIMPLE_BILINEAR_FAST_PATH (SRC, x8r8g8b8, x8r8g8b8, mips_8888_8888),
400 
401  SIMPLE_BILINEAR_FAST_PATH (SRC, a8r8g8b8, r5g6b5, mips_8888_0565),
402  SIMPLE_BILINEAR_FAST_PATH (SRC, x8r8g8b8, r5g6b5, mips_8888_0565),
403 
404  SIMPLE_BILINEAR_FAST_PATH (SRC, r5g6b5, x8r8g8b8, mips_0565_8888),
405  SIMPLE_BILINEAR_FAST_PATH (SRC, r5g6b5, r5g6b5, mips_0565_0565),
406 
407  SIMPLE_BILINEAR_FAST_PATH (OVER, a8r8g8b8, a8r8g8b8, mips_8888_8888),
408  SIMPLE_BILINEAR_FAST_PATH (OVER, a8r8g8b8, x8r8g8b8, mips_8888_8888),
409 
410  SIMPLE_BILINEAR_FAST_PATH (ADD, a8r8g8b8, a8r8g8b8, mips_8888_8888),
411  SIMPLE_BILINEAR_FAST_PATH (ADD, a8r8g8b8, x8r8g8b8, mips_8888_8888),
412 
413  SIMPLE_BILINEAR_A8_MASK_FAST_PATH (SRC, a8r8g8b8, a8r8g8b8, mips_8888_8_8888),
414  SIMPLE_BILINEAR_A8_MASK_FAST_PATH (SRC, a8r8g8b8, x8r8g8b8, mips_8888_8_8888),
415  SIMPLE_BILINEAR_A8_MASK_FAST_PATH (SRC, x8r8g8b8, x8r8g8b8, mips_8888_8_8888),
416 
417  SIMPLE_BILINEAR_A8_MASK_FAST_PATH (SRC, a8r8g8b8, r5g6b5, mips_8888_8_0565),
418  SIMPLE_BILINEAR_A8_MASK_FAST_PATH (SRC, x8r8g8b8, r5g6b5, mips_8888_8_0565),
419 
420  SIMPLE_BILINEAR_A8_MASK_FAST_PATH (SRC, r5g6b5, x8r8g8b8, mips_0565_8_x888),
421  SIMPLE_BILINEAR_A8_MASK_FAST_PATH (SRC, r5g6b5, r5g6b5, mips_0565_8_0565),
422 
423  SIMPLE_BILINEAR_A8_MASK_FAST_PATH (OVER, a8r8g8b8, a8r8g8b8, mips_8888_8_8888),
424  SIMPLE_BILINEAR_A8_MASK_FAST_PATH (OVER, a8r8g8b8, x8r8g8b8, mips_8888_8_8888),
425 
426  SIMPLE_BILINEAR_A8_MASK_FAST_PATH (ADD, a8r8g8b8, a8r8g8b8, mips_8888_8_8888),
427  SIMPLE_BILINEAR_A8_MASK_FAST_PATH (ADD, a8r8g8b8, x8r8g8b8, mips_8888_8_8888),
428  { PIXMAN_OP_NONE },
429 };
430 
431 static void
433  pixman_op_t op,
434  uint32_t * dest,
435  const uint32_t * src,
436  const uint32_t * mask,
437  int width)
438 {
439  if (mask)
441  dest, (uint32_t *)src, (uint32_t *)mask, width);
442  else
444  dest, (uint32_t *)src, width);
445 }
446 
449 {
452 
454 
455  imp->blt = mips_dspr2_blt;
456  imp->fill = mips_dspr2_fill;
457 
458  return imp;
459 }
#define width(a)
Definition: aptex-macros.h:198
#define height(a)
Definition: aptex-macros.h:200
#define static
static struct brw_reg stride(struct brw_reg reg, uint32_t vstride, uint32_t width, uint32_t hstride)
@ FALSE
Definition: dd.h:101
@ TRUE
Definition: dd.h:102
#define bits
Definition: infblock.c:15
kerning y
Definition: ttdriver.c:212
unsigned short uint16_t
Definition: stdint.h:79
unsigned int uint32_t
Definition: stdint.h:80
unsigned char uint8_t
Definition: stdint.h:78
#define dest
float x
Definition: cordic.py:15
#define SKIP_ZERO_SRC
#define SKIP_ZERO_MASK
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld src_bpp[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld SRC[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld_src SRC pixld MASK if DST_R else pixld DST_R endif if src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head if pixblock_size cache_preload_simple endif process_pixblock_tail pixinterleave dst_w_basereg irp if pixblock_size chunk_size tst beq if DST_W else pixst DST_W else mov ORIG_W endif add lsl if
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp
pixman_implementation_t * _pixman_implementation_create(pixman_implementation_t *fallback, const pixman_fast_path_t *fast_paths)
#define SIMPLE_BILINEAR_FAST_PATH(op, s, d, func)
#define SIMPLE_NEAREST_FAST_PATH_COVER(op, s, d, func)
#define SIMPLE_NEAREST_A8_MASK_FAST_PATH(op, s, d, func)
#define SIMPLE_NEAREST_FAST_PATH_PAD(op, s, d, func)
#define SIMPLE_BILINEAR_A8_MASK_FAST_PATH(op, s, d, func)
static void mips_composite_over_reverse_n_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_n_8_0565(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_src_0888_0888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_add_8888_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static const pixman_fast_path_t mips_dspr2_fast_paths[]
static void mips_composite_src_n_8_8(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_8888_n_0565(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_add_8888_8888_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_8888_8_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
void pixman_composite_over_8888_8888_asm_mips(uint32_t *dst, uint32_t *src, int32_t w)
static void mips_composite_over_8888_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_dspr2_combine_over_u(pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
static void mips_composite_src_pixbuf_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_src_8888_0565(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_n_8_8(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_src_8888_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static pixman_bool_t mips_dspr2_blt(pixman_implementation_t *imp, uint32_t *src_bits, uint32_t *dst_bits, int src_stride, int dst_stride, int src_bpp, int dst_bpp, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
static void mips_composite_add_0565_8_0565(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_out_reverse_8_0565(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_8888_8_0565(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_0565_n_0565(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_in_n_8(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_src_0565_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_src_0565_0565(pixman_implementation_t *imp, pixman_composite_info_t *info)
void pixman_composite_over_8888_8888_8888_asm_mips(uint32_t *dst, uint32_t *src, uint32_t *mask, int32_t w)
static void mips_composite_over_0565_8_0565(pixman_implementation_t *imp, pixman_composite_info_t *info)
pixman_implementation_t * _pixman_implementation_create_mips_dspr2(pixman_implementation_t *fallback)
static void mips_composite_src_n_8_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_n_8888_8888_ca(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_add_8888_n_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_src_rpixbuf_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_n_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_out_reverse_8_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_8888_0565(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_add_8888_8_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_add_8_8(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_src_x888_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_add_n_8_8(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_8888_n_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_n_0565(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_8888_8888_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_add_n_8_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_n_8888_0565_ca(pixman_implementation_t *imp, pixman_composite_info_t *info)
static pixman_bool_t mips_dspr2_fill(pixman_implementation_t *imp, uint32_t *bits, int stride, int bpp, int x, int y, int width, int height, uint32_t _xor)
static void mips_composite_add_8_8_8(pixman_implementation_t *imp, pixman_composite_info_t *info)
static void mips_composite_over_n_8_8888(pixman_implementation_t *imp, pixman_composite_info_t *info)
#define PIXMAN_MIPS_BIND_SCALED_BILINEAR_SRC_DST(flags, name, op, src_type, dst_type)
#define PIXMAN_MIPS_BIND_FAST_PATH_SRC_DST(flags, name, src_type, src_cnt, dst_type, dst_cnt)
#define PIXMAN_MIPS_BIND_SCALED_BILINEAR_SRC_A8_DST(flags, name, op, src_type, dst_type)
#define PIXMAN_MIPS_BIND_FAST_PATH_SRC_N_DST(flags, name, src_type, src_cnt, dst_type, dst_cnt)
void pixman_fill_buff32_mips(void *dst, uint32_t n_bytes, uint32_t value)
void pixman_mips_fast_memcpy(void *dst, void *src, uint32_t n_bytes)
#define PIXMAN_MIPS_BIND_FAST_PATH_N_MASK_DST(flags, name, mask_type, mask_cnt, dst_type, dst_cnt)
#define PIXMAN_MIPS_SIMPLE_NEAREST_FAST_PATH(op, s, d, func)
#define DO_FAST_MEMCPY
#define PIXMAN_MIPS_BIND_SCALED_NEAREST_SRC_A8_DST(flags, name, op, src_type, dst_type)
#define PIXMAN_MIPS_BIND_FAST_PATH_N_DST(flags, name, dst_type, dst_cnt)
#define PIXMAN_MIPS_BIND_FAST_PATH_SRC_MASK_DST(name, src_type, src_cnt, mask_type, mask_cnt, dst_type, dst_cnt)
#define PIXMAN_MIPS_BIND_SCALED_NEAREST_SRC_DST(name, op, src_type, dst_type)
void pixman_fill_buff16_mips(void *dst, uint32_t n_bytes, uint16_t value)
#define PIXMAN_STD_FAST_PATH_CA(op, src, mask, dest, func)
#define PIXMAN_STD_FAST_PATH(op, src, mask, dest, func)
int pixman_bool_t
Definition: pixman.h:113
pixman_op_t
Definition: pixman.h:389
@ PIXMAN_OP_OVER
Definition: pixman.h:393
#define mask(n)
Definition: lbitlib.c:93
@ ADD
Definition: strexpr.c:18
Definition: namelist.c:170
Definition: sh.h:1226
pixman_combine_32_func_t combine_32[PIXMAN_N_OPERATORS]
pixman_blt_func_t blt
pixman_fill_func_t fill
return() int(((double) *(font_tbl[cur_fnt].wtbl+(int)(*(font_tbl[cur_fnt].char_wi+(int)(ch - font_tbl[cur_fnt].char_f)% 256)))/(double)(1L<< 20)) *(double) font_tbl[cur_fnt].scale)
static UBool fallback(char *loc)
Definition: ucurr.cpp:604