Arm-2D  
2D Image Processing Library for Cortex-M Processors
 
Loading...
Searching...
No Matches
arm_2d_transform.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: #include "arm_2d_transform.h"
22 * Description: Public header file to contain the APIs for transform
23 *
24 * $Date: 25 Nov 2022
25 * $Revision: V.1.0.3
26 *
27 * Target Processor: Cortex-M cores
28 * -------------------------------------------------------------------- */
29
30#ifndef __ARM_2D_ROTATION_H__
31#define __ARM_2D_ROTATION_H__
32
33/*============================ INCLUDES ======================================*/
34
35#include "arm_2d_types.h"
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41#if defined(__clang__)
42# pragma clang diagnostic push
43# pragma clang diagnostic ignored "-Wunknown-warning-option"
44# pragma clang diagnostic ignored "-Wreserved-identifier"
45# pragma clang diagnostic ignored "-Wsign-conversion"
46# pragma clang diagnostic ignored "-Wpadded"
47# pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
48#endif
49
50/*============================ MACROS ========================================*/
51/*!
52 * \addtogroup Deprecated
53 * @{
54 */
55#define arm_2d_op_rotate_t arm_2d_op_trans_t
56#define arm_2d_op_rotate_opacity_t arm_2d_op_trans_opa_t
57/*! @} */
58
59/*!
60 * \addtogroup Deprecated
61 * @{
62 */
63#define arm_2dp_tile_rotate arm_2dp_tile_transform
64
65#define arm_2dp_gray8_tile_rotate_prepare \
66 arm_2dp_gray8_tile_transform_prepare
67
68#define arm_2dp_rgb565_tile_rotate_prepare \
69 arm_2dp_rgb565_tile_transform_prepare
70
71#define arm_2dp_cccn888_tile_rotate_prepare \
72 arm_2dp_cccn888_tile_transform_prepare
73
74#define arm_2dp_gray8_tile_rotate_with_opacity_prepare \
75 arm_2dp_gray8_tile_transform_with_opacity_prepare
76
77#define arm_2dp_rgb565_tile_rotate_with_opacity_prepare \
78 arm_2dp_rgb565_tile_transform_with_opacity_prepare
79
80#define arm_2dp_cccn888_tile_rotate_with_opacity_prepare \
81 arm_2dp_cccn888_tile_transform_with_opacity_prepare
82
83#define arm_2d_gray8_tile_rotation_with_alpha_prepare \
84 arm_2d_gray8_tile_rotation_with_opacity_prepare
85
86#define arm_2d_rgb565_tile_rotation_with_alpha_prepare \
87 arm_2d_rgb565_tile_rotation_with_opacity_prepare
88
89#define arm_2d_rgb888_tile_rotation_with_alpha_prepare \
90 arm_2d_rgb888_tile_rotation_with_opacity_prepare
91
92#define arm_2d_cccn888_tile_rotation_with_alpha_prepare \
93 arm_2d_cccn888_tile_rotation_with_opacity_prepare
94
95#define arm_2dp_gray8_tile_rotation_with_alpha \
96 arm_2dp_gray8_tile_rotation_with_opacity
97
98#define arm_2dp_rgb565_tile_rotation_with_alpha \
99 arm_2dp_rgb565_tile_rotation_with_opacity
100
101#define arm_2dp_rgb888_tile_rotation_with_alpha \
102 arm_2dp_rgb888_tile_rotation_with_opacity
103
104#define arm_2dp_cccn888_tile_rotation_with_alpha \
105 arm_2dp_cccn888_tile_rotation_with_opacity
106
107#define arm_2d_gray8_tile_rotation_with_alpha \
108 arm_2d_gray8_tile_rotation_with_opacity
109
110#define arm_2d_rgb565_tile_rotation_with_alpha \
111 arm_2d_rgb565_tile_rotation_with_opacity
112
113#define arm_2d_rgb888_tile_rotation_with_alpha \
114 arm_2d_rgb888_tile_rotation_with_opacity
115
116#define arm_2d_cccn888_tile_rotation_with_alpha \
117 arm_2d_cccn888_tile_rotation_with_opacity
118
119#define arm_2d_gray8_tile_transform_with_alpha_prepare \
120 arm_2d_gray8_tile_transform_with_opacity_prepare
121
122#define arm_2d_rgb565_tile_transform_with_alpha_prepare \
123 arm_2d_rgb565_tile_transform_with_opacity_prepare
124
125#define arm_2d_rgb888_tile_transform_with_alpha_prepare \
126 arm_2d_rgb888_tile_transform_with_opacity_prepare
127
128#define arm_2d_cccn888_tile_transform_with_alpha_prepare \
129 arm_2d_cccn888_tile_transform_with_opacity_prepare
130
131#define arm_2d_gray8_tile_transform_with_alpha \
132 arm_2d_gray8_tile_transform_with_opacity
133
134#define arm_2d_rgb565_tile_transform_with_alpha \
135 arm_2d_rgb565_tile_transform_with_opacity
136
137#define arm_2d_rgb888_tile_transform_with_alpha \
138 arm_2d_rgb888_tile_transform_with_opacity
139
140#define arm_2d_cccn888_tile_transform_with_alpha \
141 arm_2d_cccn888_tile_transform_with_opacity
142
143#define arm_2dp_gray8_tile_transform_with_alpha \
144 arm_2dp_gray8_tile_transform_with_opacity
145
146#define arm_2dp_rgb565_tile_transform_with_alpha \
147 arm_2dp_rgb565_tile_transform_with_opacity
148
149#define arm_2dp_rgb888_tile_transform_with_alpha \
150 arm_2dp_rgb888_tile_transform_with_opacity
151
152#define arm_2dp_cccn888_tile_transform_with_alpha \
153 arm_2dp_cccn888_tile_transform_with_opacity
154
155#define arm_2d_gray8_tile_scaling_with_alpha_prepare \
156 arm_2d_gray8_tile_scaling_with_opacity_prepare
157
158#define arm_2d_rgb565_tile_scaling_with_alpha_prepare \
159 arm_2d_rgb565_tile_scaling_with_opacity_prepare
160
161#define arm_2d_rgb888_tile_scaling_with_alpha_prepare \
162 arm_2d_rgb888_tile_scaling_with_opacity_prepare
163
164#define arm_2d_cccn888_tile_scaling_with_alpha_prepare \
165 arm_2d_cccn888_tile_scaling_with_opacity_prepare
166
167#define arm_2dp_gray8_tile_scaling_with_alpha \
168 arm_2dp_gray8_tile_scaling_with_opacity
169
170#define arm_2dp_rgb565_tile_scaling_with_alpha \
171 arm_2dp_rgb565_tile_scaling_with_opacity
172
173#define arm_2dp_rgb888_tile_scaling_with_alpha \
174 arm_2dp_rgb888_tile_scaling_with_opacity
175
176#define arm_2dp_cccn888_tile_scaling_with_alpha \
177 arm_2dp_cccn888_tile_scaling_with_opacity
178
179#define arm_2d_gray8_tile_scaling_with_alpha \
180 arm_2d_gray8_tile_scaling_with_opacity
181
182#define arm_2d_rgb565_tile_scaling_with_alpha \
183 arm_2d_rgb565_tile_scaling_with_opacity
184
185#define arm_2d_rgb888_tile_scaling_with_alpha \
186 arm_2d_rgb888_tile_scaling_with_opacity
187
188#define arm_2d_cccn888_tile_scaling_with_alpha \
189 arm_2d_cccn888_tile_scaling_with_opacity
190/*! @} */
191
192/*!
193 * \addtogroup gTransform 5 Transform Operations
194 * @{
195 */
196
197/*============================ MACROFIED FUNCTIONS ===========================*/
198
199/*----------------------------------------------------------------------------*
200 * API wrappers: Rotation *
201 *----------------------------------------------------------------------------*/
202
203#define arm_2d_gray8_tile_rotation_prepare(__SRC_TILE_ADDR, \
204 __CENTRE, \
205 __ANGLE, \
206 __MSK_COLOUR) \
207 arm_2dp_gray8_tile_transform_prepare( NULL, \
208 (__SRC_TILE_ADDR), \
209 (__CENTRE), \
210 (float)(__ANGLE), \
211 1.0f, \
212 (__MSK_COLOUR))
213
214#define arm_2d_rgb565_tile_rotation_prepare(__SRC_TILE_ADDR, \
215 __CENTRE, \
216 __ANGLE, \
217 __MSK_COLOUR) \
218 arm_2dp_rgb565_tile_transform_prepare( NULL, \
219 (__SRC_TILE_ADDR), \
220 (__CENTRE), \
221 (float)(__ANGLE), \
222 1.0f, \
223 (__MSK_COLOUR))
224
225#define arm_2d_rgb888_tile_rotation_prepare(__SRC_TILE_ADDR, \
226 __CENTRE, \
227 __ANGLE, \
228 __MSK_COLOUR) \
229 arm_2dp_cccn888_tile_transform_prepare( NULL, \
230 (__SRC_TILE_ADDR), \
231 (__CENTRE), \
232 (float)(__ANGLE), \
233 1.0f, \
234 (__MSK_COLOUR))
235
236#define arm_2d_gray8_tile_rotation_with_opacity_prepare( \
237 __SRC_TILE_ADDR, \
238 __CENTRE, \
239 __ANGLE, \
240 __MSK_COLOUR, \
241 __RATIO) \
242 arm_2dp_gray8_tile_transform_with_opacity_prepare( NULL, \
243 (__SRC_TILE_ADDR), \
244 (__CENTRE), \
245 (float)(__ANGLE), \
246 1.0f, \
247 (__MSK_COLOUR), \
248 (__RATIO))
249
250#define arm_2d_rgb565_tile_rotation_with_opacity_prepare( \
251 __SRC_TILE_ADDR, \
252 __CENTRE, \
253 __ANGLE, \
254 __MSK_COLOUR, \
255 __RATIO) \
256 arm_2dp_rgb565_tile_transform_with_opacity_prepare( NULL, \
257 (__SRC_TILE_ADDR), \
258 (__CENTRE), \
259 (float)(__ANGLE), \
260 1.0f, \
261 (__MSK_COLOUR), \
262 (__RATIO))
263
264
265#define arm_2d_rgb888_tile_rotation_with_opacity_prepare( \
266 __SRC_TILE_ADDR, \
267 __CENTRE, \
268 __ANGLE, \
269 __MSK_COLOUR, \
270 __RATIO) \
271 arm_2dp_cccn888_tile_transform_with_opacity_prepare( NULL, \
272 (__SRC_TILE_ADDR), \
273 (__CENTRE), \
274 (float)(__ANGLE), \
275 1.0f, \
276 (__MSK_COLOUR), \
277 (__RATIO))
278
279
280#define arm_2d_cccn888_tile_rotation_with_opacity_prepare( \
281 __SRC_TILE_ADDR, \
282 __CENTRE, \
283 __ANGLE, \
284 __MSK_COLOUR, \
285 __RATIO) \
286 arm_2dp_cccn888_tile_transform_with_opacity_prepare( NULL, \
287 (__SRC_TILE_ADDR), \
288 (__CENTRE), \
289 (float)(__ANGLE), \
290 1.0f, \
291 (__MSK_COLOUR), \
292 (__RATIO))
293
294#define arm_2d_gray8_tile_rotation_with_src_mask_prepare( \
295 __SRC_TILE_ADDR, \
296 __SRC_MASK_ADDR, \
297 __CENTRE, \
298 __ANGLE) \
299 arm_2dp_gray8_tile_transform_with_src_mask_prepare( NULL, \
300 (__SRC_TILE_ADDR), \
301 (__SRC_MASK_ADDR), \
302 (__CENTRE), \
303 (float)(__ANGLE), \
304 1.0f)
305
306#define arm_2d_rgb565_tile_rotation_with_src_mask_prepare( \
307 __SRC_TILE_ADDR, \
308 __SRC_MASK_ADDR, \
309 __CENTRE, \
310 __ANGLE) \
311 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( NULL, \
312 (__SRC_TILE_ADDR), \
313 (__SRC_MASK_ADDR), \
314 (__CENTRE), \
315 (float)(__ANGLE), \
316 1.0f)
317
318#define arm_2d_cccn888_tile_rotation_with_src_mask_prepare( \
319 __SRC_TILE_ADDR, \
320 __SRC_MASK_ADDR, \
321 __CENTRE, \
322 __ANGLE) \
323 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( NULL, \
324 (__SRC_TILE_ADDR), \
325 (__SRC_MASK_ADDR), \
326 (__CENTRE), \
327 (float)(__ANGLE), \
328 1.0f)
329
330#define arm_2d_gray8_tile_rotation_with_src_mask_and_opacity_prepare( \
331 __SRC_TILE_ADDR, \
332 __SRC_MASK_ADDR, \
333 __CENTRE, \
334 __ANGLE, \
335 __OPACITY) \
336 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
337 NULL, \
338 (__SRC_TILE_ADDR), \
339 (__SRC_MASK_ADDR), \
340 (__CENTRE), \
341 (float)(__ANGLE), \
342 1.0f, \
343 (__OPACITY))
344
345#define arm_2d_rgb565_tile_rotation_with_src_mask_and_opacity_prepare( \
346 __SRC_TILE_ADDR, \
347 __SRC_MASK_ADDR, \
348 __CENTRE, \
349 __ANGLE, \
350 __OPACITY) \
351 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
352 NULL, \
353 (__SRC_TILE_ADDR), \
354 (__SRC_MASK_ADDR), \
355 (__CENTRE), \
356 (float)(__ANGLE), \
357 1.0f, \
358 (__OPACITY))
359
360#define arm_2d_cccn888_tile_rotation_with_src_mask_and_opacity_prepare( \
361 __SRC_TILE_ADDR, \
362 __SRC_MASK_ADDR, \
363 __CENTRE, \
364 __ANGLE, \
365 __OPACITY) \
366 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
367 NULL, \
368 (__SRC_TILE_ADDR), \
369 (__SRC_MASK_ADDR), \
370 (__CENTRE), \
371 (float)(__ANGLE), \
372 1.0f, \
373 (__OPACITY))
374
375#define arm_2d_tile_rotate( __DES_TILE_ADDR, \
376 __DES_REGION_ADDR, \
377 __DES_CENTRE_ADDR) \
378 arm_2dp_tile_transform(NULL, \
379 (__DES_TILE_ADDR), \
380 (__DES_REGION_ADDR), \
381 (__DES_CENTRE_ADDR))
382
383
384/* following macro APIs rely on the boolean variable bIsNewFrame.
385 * Please make sure you have define it with the correct name and the
386 * corresponding value. If you don't use the PFB interfaces for neight
387 * the low level rendering nor the high level GUI drawing, please find
388 * such variable with the value "true".
389 */
390
391#define arm_2dp_gray8_tile_rotation( __CB_ADDR, \
392 __SRC_TILE_ADDR, \
393 __DES_TILE_ADDR, \
394 __DES_REGION_ADDR, \
395 __CENTRE, \
396 __ANGLE, \
397 __MSK_COLOUR, \
398 ...) \
399 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
400 arm_2dp_gray8_tile_transform_prepare( \
401 (__CB_ADDR), \
402 (__SRC_TILE_ADDR), \
403 (__CENTRE), \
404 (__ANGLE), \
405 1.0f, \
406 (__MSK_COLOUR)); \
407 }; \
408 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
409 (__DES_TILE_ADDR), \
410 (__DES_REGION_ADDR), \
411 (NULL,##__VA_ARGS__)); \
412 })
413
414#define arm_2dp_rgb565_tile_rotation( __CB_ADDR, \
415 __SRC_TILE_ADDR, \
416 __DES_TILE_ADDR, \
417 __DES_REGION_ADDR, \
418 __CENTRE, \
419 __ANGLE, \
420 __MSK_COLOUR, \
421 ...) \
422 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
423 arm_2dp_rgb565_tile_transform_prepare( \
424 (__CB_ADDR), \
425 (__SRC_TILE_ADDR), \
426 (__CENTRE), \
427 (__ANGLE), \
428 1.0f, \
429 (__MSK_COLOUR)); \
430 }; \
431 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
432 (__DES_TILE_ADDR), \
433 (__DES_REGION_ADDR), \
434 (NULL,##__VA_ARGS__)); \
435 })
436
437
438#define arm_2dp_cccn888_tile_rotation( __CB_ADDR, \
439 __SRC_TILE_ADDR, \
440 __DES_TILE_ADDR, \
441 __DES_REGION_ADDR, \
442 __CENTRE, \
443 __ANGLE, \
444 __MSK_COLOUR,...) \
445 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
446 arm_2dp_cccn888_tile_transform_prepare( \
447 (__CB_ADDR), \
448 (__SRC_TILE_ADDR), \
449 (__CENTRE), \
450 (__ANGLE), \
451 1.0f, \
452 (__MSK_COLOUR)); \
453 }; \
454 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
455 (__DES_TILE_ADDR), \
456 (__DES_REGION_ADDR), \
457 (NULL,##__VA_ARGS__)); \
458 })
459
460
461
462#define arm_2dp_gray8_tile_rotation_with_opacity( \
463 __CB_ADDR, \
464 __SRC_TILE_ADDR, \
465 __DES_TILE_ADDR, \
466 __DES_REGION_ADDR, \
467 __CENTRE, \
468 __ANGLE, \
469 __MSK_COLOUR, \
470 __RATIO,...) \
471 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
472 arm_2dp_gray8_tile_transform_with_opacity_prepare( \
473 (__CB_ADDR), \
474 (__SRC_TILE_ADDR), \
475 (__CENTRE), \
476 (__ANGLE), \
477 1.0f, \
478 (__MSK_COLOUR), \
479 (__RATIO)); \
480 }; \
481 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
482 (__DES_TILE_ADDR), \
483 (__DES_REGION_ADDR), \
484 (NULL,##__VA_ARGS__)); \
485 })
486
487
488#define arm_2dp_rgb565_tile_rotation_with_opacity( \
489 __CB_ADDR, \
490 __SRC_TILE_ADDR, \
491 __DES_TILE_ADDR, \
492 __DES_REGION_ADDR, \
493 __CENTRE, \
494 __ANGLE, \
495 __MSK_COLOUR, \
496 __RATIO,...) \
497 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
498 arm_2dp_rgb565_tile_transform_with_opacity_prepare( \
499 (__CB_ADDR), \
500 (__SRC_TILE_ADDR), \
501 (__CENTRE), \
502 (__ANGLE), \
503 1.0f, \
504 (__MSK_COLOUR), \
505 (__RATIO)); \
506 }; \
507 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
508 (__DES_TILE_ADDR), \
509 (__DES_REGION_ADDR), \
510 (NULL,##__VA_ARGS__)); \
511 })
512
513
514
515#define arm_2dp_rgb888_tile_rotation_with_opacity( \
516 __CB_ADDR, \
517 __SRC_TILE_ADDR, \
518 __DES_TILE_ADDR, \
519 __DES_REGION_ADDR, \
520 __CENTRE, \
521 __ANGLE, \
522 __MSK_COLOUR, \
523 __RATIO, ...) \
524 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
525 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
526 (__CB_ADDR), \
527 (__SRC_TILE_ADDR), \
528 (__CENTRE), \
529 (__ANGLE), \
530 1.0f, \
531 (__MSK_COLOUR), \
532 (__RATIO)); \
533 }; \
534 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
535 (__DES_TILE_ADDR), \
536 (__DES_REGION_ADDR), \
537 (NULL,##__VA_ARGS__)); \
538 })
539
540#define arm_2dp_cccn888_tile_rotation_with_opacity( \
541 __CB_ADDR, \
542 __SRC_TILE_ADDR, \
543 __DES_TILE_ADDR, \
544 __DES_REGION_ADDR, \
545 __CENTRE, \
546 __ANGLE, \
547 __MSK_COLOUR, \
548 __RATIO, ...) \
549 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
550 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
551 (__CB_ADDR), \
552 (__SRC_TILE_ADDR), \
553 (__CENTRE), \
554 (__ANGLE), \
555 1.0f, \
556 (__MSK_COLOUR), \
557 (__RATIO)); \
558 }; \
559 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
560 (__DES_TILE_ADDR), \
561 (__DES_REGION_ADDR), \
562 (NULL,##__VA_ARGS__)); \
563 })
564
565#define arm_2dp_gray8_tile_rotation_with_src_mask( \
566 __CB_ADDR, \
567 __SRC_TILE_ADDR, \
568 __SRC_MASK_ADDR, \
569 __DES_TILE_ADDR, \
570 __DES_REGION_ADDR, \
571 __CENTRE, \
572 __ANGLE, \
573 ...) \
574 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
575 arm_2dp_gray8_tile_transform_with_src_mask_prepare( \
576 (__CB_ADDR), \
577 (__SRC_TILE_ADDR), \
578 (__SRC_MASK_ADDR), \
579 (__CENTRE), \
580 (__ANGLE), \
581 1.0f); \
582 }; \
583 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
584 (__DES_TILE_ADDR), \
585 (__DES_REGION_ADDR), \
586 (NULL,##__VA_ARGS__)); \
587 })
588
589#define arm_2dp_rgb565_tile_rotation_with_src_mask( \
590 __CB_ADDR, \
591 __SRC_TILE_ADDR, \
592 __SRC_MASK_ADDR, \
593 __DES_TILE_ADDR, \
594 __DES_REGION_ADDR, \
595 __CENTRE, \
596 __ANGLE, \
597 ...) \
598 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
599 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( \
600 (__CB_ADDR), \
601 (__SRC_TILE_ADDR), \
602 (__SRC_MASK_ADDR), \
603 (__CENTRE), \
604 (__ANGLE), \
605 1.0f); \
606 }; \
607 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
608 (__DES_TILE_ADDR), \
609 (__DES_REGION_ADDR), \
610 (NULL,##__VA_ARGS__)); \
611 })
612
613#define arm_2dp_cccn888_tile_rotation_with_src_mask( \
614 __CB_ADDR, \
615 __SRC_TILE_ADDR, \
616 __SRC_MASK_ADDR, \
617 __DES_TILE_ADDR, \
618 __DES_REGION_ADDR, \
619 __CENTRE, \
620 __ANGLE, \
621 ...) \
622 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
623 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( \
624 (__CB_ADDR), \
625 (__SRC_TILE_ADDR), \
626 (__SRC_MASK_ADDR), \
627 (__CENTRE), \
628 (__ANGLE), \
629 1.0f); \
630 }; \
631 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
632 (__DES_TILE_ADDR), \
633 (__DES_REGION_ADDR), \
634 (NULL,##__VA_ARGS__)); \
635 })
636
637#define arm_2dp_gray8_tile_rotation_with_src_mask_and_opacity( \
638 __CB_ADDR, \
639 __SRC_TILE_ADDR, \
640 __SRC_MASK_ADDR, \
641 __DES_TILE_ADDR, \
642 __DES_REGION_ADDR, \
643 __CENTRE, \
644 __ANGLE, \
645 __OPACITY, \
646 ...) \
647 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
648 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
649 (__CB_ADDR), \
650 (__SRC_TILE_ADDR), \
651 (__SRC_MASK_ADDR), \
652 (__CENTRE), \
653 (__ANGLE), \
654 1.0f, \
655 (__OPACITY)); \
656 }; \
657 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
658 (__DES_TILE_ADDR), \
659 (__DES_REGION_ADDR), \
660 (NULL,##__VA_ARGS__)); \
661 })
662
663#define arm_2dp_rgb565_tile_rotation_with_src_mask_and_opacity( \
664 __CB_ADDR, \
665 __SRC_TILE_ADDR, \
666 __SRC_MASK_ADDR, \
667 __DES_TILE_ADDR, \
668 __DES_REGION_ADDR, \
669 __CENTRE, \
670 __ANGLE, \
671 __OPACITY, \
672 ...) \
673 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
674 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
675 (__CB_ADDR), \
676 (__SRC_TILE_ADDR), \
677 (__SRC_MASK_ADDR), \
678 (__CENTRE), \
679 (__ANGLE), \
680 1.0f, \
681 (__OPACITY)); \
682 }; \
683 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
684 (__DES_TILE_ADDR), \
685 (__DES_REGION_ADDR), \
686 (NULL,##__VA_ARGS__)); \
687 })
688
689#define arm_2dp_cccn888_tile_rotation_with_src_mask_and_opacity( \
690 __CB_ADDR, \
691 __SRC_TILE_ADDR, \
692 __SRC_MASK_ADDR, \
693 __DES_TILE_ADDR, \
694 __DES_REGION_ADDR, \
695 __CENTRE, \
696 __ANGLE, \
697 __OPACITY, \
698 ...) \
699 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
700 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
701 (__CB_ADDR), \
702 (__SRC_TILE_ADDR), \
703 (__SRC_MASK_ADDR), \
704 (__CENTRE), \
705 (__ANGLE), \
706 1.0f, \
707 (__OPACITY)); \
708 }; \
709 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
710 (__DES_TILE_ADDR), \
711 (__DES_REGION_ADDR), \
712 (NULL,##__VA_ARGS__)); \
713 })
714
715#define arm_2d_gray8_tile_rotation( \
716 __SRC_TILE_ADDR, \
717 __DES_TILE_ADDR, \
718 __DES_REGION_ADDR, \
719 __CENTRE, \
720 __ANGLE, \
721 __MSK_COLOUR, ...) \
722 ({{ \
723 arm_2dp_gray8_tile_transform_prepare( \
724 (NULL), \
725 (__SRC_TILE_ADDR), \
726 (__CENTRE), \
727 (__ANGLE), \
728 1.0f, \
729 (__MSK_COLOUR)); \
730 }; \
731 arm_2dp_tile_transform(NULL, \
732 (__DES_TILE_ADDR), \
733 (__DES_REGION_ADDR), \
734 (NULL,##__VA_ARGS__)); \
735 })
736
737
738#define arm_2d_rgb565_tile_rotation( \
739 __SRC_TILE_ADDR, \
740 __DES_TILE_ADDR, \
741 __DES_REGION_ADDR, \
742 __CENTRE, \
743 __ANGLE, \
744 __MSK_COLOUR, ...) \
745 ({{ \
746 arm_2dp_rgb565_tile_transform_prepare( \
747 (NULL), \
748 (__SRC_TILE_ADDR), \
749 (__CENTRE), \
750 (__ANGLE), \
751 1.0f, \
752 (__MSK_COLOUR)); \
753 }; \
754 arm_2dp_tile_transform(NULL, \
755 (__DES_TILE_ADDR), \
756 (__DES_REGION_ADDR), \
757 (NULL,##__VA_ARGS__)); \
758 })
759
760
761#define arm_2d_rgb888_tile_rotation( \
762 __SRC_TILE_ADDR, \
763 __DES_TILE_ADDR, \
764 __DES_REGION_ADDR, \
765 __CENTRE, \
766 __ANGLE, \
767 __MSK_COLOUR, ...) \
768 ({{ \
769 arm_2dp_cccn888_tile_transform_prepare( \
770 NULL, \
771 (__SRC_TILE_ADDR), \
772 (__CENTRE), \
773 (__ANGLE), \
774 1.0f, \
775 (__MSK_COLOUR)); \
776 }; \
777 arm_2dp_tile_transform(NULL, \
778 (__DES_TILE_ADDR), \
779 (__DES_REGION_ADDR), \
780 (NULL,##__VA_ARGS__)); \
781 })
782
783#define arm_2d_gray8_tile_rotation_with_opacity( \
784 __SRC_TILE_ADDR, \
785 __DES_TILE_ADDR, \
786 __DES_REGION_ADDR, \
787 __CENTRE, \
788 __ANGLE, \
789 __MSK_COLOUR, \
790 __RATIO, ...) \
791 ({{ \
792 arm_2dp_gray8_tile_transform_with_opacity_prepare( \
793 NULL, \
794 (__SRC_TILE_ADDR), \
795 (__CENTRE), \
796 (__ANGLE), \
797 1.0f, \
798 (__MSK_COLOUR), \
799 (__RATIO)); \
800 }; \
801 arm_2dp_tile_transform(NULL, \
802 (__DES_TILE_ADDR), \
803 (__DES_REGION_ADDR), \
804 (NULL,##__VA_ARGS__)); \
805 })
806
807#define arm_2d_rgb565_tile_rotation_with_opacity( \
808 __SRC_TILE_ADDR, \
809 __DES_TILE_ADDR, \
810 __DES_REGION_ADDR, \
811 __CENTRE, \
812 __ANGLE, \
813 __MSK_COLOUR, \
814 __RATIO, ...) \
815 ({{ \
816 arm_2dp_rgb565_tile_transform_with_opacity_prepare( \
817 NULL, \
818 (__SRC_TILE_ADDR), \
819 (__CENTRE), \
820 (__ANGLE), \
821 1.0f, \
822 (__MSK_COLOUR), \
823 (__RATIO)); \
824 }; \
825 arm_2dp_tile_transform(NULL, \
826 (__DES_TILE_ADDR), \
827 (__DES_REGION_ADDR), \
828 (NULL,##__VA_ARGS__)); \
829 })
830
831#define arm_2d_rgb888_tile_rotation_with_opacity( \
832 __SRC_TILE_ADDR, \
833 __DES_TILE_ADDR, \
834 __DES_REGION_ADDR, \
835 __CENTRE, \
836 __ANGLE, \
837 __MSK_COLOUR, \
838 __RATIO, ...) \
839 ({{ \
840 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
841 NULL, \
842 (__SRC_TILE_ADDR), \
843 (__CENTRE), \
844 (__ANGLE), \
845 1.0f, \
846 (__MSK_COLOUR), \
847 (__RATIO)); \
848 }; \
849 arm_2dp_tile_transform(NULL, \
850 (__DES_TILE_ADDR), \
851 (__DES_REGION_ADDR), \
852 (NULL,##__VA_ARGS__)); \
853 })
854
855#define arm_2d_cccn888_tile_rotation_with_opacity( \
856 __SRC_TILE_ADDR, \
857 __DES_TILE_ADDR, \
858 __DES_REGION_ADDR, \
859 __CENTRE, \
860 __ANGLE, \
861 __MSK_COLOUR, \
862 __RATIO, ...) \
863 ({{ \
864 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
865 NULL, \
866 (__SRC_TILE_ADDR), \
867 (__CENTRE), \
868 (__ANGLE), \
869 1.0f, \
870 (__MSK_COLOUR), \
871 (__RATIO)); \
872 }; \
873 arm_2dp_tile_transform(NULL, \
874 (__DES_TILE_ADDR), \
875 (__DES_REGION_ADDR), \
876 (NULL,##__VA_ARGS__)); \
877 })
878
879#define arm_2d_gray8_tile_rotation_with_src_mask( \
880 __SRC_TILE_ADDR, \
881 __SRC_MASK_ADDR, \
882 __DES_TILE_ADDR, \
883 __DES_REGION_ADDR, \
884 __CENTRE, \
885 __ANGLE, \
886 ...) \
887 ({{ \
888 arm_2dp_gray8_tile_transform_with_src_mask_prepare( \
889 (NULL), \
890 (__SRC_TILE_ADDR), \
891 (__SRC_MASK_ADDR), \
892 (__CENTRE), \
893 (__ANGLE), \
894 1.0f); \
895 }; \
896 arm_2dp_tile_transform(NULL, \
897 (__DES_TILE_ADDR), \
898 (__DES_REGION_ADDR), \
899 (NULL,##__VA_ARGS__)); \
900 })
901
902#define arm_2d_rgb565_tile_rotation_with_src_mask( \
903 __SRC_TILE_ADDR, \
904 __SRC_MASK_ADDR, \
905 __DES_TILE_ADDR, \
906 __DES_REGION_ADDR, \
907 __CENTRE, \
908 __ANGLE, \
909 ...) \
910 ({{ \
911 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( \
912 (NULL), \
913 (__SRC_TILE_ADDR), \
914 (__SRC_MASK_ADDR), \
915 (__CENTRE), \
916 (__ANGLE), \
917 1.0f); \
918 }; \
919 arm_2dp_tile_transform(NULL, \
920 (__DES_TILE_ADDR), \
921 (__DES_REGION_ADDR), \
922 (NULL,##__VA_ARGS__)); \
923 })
924
925#define arm_2d_cccn888_tile_rotation_with_src_mask( \
926 __SRC_TILE_ADDR, \
927 __SRC_MASK_ADDR, \
928 __DES_TILE_ADDR, \
929 __DES_REGION_ADDR, \
930 __CENTRE, \
931 __ANGLE, \
932 ...) \
933 ({{ \
934 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( \
935 (NULL), \
936 (__SRC_TILE_ADDR), \
937 (__SRC_MASK_ADDR), \
938 (__CENTRE), \
939 (__ANGLE), \
940 1.0f); \
941 }; \
942 arm_2dp_tile_transform(NULL, \
943 (__DES_TILE_ADDR), \
944 (__DES_REGION_ADDR), \
945 (NULL,##__VA_ARGS__)); \
946 })
947
948#define arm_2d_gray8_tile_rotation_with_src_mask_and_opacity( \
949 __SRC_TILE_ADDR, \
950 __SRC_MASK_ADDR, \
951 __DES_TILE_ADDR, \
952 __DES_REGION_ADDR, \
953 __CENTRE, \
954 __ANGLE, \
955 __OPACITY, \
956 ...) \
957 ({{ \
958 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
959 (NULL), \
960 (__SRC_TILE_ADDR), \
961 (__SRC_MASK_ADDR), \
962 (__CENTRE), \
963 (__ANGLE), \
964 1.0f, \
965 (__OPACITY)); \
966 }; \
967 arm_2dp_tile_transform(NULL, \
968 (__DES_TILE_ADDR), \
969 (__DES_REGION_ADDR), \
970 (NULL,##__VA_ARGS__)); \
971 })
972
973#define arm_2d_rgb565_tile_rotation_with_src_mask_and_opacity( \
974 __SRC_TILE_ADDR, \
975 __SRC_MASK_ADDR, \
976 __DES_TILE_ADDR, \
977 __DES_REGION_ADDR, \
978 __CENTRE, \
979 __ANGLE, \
980 __OPACITY, \
981 ...) \
982 ({{ \
983 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
984 (NULL), \
985 (__SRC_TILE_ADDR), \
986 (__SRC_MASK_ADDR), \
987 (__CENTRE), \
988 (__ANGLE), \
989 1.0f, \
990 (__OPACITY)); \
991 }; \
992 arm_2dp_tile_transform(NULL, \
993 (__DES_TILE_ADDR), \
994 (__DES_REGION_ADDR), \
995 (NULL,##__VA_ARGS__)); \
996 })
997
998#define arm_2d_cccn888_tile_rotation_with_src_mask_and_opacity( \
999 __SRC_TILE_ADDR, \
1000 __SRC_MASK_ADDR, \
1001 __DES_TILE_ADDR, \
1002 __DES_REGION_ADDR, \
1003 __CENTRE, \
1004 __ANGLE, \
1005 __OPACITY, \
1006 ...) \
1007 ({{ \
1008 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
1009 (NULL), \
1010 (__SRC_TILE_ADDR), \
1011 (__SRC_MASK_ADDR), \
1012 (__CENTRE), \
1013 (__ANGLE), \
1014 1.0f, \
1015 (__OPACITY)); \
1016 }; \
1017 arm_2dp_tile_transform(NULL, \
1018 (__DES_TILE_ADDR), \
1019 (__DES_REGION_ADDR), \
1020 (NULL,##__VA_ARGS__)); \
1021 })
1022
1023/*----------------------------------------------------------------------------*
1024 * API wrappers: Transform *
1025 *----------------------------------------------------------------------------*/
1026
1027#define arm_2d_gray8_tile_transform_prepare(__SRC_TILE_ADDR, \
1028 __CENTRE, \
1029 __ANGLE, \
1030 __SCALE, \
1031 __MSK_COLOUR) \
1032 arm_2dp_gray8_tile_transform_prepare( NULL, \
1033 (__SRC_TILE_ADDR), \
1034 (__CENTRE), \
1035 (float)(__ANGLE), \
1036 (float)(__SCALE), \
1037 (__MSK_COLOUR))
1038
1039#define arm_2d_rgb565_tile_transform_prepare(__SRC_TILE_ADDR, \
1040 __CENTRE, \
1041 __ANGLE, \
1042 __SCALE, \
1043 __MSK_COLOUR) \
1044 arm_2dp_rgb565_tile_transform_prepare( NULL, \
1045 (__SRC_TILE_ADDR), \
1046 (__CENTRE), \
1047 (float)(__ANGLE), \
1048 (float)(__SCALE), \
1049 (__MSK_COLOUR))
1050
1051
1052#define arm_2d_rgb888_tile_transform_prepare(__SRC_TILE_ADDR, \
1053 __CENTRE, \
1054 __ANGLE, \
1055 __SCALE, \
1056 __MSK_COLOUR) \
1057 arm_2dp_cccn888_tile_transform_prepare( NULL, \
1058 (__SRC_TILE_ADDR), \
1059 (__CENTRE), \
1060 (float)(__ANGLE), \
1061 (float)(__SCALE), \
1062 (__MSK_COLOUR))
1063
1064
1065#define arm_2d_gray8_tile_transform_with_opacity_prepare( \
1066 __SRC_TILE_ADDR, \
1067 __CENTRE, \
1068 __ANGLE, \
1069 __SCALE, \
1070 __MSK_COLOUR, \
1071 __RATIO) \
1072 arm_2dp_gray8_tile_transform_with_opacity_prepare( NULL, \
1073 (__SRC_TILE_ADDR), \
1074 (__CENTRE), \
1075 (float)(__ANGLE), \
1076 (float)(__SCALE), \
1077 (__MSK_COLOUR), \
1078 (__RATIO))
1079
1080#define arm_2d_rgb565_tile_transform_with_opacity_prepare( \
1081 __SRC_TILE_ADDR, \
1082 __CENTRE, \
1083 __ANGLE, \
1084 __SCALE, \
1085 __MSK_COLOUR, \
1086 __RATIO) \
1087 arm_2dp_rgb565_tile_transform_with_opacity_prepare( NULL, \
1088 (__SRC_TILE_ADDR), \
1089 (__CENTRE), \
1090 (float)(__ANGLE), \
1091 (float)(__SCALE), \
1092 (__MSK_COLOUR), \
1093 (__RATIO))
1094
1095
1096#define arm_2d_rgb888_tile_transform_with_opacity_prepare( \
1097 __SRC_TILE_ADDR, \
1098 __CENTRE, \
1099 __ANGLE, \
1100 __SCALE, \
1101 __MSK_COLOUR, \
1102 __RATIO) \
1103 arm_2dp_cccn888_tile_transform_with_opacity_prepare( NULL, \
1104 (__SRC_TILE_ADDR), \
1105 (__CENTRE), \
1106 (float)(__ANGLE), \
1107 (float)(__SCALE), \
1108 (__MSK_COLOUR), \
1109 (__RATIO))
1110
1111
1112#define arm_2d_cccn888_tile_transform_with_opacity_prepare( \
1113 __SRC_TILE_ADDR, \
1114 __CENTRE, \
1115 __ANGLE, \
1116 __SCALE, \
1117 __MSK_COLOUR, \
1118 __RATIO) \
1119 arm_2dp_cccn888_tile_transform_with_opacity_prepare( NULL, \
1120 (__SRC_TILE_ADDR), \
1121 (__CENTRE), \
1122 (float)(__ANGLE), \
1123 (float)(__SCALE), \
1124 (__MSK_COLOUR), \
1125 (__RATIO))
1126
1127#define arm_2d_gray8_tile_transform_with_src_mask_prepare( \
1128 __SRC_TILE_ADDR, \
1129 __SRC_MASK_ADDR, \
1130 __CENTRE, \
1131 __ANGLE, \
1132 __SCALE) \
1133 arm_2dp_gray8_tile_transform_with_src_mask_prepare( NULL, \
1134 (__SRC_TILE_ADDR), \
1135 (__SRC_MASK_ADDR), \
1136 (__CENTRE), \
1137 (float)(__ANGLE), \
1138 (float)(__SCALE))
1139
1140#define arm_2d_rgb565_tile_transform_with_src_mask_prepare( \
1141 __SRC_TILE_ADDR, \
1142 __SRC_MASK_ADDR, \
1143 __CENTRE, \
1144 __ANGLE, \
1145 __SCALE) \
1146 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( NULL, \
1147 (__SRC_TILE_ADDR), \
1148 (__SRC_MASK_ADDR), \
1149 (__CENTRE), \
1150 (float)(__ANGLE), \
1151 (float)(__SCALE))
1152
1153#define arm_2d_cccn888_tile_transform_with_src_mask_prepare( \
1154 __SRC_TILE_ADDR, \
1155 __SRC_MASK_ADDR, \
1156 __CENTRE, \
1157 __ANGLE, \
1158 __SCALE) \
1159 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( NULL, \
1160 (__SRC_TILE_ADDR), \
1161 (__SRC_MASK_ADDR), \
1162 (__CENTRE), \
1163 (float)(__ANGLE), \
1164 (float)(__SCALE))
1165
1166#define arm_2d_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
1167 __SRC_TILE_ADDR, \
1168 __SRC_MASK_ADDR, \
1169 __CENTRE, \
1170 __ANGLE, \
1171 __SCALE, \
1172 __OPACITY) \
1173 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
1174 NULL, \
1175 (__SRC_TILE_ADDR), \
1176 (__SRC_MASK_ADDR), \
1177 (__CENTRE), \
1178 (float)(__ANGLE), \
1179 (float)(__SCALE), \
1180 (__OPACITY))
1181
1182#define arm_2d_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
1183 __SRC_TILE_ADDR, \
1184 __SRC_MASK_ADDR, \
1185 __CENTRE, \
1186 __ANGLE, \
1187 __SCALE, \
1188 __OPACITY) \
1189 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
1190 NULL, \
1191 (__SRC_TILE_ADDR), \
1192 (__SRC_MASK_ADDR), \
1193 (__CENTRE), \
1194 (float)(__ANGLE), \
1195 (float)(__SCALE), \
1196 (__OPACITY))
1197
1198#define arm_2d_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
1199 __SRC_TILE_ADDR, \
1200 __SRC_MASK_ADDR, \
1201 __CENTRE, \
1202 __ANGLE, \
1203 __SCALE, \
1204 __OPACITY) \
1205 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
1206 NULL, \
1207 (__SRC_TILE_ADDR), \
1208 (__SRC_MASK_ADDR), \
1209 (__CENTRE), \
1210 (float)(__ANGLE), \
1211 (float)(__SCALE), \
1212 (__OPACITY))
1213
1214#define arm_2d_tile_transform( __DES_TILE_ADDR, \
1215 __DES_REGION_ADDR, \
1216 __DES_CENTRE_ADDR) \
1217 arm_2dp_tile_transform(NULL, \
1218 (__DES_TILE_ADDR), \
1219 (__DES_REGION_ADDR), \
1220 (__DES_CENTRE_ADDR))
1221
1222
1223/* following macro APIs rely on the boolean variable bIsNewFrame.
1224 * Please make sure you have define it with the correct name and the
1225 * corresponding value. If you don't use the PFB interfaces for neither
1226 * the low level rendering nor the high level GUI drawing, please find
1227 * such variable with the value "true".
1228 */
1229
1230#define arm_2dp_gray8_tile_transform( __CB_ADDR, \
1231 __SRC_TILE_ADDR, \
1232 __DES_TILE_ADDR, \
1233 __DES_REGION_ADDR, \
1234 __CENTRE, \
1235 __ANGLE, \
1236 __SCALE, \
1237 __MSK_COLOUR, \
1238 ...) \
1239 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1240 arm_2dp_gray8_tile_transform_prepare( \
1241 (__CB_ADDR), \
1242 (__SRC_TILE_ADDR), \
1243 (__CENTRE), \
1244 (float)(__ANGLE), \
1245 (float)(__SCALE), \
1246 (__MSK_COLOUR)); \
1247 }; \
1248 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1249 (__DES_TILE_ADDR), \
1250 (__DES_REGION_ADDR), \
1251 (NULL,##__VA_ARGS__)); \
1252 })
1253
1254#define arm_2dp_rgb565_tile_transform( __CB_ADDR, \
1255 __SRC_TILE_ADDR, \
1256 __DES_TILE_ADDR, \
1257 __DES_REGION_ADDR, \
1258 __CENTRE, \
1259 __ANGLE, \
1260 __SCALE, \
1261 __MSK_COLOUR, \
1262 ...) \
1263 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1264 arm_2dp_rgb565_tile_transform_prepare( \
1265 (__CB_ADDR), \
1266 (__SRC_TILE_ADDR), \
1267 (__CENTRE), \
1268 (float)(__ANGLE), \
1269 (float)(__SCALE), \
1270 (__MSK_COLOUR)); \
1271 }; \
1272 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1273 (__DES_TILE_ADDR), \
1274 (__DES_REGION_ADDR), \
1275 (NULL,##__VA_ARGS__)); \
1276 })
1277
1278
1279#define arm_2dp_cccn888_tile_transform( __CB_ADDR, \
1280 __SRC_TILE_ADDR, \
1281 __DES_TILE_ADDR, \
1282 __DES_REGION_ADDR, \
1283 __CENTRE, \
1284 __ANGLE, \
1285 __SCALE, \
1286 __MSK_COLOUR,...) \
1287 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1288 arm_2dp_cccn888_tile_transform_prepare( \
1289 (__CB_ADDR), \
1290 (__SRC_TILE_ADDR), \
1291 (__CENTRE), \
1292 (float)(__ANGLE), \
1293 (float)(__SCALE), \
1294 (__MSK_COLOUR)); \
1295 }; \
1296 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1297 (__DES_TILE_ADDR), \
1298 (__DES_REGION_ADDR), \
1299 (NULL,##__VA_ARGS__)); \
1300 })
1301
1302
1303#define arm_2dp_gray8_tile_transform_with_opacity( \
1304 __CB_ADDR, \
1305 __SRC_TILE_ADDR, \
1306 __DES_TILE_ADDR, \
1307 __DES_REGION_ADDR, \
1308 __CENTRE, \
1309 __ANGLE, \
1310 __SCALE, \
1311 __MSK_COLOUR, \
1312 __RATIO,...) \
1313 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1314 arm_2dp_gray8_tile_transform_with_opacity_prepare( \
1315 (__CB_ADDR), \
1316 (__SRC_TILE_ADDR), \
1317 (__CENTRE), \
1318 (float)(__ANGLE), \
1319 (float)(__SCALE), \
1320 (__MSK_COLOUR), \
1321 (__RATIO)); \
1322 }; \
1323 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1324 (__DES_TILE_ADDR), \
1325 (__DES_REGION_ADDR), \
1326 (NULL,##__VA_ARGS__)); \
1327 })
1328
1329
1330#define arm_2dp_rgb565_tile_transform_with_opacity( \
1331 __CB_ADDR, \
1332 __SRC_TILE_ADDR, \
1333 __DES_TILE_ADDR, \
1334 __DES_REGION_ADDR, \
1335 __CENTRE, \
1336 __ANGLE, \
1337 __SCALE, \
1338 __MSK_COLOUR, \
1339 __RATIO,...) \
1340 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1341 arm_2dp_rgb565_tile_transform_with_opacity_prepare( \
1342 (__CB_ADDR), \
1343 (__SRC_TILE_ADDR), \
1344 (__CENTRE), \
1345 (float)(__ANGLE), \
1346 (float)(__SCALE), \
1347 (__MSK_COLOUR), \
1348 (__RATIO)); \
1349 }; \
1350 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1351 (__DES_TILE_ADDR), \
1352 (__DES_REGION_ADDR), \
1353 (NULL,##__VA_ARGS__)); \
1354 })
1355
1356#define arm_2dp_rgb888_tile_transform_with_opacity( \
1357 __CB_ADDR, \
1358 __SRC_TILE_ADDR, \
1359 __DES_TILE_ADDR, \
1360 __DES_REGION_ADDR, \
1361 __CENTRE, \
1362 __ANGLE, \
1363 __SCALE, \
1364 __MSK_COLOUR, \
1365 __RATIO, ...) \
1366 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1367 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
1368 (__CB_ADDR), \
1369 (__SRC_TILE_ADDR), \
1370 (__CENTRE), \
1371 (float)(__ANGLE), \
1372 (float)(__SCALE), \
1373 (__MSK_COLOUR), \
1374 (__RATIO)); \
1375 }; \
1376 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1377 (__DES_TILE_ADDR), \
1378 (__DES_REGION_ADDR), \
1379 (NULL,##__VA_ARGS__)); \
1380 })
1381
1382#define arm_2dp_cccn888_tile_transform_with_opacity( \
1383 __CB_ADDR, \
1384 __SRC_TILE_ADDR, \
1385 __DES_TILE_ADDR, \
1386 __DES_REGION_ADDR, \
1387 __CENTRE, \
1388 __ANGLE, \
1389 __SCALE, \
1390 __MSK_COLOUR, \
1391 __RATIO, ...) \
1392 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1393 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
1394 (__CB_ADDR), \
1395 (__SRC_TILE_ADDR), \
1396 (__CENTRE), \
1397 (float)(__ANGLE), \
1398 (float)(__SCALE), \
1399 (__MSK_COLOUR), \
1400 (__RATIO)); \
1401 }; \
1402 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1403 (__DES_TILE_ADDR), \
1404 (__DES_REGION_ADDR), \
1405 (NULL,##__VA_ARGS__)); \
1406 })
1407
1408
1409
1410
1411
1412
1413
1414#define arm_2dp_gray8_fill_colour_with_mask_opacity_and_transform( \
1415 __CB_ADDR, \
1416 __MASK_ADDR, \
1417 __DES_TILE_ADDR, \
1418 __DES_REGION_ADDR, \
1419 __CENTRE, \
1420 __ANGLE, \
1421 __SCALE, \
1422 __MSK_COLOUR, \
1423 __RATIO,...) \
1424 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1425 arm_2dp_gray8_fill_colour_with_mask_opacity_and_transform_prepare( \
1426 (__CB_ADDR), \
1427 (__MASK_ADDR), \
1428 (__CENTRE), \
1429 (float)(__ANGLE), \
1430 (float)(__SCALE), \
1431 (__MSK_COLOUR), \
1432 (__RATIO)); \
1433 }; \
1434 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1435 (__DES_TILE_ADDR), \
1436 (__DES_REGION_ADDR), \
1437 (NULL,##__VA_ARGS__)); \
1438 })
1439
1440#define arm_2dp_rgb565_fill_colour_with_mask_opacity_and_transform( \
1441 __CB_ADDR, \
1442 __MASK_ADDR, \
1443 __DES_TILE_ADDR, \
1444 __DES_REGION_ADDR, \
1445 __CENTRE, \
1446 __ANGLE, \
1447 __SCALE, \
1448 __MSK_COLOUR, \
1449 __RATIO,...) \
1450 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1451 arm_2dp_rgb565_fill_colour_with_mask_opacity_and_transform_prepare( \
1452 (__CB_ADDR), \
1453 (__MASK_ADDR), \
1454 (__CENTRE), \
1455 (float)(__ANGLE), \
1456 (float)(__SCALE), \
1457 (__MSK_COLOUR), \
1458 (__RATIO)); \
1459 }; \
1460 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1461 (__DES_TILE_ADDR), \
1462 (__DES_REGION_ADDR), \
1463 (NULL,##__VA_ARGS__)); \
1464 })
1465
1466#define arm_2dp_rgb888_fill_colour_with_mask_opacity_and_transform( \
1467 __CB_ADDR, \
1468 __MASK_ADDR, \
1469 __DES_TILE_ADDR, \
1470 __DES_REGION_ADDR, \
1471 __CENTRE, \
1472 __ANGLE, \
1473 __SCALE, \
1474 __MSK_COLOUR, \
1475 __RATIO,...) \
1476 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1477 arm_2dp_cccn888_fill_colour_with_mask_opacity_and_transform_prepare(\
1478 (__CB_ADDR), \
1479 (__MASK_ADDR), \
1480 (__CENTRE), \
1481 (float)(__ANGLE), \
1482 (float)(__SCALE), \
1483 (__MSK_COLOUR), \
1484 (__RATIO)); \
1485 }; \
1486 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1487 (__DES_TILE_ADDR), \
1488 (__DES_REGION_ADDR), \
1489 (NULL,##__VA_ARGS__)); \
1490 })
1491
1492#define arm_2dp_cccn888_fill_colour_with_mask_opacity_and_transform( \
1493 __CB_ADDR, \
1494 __MASK_ADDR, \
1495 __DES_TILE_ADDR, \
1496 __DES_REGION_ADDR, \
1497 __CENTRE, \
1498 __ANGLE, \
1499 __SCALE, \
1500 __MSK_COLOUR, \
1501 __RATIO,...) \
1502 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1503 arm_2dp_cccn888_fill_colour_with_mask_opacity_and_transform_prepare(\
1504 (__CB_ADDR), \
1505 (__MASK_ADDR), \
1506 (__CENTRE), \
1507 (float)(__ANGLE), \
1508 (float)(__SCALE), \
1509 (__MSK_COLOUR), \
1510 (__RATIO)); \
1511 }; \
1512 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1513 (__DES_TILE_ADDR), \
1514 (__DES_REGION_ADDR), \
1515 (NULL,##__VA_ARGS__)); \
1516 })
1517
1518
1519
1520#define arm_2dp_gray8_tile_transform_with_src_mask( \
1521 __CB_ADDR, \
1522 __SRC_TILE_ADDR, \
1523 __SRC_MASK_ADDR, \
1524 __DES_TILE_ADDR, \
1525 __DES_REGION_ADDR, \
1526 __CENTRE, \
1527 __ANGLE, \
1528 __SCALE, \
1529 ...) \
1530 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1531 arm_2dp_gray8_tile_transform_with_src_mask_prepare( \
1532 (__CB_ADDR), \
1533 (__SRC_TILE_ADDR), \
1534 (__SRC_MASK_ADDR), \
1535 (__CENTRE), \
1536 (float)(__ANGLE), \
1537 (float)(__SCALE)); \
1538 }; \
1539 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1540 (__DES_TILE_ADDR), \
1541 (__DES_REGION_ADDR), \
1542 (NULL,##__VA_ARGS__)); \
1543 })
1544
1545#define arm_2dp_rgb565_tile_transform_with_src_mask( \
1546 __CB_ADDR, \
1547 __SRC_TILE_ADDR, \
1548 __SRC_MASK_ADDR, \
1549 __DES_TILE_ADDR, \
1550 __DES_REGION_ADDR, \
1551 __CENTRE, \
1552 __ANGLE, \
1553 __SCALE, \
1554 ...) \
1555 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1556 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( \
1557 (__CB_ADDR), \
1558 (__SRC_TILE_ADDR), \
1559 (__SRC_MASK_ADDR), \
1560 (__CENTRE), \
1561 (float)(__ANGLE), \
1562 (float)(__SCALE)); \
1563 }; \
1564 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1565 (__DES_TILE_ADDR), \
1566 (__DES_REGION_ADDR), \
1567 (NULL,##__VA_ARGS__)); \
1568 })
1569
1570
1571#define arm_2dp_cccn888_tile_transform_with_src_mask( \
1572 __CB_ADDR, \
1573 __SRC_TILE_ADDR, \
1574 __SRC_MASK_ADDR, \
1575 __DES_TILE_ADDR, \
1576 __DES_REGION_ADDR, \
1577 __CENTRE, \
1578 __ANGLE, \
1579 __SCALE, \
1580 ...) \
1581 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1582 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( \
1583 (__CB_ADDR), \
1584 (__SRC_TILE_ADDR), \
1585 (__SRC_MASK_ADDR), \
1586 (__CENTRE), \
1587 (float)(__ANGLE), \
1588 (float)(__SCALE)); \
1589 }; \
1590 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1591 (__DES_TILE_ADDR), \
1592 (__DES_REGION_ADDR), \
1593 (NULL,##__VA_ARGS__)); \
1594 })
1595
1596#define arm_2dp_gray8_tile_transform_with_src_mask_and_opacity( \
1597 __CB_ADDR, \
1598 __SRC_TILE_ADDR, \
1599 __SRC_MASK_ADDR, \
1600 __DES_TILE_ADDR, \
1601 __DES_REGION_ADDR, \
1602 __CENTRE, \
1603 __ANGLE, \
1604 __SCALE, \
1605 __OPACITY, \
1606 ...) \
1607 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1608 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
1609 (__CB_ADDR), \
1610 (__SRC_TILE_ADDR), \
1611 (__SRC_MASK_ADDR), \
1612 (__CENTRE), \
1613 (float)(__ANGLE), \
1614 (float)(__SCALE), \
1615 (__OPACITY)); \
1616 }; \
1617 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1618 (__DES_TILE_ADDR), \
1619 (__DES_REGION_ADDR), \
1620 (NULL,##__VA_ARGS__)); \
1621 })
1622
1623#define arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity( \
1624 __CB_ADDR, \
1625 __SRC_TILE_ADDR, \
1626 __SRC_MASK_ADDR, \
1627 __DES_TILE_ADDR, \
1628 __DES_REGION_ADDR, \
1629 __CENTRE, \
1630 __ANGLE, \
1631 __SCALE, \
1632 __OPACITY, \
1633 ...) \
1634 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1635 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
1636 (__CB_ADDR), \
1637 (__SRC_TILE_ADDR), \
1638 (__SRC_MASK_ADDR), \
1639 (__CENTRE), \
1640 (float)(__ANGLE), \
1641 (float)(__SCALE), \
1642 (__OPACITY)); \
1643 }; \
1644 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1645 (__DES_TILE_ADDR), \
1646 (__DES_REGION_ADDR), \
1647 (NULL,##__VA_ARGS__)); \
1648 })
1649
1650
1651#define arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity( \
1652 __CB_ADDR, \
1653 __SRC_TILE_ADDR, \
1654 __SRC_MASK_ADDR, \
1655 __DES_TILE_ADDR, \
1656 __DES_REGION_ADDR, \
1657 __CENTRE, \
1658 __ANGLE, \
1659 __SCALE, \
1660 __OPACITY, \
1661 ...) \
1662 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1663 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
1664 (__CB_ADDR), \
1665 (__SRC_TILE_ADDR), \
1666 (__SRC_MASK_ADDR), \
1667 (__CENTRE), \
1668 (float)(__ANGLE), \
1669 (float)(__SCALE), \
1670 (__OPACITY)); \
1671 }; \
1672 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1673 (__DES_TILE_ADDR), \
1674 (__DES_REGION_ADDR), \
1675 (NULL,##__VA_ARGS__)); \
1676 })
1677
1678
1679#define arm_2d_gray8_tile_transform( \
1680 __SRC_TILE_ADDR, \
1681 __DES_TILE_ADDR, \
1682 __DES_REGION_ADDR, \
1683 __CENTRE, \
1684 __ANGLE, \
1685 __SCALE, \
1686 __MSK_COLOUR, ...) \
1687 ({{ \
1688 arm_2dp_gray8_tile_transform_prepare( \
1689 (NULL), \
1690 (__SRC_TILE_ADDR), \
1691 (__CENTRE), \
1692 (float)(__ANGLE), \
1693 (float)(__SCALE), \
1694 (__MSK_COLOUR)); \
1695 }; \
1696 arm_2dp_tile_transform(NULL, \
1697 (__DES_TILE_ADDR), \
1698 (__DES_REGION_ADDR), \
1699 (NULL,##__VA_ARGS__)); \
1700 })
1701
1702#define arm_2d_rgb565_tile_transform( \
1703 __SRC_TILE_ADDR, \
1704 __DES_TILE_ADDR, \
1705 __DES_REGION_ADDR, \
1706 __CENTRE, \
1707 __ANGLE, \
1708 __SCALE, \
1709 __MSK_COLOUR, ...) \
1710 ({{ \
1711 arm_2dp_rgb565_tile_transform_prepare( \
1712 (NULL), \
1713 (__SRC_TILE_ADDR), \
1714 (__CENTRE), \
1715 (float)(__ANGLE), \
1716 (float)(__SCALE), \
1717 (__MSK_COLOUR)); \
1718 }; \
1719 arm_2dp_tile_transform(NULL, \
1720 (__DES_TILE_ADDR), \
1721 (__DES_REGION_ADDR), \
1722 (NULL,##__VA_ARGS__)); \
1723 })
1724
1725
1726#define arm_2d_rgb888_tile_transform( \
1727 __SRC_TILE_ADDR, \
1728 __DES_TILE_ADDR, \
1729 __DES_REGION_ADDR, \
1730 __CENTRE, \
1731 __ANGLE, \
1732 __SCALE, \
1733 __MSK_COLOUR, ...) \
1734 ({{ \
1735 arm_2dp_cccn888_tile_transform_prepare( \
1736 NULL, \
1737 (__SRC_TILE_ADDR), \
1738 (__CENTRE), \
1739 (float)(__ANGLE), \
1740 (float)(__SCALE), \
1741 (__MSK_COLOUR)); \
1742 }; \
1743 arm_2dp_tile_transform(NULL, \
1744 (__DES_TILE_ADDR), \
1745 (__DES_REGION_ADDR), \
1746 (NULL,##__VA_ARGS__)); \
1747 })
1748
1749#define arm_2d_gray8_tile_transform_with_opacity( \
1750 __SRC_TILE_ADDR, \
1751 __DES_TILE_ADDR, \
1752 __DES_REGION_ADDR, \
1753 __CENTRE, \
1754 __ANGLE, \
1755 __SCALE, \
1756 __MSK_COLOUR, \
1757 __RATIO, ...) \
1758 ({{ \
1759 arm_2dp_gray8_tile_transform_with_opacity_prepare( \
1760 NULL, \
1761 (__SRC_TILE_ADDR), \
1762 (__CENTRE), \
1763 (float)(__ANGLE), \
1764 (float)(__SCALE), \
1765 (__MSK_COLOUR), \
1766 (__RATIO)); \
1767 }; \
1768 arm_2dp_tile_transform(NULL, \
1769 (__DES_TILE_ADDR), \
1770 (__DES_REGION_ADDR), \
1771 (NULL,##__VA_ARGS__)); \
1772 })
1773
1774#define arm_2d_rgb565_tile_transform_with_opacity( \
1775 __SRC_TILE_ADDR, \
1776 __DES_TILE_ADDR, \
1777 __DES_REGION_ADDR, \
1778 __CENTRE, \
1779 __ANGLE, \
1780 __SCALE, \
1781 __MSK_COLOUR, \
1782 __RATIO, ...) \
1783 ({{ \
1784 arm_2dp_rgb565_tile_transform_with_opacity_prepare( \
1785 NULL, \
1786 (__SRC_TILE_ADDR), \
1787 (__CENTRE), \
1788 (float)(__ANGLE), \
1789 (float)(__SCALE), \
1790 (__MSK_COLOUR), \
1791 (__RATIO)); \
1792 }; \
1793 arm_2dp_tile_transform(NULL, \
1794 (__DES_TILE_ADDR), \
1795 (__DES_REGION_ADDR), \
1796 (NULL,##__VA_ARGS__)); \
1797 })
1798
1799#define arm_2d_rgb888_tile_transform_with_opacity( \
1800 __SRC_TILE_ADDR, \
1801 __DES_TILE_ADDR, \
1802 __DES_REGION_ADDR, \
1803 __CENTRE, \
1804 __ANGLE, \
1805 __SCALE, \
1806 __MSK_COLOUR, \
1807 __RATIO, ...) \
1808 ({{ \
1809 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
1810 NULL, \
1811 (__SRC_TILE_ADDR), \
1812 (__CENTRE), \
1813 (float)(__ANGLE), \
1814 (float)(__SCALE), \
1815 (__MSK_COLOUR), \
1816 (__RATIO)); \
1817 }; \
1818 arm_2dp_tile_transform(NULL, \
1819 (__DES_TILE_ADDR), \
1820 (__DES_REGION_ADDR), \
1821 (NULL,##__VA_ARGS__)); \
1822 })
1823
1824
1825
1826#define arm_2d_cccn888_tile_transform_with_opacity( \
1827 __SRC_TILE_ADDR, \
1828 __DES_TILE_ADDR, \
1829 __DES_REGION_ADDR, \
1830 __CENTRE, \
1831 __ANGLE, \
1832 __SCALE, \
1833 __MSK_COLOUR, \
1834 __RATIO, ...) \
1835 ({{ \
1836 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
1837 NULL, \
1838 (__SRC_TILE_ADDR), \
1839 (__CENTRE), \
1840 (float)(__ANGLE), \
1841 (float)(__SCALE), \
1842 (__MSK_COLOUR), \
1843 (__RATIO)); \
1844 }; \
1845 arm_2dp_tile_transform(NULL, \
1846 (__DES_TILE_ADDR), \
1847 (__DES_REGION_ADDR), \
1848 (NULL,##__VA_ARGS__)); \
1849 })
1850
1851
1852#define arm_2d_gray8_tile_transform_with_src_mask( \
1853 __SRC_TILE_ADDR, \
1854 __SRC_MASK_ADDR, \
1855 __DES_TILE_ADDR, \
1856 __DES_REGION_ADDR, \
1857 __CENTRE, \
1858 __ANGLE, \
1859 __SCALE, \
1860 ...) \
1861 ({{ \
1862 arm_2dp_gray8_tile_transform_with_src_mask_prepare( \
1863 (NULL), \
1864 (__SRC_TILE_ADDR), \
1865 (__SRC_MASK_ADDR), \
1866 (__CENTRE), \
1867 (float)(__ANGLE), \
1868 (float)(__SCALE)); \
1869 }; \
1870 arm_2dp_tile_transform(NULL, \
1871 (__DES_TILE_ADDR), \
1872 (__DES_REGION_ADDR), \
1873 (NULL,##__VA_ARGS__)); \
1874 })
1875
1876#define arm_2d_rgb565_tile_transform_with_src_mask( \
1877 __SRC_TILE_ADDR, \
1878 __SRC_MASK_ADDR, \
1879 __DES_TILE_ADDR, \
1880 __DES_REGION_ADDR, \
1881 __CENTRE, \
1882 __ANGLE, \
1883 __SCALE, \
1884 ...) \
1885 ({{ \
1886 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( \
1887 (NULL), \
1888 (__SRC_TILE_ADDR), \
1889 (__SRC_MASK_ADDR), \
1890 (__CENTRE), \
1891 (float)(__ANGLE), \
1892 (float)(__SCALE)); \
1893 }; \
1894 arm_2dp_tile_transform(NULL, \
1895 (__DES_TILE_ADDR), \
1896 (__DES_REGION_ADDR), \
1897 (NULL,##__VA_ARGS__)); \
1898 })
1899
1900#define arm_2d_cccn888_tile_transform_with_src_mask( \
1901 __SRC_TILE_ADDR, \
1902 __SRC_MASK_ADDR, \
1903 __DES_TILE_ADDR, \
1904 __DES_REGION_ADDR, \
1905 __CENTRE, \
1906 __ANGLE, \
1907 __SCALE, \
1908 ...) \
1909 ({{ \
1910 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( \
1911 (NULL), \
1912 (__SRC_TILE_ADDR), \
1913 (__SRC_MASK_ADDR), \
1914 (__CENTRE), \
1915 (float)(__ANGLE), \
1916 (float)(__SCALE)); \
1917 }; \
1918 arm_2dp_tile_transform(NULL, \
1919 (__DES_TILE_ADDR), \
1920 (__DES_REGION_ADDR), \
1921 (NULL,##__VA_ARGS__)); \
1922 })
1923
1924#define arm_2d_gray8_tile_transform_with_src_mask_and_opacity( \
1925 __SRC_TILE_ADDR, \
1926 __SRC_MASK_ADDR, \
1927 __DES_TILE_ADDR, \
1928 __DES_REGION_ADDR, \
1929 __CENTRE, \
1930 __ANGLE, \
1931 __SCALE, \
1932 __OPACITY, \
1933 ...) \
1934 ({{ \
1935 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
1936 (NULL), \
1937 (__SRC_TILE_ADDR), \
1938 (__SRC_MASK_ADDR), \
1939 (__CENTRE), \
1940 (float)(__ANGLE), \
1941 (float)(__SCALE), \
1942 (__OPACITY)); \
1943 }; \
1944 arm_2dp_tile_transform(NULL, \
1945 (__DES_TILE_ADDR), \
1946 (__DES_REGION_ADDR), \
1947 (NULL,##__VA_ARGS__)); \
1948 })
1949
1950#define arm_2d_rgb565_tile_transform_with_src_mask_and_opacity( \
1951 __SRC_TILE_ADDR, \
1952 __SRC_MASK_ADDR, \
1953 __DES_TILE_ADDR, \
1954 __DES_REGION_ADDR, \
1955 __CENTRE, \
1956 __ANGLE, \
1957 __SCALE, \
1958 __OPACITY, \
1959 ...) \
1960 ({{ \
1961 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
1962 (NULL), \
1963 (__SRC_TILE_ADDR), \
1964 (__SRC_MASK_ADDR), \
1965 (__CENTRE), \
1966 (float)(__ANGLE), \
1967 (float)(__SCALE), \
1968 (__OPACITY)); \
1969 }; \
1970 arm_2dp_tile_transform(NULL, \
1971 (__DES_TILE_ADDR), \
1972 (__DES_REGION_ADDR), \
1973 (NULL,##__VA_ARGS__)); \
1974 })
1975
1976#define arm_2d_cccn888_tile_transform_with_src_mask_and_opacity( \
1977 __SRC_TILE_ADDR, \
1978 __SRC_MASK_ADDR, \
1979 __DES_TILE_ADDR, \
1980 __DES_REGION_ADDR, \
1981 __CENTRE, \
1982 __ANGLE, \
1983 __SCALE, \
1984 __OPACITY, \
1985 ...) \
1986 ({{ \
1987 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
1988 (NULL), \
1989 (__SRC_TILE_ADDR), \
1990 (__SRC_MASK_ADDR), \
1991 (__CENTRE), \
1992 (float)(__ANGLE), \
1993 (float)(__SCALE), \
1994 (__OPACITY)); \
1995 }; \
1996 arm_2dp_tile_transform(NULL, \
1997 (__DES_TILE_ADDR), \
1998 (__DES_REGION_ADDR), \
1999 (NULL,##__VA_ARGS__)); \
2000 })
2001
2002/*----------------------------------------------------------------------------*
2003 * API wrappers: Scaling *
2004 *----------------------------------------------------------------------------*/
2005#define arm_2d_gray8_tile_scaling_prepare(__SRC_TILE_ADDR, \
2006 __CENTRE, \
2007 __SCALE, \
2008 __MSK_COLOUR) \
2009 arm_2dp_gray8_tile_transform_prepare( NULL, \
2010 (__SRC_TILE_ADDR), \
2011 (__CENTRE), \
2012 0.0f, \
2013 (float)(__SCALE), \
2014 (__MSK_COLOUR))
2015
2016#define arm_2d_rgb565_tile_scaling_prepare(__SRC_TILE_ADDR, \
2017 __CENTRE, \
2018 __SCALE, \
2019 __MSK_COLOUR) \
2020 arm_2dp_rgb565_tile_transform_prepare( NULL, \
2021 (__SRC_TILE_ADDR), \
2022 (__CENTRE), \
2023 0.0f, \
2024 (float)(__SCALE), \
2025 (__MSK_COLOUR))
2026
2027#define arm_2d_rgb888_tile_scaling_prepare(__SRC_TILE_ADDR, \
2028 __CENTRE, \
2029 __SCALE, \
2030 __MSK_COLOUR) \
2031 arm_2dp_cccn888_tile_transform_prepare( NULL, \
2032 (__SRC_TILE_ADDR), \
2033 (__CENTRE), \
2034 0.0f, \
2035 (float)(__SCALE), \
2036 (__MSK_COLOUR))
2037
2038
2039
2040#define arm_2d_gray8_tile_scaling_with_opacity_prepare( \
2041 __SRC_TILE_ADDR, \
2042 __CENTRE, \
2043 __SCALE, \
2044 __MSK_COLOUR, \
2045 __RATIO) \
2046 arm_2dp_gray8_tile_transform_with_opacity_prepare( NULL, \
2047 (__SRC_TILE_ADDR), \
2048 (__CENTRE), \
2049 0.0f, \
2050 (float)(__SCALE), \
2051 (__MSK_COLOUR), \
2052 (__RATIO))
2053
2054#define arm_2d_rgb565_tile_scaling_with_opacity_prepare( \
2055 __SRC_TILE_ADDR, \
2056 __CENTRE, \
2057 __SCALE, \
2058 __MSK_COLOUR, \
2059 __RATIO) \
2060 arm_2dp_rgb565_tile_transform_with_opacity_prepare( NULL, \
2061 (__SRC_TILE_ADDR), \
2062 (__CENTRE), \
2063 0.0f, \
2064 (float)(__SCALE), \
2065 (__MSK_COLOUR), \
2066 (__RATIO))
2067
2068
2069#define arm_2d_rgb888_tile_scaling_with_opacity_prepare( \
2070 __SRC_TILE_ADDR, \
2071 __CENTRE, \
2072 __SCALE, \
2073 __MSK_COLOUR, \
2074 __RATIO) \
2075 arm_2dp_cccn888_tile_transform_with_opacity_prepare( NULL, \
2076 (__SRC_TILE_ADDR), \
2077 (__CENTRE), \
2078 0.0f, \
2079 (float)(__SCALE), \
2080 (__MSK_COLOUR), \
2081 (__RATIO))
2082
2083#define arm_2d_cccn888_tile_scaling_with_opacity_prepare( \
2084 __SRC_TILE_ADDR, \
2085 __CENTRE, \
2086 __SCALE, \
2087 __MSK_COLOUR, \
2088 __RATIO) \
2089 arm_2dp_cccn888_tile_transform_with_opacity_prepare( NULL, \
2090 (__SRC_TILE_ADDR), \
2091 (__CENTRE), \
2092 0.0f, \
2093 (float)(__SCALE), \
2094 (__MSK_COLOUR), \
2095 (__RATIO))
2096
2097#define arm_2d_gray8_tile_scaling_with_src_mask_prepare( \
2098 __SRC_TILE_ADDR, \
2099 __SRC_MASK_ADDR, \
2100 __CENTRE, \
2101 __SCALE) \
2102 arm_2dp_gray8_tile_transform_with_src_mask_prepare( NULL, \
2103 (__SRC_TILE_ADDR), \
2104 (__SRC_MASK_ADDR), \
2105 (__CENTRE), \
2106 0.0f, \
2107 (float)(__SCALE))
2108
2109#define arm_2d_rgb565_tile_scaling_with_src_mask_prepare( \
2110 __SRC_TILE_ADDR, \
2111 __SRC_MASK_ADDR, \
2112 __CENTRE, \
2113 __SCALE) \
2114 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( NULL, \
2115 (__SRC_TILE_ADDR), \
2116 (__SRC_MASK_ADDR), \
2117 (__CENTRE), \
2118 0.0f, \
2119 (float)(__SCALE))
2120
2121#define arm_2d_cccn888_tile_scaling_with_src_mask_prepare( \
2122 __SRC_TILE_ADDR, \
2123 __SRC_MASK_ADDR, \
2124 __CENTRE, \
2125 __SCALE) \
2126 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( NULL, \
2127 (__SRC_TILE_ADDR), \
2128 (__SRC_MASK_ADDR), \
2129 (__CENTRE), \
2130 0.0f, \
2131 (float)(__SCALE))
2132
2133#define arm_2d_gray8_tile_scaling_with_src_mask_and_opacity_prepare( \
2134 __SRC_TILE_ADDR, \
2135 __SRC_MASK_ADDR, \
2136 __CENTRE, \
2137 __SCALE, \
2138 __OPACITY) \
2139 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
2140 NULL, \
2141 (__SRC_TILE_ADDR), \
2142 (__SRC_MASK_ADDR), \
2143 (__CENTRE), \
2144 0.0f, \
2145 (float)(__SCALE), \
2146 (__OPACITY))
2147
2148#define arm_2d_rgb565_tile_scaling_with_src_mask_and_opacity_prepare( \
2149 __SRC_TILE_ADDR, \
2150 __SRC_MASK_ADDR, \
2151 __CENTRE, \
2152 __SCALE, \
2153 __OPACITY) \
2154 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
2155 NULL, \
2156 (__SRC_TILE_ADDR), \
2157 (__SRC_MASK_ADDR), \
2158 (__CENTRE), \
2159 0.0f, \
2160 (float)(__SCALE), \
2161 (__OPACITY))
2162
2163#define arm_2d_cccn888_tile_scaling_with_src_mask_and_opacity_prepare( \
2164 __SRC_TILE_ADDR, \
2165 __SRC_MASK_ADDR, \
2166 __CENTRE, \
2167 __SCALE, \
2168 __OPACITY) \
2169 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
2170 NULL, \
2171 (__SRC_TILE_ADDR), \
2172 (__SRC_MASK_ADDR), \
2173 (__CENTRE), \
2174 0.0f, \
2175 (float)(__SCALE), \
2176 (__OPACITY))
2177
2178#define arm_2d_tile_scale( __DES_TILE_ADDR, \
2179 __DES_REGION_ADDR, \
2180 __DES_CENTRE_ADDR) \
2181 arm_2dp_tile_transform(NULL, \
2182 (__DES_TILE_ADDR), \
2183 (__DES_REGION_ADDR), \
2184 (__DES_CENTRE_ADDR))
2185
2186
2187/* following macro APIs rely on the boolean variable bIsNewFrame.
2188 * Please make sure you have define it with the correct name and the
2189 * corresponding value. If you don't use the PFB interfaces for neither
2190 * the low level rendering nor the high level GUI drawing, please find
2191 * such variable with the value "true".
2192 */
2193
2194#define arm_2dp_gray8_tile_scaling( __CB_ADDR, \
2195 __SRC_TILE_ADDR, \
2196 __DES_TILE_ADDR, \
2197 __DES_REGION_ADDR, \
2198 __CENTRE, \
2199 __SCALE, \
2200 __MSK_COLOUR, \
2201 ...) \
2202 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2203 arm_2dp_gray8_tile_transform_prepare( \
2204 (__CB_ADDR), \
2205 (__SRC_TILE_ADDR), \
2206 (__CENTRE), \
2207 0.0f, \
2208 (__SCALE), \
2209 (__MSK_COLOUR)); \
2210 }; \
2211 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2212 (__DES_TILE_ADDR), \
2213 (__DES_REGION_ADDR), \
2214 (NULL,##__VA_ARGS__)); \
2215 })
2216
2217#define arm_2dp_rgb565_tile_scaling( __CB_ADDR, \
2218 __SRC_TILE_ADDR, \
2219 __DES_TILE_ADDR, \
2220 __DES_REGION_ADDR, \
2221 __CENTRE, \
2222 __SCALE, \
2223 __MSK_COLOUR, \
2224 ...) \
2225 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2226 arm_2dp_rgb565_tile_transform_prepare( \
2227 (__CB_ADDR), \
2228 (__SRC_TILE_ADDR), \
2229 (__CENTRE), \
2230 0.0f, \
2231 (__SCALE), \
2232 (__MSK_COLOUR)); \
2233 }; \
2234 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2235 (__DES_TILE_ADDR), \
2236 (__DES_REGION_ADDR), \
2237 (NULL,##__VA_ARGS__)); \
2238 })
2239
2240
2241#define arm_2dp_cccn888_tile_scaling( __CB_ADDR, \
2242 __SRC_TILE_ADDR, \
2243 __DES_TILE_ADDR, \
2244 __DES_REGION_ADDR, \
2245 __CENTRE, \
2246 __SCALE, \
2247 __MSK_COLOUR,...) \
2248 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2249 arm_2dp_cccn888_tile_transform_prepare( \
2250 (__CB_ADDR), \
2251 (__SRC_TILE_ADDR), \
2252 (__CENTRE), \
2253 0.0f, \
2254 (__SCALE), \
2255 (__MSK_COLOUR)); \
2256 }; \
2257 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2258 (__DES_TILE_ADDR), \
2259 (__DES_REGION_ADDR), \
2260 (NULL,##__VA_ARGS__)); \
2261 })
2262
2263#define arm_2dp_gray8_tile_scaling_with_opacity( \
2264 __CB_ADDR, \
2265 __SRC_TILE_ADDR, \
2266 __DES_TILE_ADDR, \
2267 __DES_REGION_ADDR, \
2268 __CENTRE, \
2269 __SCALE, \
2270 __MSK_COLOUR, \
2271 __RATIO,...) \
2272 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2273 arm_2dp_gray8_tile_transform_with_opacity_prepare( \
2274 (__CB_ADDR), \
2275 (__SRC_TILE_ADDR), \
2276 (__CENTRE), \
2277 0.0f, \
2278 (__SCALE), \
2279 (__MSK_COLOUR), \
2280 (__RATIO)); \
2281 }; \
2282 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2283 (__DES_TILE_ADDR), \
2284 (__DES_REGION_ADDR), \
2285 (NULL,##__VA_ARGS__)); \
2286 })
2287
2288#define arm_2dp_rgb565_tile_scaling_with_opacity( \
2289 __CB_ADDR, \
2290 __SRC_TILE_ADDR, \
2291 __DES_TILE_ADDR, \
2292 __DES_REGION_ADDR, \
2293 __CENTRE, \
2294 __SCALE, \
2295 __MSK_COLOUR, \
2296 __RATIO,...) \
2297 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2298 arm_2dp_rgb565_tile_transform_with_opacity_prepare( \
2299 (__CB_ADDR), \
2300 (__SRC_TILE_ADDR), \
2301 (__CENTRE), \
2302 0.0f, \
2303 (__SCALE), \
2304 (__MSK_COLOUR), \
2305 (__RATIO)); \
2306 }; \
2307 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2308 (__DES_TILE_ADDR), \
2309 (__DES_REGION_ADDR), \
2310 (NULL,##__VA_ARGS__)); \
2311 })
2312
2313#define arm_2dp_rgb888_tile_scaling_with_opacity( \
2314 __CB_ADDR, \
2315 __SRC_TILE_ADDR, \
2316 __DES_TILE_ADDR, \
2317 __DES_REGION_ADDR, \
2318 __CENTRE, \
2319 __SCALE, \
2320 __MSK_COLOUR, \
2321 __RATIO, ...) \
2322 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2323 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
2324 (__CB_ADDR), \
2325 (__SRC_TILE_ADDR), \
2326 (__CENTRE), \
2327 0.0f, \
2328 (__SCALE), \
2329 (__MSK_COLOUR), \
2330 (__RATIO)); \
2331 }; \
2332 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2333 (__DES_TILE_ADDR), \
2334 (__DES_REGION_ADDR), \
2335 (NULL,##__VA_ARGS__)); \
2336 })
2337
2338#define arm_2dp_cccn888_tile_scaling_with_opacity( \
2339 __CB_ADDR, \
2340 __SRC_TILE_ADDR, \
2341 __DES_TILE_ADDR, \
2342 __DES_REGION_ADDR, \
2343 __CENTRE, \
2344 __SCALE, \
2345 __MSK_COLOUR, \
2346 __RATIO, ...) \
2347 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2348 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
2349 (__CB_ADDR), \
2350 (__SRC_TILE_ADDR), \
2351 (__CENTRE), \
2352 0.0f, \
2353 (__SCALE), \
2354 (__MSK_COLOUR), \
2355 (__RATIO)); \
2356 }; \
2357 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2358 (__DES_TILE_ADDR), \
2359 (__DES_REGION_ADDR), \
2360 (NULL,##__VA_ARGS__)); \
2361 })
2362
2363
2364#define arm_2dp_gray8_tile_scaling_with_src_mask( \
2365 __CB_ADDR, \
2366 __SRC_TILE_ADDR, \
2367 __SRC_MASK_ADDR, \
2368 __DES_TILE_ADDR, \
2369 __DES_REGION_ADDR, \
2370 __CENTRE, \
2371 __SCALE, \
2372 ...) \
2373 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2374 arm_2dp_gray8_tile_transform_with_src_mask_prepare( \
2375 (__CB_ADDR), \
2376 (__SRC_TILE_ADDR), \
2377 (__SRC_MASK_ADDR), \
2378 (__CENTRE), \
2379 0.0f, \
2380 (__SCALE)); \
2381 }; \
2382 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2383 (__DES_TILE_ADDR), \
2384 (__DES_REGION_ADDR), \
2385 (NULL,##__VA_ARGS__)); \
2386 })
2387
2388#define arm_2dp_rgb565_tile_scaling_with_src_mask( \
2389 __CB_ADDR, \
2390 __SRC_TILE_ADDR, \
2391 __SRC_MASK_ADDR, \
2392 __DES_TILE_ADDR, \
2393 __DES_REGION_ADDR, \
2394 __CENTRE, \
2395 __SCALE, \
2396 ...) \
2397 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2398 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( \
2399 (__CB_ADDR), \
2400 (__SRC_TILE_ADDR), \
2401 (__SRC_MASK_ADDR), \
2402 (__CENTRE), \
2403 0.0f, \
2404 (__SCALE)); \
2405 }; \
2406 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2407 (__DES_TILE_ADDR), \
2408 (__DES_REGION_ADDR), \
2409 (NULL,##__VA_ARGS__)); \
2410 })
2411
2412#define arm_2dp_cccn888_tile_scaling_with_src_mask( \
2413 __CB_ADDR, \
2414 __SRC_TILE_ADDR, \
2415 __SRC_MASK_ADDR, \
2416 __DES_TILE_ADDR, \
2417 __DES_REGION_ADDR, \
2418 __CENTRE, \
2419 __SCALE, \
2420 ...) \
2421 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2422 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( \
2423 (__CB_ADDR), \
2424 (__SRC_TILE_ADDR), \
2425 (__SRC_MASK_ADDR), \
2426 (__CENTRE), \
2427 0.0f, \
2428 (__SCALE)); \
2429 }; \
2430 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2431 (__DES_TILE_ADDR), \
2432 (__DES_REGION_ADDR), \
2433 (NULL,##__VA_ARGS__)); \
2434 })
2435
2436#define arm_2dp_gray8_tile_scaling_with_src_mask_and_opacity( \
2437 __CB_ADDR, \
2438 __SRC_TILE_ADDR, \
2439 __SRC_MASK_ADDR, \
2440 __DES_TILE_ADDR, \
2441 __DES_REGION_ADDR, \
2442 __CENTRE, \
2443 __SCALE, \
2444 __OPACITY, \
2445 ...) \
2446 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2447 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
2448 (__CB_ADDR), \
2449 (__SRC_TILE_ADDR), \
2450 (__SRC_MASK_ADDR), \
2451 (__CENTRE), \
2452 0.0f, \
2453 (__SCALE), \
2454 (__OPACITY)); \
2455 }; \
2456 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2457 (__DES_TILE_ADDR), \
2458 (__DES_REGION_ADDR), \
2459 (NULL,##__VA_ARGS__)); \
2460 })
2461
2462#define arm_2dp_rgb565_tile_scaling_with_src_mask_and_opacity( \
2463 __CB_ADDR, \
2464 __SRC_TILE_ADDR, \
2465 __SRC_MASK_ADDR, \
2466 __DES_TILE_ADDR, \
2467 __DES_REGION_ADDR, \
2468 __CENTRE, \
2469 __SCALE, \
2470 __OPACITY, \
2471 ...) \
2472 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2473 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
2474 (__CB_ADDR), \
2475 (__SRC_TILE_ADDR), \
2476 (__SRC_MASK_ADDR), \
2477 (__CENTRE), \
2478 0.0f, \
2479 (__SCALE), \
2480 (__OPACITY)); \
2481 }; \
2482 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2483 (__DES_TILE_ADDR), \
2484 (__DES_REGION_ADDR), \
2485 (NULL,##__VA_ARGS__)); \
2486 })
2487
2488#define arm_2dp_cccn888_tile_scaling_with_src_mask_and_opacity( \
2489 __CB_ADDR, \
2490 __SRC_TILE_ADDR, \
2491 __SRC_MASK_ADDR, \
2492 __DES_TILE_ADDR, \
2493 __DES_REGION_ADDR, \
2494 __CENTRE, \
2495 __SCALE, \
2496 __OPACITY, \
2497 ...) \
2498 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2499 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
2500 (__CB_ADDR), \
2501 (__SRC_TILE_ADDR), \
2502 (__SRC_MASK_ADDR), \
2503 (__CENTRE), \
2504 0.0f, \
2505 (__SCALE), \
2506 (__OPACITY)); \
2507 }; \
2508 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2509 (__DES_TILE_ADDR), \
2510 (__DES_REGION_ADDR), \
2511 (NULL,##__VA_ARGS__)); \
2512 })
2513
2514#define arm_2d_gray8_tile_scaling( \
2515 __SRC_TILE_ADDR, \
2516 __DES_TILE_ADDR, \
2517 __DES_REGION_ADDR, \
2518 __CENTRE, \
2519 __SCALE, \
2520 __MSK_COLOUR, ...) \
2521 ({{ \
2522 arm_2dp_gray8_tile_transform_prepare( \
2523 (NULL), \
2524 (__SRC_TILE_ADDR), \
2525 (__CENTRE), \
2526 0.0f, \
2527 (__SCALE), \
2528 (__MSK_COLOUR)); \
2529 }; \
2530 arm_2dp_tile_transform(NULL, \
2531 (__DES_TILE_ADDR), \
2532 (__DES_REGION_ADDR), \
2533 (NULL,##__VA_ARGS__)); \
2534 })
2535
2536#define arm_2d_rgb565_tile_scaling( \
2537 __SRC_TILE_ADDR, \
2538 __DES_TILE_ADDR, \
2539 __DES_REGION_ADDR, \
2540 __CENTRE, \
2541 __SCALE, \
2542 __MSK_COLOUR, ...) \
2543 ({{ \
2544 arm_2dp_rgb565_tile_transform_prepare( \
2545 (NULL), \
2546 (__SRC_TILE_ADDR), \
2547 (__CENTRE), \
2548 0.0f, \
2549 (__SCALE), \
2550 (__MSK_COLOUR)); \
2551 }; \
2552 arm_2dp_tile_transform(NULL, \
2553 (__DES_TILE_ADDR), \
2554 (__DES_REGION_ADDR), \
2555 (NULL,##__VA_ARGS__)); \
2556 })
2557
2558
2559#define arm_2d_rgb888_tile_scaling( \
2560 __SRC_TILE_ADDR, \
2561 __DES_TILE_ADDR, \
2562 __DES_REGION_ADDR, \
2563 __CENTRE, \
2564 __SCALE, \
2565 __MSK_COLOUR, ...) \
2566 ({{ \
2567 arm_2dp_cccn888_tile_transform_prepare( \
2568 NULL, \
2569 (__SRC_TILE_ADDR), \
2570 (__CENTRE), \
2571 0.0f, \
2572 (__SCALE), \
2573 (__MSK_COLOUR)); \
2574 }; \
2575 arm_2dp_tile_transform(NULL, \
2576 (__DES_TILE_ADDR), \
2577 (__DES_REGION_ADDR), \
2578 (NULL,##__VA_ARGS__)); \
2579 })
2580
2581#define arm_2d_gray8_tile_scaling_with_opacity( \
2582 __SRC_TILE_ADDR, \
2583 __DES_TILE_ADDR, \
2584 __DES_REGION_ADDR, \
2585 __CENTRE, \
2586 __SCALE, \
2587 __MSK_COLOUR, \
2588 __RATIO, ...) \
2589 ({{ \
2590 arm_2dp_gray8_tile_transform_with_opacity_prepare( \
2591 NULL, \
2592 (__SRC_TILE_ADDR), \
2593 (__CENTRE), \
2594 0.0f, \
2595 (__SCALE), \
2596 (__MSK_COLOUR), \
2597 (__RATIO)); \
2598 }; \
2599 arm_2dp_tile_transform(NULL, \
2600 (__DES_TILE_ADDR), \
2601 (__DES_REGION_ADDR), \
2602 (NULL,##__VA_ARGS__)); \
2603 })
2604
2605
2606#define arm_2d_rgb565_tile_scaling_with_opacity( \
2607 __SRC_TILE_ADDR, \
2608 __DES_TILE_ADDR, \
2609 __DES_REGION_ADDR, \
2610 __CENTRE, \
2611 __SCALE, \
2612 __MSK_COLOUR, \
2613 __RATIO, ...) \
2614 ({{ \
2615 arm_2dp_rgb565_tile_transform_with_opacity_prepare( \
2616 NULL, \
2617 (__SRC_TILE_ADDR), \
2618 (__CENTRE), \
2619 0.0f, \
2620 (__SCALE), \
2621 (__MSK_COLOUR), \
2622 (__RATIO)); \
2623 }; \
2624 arm_2dp_tile_transform(NULL, \
2625 (__DES_TILE_ADDR), \
2626 (__DES_REGION_ADDR), \
2627 (NULL,##__VA_ARGS__)); \
2628 })
2629
2630
2631
2632#define arm_2d_rgb888_tile_scaling_with_opacity( \
2633 __SRC_TILE_ADDR, \
2634 __DES_TILE_ADDR, \
2635 __DES_REGION_ADDR, \
2636 __CENTRE, \
2637 __SCALE, \
2638 __MSK_COLOUR, \
2639 __RATIO, ...) \
2640 ({{ \
2641 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
2642 NULL, \
2643 (__SRC_TILE_ADDR), \
2644 (__CENTRE), \
2645 0.0f, \
2646 (__SCALE), \
2647 (__MSK_COLOUR), \
2648 (__RATIO)); \
2649 }; \
2650 arm_2dp_tile_transform(NULL, \
2651 (__DES_TILE_ADDR), \
2652 (__DES_REGION_ADDR), \
2653 (NULL,##__VA_ARGS__)); \
2654 })
2655
2656#define arm_2d_cccn888_tile_scaling_with_opacity( \
2657 __SRC_TILE_ADDR, \
2658 __DES_TILE_ADDR, \
2659 __DES_REGION_ADDR, \
2660 __CENTRE, \
2661 __SCALE, \
2662 __MSK_COLOUR, \
2663 __RATIO, ...) \
2664 ({{ \
2665 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
2666 NULL, \
2667 (__SRC_TILE_ADDR), \
2668 (__CENTRE), \
2669 0.0f, \
2670 (__SCALE), \
2671 (__MSK_COLOUR), \
2672 (__RATIO)); \
2673 }; \
2674 arm_2dp_tile_transform(NULL, \
2675 (__DES_TILE_ADDR), \
2676 (__DES_REGION_ADDR), \
2677 (NULL,##__VA_ARGS__)); \
2678 })
2679
2680#define arm_2d_gray8_tile_scaling_with_src_mask( \
2681 __SRC_TILE_ADDR, \
2682 __SRC_MASK_ADDR, \
2683 __DES_TILE_ADDR, \
2684 __DES_REGION_ADDR, \
2685 __CENTRE, \
2686 __SCALE, \
2687 ...) \
2688 ({{ \
2689 arm_2dp_gray8_tile_transform_with_src_mask_prepare( \
2690 (NULL), \
2691 (__SRC_TILE_ADDR), \
2692 (__SRC_MASK_ADDR), \
2693 (__CENTRE), \
2694 0.0f, \
2695 (__SCALE)); \
2696 }; \
2697 arm_2dp_tile_transform(NULL, \
2698 (__DES_TILE_ADDR), \
2699 (__DES_REGION_ADDR), \
2700 (NULL,##__VA_ARGS__)); \
2701 })
2702
2703#define arm_2d_rgb565_tile_scaling_with_src_mask( \
2704 __SRC_TILE_ADDR, \
2705 __SRC_MASK_ADDR, \
2706 __DES_TILE_ADDR, \
2707 __DES_REGION_ADDR, \
2708 __CENTRE, \
2709 __SCALE, \
2710 ...) \
2711 ({{ \
2712 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( \
2713 (NULL), \
2714 (__SRC_TILE_ADDR), \
2715 (__SRC_MASK_ADDR), \
2716 (__CENTRE), \
2717 0.0f, \
2718 (__SCALE)); \
2719 }; \
2720 arm_2dp_tile_transform(NULL, \
2721 (__DES_TILE_ADDR), \
2722 (__DES_REGION_ADDR), \
2723 (NULL,##__VA_ARGS__)); \
2724 })
2725
2726#define arm_2d_cccn888_tile_scaling_with_src_mask( \
2727 __SRC_TILE_ADDR, \
2728 __SRC_MASK_ADDR, \
2729 __DES_TILE_ADDR, \
2730 __DES_REGION_ADDR, \
2731 __CENTRE, \
2732 __SCALE, \
2733 ...) \
2734 ({{ \
2735 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( \
2736 (NULL), \
2737 (__SRC_TILE_ADDR), \
2738 (__SRC_MASK_ADDR), \
2739 (__CENTRE), \
2740 0.0f, \
2741 (__SCALE)); \
2742 }; \
2743 arm_2dp_tile_transform(NULL, \
2744 (__DES_TILE_ADDR), \
2745 (__DES_REGION_ADDR), \
2746 (NULL,##__VA_ARGS__)); \
2747 })
2748
2749#define arm_2d_gray8_tile_scaling_with_src_mask_and_opacity( \
2750 __SRC_TILE_ADDR, \
2751 __SRC_MASK_ADDR, \
2752 __DES_TILE_ADDR, \
2753 __DES_REGION_ADDR, \
2754 __CENTRE, \
2755 __SCALE, \
2756 __OPACITY, \
2757 ...) \
2758 ({{ \
2759 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
2760 (NULL), \
2761 (__SRC_TILE_ADDR), \
2762 (__SRC_MASK_ADDR), \
2763 (__CENTRE), \
2764 0.0f, \
2765 (__SCALE), \
2766 (__OPACITY)); \
2767 }; \
2768 arm_2dp_tile_transform(NULL, \
2769 (__DES_TILE_ADDR), \
2770 (__DES_REGION_ADDR), \
2771 (NULL,##__VA_ARGS__)); \
2772 })
2773
2774#define arm_2d_rgb565_tile_scaling_with_src_mask_and_opacity( \
2775 __SRC_TILE_ADDR, \
2776 __SRC_MASK_ADDR, \
2777 __DES_TILE_ADDR, \
2778 __DES_REGION_ADDR, \
2779 __CENTRE, \
2780 __SCALE, \
2781 __OPACITY, \
2782 ...) \
2783 ({{ \
2784 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
2785 (NULL), \
2786 (__SRC_TILE_ADDR), \
2787 (__SRC_MASK_ADDR), \
2788 (__CENTRE), \
2789 0.0f, \
2790 (__SCALE), \
2791 (__OPACITY)); \
2792 }; \
2793 arm_2dp_tile_transform(NULL, \
2794 (__DES_TILE_ADDR), \
2795 (__DES_REGION_ADDR), \
2796 (NULL,##__VA_ARGS__)); \
2797 })
2798
2799#define arm_2d_cccn888_tile_scaling_with_src_mask_and_opacity( \
2800 __SRC_TILE_ADDR, \
2801 __SRC_MASK_ADDR, \
2802 __DES_TILE_ADDR, \
2803 __DES_REGION_ADDR, \
2804 __CENTRE, \
2805 __SCALE, \
2806 __OPACITY, \
2807 ...) \
2808 ({{ \
2809 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
2810 (NULL), \
2811 (__SRC_TILE_ADDR), \
2812 (__SRC_MASK_ADDR), \
2813 (__CENTRE), \
2814 0.0f, \
2815 (__SCALE), \
2816 (__OPACITY)); \
2817 }; \
2818 arm_2dp_tile_transform(NULL, \
2819 (__DES_TILE_ADDR), \
2820 (__DES_REGION_ADDR), \
2821 (NULL,##__VA_ARGS__)); \
2822 })
2823
2824/*============================ TYPES =========================================*/
2825
2826/*!
2827 * \brief transform runtime context
2828 *
2829 */
2831 float fAngle; //!< target angle
2832 float fScale; //!< scaling factor
2834 union {
2835 uint8_t chColour; //!< the key colour in 8bit
2836 uint32_t wColour; //!< the key colour in 16bit
2837 uint16_t hwColour; //!< the key colour in 32bit
2838 } Mask;
2839
2840 /* private members used by runtime */
2841ARM_PRIVATE(
2842 arm_2d_location_t tDummySourceOffset;
2843 struct {
2844 arm_2d_region_t tRegion;
2845 arm_2d_tile_t tTile;
2846 } Target;
2848
2850
2851/*! \brief arm_2d_op_trans_t is inherit from arm_2d_op_src_orig_t
2852 */
2853typedef struct arm_2d_op_trans_t {
2855 struct {
2856 const arm_2d_tile_t *ptTile; //!< target tile
2857 const arm_2d_region_t *ptRegion; //!< target region
2858 } Target;
2859 struct {
2860 const arm_2d_tile_t *ptTile; //!< source tile
2861 }Source;
2862 uint32_t wMode; //!< not used
2863
2864 struct {
2865 const arm_2d_tile_t *ptTile; //!< the origin tile
2866 arm_2d_tile_t tDummySource; //!< the buffer for the source
2867 }Origin;
2868
2870
2872
2873
2874/*! \brief arm_2d_op_trans_opa_t is inherit from arm_2d_op_trans_t
2875 */
2878 struct {
2879 const arm_2d_tile_t *ptTile; //!< target tile
2880 const arm_2d_region_t *ptRegion; //!< target region
2881 } Target;
2882 struct {
2883 const arm_2d_tile_t *ptTile; //!< source tile
2884 }Source;
2885 uint32_t wMode; //!< not used
2886
2887 struct {
2888 const arm_2d_tile_t *ptTile; //!< the origin tile
2889 arm_2d_tile_t tDummySource; //!< the buffer for the source
2890 }Origin;
2891
2893 uint8_t chOpacity; //!< opacity
2894
2896
2897
2898/*! \brief arm_2d_op_fill_cl_msk_opa_trans_t is alias of arm_2d_op_trans_opa_t
2899 */
2901
2902
2903/*! \brief arm_2d_op_trans_msk_t is inherit from arm_2d_op_src_orig_msk_t
2904 */
2907 struct {
2908 const arm_2d_tile_t *ptTile; //!< target tile
2909 const arm_2d_region_t *ptRegion; //!< target region
2910 } Target;
2911 struct {
2912 const arm_2d_tile_t *ptTile; //!< source tile
2913 }Source;
2914 uint32_t wMode; //!< not used
2915 struct {
2916 const arm_2d_tile_t *ptTile; //!< the origin tile
2917 arm_2d_tile_t tDummySource; //!< the buffer for the source
2918 }Origin;
2919 struct {
2920 const arm_2d_tile_t *ptOriginSide; //!< origin side mask
2921 const arm_2d_tile_t *ptTargetSide; //!< target side mask
2922 } Mask;
2923
2925
2927
2928
2929/*! \brief arm_2d_op_trans_msk_t is inherit from arm_2d_op_trans_msk_t
2930 */
2933 struct {
2934 const arm_2d_tile_t *ptTile; //!< target tile
2935 const arm_2d_region_t *ptRegion; //!< target region
2936 } Target;
2937 struct {
2938 const arm_2d_tile_t *ptTile; //!< source tile
2939 }Source;
2940 uint32_t wMode; //!< not used
2941 struct {
2942 const arm_2d_tile_t *ptTile; //!< the origin tile
2943 arm_2d_tile_t tDummySource; //!< the buffer for the source
2944 }Origin;
2945 struct {
2946 const arm_2d_tile_t *ptOriginSide; //!< origin side mask
2947 const arm_2d_tile_t *ptTargetSide; //!< target side mask
2948 } Mask;
2949
2951 uint8_t chOpacity; //!< opacity
2952
2954
2955/*============================ GLOBAL VARIABLES ==============================*/
2956/*============================ PROTOTYPES ====================================*/
2957
2958/*!
2959 * \brief prepare for a transform in gray8
2960 * \param[in] ptOP the control block, NULL means using the default control block
2961 * \param[in] ptSource the source tile
2962 * \param[in] tCentre the pivot in the source tile
2963 * \param[in] fAngle the rotation angle
2964 * \param[in] fScale the scaling factor
2965 * \param[in] chFillColour the key colour
2966 * \return arm_2d_err_t the result of the preparing process
2967 */
2968extern
2969ARM_NONNULL(2)
2971 arm_2d_op_trans_t *ptOP,
2972 const arm_2d_tile_t *ptSource,
2973 const arm_2d_location_t tCentre,
2974 float fAngle,
2975 float fScale,
2976 uint_fast8_t chFillColour);
2977
2978/*!
2979 * \brief prepare for a transform in rgb565
2980 * \param[in] ptOP the control block, NULL means using the default control block
2981 * \param[in] ptSource the source tile
2982 * \param[in] tCentre the pivot in the source tile
2983 * \param[in] fAngle the rotation angle
2984 * \param[in] fScale the scaling factor
2985 * \param[in] hwFillColour the key colour
2986 * \return arm_2d_err_t the result of the preparing process
2987 */
2988extern
2989ARM_NONNULL(2)
2991 arm_2d_op_trans_t *ptOP,
2992 const arm_2d_tile_t *ptSource,
2993 const arm_2d_location_t tCentre,
2994 float fAngle,
2995 float fScale,
2996 uint_fast16_t hwFillColour);
2997
2998/*!
2999 * \brief prepare for a transform in cccn888
3000 * \param[in] ptOP the control block, NULL means using the default control block
3001 * \param[in] ptSource the source tile
3002 * \param[in] tCentre the pivot in the source tile
3003 * \param[in] fAngle the rotation angle
3004 * \param[in] fScale the scaling factor
3005 * \param[in] wFillColour the key colour
3006 * \return arm_2d_err_t the result of the preparing process
3007 */
3008extern
3009ARM_NONNULL(2)
3011 arm_2d_op_trans_t *ptOP,
3012 const arm_2d_tile_t *ptSource,
3013 const arm_2d_location_t tCentre,
3014 float fAngle,
3015 float fScale,
3016 uint32_t wFillColour);
3017
3018/*!
3019 * \brief prepare for a transform with opacity in gray8
3020 * \param[in] ptOP the control block, NULL means using the default control block
3021 * \param[in] ptSource the source tile
3022 * \param[in] tCentre the pivot in the source tile
3023 * \param[in] fAngle the rotation angle
3024 * \param[in] fScale the scaling factor
3025 * \param[in] chFillColour the key colour
3026 * \param[in] chRatio the opacity
3027 * \return arm_2d_err_t the result of the preparing process
3028 */
3029extern
3030ARM_NONNULL(2)
3033 const arm_2d_tile_t *ptSource,
3034 const arm_2d_location_t tCentre,
3035 float fAngle,
3036 float fScale,
3037 uint_fast8_t chFillColour,
3038 uint_fast8_t chRatio);
3039
3040/*!
3041 * \brief prepare for a transform with opacity in rgb565
3042 * \param[in] ptOP the control block, NULL means using the default control block
3043 * \param[in] ptSource the source tile
3044 * \param[in] tCentre the pivot in the source tile
3045 * \param[in] fAngle the rotation angle
3046 * \param[in] fScale the scaling factor
3047 * \param[in] hwFillColour the key colour
3048 * \param[in] chRatio the opacity
3049 * \return arm_2d_err_t the result of the preparing process
3050 */
3051extern
3052ARM_NONNULL(2)
3055 const arm_2d_tile_t *ptSource,
3056 const arm_2d_location_t tCentre,
3057 float fAngle,
3058 float fScale,
3059 uint_fast16_t hwFillColour,
3060 uint_fast8_t chRatio);
3061
3062/*!
3063 * \brief prepare for a transform with opacity in cccn888
3064 * \param[in] ptOP the control block, NULL means using the default control block
3065 * \param[in] ptSource the source tile
3066 * \param[in] tCentre the pivot in the source tile
3067 * \param[in] fAngle the rotation angle
3068 * \param[in] fScale the scaling factor
3069 * \param[in] wFillColour the key colour
3070 * \param[in] chRatio the opacity
3071 * \return arm_2d_err_t the result of the preparing process
3072 */
3073extern
3074ARM_NONNULL(2)
3077 const arm_2d_tile_t *ptSource,
3078 const arm_2d_location_t tCentre,
3079 float fAngle,
3080 float fScale,
3081 uint32_t wFillColour,
3082 uint_fast8_t chRatio);
3083
3084/*!
3085 * \brief prepare for a transform with a source mask in gray8
3086 * \param[in] ptOP the control block, NULL means using the default control block
3087 * \param[in] ptSource the source tile
3088 * \param[in] ptSourceMask the source mask
3089 * \param[in] tCentre the pivot in the source tile
3090 * \param[in] fAngle the rotation angle
3091 * \param[in] fScale the scaling factor
3092 * \return arm_2d_err_t the result of the preparing process
3093 */
3094extern
3095ARM_NONNULL(2,3)
3098 const arm_2d_tile_t *ptSource,
3099 const arm_2d_tile_t *ptSourceMask,
3100 const arm_2d_location_t tCentre,
3101 float fAngle,
3102 float fScale);
3103
3104/*!
3105 * \brief prepare for a transform with a source mask in rgb565
3106 * \param[in] ptOP the control block, NULL means using the default control block
3107 * \param[in] ptSource the source tile
3108 * \param[in] ptSourceMask the source mask
3109 * \param[in] tCentre the pivot in the source tile
3110 * \param[in] fAngle the rotation angle
3111 * \param[in] fScale the scaling factor
3112 * \return arm_2d_err_t the result of the preparing process
3113 */
3114extern
3115ARM_NONNULL(2,3)
3118 const arm_2d_tile_t *ptSource,
3119 const arm_2d_tile_t *ptSourceMask,
3120 const arm_2d_location_t tCentre,
3121 float fAngle,
3122 float fScale);
3123
3124/*!
3125 * \brief prepare for a transform with a source mask in cccn888
3126 * \param[in] ptOP the control block, NULL means using the default control block
3127 * \param[in] ptSource the source tile
3128 * \param[in] ptSourceMask the source mask
3129 * \param[in] tCentre the pivot in the source tile
3130 * \param[in] fAngle the rotation angle
3131 * \param[in] fScale the scaling factor
3132 * \return arm_2d_err_t the result of the preparing process
3133 */
3134extern
3135ARM_NONNULL(2,3)
3138 const arm_2d_tile_t *ptSource,
3139 const arm_2d_tile_t *ptSourceMask,
3140 const arm_2d_location_t tCentre,
3141 float fAngle,
3142 float fScale);
3143
3144/*!
3145 * \brief prepare for a transform with a source mask and opacity in gray8
3146 * \param[in] ptOP the control block, NULL means using the default control block
3147 * \param[in] ptSource the source tile
3148 * \param[in] ptSourceMask the source mask
3149 * \param[in] tCentre the pivot in the source tile
3150 * \param[in] fAngle the rotation angle
3151 * \param[in] fScale the scaling factor
3152 * \param[in] chOpacity the opacity
3153 * \return arm_2d_err_t the result of the preparing process
3154 */
3155extern
3156ARM_NONNULL(2,3)
3159 const arm_2d_tile_t *ptSource,
3160 const arm_2d_tile_t *ptSourceMask,
3161 const arm_2d_location_t tCentre,
3162 float fAngle,
3163 float fScale,
3164 uint_fast8_t chOpacity);
3165
3166/*!
3167 * \brief prepare for a transform with a source mask and opacity in rgb565
3168 * \param[in] ptOP the control block, NULL means using the default control block
3169 * \param[in] ptSource the source tile
3170 * \param[in] ptSourceMask the source mask
3171 * \param[in] tCentre the pivot in the source tile
3172 * \param[in] fAngle the rotation angle
3173 * \param[in] fScale the scaling factor
3174 * \param[in] chOpacity the opacity
3175 * \return arm_2d_err_t the result of the preparing process
3176 */
3177extern
3178ARM_NONNULL(2,3)
3181 const arm_2d_tile_t *ptSource,
3182 const arm_2d_tile_t *ptSourceMask,
3183 const arm_2d_location_t tCentre,
3184 float fAngle,
3185 float fScale,
3186 uint_fast8_t chOpacity);
3187
3188/*!
3189 * \brief prepare for a transform with a source mask and opacity in cccn888
3190 * \param[in] ptOP the control block, NULL means using the default control block
3191 * \param[in] ptSource the source tile
3192 * \param[in] ptSourceMask the source mask
3193 * \param[in] tCentre the pivot in the source tile
3194 * \param[in] fAngle the rotation angle
3195 * \param[in] fScale the scaling factor
3196 * \param[in] chOpacity the opacity
3197 * \return arm_2d_err_t the result of the preparing process
3198 */
3199extern
3200ARM_NONNULL(2,3)
3203 const arm_2d_tile_t *ptSource,
3204 const arm_2d_tile_t *ptSourceMask,
3205 const arm_2d_location_t tCentre,
3206 float fAngle,
3207 float fScale,
3208 uint_fast8_t chOpacity);
3209
3210
3211/*!
3212 * \brief prepare for a gray8 colour-filling with a mask, a given opacity and
3213 * transform
3214 * \param[in] ptOP the control block, NULL means using the default control block
3215 * \param[in] ptMask the target mask
3216 * \param[in] tCentre the pivot in the source tile
3217 * \param[in] fAngle the rotation angle
3218 * \param[in] fScale the scaling factor
3219 * \param[in] chFillColour the colour to fill
3220 * \param[in] chOpacity the opacity
3221 * \return arm_2d_err_t the result of the preparing process
3222 */
3223extern
3224ARM_NONNULL(2)
3227 const arm_2d_tile_t *ptMask,
3228 const arm_2d_location_t tCentre,
3229 float fAngle,
3230 float fScale,
3231 uint_fast8_t chFillColour,
3232 uint_fast8_t chOpacity);
3233
3234/*!
3235 * \brief prepare for a rgb565 colour-filling with a mask, a given opacity and
3236 * transform
3237 * \param[in] ptOP the control block, NULL means using the default control block
3238 * \param[in] ptMask the target mask
3239 * \param[in] tCentre the pivot in the source tile
3240 * \param[in] fAngle the rotation angle
3241 * \param[in] fScale the scaling factor
3242 * \param[in] hwFillColour the colour to fill
3243 * \param[in] chOpacity the opacity
3244 * \return arm_2d_err_t the result of the preparing process
3245 */
3246extern
3247ARM_NONNULL(2)
3250 const arm_2d_tile_t *ptMask,
3251 const arm_2d_location_t tCentre,
3252 float fAngle,
3253 float fScale,
3254 uint_fast16_t hwFillColour,
3255 uint_fast8_t chOpacity);
3256
3257/*!
3258 * \brief prepare for a cccn888 colour-filling with a mask, a given opacity and
3259 * transform
3260 * \param[in] ptOP the control block, NULL means using the default control block
3261 * \param[in] ptMask the target mask
3262 * \param[in] tCentre the pivot in the source tile
3263 * \param[in] fAngle the rotation angle
3264 * \param[in] fScale the scaling factor
3265 * \param[in] wFillColour the colour to fill
3266 * \param[in] chOpacity the opacity
3267 * \return arm_2d_err_t the result of the preparing process
3268 */
3269extern
3270ARM_NONNULL(2)
3273 const arm_2d_tile_t *ptMask,
3274 const arm_2d_location_t tCentre,
3275 float fAngle,
3276 float fScale,
3277 uint32_t wFillColour,
3278 uint_fast8_t chOpacity);
3279
3280/*!
3281 * \brief start a transform operation
3282 * \param[in] ptOP the control block, NULL means using the default control block
3283 * \param[in] ptTarget the target tile
3284 * \param[in] ptRegion the target region
3285 * \param[in] ptTargetCentre the pivot in the target region
3286 * \return arm_fsm_rt_t the operation result
3287 */
3288extern
3289ARM_NONNULL(2)
3291 const arm_2d_tile_t *ptTarget,
3292 const arm_2d_region_t *ptRegion,
3293 const arm_2d_location_t *ptTargetCentre);
3294
3295/*! @} */
3296
3297#if defined(__clang__)
3298# pragma clang diagnostic pop
3299#endif
3300
3301#ifdef __cplusplus
3302}
3303#endif
3304
3305#endif