Arm-2D  
2D Image Processing Library for Cortex-M Processors
 
Loading...
Searching...
No Matches
arm_2d_tile.h
1/*
2 * Copyright (C) 2010-2022 Arm Limited or its affiliates. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Licensed under the Apache License, Version 2.0 (the License); you may
7 * not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
14 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19/* ----------------------------------------------------------------------
20 * Project: Arm-2D Library
21 * Title: arm_2d_tile.h
22 * Description: Public header file to contain the basic tile operations
23 *
24 * $Date: 27. Nov 2025
25 * $Revision: V.1.7.0
26 *
27 * Target Processor: Cortex-M cores
28 * -------------------------------------------------------------------- */
29
30#ifndef __ARM_2D_TILE_H__
31#define __ARM_2D_TILE_H__
32
33/*============================ INCLUDES ======================================*/
34#include "arm_2d_types.h"
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40
41
42/*============================ MACROS ========================================*/
43
44/*!
45 * \addtogroup Deprecated
46 * @{
47 */
48#define arm_2d_c8bit_tile_copy_with_colour_masking \
49 arm_2d_c8bit_tile_copy_with_colour_keying
50
51#define arm_2d_rgb16_tile_copy_with_colour_masking \
52 arm_2d_rgb16_tile_copy_with_colour_keying
53
54#define arm_2d_rgb32_tile_copy_with_colour_masking \
55 arm_2d_rgb32_tile_copy_with_colour_keying
56/*! @} */
57
58/*!
59 * \addtogroup Tile 2 Tile Operations
60 * @{
61 */
62/*============================ MACROFIED FUNCTIONS ===========================*/
63
64#define arm_2d_c8bit_tile_copy( __SRC_ADDR, /* source tile address */ \
65 __DES_ADDR, /* target tile address */ \
66 __DES_REGION_ADDR, /* target region address*/\
67 __MODE) /* mode */ \
68 arm_2dp_c8bit_tile_copy(NULL, \
69 (__SRC_ADDR), \
70 (__DES_ADDR), \
71 (__DES_REGION_ADDR), \
72 (__MODE))
73
74#define arm_2d_rgb16_tile_copy( __SRC_ADDR, /* source tile address */ \
75 __DES_ADDR, /* target tile address */ \
76 __DES_REGION_ADDR, /* target region address*/\
77 __MODE) /* mode */ \
78 arm_2dp_rgb16_tile_copy(NULL, \
79 (__SRC_ADDR), \
80 (__DES_ADDR), \
81 (__DES_REGION_ADDR), \
82 (__MODE))
83
84#define arm_2d_rgb32_tile_copy( __SRC_ADDR, /* source tile address */ \
85 __DES_ADDR, /* target tile address */ \
86 __DES_REGION_ADDR, /* target region address*/\
87 __MODE) /* mode */ \
88 arm_2dp_rgb32_tile_copy(NULL, \
89 (__SRC_ADDR), \
90 (__DES_ADDR), \
91 (__DES_REGION_ADDR), \
92 (__MODE))
93
94#define arm_2d_c8bit_tile_copy_only( \
95 __SRC_ADDR, /* source tile address */ \
96 __DES_ADDR, /* target tile address */ \
97 __DES_REGION_ADDR) /* target region address*/\
98 arm_2dp_c8bit_tile_copy_only(NULL, \
99 (__SRC_ADDR), \
100 (__DES_ADDR), \
101 (__DES_REGION_ADDR))
102
103#define arm_2d_rgb16_tile_copy_only( \
104 __SRC_ADDR, /* source tile address */ \
105 __DES_ADDR, /* target tile address */ \
106 __DES_REGION_ADDR) /* target region address*/\
107 arm_2dp_rgb16_tile_copy_only(NULL, \
108 (__SRC_ADDR), \
109 (__DES_ADDR), \
110 (__DES_REGION_ADDR))
111
112#define arm_2d_rgb32_tile_copy_only( \
113 __SRC_ADDR, /* source tile address */ \
114 __DES_ADDR, /* target tile address */ \
115 __DES_REGION_ADDR) /* target region address*/\
116 arm_2dp_rgb32_tile_copy_only(NULL, \
117 (__SRC_ADDR), \
118 (__DES_ADDR), \
119 (__DES_REGION_ADDR))
120
121#define arm_2d_c8bit_tile_copy_with_x_mirror( \
122 __SRC_ADDR, /* source tile address */ \
123 __DES_ADDR, /* target tile address */ \
124 __DES_REGION_ADDR) /* target region address*/\
125 arm_2dp_c8bit_tile_copy_with_x_mirror( \
126 NULL, \
127 (__SRC_ADDR), \
128 (__DES_ADDR), \
129 (__DES_REGION_ADDR))
130
131#define arm_2d_rgb16_tile_copy_with_x_mirror( \
132 __SRC_ADDR, /* source tile address */ \
133 __DES_ADDR, /* target tile address */ \
134 __DES_REGION_ADDR) /* target region address*/\
135 arm_2dp_rgb16_tile_copy_with_x_mirror( \
136 NULL, \
137 (__SRC_ADDR), \
138 (__DES_ADDR), \
139 (__DES_REGION_ADDR))
140
141#define arm_2d_rgb32_tile_copy_with_x_mirror( \
142 __SRC_ADDR, /* source tile address */ \
143 __DES_ADDR, /* target tile address */ \
144 __DES_REGION_ADDR) /* target region address*/\
145 arm_2dp_rgb32_tile_copy_with_x_mirror( \
146 NULL, \
147 (__SRC_ADDR), \
148 (__DES_ADDR), \
149 (__DES_REGION_ADDR))
150
151#define arm_2d_c8bit_tile_copy_with_y_mirror( \
152 __SRC_ADDR, /* source tile address */ \
153 __DES_ADDR, /* target tile address */ \
154 __DES_REGION_ADDR) /* target region address*/\
155 arm_2dp_c8bit_tile_copy_with_y_mirror( \
156 NULL, \
157 (__SRC_ADDR), \
158 (__DES_ADDR), \
159 (__DES_REGION_ADDR))
160
161#define arm_2d_rgb16_tile_copy_with_y_mirror( \
162 __SRC_ADDR, /* source tile address */ \
163 __DES_ADDR, /* target tile address */ \
164 __DES_REGION_ADDR) /* target region address*/\
165 arm_2dp_rgb16_tile_copy_with_y_mirror( \
166 NULL, \
167 (__SRC_ADDR), \
168 (__DES_ADDR), \
169 (__DES_REGION_ADDR))
170
171#define arm_2d_rgb32_tile_copy_with_y_mirror( \
172 __SRC_ADDR, /* source tile address */ \
173 __DES_ADDR, /* target tile address */ \
174 __DES_REGION_ADDR) /* target region address*/\
175 arm_2dp_rgb32_tile_copy_with_y_mirror( \
176 NULL, \
177 (__SRC_ADDR), \
178 (__DES_ADDR), \
179 (__DES_REGION_ADDR))
180
181#define arm_2d_c8bit_tile_copy_with_xy_mirror( \
182 __SRC_ADDR, /* source tile address */ \
183 __DES_ADDR, /* target tile address */ \
184 __DES_REGION_ADDR) /* target region address*/\
185 arm_2dp_c8bit_tile_copy_with_xy_mirror( \
186 NULL, \
187 (__SRC_ADDR), \
188 (__DES_ADDR), \
189 (__DES_REGION_ADDR))
190
191#define arm_2d_rgb16_tile_copy_with_xy_mirror( \
192 __SRC_ADDR, /* source tile address */ \
193 __DES_ADDR, /* target tile address */ \
194 __DES_REGION_ADDR) /* target region address*/\
195 arm_2dp_rgb16_tile_copy_with_xy_mirror( \
196 NULL, \
197 (__SRC_ADDR), \
198 (__DES_ADDR), \
199 (__DES_REGION_ADDR))
200
201#define arm_2d_rgb32_tile_copy_with_xy_mirror( \
202 __SRC_ADDR, /* source tile address */ \
203 __DES_ADDR, /* target tile address */ \
204 __DES_REGION_ADDR) /* target region address*/\
205 arm_2dp_rgb32_tile_copy_with_xy_mirror( \
206 NULL, \
207 (__SRC_ADDR), \
208 (__DES_ADDR), \
209 (__DES_REGION_ADDR))
210
211#define arm_2d_c8bit_tile_fill_only( \
212 __SRC_ADDR, /* source tile address */ \
213 __DES_ADDR, /* target tile address */ \
214 __DES_REGION_ADDR) /* target region address*/\
215 arm_2dp_c8bit_tile_fill_only(NULL, \
216 (__SRC_ADDR), \
217 (__DES_ADDR), \
218 (__DES_REGION_ADDR))
219
220#define arm_2d_rgb16_tile_fill_only( \
221 __SRC_ADDR, /* source tile address */ \
222 __DES_ADDR, /* target tile address */ \
223 __DES_REGION_ADDR) /* target region address*/\
224 arm_2dp_rgb16_tile_fill_only(NULL, \
225 (__SRC_ADDR), \
226 (__DES_ADDR), \
227 (__DES_REGION_ADDR))
228
229#define arm_2d_rgb32_tile_fill_only( \
230 __SRC_ADDR, /* source tile address */ \
231 __DES_ADDR, /* target tile address */ \
232 __DES_REGION_ADDR) /* target region address*/\
233 arm_2dp_rgb32_tile_fill_only(NULL, \
234 (__SRC_ADDR), \
235 (__DES_ADDR), \
236 (__DES_REGION_ADDR))
237
238#define arm_2d_c8bit_tile_fill_with_x_mirror( \
239 __SRC_ADDR, /* source tile address */ \
240 __DES_ADDR, /* target tile address */ \
241 __DES_REGION_ADDR) /* target region address*/\
242 arm_2dp_c8bit_tile_fill_with_x_mirror( \
243 NULL, \
244 (__SRC_ADDR), \
245 (__DES_ADDR), \
246 (__DES_REGION_ADDR))
247
248#define arm_2d_rgb16_tile_fill_with_x_mirror( \
249 __SRC_ADDR, /* source tile address */ \
250 __DES_ADDR, /* target tile address */ \
251 __DES_REGION_ADDR) /* target region address*/\
252 arm_2dp_rgb16_tile_fill_with_x_mirror( \
253 NULL, \
254 (__SRC_ADDR), \
255 (__DES_ADDR), \
256 (__DES_REGION_ADDR))
257
258#define arm_2d_rgb32_tile_fill_with_x_mirror( \
259 __SRC_ADDR, /* source tile address */ \
260 __DES_ADDR, /* target tile address */ \
261 __DES_REGION_ADDR) /* target region address*/\
262 arm_2dp_rgb32_tile_fill_with_x_mirror( \
263 NULL, \
264 (__SRC_ADDR), \
265 (__DES_ADDR), \
266 (__DES_REGION_ADDR))
267
268#define arm_2d_c8bit_tile_fill_with_y_mirror( \
269 __SRC_ADDR, /* source tile address */ \
270 __DES_ADDR, /* target tile address */ \
271 __DES_REGION_ADDR) /* target region address*/\
272 arm_2dp_c8bit_tile_fill_with_y_mirror( \
273 NULL, \
274 (__SRC_ADDR), \
275 (__DES_ADDR), \
276 (__DES_REGION_ADDR))
277
278#define arm_2d_rgb16_tile_fill_with_y_mirror( \
279 __SRC_ADDR, /* source tile address */ \
280 __DES_ADDR, /* target tile address */ \
281 __DES_REGION_ADDR) /* target region address*/\
282 arm_2dp_rgb16_tile_fill_with_y_mirror( \
283 NULL, \
284 (__SRC_ADDR), \
285 (__DES_ADDR), \
286 (__DES_REGION_ADDR))
287
288#define arm_2d_rgb32_tile_fill_with_y_mirror( \
289 __SRC_ADDR, /* source tile address */ \
290 __DES_ADDR, /* target tile address */ \
291 __DES_REGION_ADDR) /* target region address*/\
292 arm_2dp_rgb32_tile_fill_with_y_mirror( \
293 NULL, \
294 (__SRC_ADDR), \
295 (__DES_ADDR), \
296 (__DES_REGION_ADDR))
297
298#define arm_2d_c8bit_tile_fill_with_xy_mirror( \
299 __SRC_ADDR, /* source tile address */ \
300 __DES_ADDR, /* target tile address */ \
301 __DES_REGION_ADDR) /* target region address*/\
302 arm_2dp_c8bit_tile_fill_with_xy_mirror( \
303 NULL, \
304 (__SRC_ADDR), \
305 (__DES_ADDR), \
306 (__DES_REGION_ADDR))
307
308#define arm_2d_rgb16_tile_fill_with_xy_mirror( \
309 __SRC_ADDR, /* source tile address */ \
310 __DES_ADDR, /* target tile address */ \
311 __DES_REGION_ADDR) /* target region address*/\
312 arm_2dp_rgb16_tile_fill_with_xy_mirror( \
313 NULL, \
314 (__SRC_ADDR), \
315 (__DES_ADDR), \
316 (__DES_REGION_ADDR))
317
318#define arm_2d_rgb32_tile_fill_with_xy_mirror( \
319 __SRC_ADDR, /* source tile address */ \
320 __DES_ADDR, /* target tile address */ \
321 __DES_REGION_ADDR) /* target region address*/\
322 arm_2dp_rgb32_tile_fill_with_xy_mirror( \
323 NULL, \
324 (__SRC_ADDR), \
325 (__DES_ADDR), \
326 (__DES_REGION_ADDR))
327
328#define arm_2d_c8bit_tile_copy_with_colour_keying( \
329 __SRC_ADDR, /* source tile address */ \
330 __DES_ADDR, /* target tile address */ \
331 __DES_REGION_ADDR, /* target region address*/\
332 __MSK_COLOUR, /* mask(key) colour */ \
333 __MODE) /* mode */ \
334 arm_2dp_c8bit_tile_copy_with_colour_keying( \
335 NULL, \
336 (__SRC_ADDR), \
337 (__DES_ADDR), \
338 (__DES_REGION_ADDR), \
339 (__MSK_COLOUR), \
340 (__MODE))
341
342
343#define arm_2d_rgb16_tile_copy_with_colour_keying( \
344 __SRC_ADDR, /* source tile address */ \
345 __DES_ADDR, /* target tile address */ \
346 __DES_REGION_ADDR, /* target region address*/\
347 __MSK_COLOUR, /* mask(key) colour */ \
348 __MODE) /* mode */ \
349 arm_2dp_rgb16_tile_copy_with_colour_keying( \
350 NULL, \
351 (__SRC_ADDR), \
352 (__DES_ADDR), \
353 (__DES_REGION_ADDR), \
354 (__MSK_COLOUR), \
355 (__MODE))
356
357#define arm_2d_rgb32_tile_copy_with_colour_keying( \
358 __SRC_ADDR, /* source tile address */ \
359 __DES_ADDR, /* target tile address */ \
360 __DES_REGION_ADDR, /* target region address*/\
361 __MSK_COLOUR, /* mask(key) colour */ \
362 __MODE) /* mode */ \
363 arm_2dp_rgb32_tile_copy_with_colour_keying( \
364 NULL, \
365 (__SRC_ADDR), \
366 (__DES_ADDR), \
367 (__DES_REGION_ADDR), \
368 (__MSK_COLOUR), \
369 (__MODE))
370
371#define arm_2d_c8bit_tile_copy_with_colour_keying_only( \
372 __SRC_ADDR, /* source tile address */ \
373 __DES_ADDR, /* target tile address */ \
374 __DES_REGION_ADDR, /* target region address*/\
375 __MSK_COLOUR) /* mask(key) colour */ \
376 arm_2dp_c8bit_tile_copy_with_colour_keying_only( \
377 NULL, \
378 (__SRC_ADDR), \
379 (__DES_ADDR), \
380 (__DES_REGION_ADDR), \
381 (__MSK_COLOUR))
382
383
384#define arm_2d_rgb16_tile_copy_with_colour_keying_only( \
385 __SRC_ADDR, /* source tile address */ \
386 __DES_ADDR, /* target tile address */ \
387 __DES_REGION_ADDR, /* target region address*/\
388 __MSK_COLOUR) /* mask(key) colour */ \
389 arm_2dp_rgb16_tile_copy_with_colour_keying_only( \
390 NULL, \
391 (__SRC_ADDR), \
392 (__DES_ADDR), \
393 (__DES_REGION_ADDR), \
394 (__MSK_COLOUR))
395
396#define arm_2d_rgb32_tile_copy_with_colour_keying_only( \
397 __SRC_ADDR, /* source tile address */ \
398 __DES_ADDR, /* target tile address */ \
399 __DES_REGION_ADDR, /* target region address*/\
400 __MSK_COLOUR) /* mask(key) colour */ \
401 arm_2dp_rgb32_tile_copy_with_colour_keying_only( \
402 NULL, \
403 (__SRC_ADDR), \
404 (__DES_ADDR), \
405 (__DES_REGION_ADDR), \
406 (__MSK_COLOUR))
407
408
409#define arm_2d_c8bit_tile_copy_with_colour_keying_and_x_mirror( \
410 __SRC_ADDR, /* source tile address */ \
411 __DES_ADDR, /* target tile address */ \
412 __DES_REGION_ADDR, /* target region address*/\
413 __MSK_COLOUR) /* mask(key) colour */ \
414 arm_2dp_c8bit_tile_copy_with_colour_keying_and_x_mirror( \
415 NULL, \
416 (__SRC_ADDR), \
417 (__DES_ADDR), \
418 (__DES_REGION_ADDR), \
419 (__MSK_COLOUR))
420
421#define arm_2d_rgb16_tile_copy_with_colour_keying_and_x_mirror( \
422 __SRC_ADDR, /* source tile address */ \
423 __DES_ADDR, /* target tile address */ \
424 __DES_REGION_ADDR, /* target region address*/\
425 __MSK_COLOUR) /* mask(key) colour */ \
426 arm_2dp_rgb16_tile_copy_with_colour_keying_and_x_mirror( \
427 NULL, \
428 (__SRC_ADDR), \
429 (__DES_ADDR), \
430 (__DES_REGION_ADDR), \
431 (__MSK_COLOUR))
432
433#define arm_2d_rgb32_tile_copy_with_colour_keying_and_x_mirror( \
434 __SRC_ADDR, /* source tile address */ \
435 __DES_ADDR, /* target tile address */ \
436 __DES_REGION_ADDR, /* target region address*/\
437 __MSK_COLOUR) /* mask(key) colour */ \
438 arm_2dp_rgb32_tile_copy_with_colour_keying_and_x_mirror( \
439 NULL, \
440 (__SRC_ADDR), \
441 (__DES_ADDR), \
442 (__DES_REGION_ADDR), \
443 (__MSK_COLOUR))
444
445#define arm_2d_c8bit_tile_copy_with_colour_keying_and_y_mirror( \
446 __SRC_ADDR, /* source tile address */ \
447 __DES_ADDR, /* target tile address */ \
448 __DES_REGION_ADDR, /* target region address*/\
449 __MSK_COLOUR) /* mask(key) colour */ \
450 arm_2dp_c8bit_tile_copy_with_colour_keying_and_y_mirror( \
451 NULL, \
452 (__SRC_ADDR), \
453 (__DES_ADDR), \
454 (__DES_REGION_ADDR), \
455 (__MSK_COLOUR))
456
457#define arm_2d_rgb16_tile_copy_with_colour_keying_and_y_mirror( \
458 __SRC_ADDR, /* source tile address */ \
459 __DES_ADDR, /* target tile address */ \
460 __DES_REGION_ADDR, /* target region address*/\
461 __MSK_COLOUR) /* mask(key) colour */ \
462 arm_2dp_rgb16_tile_copy_with_colour_keying_and_y_mirror( \
463 NULL, \
464 (__SRC_ADDR), \
465 (__DES_ADDR), \
466 (__DES_REGION_ADDR), \
467 (__MSK_COLOUR))
468
469#define arm_2d_rgb32_tile_copy_with_colour_keying_and_y_mirror( \
470 __SRC_ADDR, /* source tile address */ \
471 __DES_ADDR, /* target tile address */ \
472 __DES_REGION_ADDR, /* target region address*/\
473 __MSK_COLOUR) /* mask(key) colour */ \
474 arm_2dp_rgb32_tile_copy_with_colour_keying_and_y_mirror( \
475 NULL, \
476 (__SRC_ADDR), \
477 (__DES_ADDR), \
478 (__DES_REGION_ADDR), \
479 (__MSK_COLOUR))
480
481#define arm_2d_c8bit_tile_copy_with_colour_keying_and_xy_mirror( \
482 __SRC_ADDR, /* source tile address */ \
483 __DES_ADDR, /* target tile address */ \
484 __DES_REGION_ADDR, /* target region address*/\
485 __MSK_COLOUR) /* mask(key) colour */ \
486 arm_2dp_c8bit_tile_copy_with_colour_keying_and_xy_mirror( \
487 NULL, \
488 (__SRC_ADDR), \
489 (__DES_ADDR), \
490 (__DES_REGION_ADDR), \
491 (__MSK_COLOUR))
492
493#define arm_2d_rgb16_tile_copy_with_colour_keying_and_xy_mirror( \
494 __SRC_ADDR, /* source tile address */ \
495 __DES_ADDR, /* target tile address */ \
496 __DES_REGION_ADDR, /* target region address*/\
497 __MSK_COLOUR) /* mask(key) colour */ \
498 arm_2dp_rgb16_tile_copy_with_colour_keying_and_xy_mirror( \
499 NULL, \
500 (__SRC_ADDR), \
501 (__DES_ADDR), \
502 (__DES_REGION_ADDR), \
503 (__MSK_COLOUR))
504
505#define arm_2d_rgb32_tile_copy_with_colour_keying_and_xy_mirror( \
506 __SRC_ADDR, /* source tile address */ \
507 __DES_ADDR, /* target tile address */ \
508 __DES_REGION_ADDR, /* target region address*/\
509 __MSK_COLOUR) /* mask(key) colour */ \
510 arm_2dp_rgb32_tile_copy_with_colour_keying_and_xy_mirror( \
511 NULL, \
512 (__SRC_ADDR), \
513 (__DES_ADDR), \
514 (__DES_REGION_ADDR), \
515 (__MSK_COLOUR))
516
517#define arm_2d_c8bit_tile_fill_with_colour_keying_only( \
518 __SRC_ADDR, /* source tile address */ \
519 __DES_ADDR, /* target tile address */ \
520 __DES_REGION_ADDR, /* target region address*/\
521 __MSK_COLOUR) /* mask(key) colour */ \
522 arm_2dp_c8bit_tile_fill_with_colour_keying_only( \
523 NULL, \
524 (__SRC_ADDR), \
525 (__DES_ADDR), \
526 (__DES_REGION_ADDR), \
527 (__MSK_COLOUR))
528
529
530#define arm_2d_rgb16_tile_fill_with_colour_keying_only( \
531 __SRC_ADDR, /* source tile address */ \
532 __DES_ADDR, /* target tile address */ \
533 __DES_REGION_ADDR, /* target region address*/\
534 __MSK_COLOUR) /* mask(key) colour */ \
535 arm_2dp_rgb16_tile_fill_with_colour_keying_only( \
536 NULL, \
537 (__SRC_ADDR), \
538 (__DES_ADDR), \
539 (__DES_REGION_ADDR), \
540 (__MSK_COLOUR))
541
542#define arm_2d_rgb32_tile_fill_with_colour_keying_only( \
543 __SRC_ADDR, /* source tile address */ \
544 __DES_ADDR, /* target tile address */ \
545 __DES_REGION_ADDR, /* target region address*/\
546 __MSK_COLOUR) /* mask(key) colour */ \
547 arm_2dp_rgb32_tile_fill_with_colour_keying_only( \
548 NULL, \
549 (__SRC_ADDR), \
550 (__DES_ADDR), \
551 (__DES_REGION_ADDR), \
552 (__MSK_COLOUR))
553
554
555#define arm_2d_c8bit_tile_fill_with_colour_keying_and_x_mirror( \
556 __SRC_ADDR, /* source tile address */ \
557 __DES_ADDR, /* target tile address */ \
558 __DES_REGION_ADDR, /* target region address*/\
559 __MSK_COLOUR) /* mask(key) colour */ \
560 arm_2dp_c8bit_tile_fill_with_colour_keying_and_x_mirror( \
561 NULL, \
562 (__SRC_ADDR), \
563 (__DES_ADDR), \
564 (__DES_REGION_ADDR), \
565 (__MSK_COLOUR))
566
567#define arm_2d_rgb16_tile_fill_with_colour_keying_and_x_mirror( \
568 __SRC_ADDR, /* source tile address */ \
569 __DES_ADDR, /* target tile address */ \
570 __DES_REGION_ADDR, /* target region address*/\
571 __MSK_COLOUR) /* mask(key) colour */ \
572 arm_2dp_rgb16_tile_fill_with_colour_keying_and_x_mirror( \
573 NULL, \
574 (__SRC_ADDR), \
575 (__DES_ADDR), \
576 (__DES_REGION_ADDR), \
577 (__MSK_COLOUR))
578
579#define arm_2d_rgb32_tile_fill_with_colour_keying_and_x_mirror( \
580 __SRC_ADDR, /* source tile address */ \
581 __DES_ADDR, /* target tile address */ \
582 __DES_REGION_ADDR, /* target region address*/\
583 __MSK_COLOUR) /* mask(key) colour */ \
584 arm_2dp_rgb32_tile_fill_with_colour_keying_and_x_mirror( \
585 NULL, \
586 (__SRC_ADDR), \
587 (__DES_ADDR), \
588 (__DES_REGION_ADDR), \
589 (__MSK_COLOUR))
590
591#define arm_2d_c8bit_tile_fill_with_colour_keying_and_y_mirror( \
592 __SRC_ADDR, /* source tile address */ \
593 __DES_ADDR, /* target tile address */ \
594 __DES_REGION_ADDR, /* target region address*/\
595 __MSK_COLOUR) /* mask(key) colour */ \
596 arm_2dp_c8bit_tile_fill_with_colour_keying_and_y_mirror( \
597 NULL, \
598 (__SRC_ADDR), \
599 (__DES_ADDR), \
600 (__DES_REGION_ADDR), \
601 (__MSK_COLOUR))
602
603#define arm_2d_rgb16_tile_fill_with_colour_keying_and_y_mirror( \
604 __SRC_ADDR, /* source tile address */ \
605 __DES_ADDR, /* target tile address */ \
606 __DES_REGION_ADDR, /* target region address*/\
607 __MSK_COLOUR) /* mask(key) colour */ \
608 arm_2dp_rgb16_tile_fill_with_colour_keying_and_y_mirror( \
609 NULL, \
610 (__SRC_ADDR), \
611 (__DES_ADDR), \
612 (__DES_REGION_ADDR), \
613 (__MSK_COLOUR))
614
615#define arm_2d_rgb32_tile_fill_with_colour_keying_and_y_mirror( \
616 __SRC_ADDR, /* source tile address */ \
617 __DES_ADDR, /* target tile address */ \
618 __DES_REGION_ADDR, /* target region address*/\
619 __MSK_COLOUR) /* mask(key) colour */ \
620 arm_2dp_rgb32_tile_fill_with_colour_keying_and_y_mirror( \
621 NULL, \
622 (__SRC_ADDR), \
623 (__DES_ADDR), \
624 (__DES_REGION_ADDR), \
625 (__MSK_COLOUR))
626
627#define arm_2d_c8bit_tile_fill_with_colour_keying_and_xy_mirror( \
628 __SRC_ADDR, /* source tile address */ \
629 __DES_ADDR, /* target tile address */ \
630 __DES_REGION_ADDR, /* target region address*/\
631 __MSK_COLOUR) /* mask(key) colour */ \
632 arm_2dp_c8bit_tile_fill_with_colour_keying_and_xy_mirror( \
633 NULL, \
634 (__SRC_ADDR), \
635 (__DES_ADDR), \
636 (__DES_REGION_ADDR), \
637 (__MSK_COLOUR))
638
639#define arm_2d_rgb16_tile_fill_with_colour_keying_and_xy_mirror( \
640 __SRC_ADDR, /* source tile address */ \
641 __DES_ADDR, /* target tile address */ \
642 __DES_REGION_ADDR, /* target region address*/\
643 __MSK_COLOUR) /* mask(key) colour */ \
644 arm_2dp_rgb16_tile_fill_with_colour_keying_and_xy_mirror( \
645 NULL, \
646 (__SRC_ADDR), \
647 (__DES_ADDR), \
648 (__DES_REGION_ADDR), \
649 (__MSK_COLOUR))
650
651#define arm_2d_rgb32_tile_fill_with_colour_keying_and_xy_mirror( \
652 __SRC_ADDR, /* source tile address */ \
653 __DES_ADDR, /* target tile address */ \
654 __DES_REGION_ADDR, /* target region address*/\
655 __MSK_COLOUR) /* mask(key) colour */ \
656 arm_2dp_rgb32_tile_fill_with_colour_keying_and_xy_mirror( \
657 NULL, \
658 (__SRC_ADDR), \
659 (__DES_ADDR), \
660 (__DES_REGION_ADDR), \
661 (__MSK_COLOUR))
662
663
664
665
666
667/*
668 calculate the start address
669 HOW IT WORKS:
670
671 Base Address
672 +------------------------------------------------------------------------+
673 | |
674 |<------------------------------- iWidth ------------------------------->|
675 | |
676 | |
677 | Start Address = Base Address + iX + iY * iWidth |
678 | (iX,iY) |
679 |<-------- iX --------->+------------------------------+ |
680 | | | |
681 | | Valid Region | |
682 | | | |
683 | +------------------------------+ |
684 ... ...
685 | |
686 +------------------------------------------------------------------------+
687 */
688
689#define __arm_2d_get_address_and_region_from_tile( __TILE_PTR, \
690 __VALID_REGION_NAME, \
691 __LOCATION_OFFSET_PTR, \
692 __TYPE, \
693 __BUF_PTR_NAME) \
694 arm_2d_region_t __VALID_REGION_NAME; \
695 assert(NULL != (__TILE_PTR)); \
696 __TYPE *(__BUF_PTR_NAME) = NULL; \
697 \
698 (__TILE_PTR) = arm_2d_tile_get_root((__TILE_PTR), \
699 &__VALID_REGION_NAME, \
700 __LOCATION_OFFSET_PTR); \
701 \
702 if (NULL != (__TILE_PTR)) { \
703 (__BUF_PTR_NAME) = ((__TYPE *)((__TILE_PTR)->pchBuffer)) \
704 + (__TILE_PTR)->tRegion.tSize.iWidth * \
705 __VALID_REGION_NAME.tLocation.iY \
706 + __VALID_REGION_NAME.tLocation.iX; \
707 }
708
709
710#define arm_2d_get_address_and_region_from_tile(__TILE_PTR, \
711 __VALID_REGION_NAME, \
712 __LOCATION_OFFSET_PTR, \
713 __TYPE, \
714 __BUF_PTR_NAME) \
715 __arm_2d_get_address_and_region_from_tile( __TILE_PTR, \
716 __VALID_REGION_NAME, \
717 __LOCATION_OFFSET_PTR, \
718 __TYPE, \
719 __BUF_PTR_NAME)
720
721
722#define __arm_2d_get_address_and_region_from_tile_with_mirroring( \
723 __TILE_PTR, \
724 __VALID_REGION_NAME, \
725 __LOCATION_OFFSET_PTR, \
726 __TYPE, \
727 __BUF_PTR_NAME, \
728 __MODE) \
729 arm_2d_region_t __VALID_REGION_NAME; \
730 assert(NULL != (__TILE_PTR)); \
731 __TYPE *(__BUF_PTR_NAME) = NULL; \
732 \
733 (__TILE_PTR) = arm_2d_tile_get_root((__TILE_PTR), \
734 &__VALID_REGION_NAME, \
735 __LOCATION_OFFSET_PTR); \
736 \
737 if (NULL != (__TILE_PTR)) { \
738 arm_2d_location_t tOffset = __VALID_REGION_NAME.tLocation; \
739 if ((__MODE) & ARM_2D_CP_MODE_X_MIRROR) { \
740 tOffset.iX = 0; \
741 } \
742 if ((__MODE) & ARM_2D_CP_MODE_Y_MIRROR) { \
743 tOffset.iY = 0; \
744 } \
745 (__BUF_PTR_NAME) = ((__TYPE *)((__TILE_PTR)->pchBuffer)) \
746 + (__TILE_PTR)->tRegion.tSize.iWidth * tOffset.iY \
747 + tOffset.iX; \
748 }
749
750
751#define arm_2d_get_address_and_region_from_tile_with_mirroring( \
752 __TILE_PTR, \
753 __VALID_REGION_NAME, \
754 __LOCATION_OFFSET_PTR, \
755 __TYPE, \
756 __BUF_PTR_NAME, \
757 __MODE) \
758 __arm_2d_get_address_and_region_from_tile_with_mirroring( \
759 __TILE_PTR, \
760 __VALID_REGION_NAME, \
761 __LOCATION_OFFSET_PTR, \
762 __TYPE, \
763 __BUF_PTR_NAME, \
764 (__MODE))
765
766
767#define arm_2d_tile_width_compare(__target_tile_ptr, __ref_tile_ptr, ...) \
768 __arm_2d_tile_width_compare((__target_tile_ptr), \
769 (__ref_tile_ptr), \
770 (true, ##__VA_ARGS__))
771
772#define arm_2d_tile_height_compare(__target_tile_ptr, __ref_tile_ptr, ...) \
773 __arm_2d_tile_height_compare((__target_tile_ptr), \
774 (__ref_tile_ptr), \
775 (true, ##__VA_ARGS__))
776
777#define arm_2dp_c8bit_tile_fill( __OPCODE_PTR, /* arm_2d_op_cp_t * */ \
778 __SOURCE_ADDR, /* source tile address */ \
779 __TARGET_ADDR, /* target tile address*/ \
780 __REGION_ADDR, /* target region address*/\
781 ...) /* mode */ \
782({ \
783 arm_fsm_rt_t tResult = (arm_fsm_rt_t)ARM_2D_ERR_UNKNOWN; \
784 switch ( (ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) \
785 & ARM_2D_CP_MODE_XY_MIRROR) { \
786 case ARM_2D_CP_MODE_NO_MIRROR: \
787 tResult = arm_2dp_c8bit_tile_fill_only( \
788 (__OPCODE_PTR), \
789 (__SOURCE_ADDR), \
790 (__TARGET_ADDR), \
791 (__REGION_ADDR)); \
792 break; \
793 case ARM_2D_CP_MODE_X_MIRROR: \
794 tResult = arm_2dp_c8bit_tile_fill_with_x_mirror( \
795 (__OPCODE_PTR), \
796 (__SOURCE_ADDR), \
797 (__TARGET_ADDR), \
798 (__REGION_ADDR)); \
799 break; \
800 case ARM_2D_CP_MODE_Y_MIRROR: \
801 tResult = arm_2dp_c8bit_tile_fill_with_y_mirror( \
802 (__OPCODE_PTR), \
803 (__SOURCE_ADDR), \
804 (__TARGET_ADDR), \
805 (__REGION_ADDR)); \
806 break; \
807 case ARM_2D_CP_MODE_XY_MIRROR: \
808 tResult = arm_2dp_c8bit_tile_fill_with_xy_mirror( \
809 (__OPCODE_PTR), \
810 (__SOURCE_ADDR), \
811 (__TARGET_ADDR), \
812 (__REGION_ADDR)); \
813 break; \
814 } \
815 tResult; \
816})
817
818#define arm_2d_c8bit_tile_fill( __SOURCE_ADDR, /* source tile address */ \
819 __TARGET_ADDR, /* target tile address*/ \
820 __REGION_ADDR, /* target region address*/ \
821 ...) /* mode */ \
822 arm_2dp_c8bit_tile_fill(NULL, \
823 (__SOURCE_ADDR), \
824 (__TARGET_ADDR), \
825 (__REGION_ADDR), \
826 ##__VA_ARGS__)
827
828#define arm_2dp_rgb16_tile_fill( __OPCODE_PTR, /* arm_2d_op_cp_t * */ \
829 __SOURCE_ADDR, /* source tile address */ \
830 __TARGET_ADDR, /* target tile address*/ \
831 __REGION_ADDR, /* target region address*/\
832 ...) /* mode */ \
833({ \
834 arm_fsm_rt_t tResult = (arm_fsm_rt_t)ARM_2D_ERR_UNKNOWN; \
835 switch ( (ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) \
836 & ARM_2D_CP_MODE_XY_MIRROR) { \
837 case ARM_2D_CP_MODE_NO_MIRROR: \
838 tResult = arm_2dp_rgb16_tile_fill_only( \
839 (__OPCODE_PTR), \
840 (__SOURCE_ADDR), \
841 (__TARGET_ADDR), \
842 (__REGION_ADDR)); \
843 break; \
844 case ARM_2D_CP_MODE_X_MIRROR: \
845 tResult = arm_2dp_rgb16_tile_fill_with_x_mirror( \
846 (__OPCODE_PTR), \
847 (__SOURCE_ADDR), \
848 (__TARGET_ADDR), \
849 (__REGION_ADDR)); \
850 break; \
851 case ARM_2D_CP_MODE_Y_MIRROR: \
852 tResult = arm_2dp_rgb16_tile_fill_with_y_mirror( \
853 (__OPCODE_PTR), \
854 (__SOURCE_ADDR), \
855 (__TARGET_ADDR), \
856 (__REGION_ADDR)); \
857 break; \
858 case ARM_2D_CP_MODE_XY_MIRROR: \
859 tResult = arm_2dp_rgb16_tile_fill_with_xy_mirror( \
860 (__OPCODE_PTR), \
861 (__SOURCE_ADDR), \
862 (__TARGET_ADDR), \
863 (__REGION_ADDR)); \
864 break; \
865 } \
866 tResult; \
867})
868
869#define arm_2d_rgb16_tile_fill( __SOURCE_ADDR, /* source tile address */ \
870 __TARGET_ADDR, /* target tile address*/ \
871 __REGION_ADDR, /* target region address*/ \
872 ...) /* mode */ \
873 arm_2dp_rgb16_tile_fill(NULL, \
874 (__SOURCE_ADDR), \
875 (__TARGET_ADDR), \
876 (__REGION_ADDR), \
877 ##__VA_ARGS__)
878
879#define arm_2dp_rgb32_tile_fill( __OPCODE_PTR, /* arm_2d_op_cp_t * */ \
880 __SOURCE_ADDR, /* source tile address */ \
881 __TARGET_ADDR, /* target tile address*/ \
882 __REGION_ADDR, /* target region address*/\
883 ...) /* mode */ \
884({ \
885 arm_fsm_rt_t tResult = (arm_fsm_rt_t)ARM_2D_ERR_UNKNOWN; \
886 switch ( (ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) \
887 & ARM_2D_CP_MODE_XY_MIRROR) { \
888 case ARM_2D_CP_MODE_NO_MIRROR: \
889 tResult = arm_2dp_rgb32_tile_fill_only( \
890 (__OPCODE_PTR), \
891 (__SOURCE_ADDR), \
892 (__TARGET_ADDR), \
893 (__REGION_ADDR)); \
894 break; \
895 case ARM_2D_CP_MODE_X_MIRROR: \
896 tResult = arm_2dp_rgb32_tile_fill_with_x_mirror( \
897 (__OPCODE_PTR), \
898 (__SOURCE_ADDR), \
899 (__TARGET_ADDR), \
900 (__REGION_ADDR)); \
901 break; \
902 case ARM_2D_CP_MODE_Y_MIRROR: \
903 tResult = arm_2dp_rgb32_tile_fill_with_y_mirror( \
904 (__OPCODE_PTR), \
905 (__SOURCE_ADDR), \
906 (__TARGET_ADDR), \
907 (__REGION_ADDR)); \
908 break; \
909 case ARM_2D_CP_MODE_XY_MIRROR: \
910 tResult = arm_2dp_rgb32_tile_fill_with_xy_mirror( \
911 (__OPCODE_PTR), \
912 (__SOURCE_ADDR), \
913 (__TARGET_ADDR), \
914 (__REGION_ADDR)); \
915 break; \
916 } \
917 tResult; \
918})
919
920#define arm_2d_rgb32_tile_fill( __SOURCE_ADDR, /* source tile address */ \
921 __TARGET_ADDR, /* target tile address*/ \
922 __REGION_ADDR, /* target region address*/ \
923 ...) /* mode */ \
924 arm_2dp_rgb32_tile_fill(NULL, \
925 (__SOURCE_ADDR), \
926 (__TARGET_ADDR), \
927 (__REGION_ADDR), \
928 ##__VA_ARGS__)
929
930/*!
931 * \brief tile copy with specified mode
932 * \param[in] ptOP the control block, NULL means using the default control block
933 * \param[in] ptSource the source tile
934 * \param[in] ptTarget the target tile
935 * \param[in] ptRegion the target region, NULL means using the region of the
936 * target tile.
937 * \param[in] wMode the copy mode
938 * \return arm_fsm_rt_t the operation result
939 */
940#define arm_2dp_c8bit_tile_copy( __OPCODE_PTR, /* arm_2d_op_cp_t * */ \
941 __SOURCE_ADDR, /* source tile address */ \
942 __TARGET_ADDR, /* target tile address*/ \
943 __REGION_ADDR, /* target region address*/\
944 ...) /* mode */ \
945({ \
946 arm_fsm_rt_t tResult = (arm_fsm_rt_t)ARM_2D_ERR_UNKNOWN; \
947 if ((ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) & ARM_2D_CP_MODE_FILL) { \
948 tResult = arm_2dp_c8bit_tile_fill( \
949 (__OPCODE_PTR), \
950 (__SOURCE_ADDR), \
951 (__TARGET_ADDR), \
952 (__REGION_ADDR), \
953 ##__VA_ARGS__); \
954 } else { \
955 switch ( (ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) \
956 & ARM_2D_CP_MODE_XY_MIRROR) { \
957 case ARM_2D_CP_MODE_NO_MIRROR: \
958 tResult = arm_2dp_c8bit_tile_copy_only( \
959 (__OPCODE_PTR), \
960 (__SOURCE_ADDR), \
961 (__TARGET_ADDR), \
962 (__REGION_ADDR)); \
963 break; \
964 case ARM_2D_CP_MODE_X_MIRROR: \
965 tResult = arm_2dp_c8bit_tile_copy_with_x_mirror( \
966 (__OPCODE_PTR), \
967 (__SOURCE_ADDR), \
968 (__TARGET_ADDR), \
969 (__REGION_ADDR)); \
970 break; \
971 case ARM_2D_CP_MODE_Y_MIRROR: \
972 tResult = arm_2dp_c8bit_tile_copy_with_y_mirror( \
973 (__OPCODE_PTR), \
974 (__SOURCE_ADDR), \
975 (__TARGET_ADDR), \
976 (__REGION_ADDR)); \
977 break; \
978 case ARM_2D_CP_MODE_XY_MIRROR: \
979 tResult = arm_2dp_c8bit_tile_copy_with_xy_mirror( \
980 (__OPCODE_PTR), \
981 (__SOURCE_ADDR), \
982 (__TARGET_ADDR), \
983 (__REGION_ADDR)); \
984 break; \
985 } \
986 }; \
987 tResult; \
988})
989
990/*!
991 * \brief tile copy with specified mode
992 * \param[in] ptOP the control block, NULL means using the default control block
993 * \param[in] ptSource the source tile
994 * \param[in] ptTarget the target tile
995 * \param[in] ptRegion the target region, NULL means using the region of the
996 * target tile.
997 * \param[in] wMode the copy mode
998 * \return arm_fsm_rt_t the operation result
999 */
1000#define arm_2dp_rgb16_tile_copy( __OPCODE_PTR, /* arm_2d_op_cp_t * */ \
1001 __SOURCE_ADDR, /* source tile address */ \
1002 __TARGET_ADDR, /* target tile address*/ \
1003 __REGION_ADDR, /* target region address*/\
1004 ...) /* mode */ \
1005({ \
1006 arm_fsm_rt_t tResult = (arm_fsm_rt_t)ARM_2D_ERR_UNKNOWN; \
1007 if ((ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) & ARM_2D_CP_MODE_FILL) { \
1008 tResult = arm_2dp_rgb16_tile_fill( \
1009 (__OPCODE_PTR), \
1010 (__SOURCE_ADDR), \
1011 (__TARGET_ADDR), \
1012 (__REGION_ADDR), \
1013 ##__VA_ARGS__); \
1014 } else { \
1015 switch ( (ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) \
1016 & ARM_2D_CP_MODE_XY_MIRROR) { \
1017 case ARM_2D_CP_MODE_NO_MIRROR: \
1018 tResult = arm_2dp_rgb16_tile_copy_only( \
1019 (__OPCODE_PTR), \
1020 (__SOURCE_ADDR), \
1021 (__TARGET_ADDR), \
1022 (__REGION_ADDR)); \
1023 break; \
1024 case ARM_2D_CP_MODE_X_MIRROR: \
1025 tResult = arm_2dp_rgb16_tile_copy_with_x_mirror( \
1026 (__OPCODE_PTR), \
1027 (__SOURCE_ADDR), \
1028 (__TARGET_ADDR), \
1029 (__REGION_ADDR)); \
1030 break; \
1031 case ARM_2D_CP_MODE_Y_MIRROR: \
1032 tResult = arm_2dp_rgb16_tile_copy_with_y_mirror( \
1033 (__OPCODE_PTR), \
1034 (__SOURCE_ADDR), \
1035 (__TARGET_ADDR), \
1036 (__REGION_ADDR)); \
1037 break; \
1038 case ARM_2D_CP_MODE_XY_MIRROR: \
1039 tResult = arm_2dp_rgb16_tile_copy_with_xy_mirror( \
1040 (__OPCODE_PTR), \
1041 (__SOURCE_ADDR), \
1042 (__TARGET_ADDR), \
1043 (__REGION_ADDR)); \
1044 break; \
1045 } \
1046 }; \
1047 tResult; \
1048})
1049
1050/*!
1051 * \brief tile copy with specified mode
1052 * \param[in] ptOP the control block, NULL means using the default control block
1053 * \param[in] ptSource the source tile
1054 * \param[in] ptTarget the target tile
1055 * \param[in] ptRegion the target region, NULL means using the region of the
1056 * target tile.
1057 * \param[in] wMode the copy mode
1058 * \return arm_fsm_rt_t the operation result
1059 */
1060#define arm_2dp_rgb32_tile_copy( __OPCODE_PTR, /* arm_2d_op_cp_t * */ \
1061 __SOURCE_ADDR, /* source tile address */ \
1062 __TARGET_ADDR, /* target tile address*/ \
1063 __REGION_ADDR, /* target region address*/\
1064 ...) /* mode */ \
1065({ \
1066 arm_fsm_rt_t tResult = (arm_fsm_rt_t)ARM_2D_ERR_UNKNOWN; \
1067 if ((ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) & ARM_2D_CP_MODE_FILL) { \
1068 tResult = arm_2dp_rgb32_tile_fill( \
1069 (__OPCODE_PTR), \
1070 (__SOURCE_ADDR), \
1071 (__TARGET_ADDR), \
1072 (__REGION_ADDR), \
1073 ##__VA_ARGS__); \
1074 } else { \
1075 switch ( (ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) \
1076 & ARM_2D_CP_MODE_XY_MIRROR) { \
1077 case ARM_2D_CP_MODE_NO_MIRROR: \
1078 tResult = arm_2dp_rgb32_tile_copy_only( \
1079 (__OPCODE_PTR), \
1080 (__SOURCE_ADDR), \
1081 (__TARGET_ADDR), \
1082 (__REGION_ADDR)); \
1083 break; \
1084 case ARM_2D_CP_MODE_X_MIRROR: \
1085 tResult = arm_2dp_rgb32_tile_copy_with_x_mirror( \
1086 (__OPCODE_PTR), \
1087 (__SOURCE_ADDR), \
1088 (__TARGET_ADDR), \
1089 (__REGION_ADDR)); \
1090 break; \
1091 case ARM_2D_CP_MODE_Y_MIRROR: \
1092 tResult = arm_2dp_rgb32_tile_copy_with_y_mirror( \
1093 (__OPCODE_PTR), \
1094 (__SOURCE_ADDR), \
1095 (__TARGET_ADDR), \
1096 (__REGION_ADDR)); \
1097 break; \
1098 case ARM_2D_CP_MODE_XY_MIRROR: \
1099 tResult = arm_2dp_rgb32_tile_copy_with_xy_mirror( \
1100 (__OPCODE_PTR), \
1101 (__SOURCE_ADDR), \
1102 (__TARGET_ADDR), \
1103 (__REGION_ADDR)); \
1104 break; \
1105 } \
1106 }; \
1107 tResult; \
1108})
1109
1110/*============================ TYPES =========================================*/
1111
1113
1114/*! \note arm_2d_op_cp_cl_key_t inherits from arm_2d_op_src_t explicitly
1115 */
1118 struct {
1119 const arm_2d_tile_t *ptTile; //!< target tile
1120 const arm_2d_region_t *ptRegion; //!< target region
1121 } Target;
1122 struct {
1123 const arm_2d_tile_t *ptTile; //!< source tile
1124 }Source;
1125 uint32_t wMode; //!< copy mode
1126 union {
1127 uint8_t chColour; //!< 8bit colour
1128 uint16_t hwColour; //!< 16bit colour
1129 uint32_t wColour; //!< 32bit colour
1130 };
1132
1133/*============================ GLOBAL VARIABLES ==============================*/
1134/*============================ PROTOTYPES ====================================*/
1135
1136
1137/*----------------------------------------------------------------------------*
1138 * Tile Operations *
1139 *----------------------------------------------------------------------------*/
1140
1141/*!
1142 * \brief check whether a given tile is root or not
1143 * \param[in] ptTile the target tile
1144 * \retval true the target tile is a root tile
1145 * \retval false the target tile is a child tile
1146 */
1147ARM_NONNULL(1)
1148__STATIC_INLINE bool arm_2d_is_root_tile(const arm_2d_tile_t *ptTile)
1149{
1150 return ptTile->tInfo.bIsRoot;
1151}
1152
1153
1154/*!
1155 * \brief intersect two regions and find the overlapped region
1156 * \param[in] ptRegionIn0 the input region 0
1157 * \param[in] ptRegionIn1 the input region 1
1158 * \param[out] ptRegionOut the overlapped region
1159 * \retval false the two regions do not overlap
1160 * \retval true the two regions overlap
1161 *
1162 * \code
1163
1164 HOW IT WORKS:
1165
1166 Input Region 0
1167 +------------------------------------------------------+
1168 | |
1169 | |
1170 | |
1171 | +------------------------------+---------+
1172 | | |/////////|
1173 | | Output Region |/////////|
1174 | | |/////////|
1175 +-----------------------+------------------------------+/////////|
1176 |////////////////////////////////////////|
1177 |////////////////////////////////////////|
1178 +----------------------------------------+
1179 Input Region 1
1180 * \endcode
1181 */
1182extern
1183ARM_NONNULL(1,2)
1185 const arm_2d_region_t *ptRegionIn1,
1186 arm_2d_region_t *ptRegionOut);
1187
1188
1189/*!
1190 * \brief get the minimal enclosure region for the given two regions
1191 * \param[in] ptRegionIn0 the input region 0
1192 * \param[in] ptRegionIn1 the input region 1
1193 * \param[out] ptRegionOut the enclosure region
1194 * \return arm_2d_region_t * the enclosure region
1195 *
1196 * \code
1197
1198 HOW IT WORKS:
1199
1200 Output Region
1201 +------------------------------------------------------+---------+
1202 | Input Region 0 |/////////|
1203 | |/////////|
1204 | |/////////|
1205 | +------------------------------+---------+
1206 | | | |
1207 | | | |
1208 | | | |
1209 +-----------------------+------------------------------+ |
1210 |///////////////////////| |
1211 |///////////////////////| |
1212 +-----------------------+----------------------------------------+
1213 Input Region 1
1214 * \endcode
1215 */
1216extern
1217ARM_NONNULL(1,2,3)
1219 const arm_2d_region_t *ptInput0,
1220 const arm_2d_region_t *ptInput1,
1221 arm_2d_region_t *ptOutput);
1222
1223extern
1224ARM_NONNULL(1)
1225arm_2d_region_t *arm_2d_create_region_from_corner_points(
1226 arm_2d_region_t *ptOutput,
1227 arm_2d_location_t tPointA,
1228 arm_2d_location_t tPointB);
1229
1230/*!
1231 * \brief check whether a point is inside a given region
1232 * \param[in] ptRegion the target region
1233 * \param[in] ptPoint the target point
1234 * \retval true the point is inside the target region
1235 * \retval false the point is outside the target region
1236 */
1237extern
1238ARM_NONNULL(1,2)
1240 const arm_2d_location_t *ptPoint);
1241
1242/*!
1243 * \brief check whether a given region is inside the target region
1244 * \param[in] ptRegion a given region
1245 * \param[in] ptTarget the target region used as the reference
1246 * \retval 1 the given region is inside the target region
1247 * \retval -1 the target region is inside the given region
1248 * \return 0 the given region is outside of the target region or
1249 * it only partially overlaps with the target region
1250 */
1251extern
1252ARM_NONNULL(1,2)
1254 const arm_2d_region_t *ptTarget);
1255
1256/*!
1257 * \brief get the root tile and the valid region for a given tile
1258 * \param[in] ptTile the target tile
1259 * \param[out] ptValidRegion the valid region inside the root tile
1260 * \param[out] ptOffset the offsite of the root tile as if the root tile is inside the target tile
1261 * \return const arm_2d_tile_t* the root tile
1262 *
1263 * \code
1264 HOW IT WORKS:
1265
1266 Root Tile (Output Tile)
1267 +------------------------------------------------------------------------+
1268 | ... ... |
1269 | |
1270 | Child Tile of Parent Tile |
1271 | +------------------------------------+ |
1272 | | Child Tile of Parent Tile | |
1273 | | +------------------------------+---------+ |
1274 | | | |/////////| |
1275 | | | Valid Region |/////////| |
1276 | | | |/////////| |
1277 | +-----+------------------------------+/////////| |
1278 | |////////////////////////////////////////| |
1279 | |////////////////////////////////////////| |
1280 | +----------------------------------------+ |
1281 | |
1282 +------------------------------------------------------------------------+
1283 \endcode
1284 */
1285extern
1286ARM_NONNULL(1)
1288 arm_2d_region_t *ptValidRegion,
1289 arm_2d_location_t *ptOffset);
1290
1291/*!
1292 * \brief get the root tile (and/or the virtual screen tile) without
1293 * checking the validation region
1294 *
1295 * \param[in] ptTile the target tile
1296 * \param[out] ppVirtualScreen the virtual screen tile
1297 * \param[in] bQuitWhenFindVirtualScreen whether stop searching when
1298 * encounter the virtual screen tile.
1299 * \return const arm_2d_tile_t* the root tile or the virtual screen tile
1300 * when bQuitWhenFindVirtualScreen is true
1301 */
1302extern
1303ARM_NONNULL(1)
1305 const arm_2d_tile_t *ptTile,
1306 const arm_2d_tile_t **ppVirtualScreen,
1307 bool bQuitWhenFindVirtualScreen);
1308
1309extern
1310ARM_NONNULL(1)
1311/*!
1312 * \brief get the root tile (and/or the virtual screen tile)
1313 *
1314 * \param[in] ptTile the target tile
1315 * \param[out] ptValidRegion the valid region inside the root tile
1316 * \param[out] ptOffset the offsite of the root tile as if the root tile
1317 * is inside the target tile
1318 * \param[out] ppVirtualScreen the virtual screen tile
1319 * \param[in] bQuitWhenFindVirtualScreen whether stop searching when
1320 * encounter the virtual screen tile.
1321 * \return const arm_2d_tile_t* the root tile or the virtual screen tile
1322 * when bQuitWhenFindVirtualScreen is true
1323 */
1325 const arm_2d_tile_t *ptTile,
1326 arm_2d_region_t *ptValidRegion,
1327 arm_2d_location_t *ptOffset,
1328 const arm_2d_tile_t **ppVirtualScreen,
1329 bool bQuitWhenFindVirtualScreen);
1330
1331extern
1332ARM_NONNULL(1)
1333/*!
1334 * \brief check whether a given target tile contains the boolean value of
1335 * bIsNewFrame, if it is, return the bIsNewFrame value
1336 *
1337 * \param[in] ptTarget the target tile
1338 * \retval ARM_2D_ERR_INVALID_PARAM the target tile is invalid
1339 * \retval ARM_2D_RT_TRUE The bIsNewFrame is true, or there is no virtual
1340 * screen.
1341 * \retval ARM_2D_RT_FALSE The bIsNewFrame is false
1342 */
1344
1345/*!
1346 * \brief generate a child tile from the target tile with a given region
1347 * \param[in] ptTargetTile the target tile
1348 * \param[in] ptRegion the target region
1349 * \param[out] ptOutput the child tile
1350 * \param[in] bClipRegion whether clip the region for the child tile
1351 * \note We highly recommend that please DO NOT clip the child tile if
1352 * you don't know what you are doing.
1353 * \retval non-NULL the child tile
1354 * \retval NULL the given region is outside the target tile
1355 *
1356 * \note If you want to use the child tile generated by
1357 * arm_2d_tile_generate_child() as a source tile / mask, please set the
1358 * bDerivedResource to true manually, otherwise all mirror related
1359 * operation will NOT work correctly.
1360 *
1361 * \code
1362 HOW IT WORKS:
1363
1364 Parent Tile (NOT necessarily a ROOT tile )
1365 +------------------------------------------------------+
1366 | |
1367 | |
1368 | Target Region |
1369 | +------------------------------+---------+
1370 | | |/////////|
1371 | | New Child Tile (Output) |/////////|
1372 | | |/////////|
1373 +-----------------------+------------------------------+/////////|
1374 |////////////////////////////////////////|
1375 |////////////////////////////////////////|
1376 +----------------------------------------+
1377 \endcode
1378 */
1379extern
1380ARM_NONNULL(1,2,3)
1382 const arm_2d_region_t *ptRegion,
1383 arm_2d_tile_t *ptOutput,
1384 bool bClipRegion,
1385 bool bValidateBeforeReturn);
1386
1387extern
1388ARM_NONNULL(1,2,3)
1389arm_2d_tile_t *arm_2d_tile_generate_child(
1390 const arm_2d_tile_t *ptTargetTile,
1391 const arm_2d_region_t *ptRegion,
1392 arm_2d_tile_t *ptOutput,
1393 bool bClipRegion);
1394
1395/*!
1396 * \brief get the absolute location on a specified target tile
1397 *
1398 * \param[in] ptTile the target tile
1399 * \param[in] tLocation the relative location
1400 * \param[in] bOnVirtualScreen whether taking the virtual screen into
1401 * consideration.
1402 *
1403 * \return arm_2d_location_t the absolute location
1404 */
1405extern
1406ARM_NONNULL(1)
1408 arm_2d_location_t tLocation,
1409 bool bOnVirtualScreen);
1410
1411/*!
1412 * \brief compare the widths of two tiles
1413 * \param[in] ptTarget the target tile
1414 * \param[in] ptReference the reference tile
1415 * \param[in] whether clipping the two tiles before comparing
1416 * \return arm_2d_cmp_t the comparision result
1417 */
1418extern
1419ARM_NONNULL(1,2)
1421 const arm_2d_tile_t *ptReference,
1422 bool bClipBeforeCompare);
1423/*!
1424 * \brief compare the heights of two tiles
1425 * \param[in] ptTarget the target tile
1426 * \param[in] ptReference the reference tile
1427 * \param[in] whether clipping the two tiles before comparing
1428 * \return arm_2d_cmp_t the comparision result
1429 */
1430extern
1431ARM_NONNULL(1,2)
1433 const arm_2d_tile_t *ptReference,
1434 bool bClipBeforeCompare);
1435
1436/*!
1437 * \brief compare the shape (both widths and heights) of two tiles
1438 * \param[in] ptTarget the target tile
1439 * \param[in] ptReference the reference tile
1440 * \return arm_2d_cmp_t the comparision result
1441 */
1442extern
1443ARM_NONNULL(1,2)
1445 const arm_2d_tile_t *ptReference);
1446
1447/*!
1448 * \brief get the absolute location of a given tile
1449 * \param[in] ptTile the target tile
1450 * \param[out] ptLocation the absolute location in the root tile
1451 * \return const arm_2d_tile_t * the root tile
1452 */
1453extern
1454ARM_NONNULL(1,2)
1456 const arm_2d_tile_t *ptTile,
1457 arm_2d_location_t *ptLocation);
1458
1459/*!
1460 * \brief calculate the region differences between two tiles
1461 * \param[in] ptTarget the target tile
1462 * \param[in] ptReference the reference tile
1463 * \param[out] ptBuffer the difference stored in a region
1464 * \return arm_2d_region_t * the ptBuffer passed to this function
1465 */
1466extern
1467ARM_NONNULL(1,2,3)
1469 const arm_2d_tile_t *ptReference,
1470 arm_2d_region_t *ptBuffer);
1471
1472extern
1473ARM_NONNULL(1,2)
1474/*!
1475 * \brief generic software tile copy for root tiles.
1476 * \note This API only supports normal tiles but not virtual resources.
1477 *
1478 * \param[in] ptSource the source tile
1479 * \param[in] ptTarget the target tile
1480 * \param[in] ptRegion the target region, NULL means using the region of the
1481 * target tile.
1482 * \param chBytesPerPixel number of bytes in a pixel
1483 */
1485 arm_2d_tile_t *ptTarget,
1486 const arm_2d_region_t *ptRegion,
1487 uint_fast8_t chBytesPerPixel);
1488
1489/*----------------------------------------------------------------------------*
1490 * Copy/Fill tile to destination with Mirroring *
1491 *----------------------------------------------------------------------------*/
1492
1493/*!
1494 * \brief tile copy modes
1495 */
1497 ARM_2D_CP_MODE_COPY = 0,
1498 ARM_2D_CP_MODE_FILL = _BV(0),
1499 ARM_2D_CP_MODE_NO_MIRROR = 0,
1500 ARM_2D_CP_MODE_Y_MIRROR = _BV(2),
1501 ARM_2D_CP_MODE_X_MIRROR = _BV(3),
1502 ARM_2D_CP_MODE_XY_MIRROR = ARM_2D_CP_MODE_X_MIRROR |
1503 ARM_2D_CP_MODE_Y_MIRROR,
1504};
1505
1506
1507
1508#if 0
1509/*!
1510 * \brief tile copy with specified mode
1511 * \param[in] ptOP the control block, NULL means using the default control block
1512 * \param[in] ptSource the source tile
1513 * \param[in] ptTarget the target tile
1514 * \param[in] ptRegion the target region, NULL means using the region of the
1515 * target tile.
1516 * \param[in] wMode the copy mode
1517 * \return arm_fsm_rt_t the operation result
1518 */
1519extern
1520ARM_NONNULL(2,3)
1522 const arm_2d_tile_t *ptSource,
1523 const arm_2d_tile_t *ptTarget,
1524 const arm_2d_region_t *ptRegion,
1525 uint32_t wMode);
1526
1527/*!
1528 * \brief tile copy with specified mode
1529 * \param[in] ptOP the control block, NULL means using the default control block
1530 * \param[in] ptSource the source tile
1531 * \param[in] ptTarget the target tile
1532 * \param[in] ptRegion the target region, NULL means using the region of the
1533 * target tile.
1534 * \param[in] wMode the copy mode
1535 * \return arm_fsm_rt_t the operation result
1536 */
1537extern
1538ARM_NONNULL(2,3)
1540 const arm_2d_tile_t *ptSource,
1541 const arm_2d_tile_t *ptTarget,
1542 const arm_2d_region_t *ptRegion,
1543 uint32_t wMode);
1544
1545/*!
1546 * \brief tile copy with specified mode
1547 * \param[in] ptOP the control block, NULL means using the default control block
1548 * \param[in] ptSource the source tile
1549 * \param[in] ptTarget the target tile
1550 * \param[in] ptRegion the target region, NULL means using the region of the
1551 * target tile.
1552 * \param[in] wMode the copy mode
1553 * \return arm_fsm_rt_t the operation result
1554 */
1555extern
1556ARM_NONNULL(2,3)
1558 const arm_2d_tile_t *ptSource,
1559 const arm_2d_tile_t *ptTarget,
1560 const arm_2d_region_t *ptRegion,
1561 uint32_t wMode);
1562#endif
1563
1564/*----------------------------------------------------------------------------*
1565 * Copy Only *
1566 *----------------------------------------------------------------------------*/
1567/*!
1568 * \brief tile copy only
1569 * \param[in] ptOP the control block, NULL means using the default control block
1570 * \param[in] ptSource the source tile
1571 * \param[in] ptTarget the target tile
1572 * \param[in] ptRegion the target region, NULL means using the region of the
1573 * target tile.
1574 * \return arm_fsm_rt_t the operation result
1575 */
1576extern
1577ARM_NONNULL(2,3)
1579 const arm_2d_tile_t *ptSource,
1580 const arm_2d_tile_t *ptTarget,
1581 const arm_2d_region_t *ptRegion);
1582
1583/*!
1584 * \brief tile copy only
1585 * \param[in] ptOP the control block, NULL means using the default control block
1586 * \param[in] ptSource the source tile
1587 * \param[in] ptTarget the target tile
1588 * \param[in] ptRegion the target region, NULL means using the region of the
1589 * target tile.
1590 * \return arm_fsm_rt_t the operation result
1591 */
1592extern
1593ARM_NONNULL(2,3)
1595 const arm_2d_tile_t *ptSource,
1596 const arm_2d_tile_t *ptTarget,
1597 const arm_2d_region_t *ptRegion);
1598
1599/*!
1600 * \brief tile copy only
1601 * \param[in] ptOP the control block, NULL means using the default control block
1602 * \param[in] ptSource the source tile
1603 * \param[in] ptTarget the target tile
1604 * \param[in] ptRegion the target region, NULL means using the region of the
1605 * target tile.
1606 * \return arm_fsm_rt_t the operation result
1607 */
1608extern
1609ARM_NONNULL(2,3)
1611 const arm_2d_tile_t *ptSource,
1612 const arm_2d_tile_t *ptTarget,
1613 const arm_2d_region_t *ptRegion);
1614
1615/*----------------------------------------------------------------------------*
1616 * Copy with X mirroring *
1617 *----------------------------------------------------------------------------*/
1618/*!
1619 * \brief tile copy with x-mirroring
1620 * \param[in] ptOP the control block, NULL means using the default control block
1621 * \param[in] ptSource the source tile
1622 * \param[in] ptTarget the target tile
1623 * \param[in] ptRegion the target region, NULL means using the region of the
1624 * target tile.
1625 * \return arm_fsm_rt_t the operation result
1626 */
1627extern
1628ARM_NONNULL(2,3)
1630 arm_2d_op_cp_t *ptOP,
1631 const arm_2d_tile_t *ptSource,
1632 const arm_2d_tile_t *ptTarget,
1633 const arm_2d_region_t *ptRegion);
1634
1635/*!
1636 * \brief tile copy with x-mirroring
1637 * \param[in] ptOP the control block, NULL means using the default control block
1638 * \param[in] ptSource the source tile
1639 * \param[in] ptTarget the target tile
1640 * \param[in] ptRegion the target region, NULL means using the region of the
1641 * target tile.
1642 * \return arm_fsm_rt_t the operation result
1643 */
1644extern
1645ARM_NONNULL(2,3)
1647 arm_2d_op_cp_t *ptOP,
1648 const arm_2d_tile_t *ptSource,
1649 const arm_2d_tile_t *ptTarget,
1650 const arm_2d_region_t *ptRegion);
1651
1652/*!
1653 * \brief tile copy with x-mirroring
1654 * \param[in] ptOP the control block, NULL means using the default control block
1655 * \param[in] ptSource the source tile
1656 * \param[in] ptTarget the target tile
1657 * \param[in] ptRegion the target region, NULL means using the region of the
1658 * target tile.
1659 * \return arm_fsm_rt_t the operation result
1660 */
1661extern
1662ARM_NONNULL(2,3)
1664 arm_2d_op_cp_t *ptOP,
1665 const arm_2d_tile_t *ptSource,
1666 const arm_2d_tile_t *ptTarget,
1667 const arm_2d_region_t *ptRegion);
1668
1669/*----------------------------------------------------------------------------*
1670 * Copy with Y mirroring *
1671 *----------------------------------------------------------------------------*/
1672
1673/*!
1674 * \brief tile copy with y-mirroring
1675 * \param[in] ptOP the control block, NULL means using the default control block
1676 * \param[in] ptSource the source tile
1677 * \param[in] ptTarget the target tile
1678 * \param[in] ptRegion the target region, NULL means using the region of the
1679 * target tile.
1680 * \return arm_fsm_rt_t the operation result
1681 */
1682extern
1683ARM_NONNULL(2,3)
1685 arm_2d_op_cp_t *ptOP,
1686 const arm_2d_tile_t *ptSource,
1687 const arm_2d_tile_t *ptTarget,
1688 const arm_2d_region_t *ptRegion);
1689
1690/*!
1691 * \brief tile copy with y-mirroring
1692 * \param[in] ptOP the control block, NULL means using the default control block
1693 * \param[in] ptSource the source tile
1694 * \param[in] ptTarget the target tile
1695 * \param[in] ptRegion the target region, NULL means using the region of the
1696 * target tile.
1697 * \return arm_fsm_rt_t the operation result
1698 */
1699extern
1700ARM_NONNULL(2,3)
1702 arm_2d_op_cp_t *ptOP,
1703 const arm_2d_tile_t *ptSource,
1704 const arm_2d_tile_t *ptTarget,
1705 const arm_2d_region_t *ptRegion);
1706
1707/*!
1708 * \brief tile copy with y-mirroring
1709 * \param[in] ptOP the control block, NULL means using the default control block
1710 * \param[in] ptSource the source tile
1711 * \param[in] ptTarget the target tile
1712 * \param[in] ptRegion the target region, NULL means using the region of the
1713 * target tile.
1714 * \return arm_fsm_rt_t the operation result
1715 */
1716extern
1717ARM_NONNULL(2,3)
1719 arm_2d_op_cp_t *ptOP,
1720 const arm_2d_tile_t *ptSource,
1721 const arm_2d_tile_t *ptTarget,
1722 const arm_2d_region_t *ptRegion);
1723
1724/*----------------------------------------------------------------------------*
1725 * Copy with XY mirroring *
1726 *----------------------------------------------------------------------------*/
1727
1728/*!
1729 * \brief tile copy with xy-mirroring
1730 * \param[in] ptOP the control block, NULL means using the default control block
1731 * \param[in] ptSource the source tile
1732 * \param[in] ptTarget the target tile
1733 * \param[in] ptRegion the target region, NULL means using the region of the
1734 * target tile.
1735 * \return arm_fsm_rt_t the operation result
1736 */
1737extern
1738ARM_NONNULL(2,3)
1740 arm_2d_op_cp_t *ptOP,
1741 const arm_2d_tile_t *ptSource,
1742 const arm_2d_tile_t *ptTarget,
1743 const arm_2d_region_t *ptRegion);
1744
1745/*!
1746 * \brief tile copy with xy-mirroring
1747 * \param[in] ptOP the control block, NULL means using the default control block
1748 * \param[in] ptSource the source tile
1749 * \param[in] ptTarget the target tile
1750 * \param[in] ptRegion the target region, NULL means using the region of the
1751 * target tile.
1752 * \return arm_fsm_rt_t the operation result
1753 */
1754extern
1755ARM_NONNULL(2,3)
1757 arm_2d_op_cp_t *ptOP,
1758 const arm_2d_tile_t *ptSource,
1759 const arm_2d_tile_t *ptTarget,
1760 const arm_2d_region_t *ptRegion);
1761
1762/*!
1763 * \brief tile copy with xy-mirroring
1764 * \param[in] ptOP the control block, NULL means using the default control block
1765 * \param[in] ptSource the source tile
1766 * \param[in] ptTarget the target tile
1767 * \param[in] ptRegion the target region, NULL means using the region of the
1768 * target tile.
1769 * \return arm_fsm_rt_t the operation result
1770 */
1771extern
1772ARM_NONNULL(2,3)
1774 arm_2d_op_cp_t *ptOP,
1775 const arm_2d_tile_t *ptSource,
1776 const arm_2d_tile_t *ptTarget,
1777 const arm_2d_region_t *ptRegion);
1778
1779/*----------------------------------------------------------------------------*
1780 * Fill Only *
1781 *----------------------------------------------------------------------------*/
1782
1783/*!
1784 * \brief Tiling only
1785 * \param[in] ptOP the control block, NULL means using the default control block
1786 * \param[in] ptSource the source tile
1787 * \param[in] ptTarget the target tile
1788 * \param[in] ptRegion the target region, NULL means using the region of the
1789 * target tile.
1790 * \return arm_fsm_rt_t the operation result
1791 */
1792extern
1793ARM_NONNULL(2,3)
1795 const arm_2d_tile_t *ptSource,
1796 const arm_2d_tile_t *ptTarget,
1797 const arm_2d_region_t *ptRegion);
1798
1799/*!
1800 * \brief Tiling only
1801 * \param[in] ptOP the control block, NULL means using the default control block
1802 * \param[in] ptSource the source tile
1803 * \param[in] ptTarget the target tile
1804 * \param[in] ptRegion the target region, NULL means using the region of the
1805 * target tile.
1806 * \return arm_fsm_rt_t the operation result
1807 */
1808extern
1809ARM_NONNULL(2,3)
1811 const arm_2d_tile_t *ptSource,
1812 const arm_2d_tile_t *ptTarget,
1813 const arm_2d_region_t *ptRegion);
1814
1815/*!
1816 * \brief Tiling only
1817 * \param[in] ptOP the control block, NULL means using the default control block
1818 * \param[in] ptSource the source tile
1819 * \param[in] ptTarget the target tile
1820 * \param[in] ptRegion the target region, NULL means using the region of the
1821 * target tile.
1822 * \return arm_fsm_rt_t the operation result
1823 */
1824extern
1825ARM_NONNULL(2,3)
1827 const arm_2d_tile_t *ptSource,
1828 const arm_2d_tile_t *ptTarget,
1829 const arm_2d_region_t *ptRegion);
1830
1831/*----------------------------------------------------------------------------*
1832 * Fill with X mirroring *
1833 *----------------------------------------------------------------------------*/
1834
1835/*!
1836 * \brief Tiling with x-mirroring
1837 * \param[in] ptOP the control block, NULL means using the default control block
1838 * \param[in] ptSource the source tile
1839 * \param[in] ptTarget the target tile
1840 * \param[in] ptRegion the target region, NULL means using the region of the
1841 * target tile.
1842 * \return arm_fsm_rt_t the operation result
1843 */
1844extern
1845ARM_NONNULL(2,3)
1847 arm_2d_op_cp_t *ptOP,
1848 const arm_2d_tile_t *ptSource,
1849 const arm_2d_tile_t *ptTarget,
1850 const arm_2d_region_t *ptRegion);
1851
1852/*!
1853 * \brief Tiling with x-mirroring
1854 * \param[in] ptOP the control block, NULL means using the default control block
1855 * \param[in] ptSource the source tile
1856 * \param[in] ptTarget the target tile
1857 * \param[in] ptRegion the target region, NULL means using the region of the
1858 * target tile.
1859 * \return arm_fsm_rt_t the operation result
1860 */
1861extern
1862ARM_NONNULL(2,3)
1864 arm_2d_op_cp_t *ptOP,
1865 const arm_2d_tile_t *ptSource,
1866 const arm_2d_tile_t *ptTarget,
1867 const arm_2d_region_t *ptRegion);
1868
1869/*!
1870 * \brief Tiling with x-mirroring
1871 * \param[in] ptOP the control block, NULL means using the default control block
1872 * \param[in] ptSource the source tile
1873 * \param[in] ptTarget the target tile
1874 * \param[in] ptRegion the target region, NULL means using the region of the
1875 * target tile.
1876 * \return arm_fsm_rt_t the operation result
1877 */
1878extern
1879ARM_NONNULL(2,3)
1881 arm_2d_op_cp_t *ptOP,
1882 const arm_2d_tile_t *ptSource,
1883 const arm_2d_tile_t *ptTarget,
1884 const arm_2d_region_t *ptRegion);
1885
1886/*----------------------------------------------------------------------------*
1887 * Fill with Y mirroring *
1888 *----------------------------------------------------------------------------*/
1889
1890/*!
1891 * \brief Tiling with y-mirroring
1892 * \param[in] ptOP the control block, NULL means using the default control block
1893 * \param[in] ptSource the source tile
1894 * \param[in] ptTarget the target tile
1895 * \param[in] ptRegion the target region, NULL means using the region of the
1896 * target tile.
1897 * \return arm_fsm_rt_t the operation result
1898 */
1899extern
1900ARM_NONNULL(2,3)
1902 arm_2d_op_cp_t *ptOP,
1903 const arm_2d_tile_t *ptSource,
1904 const arm_2d_tile_t *ptTarget,
1905 const arm_2d_region_t *ptRegion);
1906
1907/*!
1908 * \brief Tiling with y-mirroring
1909 * \param[in] ptOP the control block, NULL means using the default control block
1910 * \param[in] ptSource the source tile
1911 * \param[in] ptTarget the target tile
1912 * \param[in] ptRegion the target region, NULL means using the region of the
1913 * target tile.
1914 * \return arm_fsm_rt_t the operation result
1915 */
1916extern
1917ARM_NONNULL(2,3)
1919 arm_2d_op_cp_t *ptOP,
1920 const arm_2d_tile_t *ptSource,
1921 const arm_2d_tile_t *ptTarget,
1922 const arm_2d_region_t *ptRegion);
1923
1924/*!
1925 * \brief Tiling with y-mirroring
1926 * \param[in] ptOP the control block, NULL means using the default control block
1927 * \param[in] ptSource the source tile
1928 * \param[in] ptTarget the target tile
1929 * \param[in] ptRegion the target region, NULL means using the region of the
1930 * target tile.
1931 * \return arm_fsm_rt_t the operation result
1932 */
1933extern
1934ARM_NONNULL(2,3)
1936 arm_2d_op_cp_t *ptOP,
1937 const arm_2d_tile_t *ptSource,
1938 const arm_2d_tile_t *ptTarget,
1939 const arm_2d_region_t *ptRegion);
1940
1941/*----------------------------------------------------------------------------*
1942 * Fill with XY mirroring *
1943 *----------------------------------------------------------------------------*/
1944
1945/*!
1946 * \brief Tiling with xy-mirroring
1947 * \param[in] ptOP the control block, NULL means using the default control block
1948 * \param[in] ptSource the source tile
1949 * \param[in] ptTarget the target tile
1950 * \param[in] ptRegion the target region, NULL means using the region of the
1951 * target tile.
1952 * \return arm_fsm_rt_t the operation result
1953 */
1954extern
1955ARM_NONNULL(2,3)
1957 arm_2d_op_cp_t *ptOP,
1958 const arm_2d_tile_t *ptSource,
1959 const arm_2d_tile_t *ptTarget,
1960 const arm_2d_region_t *ptRegion);
1961
1962/*!
1963 * \brief Tiling with xy-mirroring
1964 * \param[in] ptOP the control block, NULL means using the default control block
1965 * \param[in] ptSource the source tile
1966 * \param[in] ptTarget the target tile
1967 * \param[in] ptRegion the target region, NULL means using the region of the
1968 * target tile.
1969 * \return arm_fsm_rt_t the operation result
1970 */
1971extern
1972ARM_NONNULL(2,3)
1974 arm_2d_op_cp_t *ptOP,
1975 const arm_2d_tile_t *ptSource,
1976 const arm_2d_tile_t *ptTarget,
1977 const arm_2d_region_t *ptRegion);
1978
1979/*!
1980 * \brief Tiling with xy-mirroring
1981 * \param[in] ptOP the control block, NULL means using the default control block
1982 * \param[in] ptSource the source tile
1983 * \param[in] ptTarget the target tile
1984 * \param[in] ptRegion the target region, NULL means using the region of the
1985 * target tile.
1986 * \return arm_fsm_rt_t the operation result
1987 */
1988extern
1989ARM_NONNULL(2,3)
1991 arm_2d_op_cp_t *ptOP,
1992 const arm_2d_tile_t *ptSource,
1993 const arm_2d_tile_t *ptTarget,
1994 const arm_2d_region_t *ptRegion);
1995
1996/*----------------------------------------------------------------------------*
1997 * Copy/Fill tile to destination with colour-keying and mirroring *
1998 *----------------------------------------------------------------------------*/
1999
2000/*!
2001 * \brief tile copy with colour-keying and specified mode
2002 * \param[in] ptOP the control block, NULL means using the default control block
2003 * \param[in] ptSource the source tile
2004 * \param[in] ptTarget the target tile
2005 * \param[in] ptRegion the target region, NULL means using the region of the
2006 * target tile.
2007 * \param[in] chMaskColour the key colour in any 8bit colour format
2008 * \param[in] wMode the copy mode
2009 * \return arm_fsm_rt_t the operation result
2010 */
2011extern
2012ARM_NONNULL(2,3)
2015 const arm_2d_tile_t *ptSource,
2016 const arm_2d_tile_t *ptTarget,
2017 const arm_2d_region_t *ptRegion,
2018 uint8_t chMaskColour,
2019 uint32_t wMode);
2020
2021/*!
2022 * \brief tile copy with colour-keying and specified mode
2023 * \param[in] ptOP the control block, NULL means using the default control block
2024 * \param[in] ptSource the source tile
2025 * \param[in] ptTarget the target tile
2026 * \param[in] ptRegion the target region, NULL means using the region of the
2027 * target tile.
2028 * \param[in] hwMaskColour the key colour in any 16bit colour format
2029 * \param[in] wMode the copy mode
2030 * \return arm_fsm_rt_t the operation result
2031 *
2032 * \note alpha channel is not handled, i.e. rgba5551
2033 */
2034extern
2035ARM_NONNULL(2,3)
2038 const arm_2d_tile_t *ptSource,
2039 const arm_2d_tile_t *ptTarget,
2040 const arm_2d_region_t *ptRegion,
2041 uint16_t hwMaskColour,
2042 uint32_t wMode);
2043
2044
2045/*!
2046 * \brief tile copy with colour-keying and specified mode
2047 * \param[in] ptOP the control block, NULL means using the default control block
2048 * \param[in] ptSource the source tile
2049 * \param[in] ptTarget the target tile
2050 * \param[in] ptRegion the target region, NULL means using the region of the
2051 * target tile.
2052 * \param[in] wMaskColour the key colour in any 32bit colour format
2053 * \param[in] wMode the copy mode
2054 * \return arm_fsm_rt_t the operation result
2055 *
2056 * \note alpha channel is not handled
2057 */
2058extern
2059ARM_NONNULL(2,3)
2062 const arm_2d_tile_t *ptSource,
2063 const arm_2d_tile_t *ptTarget,
2064 const arm_2d_region_t *ptRegion,
2065 uint32_t wMaskColour,
2066 uint32_t wMode);
2067
2068
2069/*----------------------------------------------------------------------------*
2070 * Copy tile to destination with colour-keying *
2071 *----------------------------------------------------------------------------*/
2072
2073/*!
2074 * \brief tile copy with colour-keying
2075 * \param[in] ptOP the control block, NULL means using the default control block
2076 * \param[in] ptSource the source tile
2077 * \param[in] ptTarget the target tile
2078 * \param[in] ptRegion the target region, NULL means using the region of the
2079 * target tile.
2080 * \param[in] chMaskColour the key colour in any 8bit colour format
2081 * \return arm_fsm_rt_t the operation result
2082 */
2083extern
2084ARM_NONNULL(2,3)
2087 const arm_2d_tile_t *ptSource,
2088 const arm_2d_tile_t *ptTarget,
2089 const arm_2d_region_t *ptRegion,
2090 uint8_t chMaskColour);
2091
2092/*!
2093 * \brief tile copy with colour-keying
2094 * \param[in] ptOP the control block, NULL means using the default control block
2095 * \param[in] ptSource the source tile
2096 * \param[in] ptTarget the target tile
2097 * \param[in] ptRegion the target region, NULL means using the region of the
2098 * target tile.
2099 * \param[in] hwMaskColour the key colour in any 16bit colour format
2100 * \return arm_fsm_rt_t the operation result
2101 *
2102 * \note alpha channel is not handled, i.e. rgba5551
2103 */
2104extern
2105ARM_NONNULL(2,3)
2108 const arm_2d_tile_t *ptSource,
2109 const arm_2d_tile_t *ptTarget,
2110 const arm_2d_region_t *ptRegion,
2111 uint16_t hwMaskColour);
2112
2113
2114/*!
2115 * \brief tile copy with colour-keying
2116 * \param[in] ptOP the control block, NULL means using the default control block
2117 * \param[in] ptSource the source tile
2118 * \param[in] ptTarget the target tile
2119 * \param[in] ptRegion the target region, NULL means using the region of the
2120 * target tile.
2121 * \param[in] wMaskColour the key colour in any 32bit colour format
2122 * \return arm_fsm_rt_t the operation result
2123 *
2124 * \note alpha channel is not handled
2125 */
2126extern
2127ARM_NONNULL(2,3)
2130 const arm_2d_tile_t *ptSource,
2131 const arm_2d_tile_t *ptTarget,
2132 const arm_2d_region_t *ptRegion,
2133 uint32_t wMaskColour);
2134
2135
2136/*----------------------------------------------------------------------------*
2137 * Copy tile to destination with colour-keying and x-mirroring *
2138 *----------------------------------------------------------------------------*/
2139
2140/*!
2141 * \brief tile copy with colour-keying and x-mirroring
2142 * \param[in] ptOP the control block, NULL means using the default control block
2143 * \param[in] ptSource the source tile
2144 * \param[in] ptTarget the target tile
2145 * \param[in] ptRegion the target region, NULL means using the region of the
2146 * target tile.
2147 * \param[in] chMaskColour the key colour in any 8bit colour format
2148 * \return arm_fsm_rt_t the operation result
2149 */
2150extern
2151ARM_NONNULL(2,3)
2154 const arm_2d_tile_t *ptSource,
2155 const arm_2d_tile_t *ptTarget,
2156 const arm_2d_region_t *ptRegion,
2157 uint8_t chMaskColour);
2158
2159/*!
2160 * \brief tile copy with colour-keying and x-mirroring
2161 * \param[in] ptOP the control block, NULL means using the default control block
2162 * \param[in] ptSource the source tile
2163 * \param[in] ptTarget the target tile
2164 * \param[in] ptRegion the target region, NULL means using the region of the
2165 * target tile.
2166 * \param[in] hwMaskColour the key colour in any 16bit colour format
2167 * \return arm_fsm_rt_t the operation result
2168 *
2169 * \note alpha channel is not handled, i.e. rgba5551
2170 */
2171extern
2172ARM_NONNULL(2,3)
2175 const arm_2d_tile_t *ptSource,
2176 const arm_2d_tile_t *ptTarget,
2177 const arm_2d_region_t *ptRegion,
2178 uint16_t hwMaskColour);
2179
2180
2181/*!
2182 * \brief tile copy with colour-keying and x-mirroring
2183 * \param[in] ptOP the control block, NULL means using the default control block
2184 * \param[in] ptSource the source tile
2185 * \param[in] ptTarget the target tile
2186 * \param[in] ptRegion the target region, NULL means using the region of the
2187 * target tile.
2188 * \param[in] wMaskColour the key colour in any 32bit colour format
2189 * \return arm_fsm_rt_t the operation result
2190 *
2191 * \note alpha channel is not handled
2192 */
2193extern
2194ARM_NONNULL(2,3)
2197 const arm_2d_tile_t *ptSource,
2198 const arm_2d_tile_t *ptTarget,
2199 const arm_2d_region_t *ptRegion,
2200 uint32_t wMaskColour);
2201
2202
2203/*----------------------------------------------------------------------------*
2204 * Copy tile to destination with colour-keying and y-mirroring *
2205 *----------------------------------------------------------------------------*/
2206
2207/*!
2208 * \brief tile copy with colour-keying and y-mirroring
2209 * \param[in] ptOP the control block, NULL means using the default control block
2210 * \param[in] ptSource the source tile
2211 * \param[in] ptTarget the target tile
2212 * \param[in] ptRegion the target region, NULL means using the region of the
2213 * target tile.
2214 * \param[in] chMaskColour the key colour in any 8bit colour format
2215 * \return arm_fsm_rt_t the operation result
2216 */
2217extern
2218ARM_NONNULL(2,3)
2221 const arm_2d_tile_t *ptSource,
2222 const arm_2d_tile_t *ptTarget,
2223 const arm_2d_region_t *ptRegion,
2224 uint8_t chMaskColour);
2225
2226/*!
2227 * \brief tile copy with colour-keying and y-mirroring
2228 * \param[in] ptOP the control block, NULL means using the default control block
2229 * \param[in] ptSource the source tile
2230 * \param[in] ptTarget the target tile
2231 * \param[in] ptRegion the target region, NULL means using the region of the
2232 * target tile.
2233 * \param[in] hwMaskColour the key colour in any 16bit colour format
2234 * \return arm_fsm_rt_t the operation result
2235 *
2236 * \note alpha channel is not handled, i.e. rgba5551
2237 */
2238extern
2239ARM_NONNULL(2,3)
2242 const arm_2d_tile_t *ptSource,
2243 const arm_2d_tile_t *ptTarget,
2244 const arm_2d_region_t *ptRegion,
2245 uint16_t hwMaskColour);
2246
2247
2248/*!
2249 * \brief tile copy with colour-keying and y-mirroring
2250 * \param[in] ptOP the control block, NULL means using the default control block
2251 * \param[in] ptSource the source tile
2252 * \param[in] ptTarget the target tile
2253 * \param[in] ptRegion the target region, NULL means using the region of the
2254 * target tile.
2255 * \param[in] wMaskColour the key colour in any 32bit colour format
2256 * \return arm_fsm_rt_t the operation result
2257 *
2258 * \note alpha channel is not handled
2259 */
2260extern
2261ARM_NONNULL(2,3)
2264 const arm_2d_tile_t *ptSource,
2265 const arm_2d_tile_t *ptTarget,
2266 const arm_2d_region_t *ptRegion,
2267 uint32_t wMaskColour);
2268
2269/*----------------------------------------------------------------------------*
2270 * Copy tile to destination with colour-keying and xy-mirroring *
2271 *----------------------------------------------------------------------------*/
2272
2273/*!
2274 * \brief tile copy with colour-keying and xy-mirroring
2275 * \param[in] ptOP the control block, NULL means using the default control block
2276 * \param[in] ptSource the source tile
2277 * \param[in] ptTarget the target tile
2278 * \param[in] ptRegion the target region, NULL means using the region of the
2279 * target tile.
2280 * \param[in] chMaskColour the key colour in any 8bit colour format
2281 * \return arm_fsm_rt_t the operation result
2282 */
2283extern
2284ARM_NONNULL(2,3)
2287 const arm_2d_tile_t *ptSource,
2288 const arm_2d_tile_t *ptTarget,
2289 const arm_2d_region_t *ptRegion,
2290 uint8_t chMaskColour);
2291
2292/*!
2293 * \brief tile copy with colour-keying and xy-mirroring
2294 * \param[in] ptOP the control block, NULL means using the default control block
2295 * \param[in] ptSource the source tile
2296 * \param[in] ptTarget the target tile
2297 * \param[in] ptRegion the target region, NULL means using the region of the
2298 * target tile.
2299 * \param[in] hwMaskColour the key colour in any 16bit colour format
2300 * \return arm_fsm_rt_t the operation result
2301 *
2302 * \note alpha channel is not handled, i.e. rgba5551
2303 */
2304extern
2305ARM_NONNULL(2,3)
2308 const arm_2d_tile_t *ptSource,
2309 const arm_2d_tile_t *ptTarget,
2310 const arm_2d_region_t *ptRegion,
2311 uint16_t hwMaskColour);
2312
2313
2314/*!
2315 * \brief tile copy with colour-keying and xy-mirroring
2316 * \param[in] ptOP the control block, NULL means using the default control block
2317 * \param[in] ptSource the source tile
2318 * \param[in] ptTarget the target tile
2319 * \param[in] ptRegion the target region, NULL means using the region of the
2320 * target tile.
2321 * \param[in] wMaskColour the key colour in any 32bit colour format
2322 * \return arm_fsm_rt_t the operation result
2323 *
2324 * \note alpha channel is not handled
2325 */
2326extern
2327ARM_NONNULL(2,3)
2330 const arm_2d_tile_t *ptSource,
2331 const arm_2d_tile_t *ptTarget,
2332 const arm_2d_region_t *ptRegion,
2333 uint32_t wMaskColour);
2334
2335
2336/*----------------------------------------------------------------------------*
2337 * Tile filling (tiling) to destination with colour-keying *
2338 *----------------------------------------------------------------------------*/
2339
2340/*!
2341 * \brief tile filling (tiling) with colour-keying
2342 * \param[in] ptOP the control block, NULL means using the default control block
2343 * \param[in] ptSource the source tile
2344 * \param[in] ptTarget the target tile
2345 * \param[in] ptRegion the target region, NULL means using the region of the
2346 * target tile.
2347 * \param[in] chMaskColour the key colour in any 8bit colour format
2348 * \return arm_fsm_rt_t the operation result
2349 */
2350extern
2351ARM_NONNULL(2,3)
2354 const arm_2d_tile_t *ptSource,
2355 const arm_2d_tile_t *ptTarget,
2356 const arm_2d_region_t *ptRegion,
2357 uint8_t chMaskColour);
2358
2359/*!
2360 * \brief tile filling (tiling) with colour-keying
2361 * \param[in] ptOP the control block, NULL means using the default control block
2362 * \param[in] ptSource the source tile
2363 * \param[in] ptTarget the target tile
2364 * \param[in] ptRegion the target region, NULL means using the region of the
2365 * target tile.
2366 * \param[in] hwMaskColour the key colour in any 16bit colour format
2367 * \return arm_fsm_rt_t the operation result
2368 *
2369 * \note alpha channel is not handled, i.e. rgba5551
2370 */
2371extern
2372ARM_NONNULL(2,3)
2375 const arm_2d_tile_t *ptSource,
2376 const arm_2d_tile_t *ptTarget,
2377 const arm_2d_region_t *ptRegion,
2378 uint16_t hwMaskColour);
2379
2380
2381/*!
2382 * \brief tile filling (tiling) with colour-keying
2383 * \param[in] ptOP the control block, NULL means using the default control block
2384 * \param[in] ptSource the source tile
2385 * \param[in] ptTarget the target tile
2386 * \param[in] ptRegion the target region, NULL means using the region of the
2387 * target tile.
2388 * \param[in] wMaskColour the key colour in any 32bit colour format
2389 * \return arm_fsm_rt_t the operation result
2390 *
2391 * \note alpha channel is not handled
2392 */
2393extern
2394ARM_NONNULL(2,3)
2397 const arm_2d_tile_t *ptSource,
2398 const arm_2d_tile_t *ptTarget,
2399 const arm_2d_region_t *ptRegion,
2400 uint32_t wMaskColour);
2401
2402
2403/*----------------------------------------------------------------------------*
2404 * Tile filling (tiling) to destination with colour-keying and x-mirroring *
2405 *----------------------------------------------------------------------------*/
2406
2407/*!
2408 * \brief tile filling (tiling) with colour-keying and x-mirroring
2409 * \param[in] ptOP the control block, NULL means using the default control block
2410 * \param[in] ptSource the source tile
2411 * \param[in] ptTarget the target tile
2412 * \param[in] ptRegion the target region, NULL means using the region of the
2413 * target tile.
2414 * \param[in] chMaskColour the key colour in any 8bit colour format
2415 * \return arm_fsm_rt_t the operation result
2416 */
2417extern
2418ARM_NONNULL(2,3)
2421 const arm_2d_tile_t *ptSource,
2422 const arm_2d_tile_t *ptTarget,
2423 const arm_2d_region_t *ptRegion,
2424 uint8_t chMaskColour);
2425
2426/*!
2427 * \brief tile filling (tiling) with colour-keying and x-mirroring
2428 * \param[in] ptOP the control block, NULL means using the default control block
2429 * \param[in] ptSource the source tile
2430 * \param[in] ptTarget the target tile
2431 * \param[in] ptRegion the target region, NULL means using the region of the
2432 * target tile.
2433 * \param[in] hwMaskColour the key colour in any 16bit colour format
2434 * \return arm_fsm_rt_t the operation result
2435 *
2436 * \note alpha channel is not handled, i.e. rgba5551
2437 */
2438extern
2439ARM_NONNULL(2,3)
2442 const arm_2d_tile_t *ptSource,
2443 const arm_2d_tile_t *ptTarget,
2444 const arm_2d_region_t *ptRegion,
2445 uint16_t hwMaskColour);
2446
2447
2448/*!
2449 * \brief tile filling (tiling) with colour-keying and x-mirroring
2450 * \param[in] ptOP the control block, NULL means using the default control block
2451 * \param[in] ptSource the source tile
2452 * \param[in] ptTarget the target tile
2453 * \param[in] ptRegion the target region, NULL means using the region of the
2454 * target tile.
2455 * \param[in] wMaskColour the key colour in any 32bit colour format
2456 * \return arm_fsm_rt_t the operation result
2457 *
2458 * \note alpha channel is not handled
2459 */
2460extern
2461ARM_NONNULL(2,3)
2464 const arm_2d_tile_t *ptSource,
2465 const arm_2d_tile_t *ptTarget,
2466 const arm_2d_region_t *ptRegion,
2467 uint32_t wMaskColour);
2468
2469
2470/*----------------------------------------------------------------------------*
2471 * Tile filling (tiling) to destination with colour-keying and y-mirroring *
2472 *----------------------------------------------------------------------------*/
2473
2474/*!
2475 * \brief tile filling (tiling) with colour-keying and y-mirroring
2476 * \param[in] ptOP the control block, NULL means using the default control block
2477 * \param[in] ptSource the source tile
2478 * \param[in] ptTarget the target tile
2479 * \param[in] ptRegion the target region, NULL means using the region of the
2480 * target tile.
2481 * \param[in] chMaskColour the key colour in any 8bit colour format
2482 * \return arm_fsm_rt_t the operation result
2483 */
2484extern
2485ARM_NONNULL(2,3)
2488 const arm_2d_tile_t *ptSource,
2489 const arm_2d_tile_t *ptTarget,
2490 const arm_2d_region_t *ptRegion,
2491 uint8_t chMaskColour);
2492
2493/*!
2494 * \brief tile filling (tiling) with colour-keying and y-mirroring
2495 * \param[in] ptOP the control block, NULL means using the default control block
2496 * \param[in] ptSource the source tile
2497 * \param[in] ptTarget the target tile
2498 * \param[in] ptRegion the target region, NULL means using the region of the
2499 * target tile.
2500 * \param[in] hwMaskColour the key colour in any 16bit colour format
2501 * \return arm_fsm_rt_t the operation result
2502 *
2503 * \note alpha channel is not handled, i.e. rgba5551
2504 */
2505extern
2506ARM_NONNULL(2,3)
2509 const arm_2d_tile_t *ptSource,
2510 const arm_2d_tile_t *ptTarget,
2511 const arm_2d_region_t *ptRegion,
2512 uint16_t hwMaskColour);
2513
2514
2515/*!
2516 * \brief tile filling (tiling) with colour-keying and y-mirroring
2517 * \param[in] ptOP the control block, NULL means using the default control block
2518 * \param[in] ptSource the source tile
2519 * \param[in] ptTarget the target tile
2520 * \param[in] ptRegion the target region, NULL means using the region of the
2521 * target tile.
2522 * \param[in] wMaskColour the key colour in any 32bit colour format
2523 * \return arm_fsm_rt_t the operation result
2524 *
2525 * \note alpha channel is not handled
2526 */
2527extern
2528ARM_NONNULL(2,3)
2531 const arm_2d_tile_t *ptSource,
2532 const arm_2d_tile_t *ptTarget,
2533 const arm_2d_region_t *ptRegion,
2534 uint32_t wMaskColour);
2535
2536/*----------------------------------------------------------------------------*
2537 * Tile filling (tiling) to destination with colour-keying and xy-mirroring *
2538 *----------------------------------------------------------------------------*/
2539
2540/*!
2541 * \brief tile filling (tiling) with colour-keying and xy-mirroring
2542 * \param[in] ptOP the control block, NULL means using the default control block
2543 * \param[in] ptSource the source tile
2544 * \param[in] ptTarget the target tile
2545 * \param[in] ptRegion the target region, NULL means using the region of the
2546 * target tile.
2547 * \param[in] chMaskColour the key colour in any 8bit colour format
2548 * \return arm_fsm_rt_t the operation result
2549 */
2550extern
2551ARM_NONNULL(2,3)
2554 const arm_2d_tile_t *ptSource,
2555 const arm_2d_tile_t *ptTarget,
2556 const arm_2d_region_t *ptRegion,
2557 uint8_t chMaskColour);
2558
2559/*!
2560 * \brief tile filling (tiling) with colour-keying and xy-mirroring
2561 * \param[in] ptOP the control block, NULL means using the default control block
2562 * \param[in] ptSource the source tile
2563 * \param[in] ptTarget the target tile
2564 * \param[in] ptRegion the target region, NULL means using the region of the
2565 * target tile.
2566 * \param[in] hwMaskColour the key colour in any 16bit colour format
2567 * \return arm_fsm_rt_t the operation result
2568 *
2569 * \note alpha channel is not handled, i.e. rgba5551
2570 */
2571extern
2572ARM_NONNULL(2,3)
2575 const arm_2d_tile_t *ptSource,
2576 const arm_2d_tile_t *ptTarget,
2577 const arm_2d_region_t *ptRegion,
2578 uint16_t hwMaskColour);
2579
2580
2581/*!
2582 * \brief tile filling (tiling) with colour-keying and xy-mirroring
2583 * \param[in] ptOP the control block, NULL means using the default control block
2584 * \param[in] ptSource the source tile
2585 * \param[in] ptTarget the target tile
2586 * \param[in] ptRegion the target region, NULL means using the region of the
2587 * target tile.
2588 * \param[in] wMaskColour the key colour in any 32bit colour format
2589 * \return arm_fsm_rt_t the operation result
2590 *
2591 * \note alpha channel is not handled
2592 */
2593extern
2594ARM_NONNULL(2,3)
2597 const arm_2d_tile_t *ptSource,
2598 const arm_2d_tile_t *ptTarget,
2599 const arm_2d_region_t *ptRegion,
2600 uint32_t wMaskColour);
2601
2602
2603
2604
2605
2606/*! @} */
2607
2608#ifdef __cplusplus
2609}
2610#endif
2611
2612#endif