1 /****************************************************************************
2 **
3 ** Copyright (C) 2013 Imagination Technologies Limited, www.imgtec.com
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 3 requirements
23 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24 **
25 ** GNU General Public License Usage
26 ** Alternatively, this file may be used under the terms of the GNU
27 ** General Public License version 2.0 or (at your option) the GNU General
28 ** Public license version 3 or any later version approved by the KDE Free
29 ** Qt Foundation. The licenses are as published by the Free Software
30 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31 ** included in the packaging of this file. Please review the following
32 ** information to ensure the GNU General Public License requirements will
33 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34 ** https://www.gnu.org/licenses/gpl-3.0.html.
35 **
36 ** $QT_END_LICENSE$
37 **
38 ****************************************************************************/
39 
40 #ifndef QDRAWHELPER_MIPS_DSP_P_H
41 #define QDRAWHELPER_MIPS_DSP_P_H
42 
43 //
44 //  W A R N I N G
45 //  -------------
46 //
47 // This file is not part of the Qt API.  It exists purely as an
48 // implementation detail.  This header file may change from version to
49 // version without notice, or even be removed.
50 //
51 // We mean it.
52 //
53 
54 #include <private/qdrawhelper_p.h>
55 
56 QT_BEGIN_NAMESPACE
57 
58 #if defined(QT_COMPILER_SUPPORTS_MIPS_DSP)
59 
60 extern "C" void qt_memfill32_asm_mips_dsp(quint32 *dest, quint32 value, qsizetype count);
61 
62 extern "C" void comp_func_SourceOver_asm_mips_dsp(uint *dest, const uint *src, int length, uint const_alpha);
63 
64 extern "C" void comp_func_solid_DestinationOver_dsp_asm_x2(uint *dest, int length, uint color);
65 
66 extern "C" void comp_func_solid_Source_dsp_asm_x2(uint *dest, int length, uint color, uint const_alpha);
67 
68 extern "C" void comp_func_DestinationOver_dsp_asm_x2(uint *dest, const uint *src, int length, uint const_alpha);
69 
70 extern "C" void comp_func_solid_SourceIn_dsp_asm_x2(uint *dest, int length, uint color, uint const_alpha);
71 
72 extern "C" void comp_func_SourceIn_dsp_asm_x2(uint *dest, const uint *src, int length, uint const_alpha);
73 
74 extern "C" void comp_func_solid_DestinationIn_dsp_asm_x2(uint *dest, int length, uint a);
75 
76 extern "C" void comp_func_DestinationIn_dsp_asm_x2(uint *dest, const uint *src, int length, uint const_alpha);
77 
78 extern "C" void comp_func_DestinationOut_dsp_asm_x2(uint *dest, const uint *src, int length, uint const_alpha);
79 
80 extern "C" void comp_func_solid_SourceAtop_dsp_asm_x2(uint *dest, int length, uint color, uint const_alpha);
81 
82 extern "C" void comp_func_SourceAtop_dsp_asm_x2(uint *dest, const uint *src, int length, uint const_alpha);
83 
84 extern "C" void comp_func_solid_DestinationAtop_dsp_asm_x2(uint *dest, int length, uint color, uint const_alpha);
85 
86 extern "C" void comp_func_DestinationAtop_dsp_asm_x2(uint *dest, const uint *src, int length, uint const_alpha);
87 
88 extern "C" void comp_func_solid_XOR_dsp_asm_x2(uint *dest, int length, uint color, uint const_alpha);
89 
90 extern "C" void comp_func_XOR_dsp_asm_x2(uint *dest, const uint *src, int length, uint const_alpha);
91 
92 extern "C" void comp_func_solid_SourceOut_dsp_asm_x2(uint *dest, int length, uint color, uint const_alpha);
93 
94 extern "C" void comp_func_SourceOut_dsp_asm_x2(uint *dest, const uint *src, int length, uint const_alpha);
95 
96 extern "C" void comp_func_Source_dsp_asm_x2(uint *dest, const uint *src, int length, uint const_alpha);
97 
98 extern "C" void qt_blend_argb32_on_argb32_mips_dsp_asm_x2(uint *dest, const uint *src, int length, uint const_alpha);
99 
100 extern "C" void qt_blend_argb32_on_argb32_const_alpha_256_mips_dsp_asm(uint *dest, const uint *src, int length);
101 
102 extern "C" void qt_blend_rgb16_on_rgb16_const_alpha_256_mips_dsp_asm(quint16 *dest, const quint16 *src, int length);
103 
104 extern "C" void qt_blend_rgb16_on_rgb16_mips_dsp_asm(quint16 *dest, const quint16 *src, int length, uint const_alpha);
105 
106 extern "C" uint * destfetchARGB32_asm_mips_dsp(uint *buffer, const uint *data, int length);
107 
108 extern "C" uint * qt_destStoreARGB32_asm_mips_dsp(uint *buffer, const uint *data, int length);
109 
110 extern "C" uint * fetchUntransformed_888_asm_mips_dsp(uint *buffer, const uchar *line, int length);
111 
112 extern "C" uint * fetchUntransformed_444_asm_mips_dsp(uint *buffer, const uchar *line, int length);
113 
114 extern "C" uint * fetchUntransformed_argb8565_premultiplied_asm_mips_dsp(uint *buffer, const uchar *line, int length);
115 
116 void qt_blend_argb32_on_argb32_mips_dsp(uchar *destPixels, int dbpl,
117                                       const uchar *srcPixels, int sbpl,
118                                       int w, int h,
119                                       int const_alpha);
120 
121 void qt_blend_rgb32_on_rgb32_mips_dsp(uchar *destPixels, int dbpl,
122                                       const uchar *srcPixels, int sbpl,
123                                       int w, int h,
124                                       int const_alpha);
125 
126 void qt_blend_rgb16_on_rgb16_mips_dsp(uchar *destPixels, int dbpl,
127                                       const uchar *srcPixels, int sbpl,
128                                       int w, int h,
129                                       int const_alpha);
130 
131 void comp_func_Source_mips_dsp(uint *dest, const uint *src, int length, uint const_alpha);
132 
133 uint * QT_FASTCALL qt_destFetchARGB32_mips_dsp(uint *buffer,
134                                           QRasterBuffer *rasterBuffer,
135                                           int x, int y, int length);
136 
137 void QT_FASTCALL qt_destStoreARGB32_mips_dsp(QRasterBuffer *rasterBuffer, int x, int y,
138                                              const uint *buffer, int length);
139 
140 void QT_FASTCALL comp_func_solid_Source_mips_dsp(uint *dest, int length, uint color, uint const_alpha);
141 
142 void QT_FASTCALL comp_func_solid_SourceOver_mips_dsp(uint *dest, int length, uint color, uint const_alpha);
143 
144 void QT_FASTCALL comp_func_solid_DestinationOver_mips_dsp(uint *dest, int length, uint color, uint const_alpha);
145 
146 void QT_FASTCALL comp_func_solid_SourceOver_mips_dsp(uint *dest, int length, uint color, uint const_alpha);
147 
148 void QT_FASTCALL comp_func_solid_DestinationOver_mips_dsp(uint *dest, int length, uint color, uint const_alpha);
149 
150 void QT_FASTCALL comp_func_DestinationOver_mips_dsp(uint *dest, const uint *src, int length, uint const_alpha);
151 
152 void QT_FASTCALL comp_func_solid_SourceIn_mips_dsp(uint *dest, int length, uint color, uint const_alpha);
153 
154 void QT_FASTCALL comp_func_SourceIn_mips_dsp(uint *dest, const uint *src, int length, uint const_alpha);
155 
156 void QT_FASTCALL comp_func_solid_DestinationIn_mips_dsp(uint *dest, int length, uint color, uint const_alpha);
157 
158 void QT_FASTCALL comp_func_DestinationIn_mips_dsp(uint *dest, const uint *src, int length, uint const_alpha);
159 
160 void QT_FASTCALL comp_func_solid_DestinationOut_mips_dsp(uint *dest, int length, uint color, uint const_alpha);
161 
162 void QT_FASTCALL comp_func_DestinationOut_mips_dsp(uint *dest, const uint *src, int length, uint const_alpha);
163 
164 void QT_FASTCALL comp_func_solid_SourceAtop_mips_dsp(uint *dest, int length, uint color, uint const_alpha);
165 
166 void QT_FASTCALL comp_func_SourceAtop_mips_dsp(uint *dest, const uint *src, int length, uint const_alpha);
167 
168 void QT_FASTCALL comp_func_solid_DestinationAtop_mips_dsp(uint *dest, int length, uint color, uint const_alpha);
169 
170 void QT_FASTCALL comp_func_DestinationAtop_mips_dsp(uint *dest, const uint *src, int length, uint const_alpha);
171 
172 void QT_FASTCALL comp_func_solid_XOR_mips_dsp(uint *dest, int length, uint color, uint const_alpha);
173 
174 void QT_FASTCALL comp_func_solid_SourceOut_mips_dsp(uint *dest, int length, uint color, uint const_alpha);
175 
176 void QT_FASTCALL comp_func_SourceOut_mips_dsp(uint *dest, const uint *src, int length, uint const_alpha);
177 
178 void QT_FASTCALL comp_func_XOR_mips_dsp(uint *dest, const uint *src, int length, uint const_alpha);
179 
180 const uint * QT_FASTCALL qt_fetchUntransformed_888_mips_dsp (uint *buffer,
181                                                              const Operator *,
182                                                              const QSpanData *data,
183                                                              int y, int x, int length);
184 
185 const uint * QT_FASTCALL qt_fetchUntransformed_444_mips_dsp (uint *buffer,
186                                                              const Operator *,
187                                                              const QSpanData *data,
188                                                              int y, int x, int length);
189 
190 const uint * QT_FASTCALL qt_fetchUntransformed_argb8565_premultiplied_mips_dsp (uint *buffer,
191                                                                                 const Operator *,
192                                                                                 const QSpanData *data,
193                                                                                 int y, int x, int length);
194 
195 
196 
197 #if defined(__MIPS_DSPR2__)
198 
199 extern "C" void qt_blend_rgb16_on_rgb16_mips_dspr2_asm(quint16 *dest, const quint16 *src, int length, uint const_alpha);
200 
201 void qt_blend_rgb16_on_rgb16_mips_dspr2(uchar *destPixels, int dbpl,
202                                         const uchar *srcPixels, int sbpl,
203                                         int w, int h,
204                                         int const_alpha);
205 
206 const uint *QT_FASTCALL qt_fetchUntransformedRGB16_mips_dspr2(uint *buffer, const Operator *,
207                                                               const QSpanData *data, int y, int x,
208                                                               int length);
209 #endif // defined(__MIPS_DSPR2__)
210 
211 #endif // QT_COMPILER_SUPPORTS_MIPS_DSP
212 
213 QT_END_NAMESPACE
214 
215 #endif // QDRAWHELPER_MIPS_DSP_P_H
216