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