Arm-2D  
2D Image Processing Library for Cortex-M Processors
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: 17 June 2022
25 * $Revision: V.1.0.1
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#define arm_2dp_gray8_tile_transform_with_src_mask( \
1410 __CB_ADDR, \
1411 __SRC_TILE_ADDR, \
1412 __SRC_MASK_ADDR, \
1413 __DES_TILE_ADDR, \
1414 __DES_REGION_ADDR, \
1415 __CENTRE, \
1416 __ANGLE, \
1417 __SCALE, \
1418 ...) \
1419 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1420 arm_2dp_gray8_tile_transform_with_src_mask_prepare( \
1421 (__CB_ADDR), \
1422 (__SRC_TILE_ADDR), \
1423 (__SRC_MASK_ADDR), \
1424 (__CENTRE), \
1425 (float)(__ANGLE), \
1426 (float)(__SCALE)); \
1427 }; \
1428 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1429 (__DES_TILE_ADDR), \
1430 (__DES_REGION_ADDR), \
1431 (NULL,##__VA_ARGS__)); \
1432 })
1433
1434#define arm_2dp_rgb565_tile_transform_with_src_mask( \
1435 __CB_ADDR, \
1436 __SRC_TILE_ADDR, \
1437 __SRC_MASK_ADDR, \
1438 __DES_TILE_ADDR, \
1439 __DES_REGION_ADDR, \
1440 __CENTRE, \
1441 __ANGLE, \
1442 __SCALE, \
1443 ...) \
1444 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1445 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( \
1446 (__CB_ADDR), \
1447 (__SRC_TILE_ADDR), \
1448 (__SRC_MASK_ADDR), \
1449 (__CENTRE), \
1450 (float)(__ANGLE), \
1451 (float)(__SCALE)); \
1452 }; \
1453 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1454 (__DES_TILE_ADDR), \
1455 (__DES_REGION_ADDR), \
1456 (NULL,##__VA_ARGS__)); \
1457 })
1458
1459
1460#define arm_2dp_cccn888_tile_transform_with_src_mask( \
1461 __CB_ADDR, \
1462 __SRC_TILE_ADDR, \
1463 __SRC_MASK_ADDR, \
1464 __DES_TILE_ADDR, \
1465 __DES_REGION_ADDR, \
1466 __CENTRE, \
1467 __ANGLE, \
1468 __SCALE, \
1469 ...) \
1470 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1471 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( \
1472 (__CB_ADDR), \
1473 (__SRC_TILE_ADDR), \
1474 (__SRC_MASK_ADDR), \
1475 (__CENTRE), \
1476 (float)(__ANGLE), \
1477 (float)(__SCALE)); \
1478 }; \
1479 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1480 (__DES_TILE_ADDR), \
1481 (__DES_REGION_ADDR), \
1482 (NULL,##__VA_ARGS__)); \
1483 })
1484
1485#define arm_2dp_gray8_tile_transform_with_src_mask_and_opacity( \
1486 __CB_ADDR, \
1487 __SRC_TILE_ADDR, \
1488 __SRC_MASK_ADDR, \
1489 __DES_TILE_ADDR, \
1490 __DES_REGION_ADDR, \
1491 __CENTRE, \
1492 __ANGLE, \
1493 __SCALE, \
1494 __OPACITY, \
1495 ...) \
1496 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1497 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
1498 (__CB_ADDR), \
1499 (__SRC_TILE_ADDR), \
1500 (__SRC_MASK_ADDR), \
1501 (__CENTRE), \
1502 (float)(__ANGLE), \
1503 (float)(__SCALE), \
1504 (__OPACITY)); \
1505 }; \
1506 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1507 (__DES_TILE_ADDR), \
1508 (__DES_REGION_ADDR), \
1509 (NULL,##__VA_ARGS__)); \
1510 })
1511
1512#define arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity( \
1513 __CB_ADDR, \
1514 __SRC_TILE_ADDR, \
1515 __SRC_MASK_ADDR, \
1516 __DES_TILE_ADDR, \
1517 __DES_REGION_ADDR, \
1518 __CENTRE, \
1519 __ANGLE, \
1520 __SCALE, \
1521 __OPACITY, \
1522 ...) \
1523 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1524 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
1525 (__CB_ADDR), \
1526 (__SRC_TILE_ADDR), \
1527 (__SRC_MASK_ADDR), \
1528 (__CENTRE), \
1529 (float)(__ANGLE), \
1530 (float)(__SCALE), \
1531 (__OPACITY)); \
1532 }; \
1533 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1534 (__DES_TILE_ADDR), \
1535 (__DES_REGION_ADDR), \
1536 (NULL,##__VA_ARGS__)); \
1537 })
1538
1539
1540#define arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity( \
1541 __CB_ADDR, \
1542 __SRC_TILE_ADDR, \
1543 __SRC_MASK_ADDR, \
1544 __DES_TILE_ADDR, \
1545 __DES_REGION_ADDR, \
1546 __CENTRE, \
1547 __ANGLE, \
1548 __SCALE, \
1549 __OPACITY, \
1550 ...) \
1551 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
1552 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
1553 (__CB_ADDR), \
1554 (__SRC_TILE_ADDR), \
1555 (__SRC_MASK_ADDR), \
1556 (__CENTRE), \
1557 (float)(__ANGLE), \
1558 (float)(__SCALE), \
1559 (__OPACITY)); \
1560 }; \
1561 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
1562 (__DES_TILE_ADDR), \
1563 (__DES_REGION_ADDR), \
1564 (NULL,##__VA_ARGS__)); \
1565 })
1566
1567
1568#define arm_2d_gray8_tile_transform( \
1569 __SRC_TILE_ADDR, \
1570 __DES_TILE_ADDR, \
1571 __DES_REGION_ADDR, \
1572 __CENTRE, \
1573 __ANGLE, \
1574 __SCALE, \
1575 __MSK_COLOUR, ...) \
1576 ({{ \
1577 arm_2dp_gray8_tile_transform_prepare( \
1578 (NULL), \
1579 (__SRC_TILE_ADDR), \
1580 (__CENTRE), \
1581 (float)(__ANGLE), \
1582 (float)(__SCALE), \
1583 (__MSK_COLOUR)); \
1584 }; \
1585 arm_2dp_tile_transform(NULL, \
1586 (__DES_TILE_ADDR), \
1587 (__DES_REGION_ADDR), \
1588 (NULL,##__VA_ARGS__)); \
1589 })
1590
1591#define arm_2d_rgb565_tile_transform( \
1592 __SRC_TILE_ADDR, \
1593 __DES_TILE_ADDR, \
1594 __DES_REGION_ADDR, \
1595 __CENTRE, \
1596 __ANGLE, \
1597 __SCALE, \
1598 __MSK_COLOUR, ...) \
1599 ({{ \
1600 arm_2dp_rgb565_tile_transform_prepare( \
1601 (NULL), \
1602 (__SRC_TILE_ADDR), \
1603 (__CENTRE), \
1604 (float)(__ANGLE), \
1605 (float)(__SCALE), \
1606 (__MSK_COLOUR)); \
1607 }; \
1608 arm_2dp_tile_transform(NULL, \
1609 (__DES_TILE_ADDR), \
1610 (__DES_REGION_ADDR), \
1611 (NULL,##__VA_ARGS__)); \
1612 })
1613
1614
1615#define arm_2d_rgb888_tile_transform( \
1616 __SRC_TILE_ADDR, \
1617 __DES_TILE_ADDR, \
1618 __DES_REGION_ADDR, \
1619 __CENTRE, \
1620 __ANGLE, \
1621 __SCALE, \
1622 __MSK_COLOUR, ...) \
1623 ({{ \
1624 arm_2dp_cccn888_tile_transform_prepare( \
1625 NULL, \
1626 (__SRC_TILE_ADDR), \
1627 (__CENTRE), \
1628 (float)(__ANGLE), \
1629 (float)(__SCALE), \
1630 (__MSK_COLOUR)); \
1631 }; \
1632 arm_2dp_tile_transform(NULL, \
1633 (__DES_TILE_ADDR), \
1634 (__DES_REGION_ADDR), \
1635 (NULL,##__VA_ARGS__)); \
1636 })
1637
1638#define arm_2d_gray8_tile_transform_with_opacity( \
1639 __SRC_TILE_ADDR, \
1640 __DES_TILE_ADDR, \
1641 __DES_REGION_ADDR, \
1642 __CENTRE, \
1643 __ANGLE, \
1644 __SCALE, \
1645 __MSK_COLOUR, \
1646 __RATIO, ...) \
1647 ({{ \
1648 arm_2dp_gray8_tile_transform_with_opacity_prepare( \
1649 NULL, \
1650 (__SRC_TILE_ADDR), \
1651 (__CENTRE), \
1652 (float)(__ANGLE), \
1653 (float)(__SCALE), \
1654 (__MSK_COLOUR), \
1655 (__RATIO)); \
1656 }; \
1657 arm_2dp_tile_transform(NULL, \
1658 (__DES_TILE_ADDR), \
1659 (__DES_REGION_ADDR), \
1660 (NULL,##__VA_ARGS__)); \
1661 })
1662
1663#define arm_2d_rgb565_tile_transform_with_opacity( \
1664 __SRC_TILE_ADDR, \
1665 __DES_TILE_ADDR, \
1666 __DES_REGION_ADDR, \
1667 __CENTRE, \
1668 __ANGLE, \
1669 __SCALE, \
1670 __MSK_COLOUR, \
1671 __RATIO, ...) \
1672 ({{ \
1673 arm_2dp_rgb565_tile_transform_with_opacity_prepare( \
1674 NULL, \
1675 (__SRC_TILE_ADDR), \
1676 (__CENTRE), \
1677 (float)(__ANGLE), \
1678 (float)(__SCALE), \
1679 (__MSK_COLOUR), \
1680 (__RATIO)); \
1681 }; \
1682 arm_2dp_tile_transform(NULL, \
1683 (__DES_TILE_ADDR), \
1684 (__DES_REGION_ADDR), \
1685 (NULL,##__VA_ARGS__)); \
1686 })
1687
1688#define arm_2d_rgb888_tile_transform_with_opacity( \
1689 __SRC_TILE_ADDR, \
1690 __DES_TILE_ADDR, \
1691 __DES_REGION_ADDR, \
1692 __CENTRE, \
1693 __ANGLE, \
1694 __SCALE, \
1695 __MSK_COLOUR, \
1696 __RATIO, ...) \
1697 ({{ \
1698 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
1699 NULL, \
1700 (__SRC_TILE_ADDR), \
1701 (__CENTRE), \
1702 (float)(__ANGLE), \
1703 (float)(__SCALE), \
1704 (__MSK_COLOUR), \
1705 (__RATIO)); \
1706 }; \
1707 arm_2dp_tile_transform(NULL, \
1708 (__DES_TILE_ADDR), \
1709 (__DES_REGION_ADDR), \
1710 (NULL,##__VA_ARGS__)); \
1711 })
1712
1713
1714
1715#define arm_2d_cccn888_tile_transform_with_opacity( \
1716 __SRC_TILE_ADDR, \
1717 __DES_TILE_ADDR, \
1718 __DES_REGION_ADDR, \
1719 __CENTRE, \
1720 __ANGLE, \
1721 __SCALE, \
1722 __MSK_COLOUR, \
1723 __RATIO, ...) \
1724 ({{ \
1725 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
1726 NULL, \
1727 (__SRC_TILE_ADDR), \
1728 (__CENTRE), \
1729 (float)(__ANGLE), \
1730 (float)(__SCALE), \
1731 (__MSK_COLOUR), \
1732 (__RATIO)); \
1733 }; \
1734 arm_2dp_tile_transform(NULL, \
1735 (__DES_TILE_ADDR), \
1736 (__DES_REGION_ADDR), \
1737 (NULL,##__VA_ARGS__)); \
1738 })
1739
1740
1741#define arm_2d_gray8_tile_transform_with_src_mask( \
1742 __SRC_TILE_ADDR, \
1743 __SRC_MASK_ADDR, \
1744 __DES_TILE_ADDR, \
1745 __DES_REGION_ADDR, \
1746 __CENTRE, \
1747 __ANGLE, \
1748 __SCALE, \
1749 ...) \
1750 ({{ \
1751 arm_2dp_gray8_tile_transform_with_src_mask_prepare( \
1752 (NULL), \
1753 (__SRC_TILE_ADDR), \
1754 (__SRC_MASK_ADDR), \
1755 (__CENTRE), \
1756 (float)(__ANGLE), \
1757 (float)(__SCALE)); \
1758 }; \
1759 arm_2dp_tile_transform(NULL, \
1760 (__DES_TILE_ADDR), \
1761 (__DES_REGION_ADDR), \
1762 (NULL,##__VA_ARGS__)); \
1763 })
1764
1765#define arm_2d_rgb565_tile_transform_with_src_mask( \
1766 __SRC_TILE_ADDR, \
1767 __SRC_MASK_ADDR, \
1768 __DES_TILE_ADDR, \
1769 __DES_REGION_ADDR, \
1770 __CENTRE, \
1771 __ANGLE, \
1772 __SCALE, \
1773 ...) \
1774 ({{ \
1775 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( \
1776 (NULL), \
1777 (__SRC_TILE_ADDR), \
1778 (__SRC_MASK_ADDR), \
1779 (__CENTRE), \
1780 (float)(__ANGLE), \
1781 (float)(__SCALE)); \
1782 }; \
1783 arm_2dp_tile_transform(NULL, \
1784 (__DES_TILE_ADDR), \
1785 (__DES_REGION_ADDR), \
1786 (NULL,##__VA_ARGS__)); \
1787 })
1788
1789#define arm_2d_cccn888_tile_transform_with_src_mask( \
1790 __SRC_TILE_ADDR, \
1791 __SRC_MASK_ADDR, \
1792 __DES_TILE_ADDR, \
1793 __DES_REGION_ADDR, \
1794 __CENTRE, \
1795 __ANGLE, \
1796 __SCALE, \
1797 ...) \
1798 ({{ \
1799 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( \
1800 (NULL), \
1801 (__SRC_TILE_ADDR), \
1802 (__SRC_MASK_ADDR), \
1803 (__CENTRE), \
1804 (float)(__ANGLE), \
1805 (float)(__SCALE)); \
1806 }; \
1807 arm_2dp_tile_transform(NULL, \
1808 (__DES_TILE_ADDR), \
1809 (__DES_REGION_ADDR), \
1810 (NULL,##__VA_ARGS__)); \
1811 })
1812
1813#define arm_2d_gray8_tile_transform_with_src_mask_and_opacity( \
1814 __SRC_TILE_ADDR, \
1815 __SRC_MASK_ADDR, \
1816 __DES_TILE_ADDR, \
1817 __DES_REGION_ADDR, \
1818 __CENTRE, \
1819 __ANGLE, \
1820 __SCALE, \
1821 __OPACITY, \
1822 ...) \
1823 ({{ \
1824 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
1825 (NULL), \
1826 (__SRC_TILE_ADDR), \
1827 (__SRC_MASK_ADDR), \
1828 (__CENTRE), \
1829 (float)(__ANGLE), \
1830 (float)(__SCALE), \
1831 (__OPACITY)); \
1832 }; \
1833 arm_2dp_tile_transform(NULL, \
1834 (__DES_TILE_ADDR), \
1835 (__DES_REGION_ADDR), \
1836 (NULL,##__VA_ARGS__)); \
1837 })
1838
1839#define arm_2d_rgb565_tile_transform_with_src_mask_and_opacity( \
1840 __SRC_TILE_ADDR, \
1841 __SRC_MASK_ADDR, \
1842 __DES_TILE_ADDR, \
1843 __DES_REGION_ADDR, \
1844 __CENTRE, \
1845 __ANGLE, \
1846 __SCALE, \
1847 __OPACITY, \
1848 ...) \
1849 ({{ \
1850 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
1851 (NULL), \
1852 (__SRC_TILE_ADDR), \
1853 (__SRC_MASK_ADDR), \
1854 (__CENTRE), \
1855 (float)(__ANGLE), \
1856 (float)(__SCALE), \
1857 (__OPACITY)); \
1858 }; \
1859 arm_2dp_tile_transform(NULL, \
1860 (__DES_TILE_ADDR), \
1861 (__DES_REGION_ADDR), \
1862 (NULL,##__VA_ARGS__)); \
1863 })
1864
1865#define arm_2d_cccn888_tile_transform_with_src_mask_and_opacity( \
1866 __SRC_TILE_ADDR, \
1867 __SRC_MASK_ADDR, \
1868 __DES_TILE_ADDR, \
1869 __DES_REGION_ADDR, \
1870 __CENTRE, \
1871 __ANGLE, \
1872 __SCALE, \
1873 __OPACITY, \
1874 ...) \
1875 ({{ \
1876 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
1877 (NULL), \
1878 (__SRC_TILE_ADDR), \
1879 (__SRC_MASK_ADDR), \
1880 (__CENTRE), \
1881 (float)(__ANGLE), \
1882 (float)(__SCALE), \
1883 (__OPACITY)); \
1884 }; \
1885 arm_2dp_tile_transform(NULL, \
1886 (__DES_TILE_ADDR), \
1887 (__DES_REGION_ADDR), \
1888 (NULL,##__VA_ARGS__)); \
1889 })
1890
1891/*----------------------------------------------------------------------------*
1892 * API wrappers: Scaling *
1893 *----------------------------------------------------------------------------*/
1894#define arm_2d_gray8_tile_scaling_prepare(__SRC_TILE_ADDR, \
1895 __CENTRE, \
1896 __SCALE, \
1897 __MSK_COLOUR) \
1898 arm_2dp_gray8_tile_transform_prepare( NULL, \
1899 (__SRC_TILE_ADDR), \
1900 (__CENTRE), \
1901 0.0f, \
1902 (float)(__SCALE), \
1903 (__MSK_COLOUR))
1904
1905#define arm_2d_rgb565_tile_scaling_prepare(__SRC_TILE_ADDR, \
1906 __CENTRE, \
1907 __SCALE, \
1908 __MSK_COLOUR) \
1909 arm_2dp_rgb565_tile_transform_prepare( NULL, \
1910 (__SRC_TILE_ADDR), \
1911 (__CENTRE), \
1912 0.0f, \
1913 (float)(__SCALE), \
1914 (__MSK_COLOUR))
1915
1916#define arm_2d_rgb888_tile_scaling_prepare(__SRC_TILE_ADDR, \
1917 __CENTRE, \
1918 __SCALE, \
1919 __MSK_COLOUR) \
1920 arm_2dp_cccn888_tile_transform_prepare( NULL, \
1921 (__SRC_TILE_ADDR), \
1922 (__CENTRE), \
1923 0.0f, \
1924 (float)(__SCALE), \
1925 (__MSK_COLOUR))
1926
1927
1928
1929#define arm_2d_gray8_tile_scaling_with_opacity_prepare( \
1930 __SRC_TILE_ADDR, \
1931 __CENTRE, \
1932 __SCALE, \
1933 __MSK_COLOUR, \
1934 __RATIO) \
1935 arm_2dp_gray8_tile_transform_with_opacity_prepare( NULL, \
1936 (__SRC_TILE_ADDR), \
1937 (__CENTRE), \
1938 0.0f, \
1939 (float)(__SCALE), \
1940 (__MSK_COLOUR), \
1941 (__RATIO))
1942
1943#define arm_2d_rgb565_tile_scaling_with_opacity_prepare( \
1944 __SRC_TILE_ADDR, \
1945 __CENTRE, \
1946 __SCALE, \
1947 __MSK_COLOUR, \
1948 __RATIO) \
1949 arm_2dp_rgb565_tile_transform_with_opacity_prepare( NULL, \
1950 (__SRC_TILE_ADDR), \
1951 (__CENTRE), \
1952 0.0f, \
1953 (float)(__SCALE), \
1954 (__MSK_COLOUR), \
1955 (__RATIO))
1956
1957
1958#define arm_2d_rgb888_tile_scaling_with_opacity_prepare( \
1959 __SRC_TILE_ADDR, \
1960 __CENTRE, \
1961 __SCALE, \
1962 __MSK_COLOUR, \
1963 __RATIO) \
1964 arm_2dp_cccn888_tile_transform_with_opacity_prepare( NULL, \
1965 (__SRC_TILE_ADDR), \
1966 (__CENTRE), \
1967 0.0f, \
1968 (float)(__SCALE), \
1969 (__MSK_COLOUR), \
1970 (__RATIO))
1971
1972#define arm_2d_cccn888_tile_scaling_with_opacity_prepare( \
1973 __SRC_TILE_ADDR, \
1974 __CENTRE, \
1975 __SCALE, \
1976 __MSK_COLOUR, \
1977 __RATIO) \
1978 arm_2dp_cccn888_tile_transform_with_opacity_prepare( NULL, \
1979 (__SRC_TILE_ADDR), \
1980 (__CENTRE), \
1981 0.0f, \
1982 (float)(__SCALE), \
1983 (__MSK_COLOUR), \
1984 (__RATIO))
1985
1986#define arm_2d_gray8_tile_scaling_with_src_mask_prepare( \
1987 __SRC_TILE_ADDR, \
1988 __SRC_MASK_ADDR, \
1989 __CENTRE, \
1990 __SCALE) \
1991 arm_2dp_gray8_tile_transform_with_src_mask_prepare( NULL, \
1992 (__SRC_TILE_ADDR), \
1993 (__SRC_MASK_ADDR), \
1994 (__CENTRE), \
1995 0.0f, \
1996 (float)(__SCALE))
1997
1998#define arm_2d_rgb565_tile_scaling_with_src_mask_prepare( \
1999 __SRC_TILE_ADDR, \
2000 __SRC_MASK_ADDR, \
2001 __CENTRE, \
2002 __SCALE) \
2003 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( NULL, \
2004 (__SRC_TILE_ADDR), \
2005 (__SRC_MASK_ADDR), \
2006 (__CENTRE), \
2007 0.0f, \
2008 (float)(__SCALE))
2009
2010#define arm_2d_cccn888_tile_scaling_with_src_mask_prepare( \
2011 __SRC_TILE_ADDR, \
2012 __SRC_MASK_ADDR, \
2013 __CENTRE, \
2014 __SCALE) \
2015 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( NULL, \
2016 (__SRC_TILE_ADDR), \
2017 (__SRC_MASK_ADDR), \
2018 (__CENTRE), \
2019 0.0f, \
2020 (float)(__SCALE))
2021
2022#define arm_2d_gray8_tile_scaling_with_src_mask_and_opacity_prepare( \
2023 __SRC_TILE_ADDR, \
2024 __SRC_MASK_ADDR, \
2025 __CENTRE, \
2026 __SCALE, \
2027 __OPACITY) \
2028 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
2029 NULL, \
2030 (__SRC_TILE_ADDR), \
2031 (__SRC_MASK_ADDR), \
2032 (__CENTRE), \
2033 0.0f, \
2034 (float)(__SCALE), \
2035 (__OPACITY))
2036
2037#define arm_2d_rgb565_tile_scaling_with_src_mask_and_opacity_prepare( \
2038 __SRC_TILE_ADDR, \
2039 __SRC_MASK_ADDR, \
2040 __CENTRE, \
2041 __SCALE, \
2042 __OPACITY) \
2043 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
2044 NULL, \
2045 (__SRC_TILE_ADDR), \
2046 (__SRC_MASK_ADDR), \
2047 (__CENTRE), \
2048 0.0f, \
2049 (float)(__SCALE), \
2050 (__OPACITY))
2051
2052#define arm_2d_cccn888_tile_scaling_with_src_mask_and_opacity_prepare( \
2053 __SRC_TILE_ADDR, \
2054 __SRC_MASK_ADDR, \
2055 __CENTRE, \
2056 __SCALE, \
2057 __OPACITY) \
2058 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
2059 NULL, \
2060 (__SRC_TILE_ADDR), \
2061 (__SRC_MASK_ADDR), \
2062 (__CENTRE), \
2063 0.0f, \
2064 (float)(__SCALE), \
2065 (__OPACITY))
2066
2067#define arm_2d_tile_scale( __DES_TILE_ADDR, \
2068 __DES_REGION_ADDR, \
2069 __DES_CENTRE_ADDR) \
2070 arm_2dp_tile_transform(NULL, \
2071 (__DES_TILE_ADDR), \
2072 (__DES_REGION_ADDR), \
2073 (__DES_CENTRE_ADDR))
2074
2075
2076/* following macro APIs rely on the boolean variable bIsNewFrame.
2077 * Please make sure you have define it with the correct name and the
2078 * corresponding value. If you don't use the PFB interfaces for neither
2079 * the low level rendering nor the high level GUI drawing, please find
2080 * such variable with the value "true".
2081 */
2082
2083#define arm_2dp_gray8_tile_scaling( __CB_ADDR, \
2084 __SRC_TILE_ADDR, \
2085 __DES_TILE_ADDR, \
2086 __DES_REGION_ADDR, \
2087 __CENTRE, \
2088 __SCALE, \
2089 __MSK_COLOUR, \
2090 ...) \
2091 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2092 arm_2dp_gray8_tile_transform_prepare( \
2093 (__CB_ADDR), \
2094 (__SRC_TILE_ADDR), \
2095 (__CENTRE), \
2096 0.0f, \
2097 (__SCALE), \
2098 (__MSK_COLOUR)); \
2099 }; \
2100 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2101 (__DES_TILE_ADDR), \
2102 (__DES_REGION_ADDR), \
2103 (NULL,##__VA_ARGS__)); \
2104 })
2105
2106#define arm_2dp_rgb565_tile_scaling( __CB_ADDR, \
2107 __SRC_TILE_ADDR, \
2108 __DES_TILE_ADDR, \
2109 __DES_REGION_ADDR, \
2110 __CENTRE, \
2111 __SCALE, \
2112 __MSK_COLOUR, \
2113 ...) \
2114 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2115 arm_2dp_rgb565_tile_transform_prepare( \
2116 (__CB_ADDR), \
2117 (__SRC_TILE_ADDR), \
2118 (__CENTRE), \
2119 0.0f, \
2120 (__SCALE), \
2121 (__MSK_COLOUR)); \
2122 }; \
2123 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2124 (__DES_TILE_ADDR), \
2125 (__DES_REGION_ADDR), \
2126 (NULL,##__VA_ARGS__)); \
2127 })
2128
2129
2130#define arm_2dp_cccn888_tile_scaling( __CB_ADDR, \
2131 __SRC_TILE_ADDR, \
2132 __DES_TILE_ADDR, \
2133 __DES_REGION_ADDR, \
2134 __CENTRE, \
2135 __SCALE, \
2136 __MSK_COLOUR,...) \
2137 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2138 arm_2dp_cccn888_tile_transform_prepare( \
2139 (__CB_ADDR), \
2140 (__SRC_TILE_ADDR), \
2141 (__CENTRE), \
2142 0.0f, \
2143 (__SCALE), \
2144 (__MSK_COLOUR)); \
2145 }; \
2146 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2147 (__DES_TILE_ADDR), \
2148 (__DES_REGION_ADDR), \
2149 (NULL,##__VA_ARGS__)); \
2150 })
2151
2152#define arm_2dp_gray8_tile_scaling_with_opacity( \
2153 __CB_ADDR, \
2154 __SRC_TILE_ADDR, \
2155 __DES_TILE_ADDR, \
2156 __DES_REGION_ADDR, \
2157 __CENTRE, \
2158 __SCALE, \
2159 __MSK_COLOUR, \
2160 __RATIO,...) \
2161 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2162 arm_2dp_gray8_tile_transform_with_opacity_prepare( \
2163 (__CB_ADDR), \
2164 (__SRC_TILE_ADDR), \
2165 (__CENTRE), \
2166 0.0f, \
2167 (__SCALE), \
2168 (__MSK_COLOUR), \
2169 (__RATIO)); \
2170 }; \
2171 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2172 (__DES_TILE_ADDR), \
2173 (__DES_REGION_ADDR), \
2174 (NULL,##__VA_ARGS__)); \
2175 })
2176
2177#define arm_2dp_rgb565_tile_scaling_with_opacity( \
2178 __CB_ADDR, \
2179 __SRC_TILE_ADDR, \
2180 __DES_TILE_ADDR, \
2181 __DES_REGION_ADDR, \
2182 __CENTRE, \
2183 __SCALE, \
2184 __MSK_COLOUR, \
2185 __RATIO,...) \
2186 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2187 arm_2dp_rgb565_tile_transform_with_opacity_prepare( \
2188 (__CB_ADDR), \
2189 (__SRC_TILE_ADDR), \
2190 (__CENTRE), \
2191 0.0f, \
2192 (__SCALE), \
2193 (__MSK_COLOUR), \
2194 (__RATIO)); \
2195 }; \
2196 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2197 (__DES_TILE_ADDR), \
2198 (__DES_REGION_ADDR), \
2199 (NULL,##__VA_ARGS__)); \
2200 })
2201
2202#define arm_2dp_rgb888_tile_scaling_with_opacity( \
2203 __CB_ADDR, \
2204 __SRC_TILE_ADDR, \
2205 __DES_TILE_ADDR, \
2206 __DES_REGION_ADDR, \
2207 __CENTRE, \
2208 __SCALE, \
2209 __MSK_COLOUR, \
2210 __RATIO, ...) \
2211 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2212 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
2213 (__CB_ADDR), \
2214 (__SRC_TILE_ADDR), \
2215 (__CENTRE), \
2216 0.0f, \
2217 (__SCALE), \
2218 (__MSK_COLOUR), \
2219 (__RATIO)); \
2220 }; \
2221 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2222 (__DES_TILE_ADDR), \
2223 (__DES_REGION_ADDR), \
2224 (NULL,##__VA_ARGS__)); \
2225 })
2226
2227#define arm_2dp_cccn888_tile_scaling_with_opacity( \
2228 __CB_ADDR, \
2229 __SRC_TILE_ADDR, \
2230 __DES_TILE_ADDR, \
2231 __DES_REGION_ADDR, \
2232 __CENTRE, \
2233 __SCALE, \
2234 __MSK_COLOUR, \
2235 __RATIO, ...) \
2236 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2237 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
2238 (__CB_ADDR), \
2239 (__SRC_TILE_ADDR), \
2240 (__CENTRE), \
2241 0.0f, \
2242 (__SCALE), \
2243 (__MSK_COLOUR), \
2244 (__RATIO)); \
2245 }; \
2246 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2247 (__DES_TILE_ADDR), \
2248 (__DES_REGION_ADDR), \
2249 (NULL,##__VA_ARGS__)); \
2250 })
2251
2252
2253#define arm_2dp_gray8_tile_scaling_with_src_mask( \
2254 __CB_ADDR, \
2255 __SRC_TILE_ADDR, \
2256 __SRC_MASK_ADDR, \
2257 __DES_TILE_ADDR, \
2258 __DES_REGION_ADDR, \
2259 __CENTRE, \
2260 __SCALE, \
2261 ...) \
2262 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2263 arm_2dp_gray8_tile_transform_with_src_mask_prepare( \
2264 (__CB_ADDR), \
2265 (__SRC_TILE_ADDR), \
2266 (__SRC_MASK_ADDR), \
2267 (__CENTRE), \
2268 0.0f, \
2269 (__SCALE)); \
2270 }; \
2271 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2272 (__DES_TILE_ADDR), \
2273 (__DES_REGION_ADDR), \
2274 (NULL,##__VA_ARGS__)); \
2275 })
2276
2277#define arm_2dp_rgb565_tile_scaling_with_src_mask( \
2278 __CB_ADDR, \
2279 __SRC_TILE_ADDR, \
2280 __SRC_MASK_ADDR, \
2281 __DES_TILE_ADDR, \
2282 __DES_REGION_ADDR, \
2283 __CENTRE, \
2284 __SCALE, \
2285 ...) \
2286 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2287 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( \
2288 (__CB_ADDR), \
2289 (__SRC_TILE_ADDR), \
2290 (__SRC_MASK_ADDR), \
2291 (__CENTRE), \
2292 0.0f, \
2293 (__SCALE)); \
2294 }; \
2295 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2296 (__DES_TILE_ADDR), \
2297 (__DES_REGION_ADDR), \
2298 (NULL,##__VA_ARGS__)); \
2299 })
2300
2301#define arm_2dp_cccn888_tile_scaling_with_src_mask( \
2302 __CB_ADDR, \
2303 __SRC_TILE_ADDR, \
2304 __SRC_MASK_ADDR, \
2305 __DES_TILE_ADDR, \
2306 __DES_REGION_ADDR, \
2307 __CENTRE, \
2308 __SCALE, \
2309 ...) \
2310 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2311 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( \
2312 (__CB_ADDR), \
2313 (__SRC_TILE_ADDR), \
2314 (__SRC_MASK_ADDR), \
2315 (__CENTRE), \
2316 0.0f, \
2317 (__SCALE)); \
2318 }; \
2319 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2320 (__DES_TILE_ADDR), \
2321 (__DES_REGION_ADDR), \
2322 (NULL,##__VA_ARGS__)); \
2323 })
2324
2325#define arm_2dp_gray8_tile_scaling_with_src_mask_and_opacity( \
2326 __CB_ADDR, \
2327 __SRC_TILE_ADDR, \
2328 __SRC_MASK_ADDR, \
2329 __DES_TILE_ADDR, \
2330 __DES_REGION_ADDR, \
2331 __CENTRE, \
2332 __SCALE, \
2333 __OPACITY, \
2334 ...) \
2335 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2336 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
2337 (__CB_ADDR), \
2338 (__SRC_TILE_ADDR), \
2339 (__SRC_MASK_ADDR), \
2340 (__CENTRE), \
2341 0.0f, \
2342 (__SCALE), \
2343 (__OPACITY)); \
2344 }; \
2345 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2346 (__DES_TILE_ADDR), \
2347 (__DES_REGION_ADDR), \
2348 (NULL,##__VA_ARGS__)); \
2349 })
2350
2351#define arm_2dp_rgb565_tile_scaling_with_src_mask_and_opacity( \
2352 __CB_ADDR, \
2353 __SRC_TILE_ADDR, \
2354 __SRC_MASK_ADDR, \
2355 __DES_TILE_ADDR, \
2356 __DES_REGION_ADDR, \
2357 __CENTRE, \
2358 __SCALE, \
2359 __OPACITY, \
2360 ...) \
2361 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2362 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
2363 (__CB_ADDR), \
2364 (__SRC_TILE_ADDR), \
2365 (__SRC_MASK_ADDR), \
2366 (__CENTRE), \
2367 0.0f, \
2368 (__SCALE), \
2369 (__OPACITY)); \
2370 }; \
2371 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2372 (__DES_TILE_ADDR), \
2373 (__DES_REGION_ADDR), \
2374 (NULL,##__VA_ARGS__)); \
2375 })
2376
2377#define arm_2dp_cccn888_tile_scaling_with_src_mask_and_opacity( \
2378 __CB_ADDR, \
2379 __SRC_TILE_ADDR, \
2380 __SRC_MASK_ADDR, \
2381 __DES_TILE_ADDR, \
2382 __DES_REGION_ADDR, \
2383 __CENTRE, \
2384 __SCALE, \
2385 __OPACITY, \
2386 ...) \
2387 ({assert(NULL != (__CB_ADDR)); if (bIsNewFrame) { \
2388 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
2389 (__CB_ADDR), \
2390 (__SRC_TILE_ADDR), \
2391 (__SRC_MASK_ADDR), \
2392 (__CENTRE), \
2393 0.0f, \
2394 (__SCALE), \
2395 (__OPACITY)); \
2396 }; \
2397 arm_2dp_tile_transform((arm_2d_op_trans_t *)(__CB_ADDR), \
2398 (__DES_TILE_ADDR), \
2399 (__DES_REGION_ADDR), \
2400 (NULL,##__VA_ARGS__)); \
2401 })
2402
2403#define arm_2d_gray8_tile_scaling( \
2404 __SRC_TILE_ADDR, \
2405 __DES_TILE_ADDR, \
2406 __DES_REGION_ADDR, \
2407 __CENTRE, \
2408 __SCALE, \
2409 __MSK_COLOUR, ...) \
2410 ({{ \
2411 arm_2dp_gray8_tile_transform_prepare( \
2412 (NULL), \
2413 (__SRC_TILE_ADDR), \
2414 (__CENTRE), \
2415 0.0f, \
2416 (__SCALE), \
2417 (__MSK_COLOUR)); \
2418 }; \
2419 arm_2dp_tile_transform(NULL, \
2420 (__DES_TILE_ADDR), \
2421 (__DES_REGION_ADDR), \
2422 (NULL,##__VA_ARGS__)); \
2423 })
2424
2425#define arm_2d_rgb565_tile_scaling( \
2426 __SRC_TILE_ADDR, \
2427 __DES_TILE_ADDR, \
2428 __DES_REGION_ADDR, \
2429 __CENTRE, \
2430 __SCALE, \
2431 __MSK_COLOUR, ...) \
2432 ({{ \
2433 arm_2dp_rgb565_tile_transform_prepare( \
2434 (NULL), \
2435 (__SRC_TILE_ADDR), \
2436 (__CENTRE), \
2437 0.0f, \
2438 (__SCALE), \
2439 (__MSK_COLOUR)); \
2440 }; \
2441 arm_2dp_tile_transform(NULL, \
2442 (__DES_TILE_ADDR), \
2443 (__DES_REGION_ADDR), \
2444 (NULL,##__VA_ARGS__)); \
2445 })
2446
2447
2448#define arm_2d_rgb888_tile_scaling( \
2449 __SRC_TILE_ADDR, \
2450 __DES_TILE_ADDR, \
2451 __DES_REGION_ADDR, \
2452 __CENTRE, \
2453 __SCALE, \
2454 __MSK_COLOUR, ...) \
2455 ({{ \
2456 arm_2dp_cccn888_tile_transform_prepare( \
2457 NULL, \
2458 (__SRC_TILE_ADDR), \
2459 (__CENTRE), \
2460 0.0f, \
2461 (__SCALE), \
2462 (__MSK_COLOUR)); \
2463 }; \
2464 arm_2dp_tile_transform(NULL, \
2465 (__DES_TILE_ADDR), \
2466 (__DES_REGION_ADDR), \
2467 (NULL,##__VA_ARGS__)); \
2468 })
2469
2470#define arm_2d_gray8_tile_scaling_with_opacity( \
2471 __SRC_TILE_ADDR, \
2472 __DES_TILE_ADDR, \
2473 __DES_REGION_ADDR, \
2474 __CENTRE, \
2475 __SCALE, \
2476 __MSK_COLOUR, \
2477 __RATIO, ...) \
2478 ({{ \
2479 arm_2dp_gray8_tile_transform_with_opacity_prepare( \
2480 NULL, \
2481 (__SRC_TILE_ADDR), \
2482 (__CENTRE), \
2483 0.0f, \
2484 (__SCALE), \
2485 (__MSK_COLOUR), \
2486 (__RATIO)); \
2487 }; \
2488 arm_2dp_tile_transform(NULL, \
2489 (__DES_TILE_ADDR), \
2490 (__DES_REGION_ADDR), \
2491 (NULL,##__VA_ARGS__)); \
2492 })
2493
2494
2495#define arm_2d_rgb565_tile_scaling_with_opacity( \
2496 __SRC_TILE_ADDR, \
2497 __DES_TILE_ADDR, \
2498 __DES_REGION_ADDR, \
2499 __CENTRE, \
2500 __SCALE, \
2501 __MSK_COLOUR, \
2502 __RATIO, ...) \
2503 ({{ \
2504 arm_2dp_rgb565_tile_transform_with_opacity_prepare( \
2505 NULL, \
2506 (__SRC_TILE_ADDR), \
2507 (__CENTRE), \
2508 0.0f, \
2509 (__SCALE), \
2510 (__MSK_COLOUR), \
2511 (__RATIO)); \
2512 }; \
2513 arm_2dp_tile_transform(NULL, \
2514 (__DES_TILE_ADDR), \
2515 (__DES_REGION_ADDR), \
2516 (NULL,##__VA_ARGS__)); \
2517 })
2518
2519
2520
2521#define arm_2d_rgb888_tile_scaling_with_opacity( \
2522 __SRC_TILE_ADDR, \
2523 __DES_TILE_ADDR, \
2524 __DES_REGION_ADDR, \
2525 __CENTRE, \
2526 __SCALE, \
2527 __MSK_COLOUR, \
2528 __RATIO, ...) \
2529 ({{ \
2530 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
2531 NULL, \
2532 (__SRC_TILE_ADDR), \
2533 (__CENTRE), \
2534 0.0f, \
2535 (__SCALE), \
2536 (__MSK_COLOUR), \
2537 (__RATIO)); \
2538 }; \
2539 arm_2dp_tile_transform(NULL, \
2540 (__DES_TILE_ADDR), \
2541 (__DES_REGION_ADDR), \
2542 (NULL,##__VA_ARGS__)); \
2543 })
2544
2545#define arm_2d_cccn888_tile_scaling_with_opacity( \
2546 __SRC_TILE_ADDR, \
2547 __DES_TILE_ADDR, \
2548 __DES_REGION_ADDR, \
2549 __CENTRE, \
2550 __SCALE, \
2551 __MSK_COLOUR, \
2552 __RATIO, ...) \
2553 ({{ \
2554 arm_2dp_cccn888_tile_transform_with_opacity_prepare( \
2555 NULL, \
2556 (__SRC_TILE_ADDR), \
2557 (__CENTRE), \
2558 0.0f, \
2559 (__SCALE), \
2560 (__MSK_COLOUR), \
2561 (__RATIO)); \
2562 }; \
2563 arm_2dp_tile_transform(NULL, \
2564 (__DES_TILE_ADDR), \
2565 (__DES_REGION_ADDR), \
2566 (NULL,##__VA_ARGS__)); \
2567 })
2568
2569#define arm_2d_gray8_tile_scaling_with_src_mask( \
2570 __SRC_TILE_ADDR, \
2571 __SRC_MASK_ADDR, \
2572 __DES_TILE_ADDR, \
2573 __DES_REGION_ADDR, \
2574 __CENTRE, \
2575 __SCALE, \
2576 ...) \
2577 ({{ \
2578 arm_2dp_gray8_tile_transform_with_src_mask_prepare( \
2579 (NULL), \
2580 (__SRC_TILE_ADDR), \
2581 (__SRC_MASK_ADDR), \
2582 (__CENTRE), \
2583 0.0f, \
2584 (__SCALE)); \
2585 }; \
2586 arm_2dp_tile_transform(NULL, \
2587 (__DES_TILE_ADDR), \
2588 (__DES_REGION_ADDR), \
2589 (NULL,##__VA_ARGS__)); \
2590 })
2591
2592#define arm_2d_rgb565_tile_scaling_with_src_mask( \
2593 __SRC_TILE_ADDR, \
2594 __SRC_MASK_ADDR, \
2595 __DES_TILE_ADDR, \
2596 __DES_REGION_ADDR, \
2597 __CENTRE, \
2598 __SCALE, \
2599 ...) \
2600 ({{ \
2601 arm_2dp_rgb565_tile_transform_with_src_mask_prepare( \
2602 (NULL), \
2603 (__SRC_TILE_ADDR), \
2604 (__SRC_MASK_ADDR), \
2605 (__CENTRE), \
2606 0.0f, \
2607 (__SCALE)); \
2608 }; \
2609 arm_2dp_tile_transform(NULL, \
2610 (__DES_TILE_ADDR), \
2611 (__DES_REGION_ADDR), \
2612 (NULL,##__VA_ARGS__)); \
2613 })
2614
2615#define arm_2d_cccn888_tile_scaling_with_src_mask( \
2616 __SRC_TILE_ADDR, \
2617 __SRC_MASK_ADDR, \
2618 __DES_TILE_ADDR, \
2619 __DES_REGION_ADDR, \
2620 __CENTRE, \
2621 __SCALE, \
2622 ...) \
2623 ({{ \
2624 arm_2dp_cccn888_tile_transform_with_src_mask_prepare( \
2625 (NULL), \
2626 (__SRC_TILE_ADDR), \
2627 (__SRC_MASK_ADDR), \
2628 (__CENTRE), \
2629 0.0f, \
2630 (__SCALE)); \
2631 }; \
2632 arm_2dp_tile_transform(NULL, \
2633 (__DES_TILE_ADDR), \
2634 (__DES_REGION_ADDR), \
2635 (NULL,##__VA_ARGS__)); \
2636 })
2637
2638#define arm_2d_gray8_tile_scaling_with_src_mask_and_opacity( \
2639 __SRC_TILE_ADDR, \
2640 __SRC_MASK_ADDR, \
2641 __DES_TILE_ADDR, \
2642 __DES_REGION_ADDR, \
2643 __CENTRE, \
2644 __SCALE, \
2645 __OPACITY, \
2646 ...) \
2647 ({{ \
2648 arm_2dp_gray8_tile_transform_with_src_mask_and_opacity_prepare( \
2649 (NULL), \
2650 (__SRC_TILE_ADDR), \
2651 (__SRC_MASK_ADDR), \
2652 (__CENTRE), \
2653 0.0f, \
2654 (__SCALE), \
2655 (__OPACITY)); \
2656 }; \
2657 arm_2dp_tile_transform(NULL, \
2658 (__DES_TILE_ADDR), \
2659 (__DES_REGION_ADDR), \
2660 (NULL,##__VA_ARGS__)); \
2661 })
2662
2663#define arm_2d_rgb565_tile_scaling_with_src_mask_and_opacity( \
2664 __SRC_TILE_ADDR, \
2665 __SRC_MASK_ADDR, \
2666 __DES_TILE_ADDR, \
2667 __DES_REGION_ADDR, \
2668 __CENTRE, \
2669 __SCALE, \
2670 __OPACITY, \
2671 ...) \
2672 ({{ \
2673 arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare( \
2674 (NULL), \
2675 (__SRC_TILE_ADDR), \
2676 (__SRC_MASK_ADDR), \
2677 (__CENTRE), \
2678 0.0f, \
2679 (__SCALE), \
2680 (__OPACITY)); \
2681 }; \
2682 arm_2dp_tile_transform(NULL, \
2683 (__DES_TILE_ADDR), \
2684 (__DES_REGION_ADDR), \
2685 (NULL,##__VA_ARGS__)); \
2686 })
2687
2688#define arm_2d_cccn888_tile_scaling_with_src_mask_and_opacity( \
2689 __SRC_TILE_ADDR, \
2690 __SRC_MASK_ADDR, \
2691 __DES_TILE_ADDR, \
2692 __DES_REGION_ADDR, \
2693 __CENTRE, \
2694 __SCALE, \
2695 __OPACITY, \
2696 ...) \
2697 ({{ \
2698 arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare( \
2699 (NULL), \
2700 (__SRC_TILE_ADDR), \
2701 (__SRC_MASK_ADDR), \
2702 (__CENTRE), \
2703 0.0f, \
2704 (__SCALE), \
2705 (__OPACITY)); \
2706 }; \
2707 arm_2dp_tile_transform(NULL, \
2708 (__DES_TILE_ADDR), \
2709 (__DES_REGION_ADDR), \
2710 (NULL,##__VA_ARGS__)); \
2711 })
2712
2713/*============================ TYPES =========================================*/
2714
2715/*!
2716 * \brief transform runtime context
2717 *
2718 */
2720 float fAngle; //!< target angle
2721 float fScale; //!< scaling factor
2723 union {
2724 uint8_t chColour; //!< the key colour in 8bit
2725 uint32_t wColour; //!< the key colour in 16bit
2726 uint16_t hwColour; //!< the key colour in 32bit
2727 } Mask;
2728
2729 /* private members used by runtime */
2730ARM_PRIVATE(
2731 arm_2d_location_t tDummySourceOffset;
2732 struct {
2733 arm_2d_region_t tRegion;
2734 arm_2d_tile_t tTile;
2735 } Target;
2737
2739
2740/*! \brief arm_2d_op_trans_t is inherit from arm_2d_op_src_orig_t
2741 */
2742typedef struct arm_2d_op_trans_t {
2743 inherit(arm_2d_op_core_t); //!< base
2744 struct {
2745 const arm_2d_tile_t *ptTile; //!< target tile
2746 const arm_2d_region_t *ptRegion; //!< target region
2747 } Target;
2748 struct {
2749 const arm_2d_tile_t *ptTile; //!< source tile
2750 }Source;
2751 uint32_t wMode; //!< not used
2752
2753 struct {
2754 const arm_2d_tile_t *ptTile; //!< the origin tile
2755 arm_2d_tile_t tDummySource; //!< the buffer for the source
2756 }Origin;
2757
2759
2761
2762
2763/*! \brief arm_2d_op_trans_opa_t is inherit from arm_2d_op_trans_t
2764 */
2766 inherit(arm_2d_op_core_t); //!< base
2767 struct {
2768 const arm_2d_tile_t *ptTile; //!< target tile
2769 const arm_2d_region_t *ptRegion; //!< target region
2770 } Target;
2771 struct {
2772 const arm_2d_tile_t *ptTile; //!< source tile
2773 }Source;
2774 uint32_t wMode; //!< not used
2775
2776 struct {
2777 const arm_2d_tile_t *ptTile; //!< the origin tile
2778 arm_2d_tile_t tDummySource; //!< the buffer for the source
2779 }Origin;
2780
2782 uint8_t chOpacity; //!< opacity
2783
2785
2786
2787/*! \brief arm_2d_op_trans_msk_t is inherit from arm_2d_op_src_orig_msk_t
2788 */
2790 inherit(arm_2d_op_core_t); //!< base
2791 struct {
2792 const arm_2d_tile_t *ptTile; //!< target tile
2793 const arm_2d_region_t *ptRegion; //!< target region
2794 } Target;
2795 struct {
2796 const arm_2d_tile_t *ptTile; //!< source tile
2797 }Source;
2798 uint32_t wMode; //!< not used
2799 struct {
2800 const arm_2d_tile_t *ptTile; //!< the origin tile
2801 arm_2d_tile_t tDummySource; //!< the buffer for the source
2802 }Origin;
2803 struct {
2804 const arm_2d_tile_t *ptOriginSide; //!< origin side mask
2805 const arm_2d_tile_t *ptTargetSide; //!< target side mask
2806 } Mask;
2807
2809
2811
2812
2813/*! \brief arm_2d_op_trans_msk_t is inherit from arm_2d_op_trans_msk_t
2814 */
2816 inherit(arm_2d_op_core_t); //!< base
2817 struct {
2818 const arm_2d_tile_t *ptTile; //!< target tile
2819 const arm_2d_region_t *ptRegion; //!< target region
2820 } Target;
2821 struct {
2822 const arm_2d_tile_t *ptTile; //!< source tile
2823 }Source;
2824 uint32_t wMode; //!< not used
2825 struct {
2826 const arm_2d_tile_t *ptTile; //!< the origin tile
2827 arm_2d_tile_t tDummySource; //!< the buffer for the source
2828 }Origin;
2829 struct {
2830 const arm_2d_tile_t *ptOriginSide; //!< origin side mask
2831 const arm_2d_tile_t *ptTargetSide; //!< target side mask
2832 } Mask;
2833
2835 uint8_t chOpacity; //!< opacity
2836
2838
2839/*============================ GLOBAL VARIABLES ==============================*/
2840/*============================ PROTOTYPES ====================================*/
2841
2842/*!
2843 * \brief prepare for a transform in gray8
2844 * \param[in] ptOP the control block, NULL means using the default control block
2845 * \param[in] ptSource the source tile
2846 * \param[in] tCentre the pivot in the source tile
2847 * \param[in] fAngle the rotation angle
2848 * \param[in] fScale the scaling factor
2849 * \param[in] chFillColour the key colour
2850 * \return arm_2d_err_t the result of the preparing process
2851 */
2852extern
2853ARM_NONNULL(2)
2855 arm_2d_op_trans_t *ptOP,
2856 const arm_2d_tile_t *ptSource,
2857 const arm_2d_location_t tCentre,
2858 float fAngle,
2859 float fScale,
2860 uint_fast8_t chFillColour);
2861
2862/*!
2863 * \brief prepare for a transform in rgb565
2864 * \param[in] ptOP the control block, NULL means using the default control block
2865 * \param[in] ptSource the source tile
2866 * \param[in] tCentre the pivot in the source tile
2867 * \param[in] fAngle the rotation angle
2868 * \param[in] fScale the scaling factor
2869 * \param[in] hwFillColour the key colour
2870 * \return arm_2d_err_t the result of the preparing process
2871 */
2872extern
2873ARM_NONNULL(2)
2875 arm_2d_op_trans_t *ptOP,
2876 const arm_2d_tile_t *ptSource,
2877 const arm_2d_location_t tCentre,
2878 float fAngle,
2879 float fScale,
2880 uint_fast16_t hwFillColour);
2881
2882/*!
2883 * \brief prepare for a transform in cccn888
2884 * \param[in] ptOP the control block, NULL means using the default control block
2885 * \param[in] ptSource the source tile
2886 * \param[in] tCentre the pivot in the source tile
2887 * \param[in] fAngle the rotation angle
2888 * \param[in] fScale the scaling factor
2889 * \param[in] wFillColour the key colour
2890 * \return arm_2d_err_t the result of the preparing process
2891 */
2892extern
2893ARM_NONNULL(2)
2895 arm_2d_op_trans_t *ptOP,
2896 const arm_2d_tile_t *ptSource,
2897 const arm_2d_location_t tCentre,
2898 float fAngle,
2899 float fScale,
2900 uint32_t wFillColour);
2901
2902/*!
2903 * \brief prepare for a transform with opacity in gray8
2904 * \param[in] ptOP the control block, NULL means using the default control block
2905 * \param[in] ptSource the source tile
2906 * \param[in] tCentre the pivot in the source tile
2907 * \param[in] fAngle the rotation angle
2908 * \param[in] fScale the scaling factor
2909 * \param[in] chFillColour the key colour
2910 * \param[in] chRatio the opacity
2911 * \return arm_2d_err_t the result of the preparing process
2912 */
2913extern
2914ARM_NONNULL(2)
2917 const arm_2d_tile_t *ptSource,
2918 const arm_2d_location_t tCentre,
2919 float fAngle,
2920 float fScale,
2921 uint_fast8_t chFillColour,
2922 uint_fast8_t chRatio);
2923
2924/*!
2925 * \brief prepare for a transform with opacity in rgb565
2926 * \param[in] ptOP the control block, NULL means using the default control block
2927 * \param[in] ptSource the source tile
2928 * \param[in] tCentre the pivot in the source tile
2929 * \param[in] fAngle the rotation angle
2930 * \param[in] fScale the scaling factor
2931 * \param[in] hwFillColour the key colour
2932 * \param[in] chRatio the opacity
2933 * \return arm_2d_err_t the result of the preparing process
2934 */
2935extern
2936ARM_NONNULL(2)
2939 const arm_2d_tile_t *ptSource,
2940 const arm_2d_location_t tCentre,
2941 float fAngle,
2942 float fScale,
2943 uint_fast16_t hwFillColour,
2944 uint_fast8_t chRatio);
2945
2946/*!
2947 * \brief prepare for a transform with opacity in cccn888
2948 * \param[in] ptOP the control block, NULL means using the default control block
2949 * \param[in] ptSource the source tile
2950 * \param[in] tCentre the pivot in the source tile
2951 * \param[in] fAngle the rotation angle
2952 * \param[in] fScale the scaling factor
2953 * \param[in] wFillColour the key colour
2954 * \param[in] chRatio the opacity
2955 * \return arm_2d_err_t the result of the preparing process
2956 */
2957extern
2958ARM_NONNULL(2)
2961 const arm_2d_tile_t *ptSource,
2962 const arm_2d_location_t tCentre,
2963 float fAngle,
2964 float fScale,
2965 uint32_t wFillColour,
2966 uint_fast8_t chRatio);
2967
2968/*!
2969 * \brief prepare for a transform with a source mask in gray8
2970 * \param[in] ptOP the control block, NULL means using the default control block
2971 * \param[in] ptSource the source tile
2972 * \param[in] ptSourceMask the source mask
2973 * \param[in] tCentre the pivot in the source tile
2974 * \param[in] fAngle the rotation angle
2975 * \param[in] fScale the scaling factor
2976 * \return arm_2d_err_t the result of the preparing process
2977 */
2978extern
2979ARM_NONNULL(2,3)
2982 const arm_2d_tile_t *ptSource,
2983 const arm_2d_tile_t *ptSourceMask,
2984 const arm_2d_location_t tCentre,
2985 float fAngle,
2986 float fScale);
2987
2988/*!
2989 * \brief prepare for a transform with a source mask in rgb565
2990 * \param[in] ptOP the control block, NULL means using the default control block
2991 * \param[in] ptSource the source tile
2992 * \param[in] ptSourceMask the source mask
2993 * \param[in] tCentre the pivot in the source tile
2994 * \param[in] fAngle the rotation angle
2995 * \param[in] fScale the scaling factor
2996 * \return arm_2d_err_t the result of the preparing process
2997 */
2998extern
2999ARM_NONNULL(2,3)
3002 const arm_2d_tile_t *ptSource,
3003 const arm_2d_tile_t *ptSourceMask,
3004 const arm_2d_location_t tCentre,
3005 float fAngle,
3006 float fScale);
3007
3008/*!
3009 * \brief prepare for a transform with a source mask in cccn888
3010 * \param[in] ptOP the control block, NULL means using the default control block
3011 * \param[in] ptSource the source tile
3012 * \param[in] ptSourceMask the source mask
3013 * \param[in] tCentre the pivot in the source tile
3014 * \param[in] fAngle the rotation angle
3015 * \param[in] fScale the scaling factor
3016 * \return arm_2d_err_t the result of the preparing process
3017 */
3018extern
3019ARM_NONNULL(2,3)
3022 const arm_2d_tile_t *ptSource,
3023 const arm_2d_tile_t *ptSourceMask,
3024 const arm_2d_location_t tCentre,
3025 float fAngle,
3026 float fScale);
3027
3028/*!
3029 * \brief prepare for a transform with a source mask and opacity in gray8
3030 * \param[in] ptOP the control block, NULL means using the default control block
3031 * \param[in] ptSource the source tile
3032 * \param[in] ptSourceMask the source mask
3033 * \param[in] tCentre the pivot in the source tile
3034 * \param[in] fAngle the rotation angle
3035 * \param[in] fScale the scaling factor
3036 * \param[in] chOpacity the opacity
3037 * \return arm_2d_err_t the result of the preparing process
3038 */
3039extern
3040ARM_NONNULL(2,3)
3043 const arm_2d_tile_t *ptSource,
3044 const arm_2d_tile_t *ptSourceMask,
3045 const arm_2d_location_t tCentre,
3046 float fAngle,
3047 float fScale,
3048 uint_fast8_t chOpacity);
3049
3050/*!
3051 * \brief prepare for a transform with a source mask and opacity in rgb565
3052 * \param[in] ptOP the control block, NULL means using the default control block
3053 * \param[in] ptSource the source tile
3054 * \param[in] ptSourceMask the source mask
3055 * \param[in] tCentre the pivot in the source tile
3056 * \param[in] fAngle the rotation angle
3057 * \param[in] fScale the scaling factor
3058 * \param[in] chOpacity the opacity
3059 * \return arm_2d_err_t the result of the preparing process
3060 */
3061extern
3062ARM_NONNULL(2,3)
3065 const arm_2d_tile_t *ptSource,
3066 const arm_2d_tile_t *ptSourceMask,
3067 const arm_2d_location_t tCentre,
3068 float fAngle,
3069 float fScale,
3070 uint_fast8_t chOpacity);
3071
3072/*!
3073 * \brief prepare for a transform with a source mask and opacity in cccn888
3074 * \param[in] ptOP the control block, NULL means using the default control block
3075 * \param[in] ptSource the source tile
3076 * \param[in] ptSourceMask the source mask
3077 * \param[in] tCentre the pivot in the source tile
3078 * \param[in] fAngle the rotation angle
3079 * \param[in] fScale the scaling factor
3080 * \param[in] chOpacity the opacity
3081 * \return arm_2d_err_t the result of the preparing process
3082 */
3083extern
3084ARM_NONNULL(2,3)
3087 const arm_2d_tile_t *ptSource,
3088 const arm_2d_tile_t *ptSourceMask,
3089 const arm_2d_location_t tCentre,
3090 float fAngle,
3091 float fScale,
3092 uint_fast8_t chOpacity);
3093
3094/*!
3095 * \brief start a transform operation
3096 * \param[in] ptOP the control block, NULL means using the default control block
3097 * \param[in] ptTarget the target tile
3098 * \param[in] ptRegion the target region
3099 * \param[in] ptTargetCentre the pivot in the target region
3100 * \return arm_fsm_rt_t the operation result
3101 */
3102extern
3103ARM_NONNULL(2)
3105 const arm_2d_tile_t *ptTarget,
3106 const arm_2d_region_t *ptRegion,
3107 const arm_2d_location_t *ptTargetCentre);
3108
3109/*! @} */
3110
3111#if defined(__clang__)
3112# pragma clang diagnostic pop
3113#endif
3114
3115#ifdef __cplusplus
3116}
3117#endif
3118
3119#endif