30#ifndef __ARM_2D_TILE_H__
31#define __ARM_2D_TILE_H__
34#include "arm_2d_types.h"
48#define arm_2d_c8bit_tile_copy_with_colour_masking \
49 arm_2d_c8bit_tile_copy_with_colour_keying
51#define arm_2d_rgb16_tile_copy_with_colour_masking \
52 arm_2d_rgb16_tile_copy_with_colour_keying
54#define arm_2d_rgb32_tile_copy_with_colour_masking \
55 arm_2d_rgb32_tile_copy_with_colour_keying
64#define arm_2d_c8bit_tile_copy( __SRC_ADDR, \
68 arm_2dp_c8bit_tile_copy(NULL, \
71 (__DES_REGION_ADDR), \
74#define arm_2d_rgb16_tile_copy( __SRC_ADDR, \
78 arm_2dp_rgb16_tile_copy(NULL, \
81 (__DES_REGION_ADDR), \
84#define arm_2d_rgb32_tile_copy( __SRC_ADDR, \
88 arm_2dp_rgb32_tile_copy(NULL, \
91 (__DES_REGION_ADDR), \
94#define arm_2d_c8bit_tile_copy_only( \
98 arm_2dp_c8bit_tile_copy_only(NULL, \
103#define arm_2d_rgb16_tile_copy_only( \
107 arm_2dp_rgb16_tile_copy_only(NULL, \
112#define arm_2d_rgb32_tile_copy_only( \
116 arm_2dp_rgb32_tile_copy_only(NULL, \
121#define arm_2d_c8bit_tile_copy_with_x_mirror( \
125 arm_2dp_c8bit_tile_copy_with_x_mirror( \
131#define arm_2d_rgb16_tile_copy_with_x_mirror( \
135 arm_2dp_rgb16_tile_copy_with_x_mirror( \
141#define arm_2d_rgb32_tile_copy_with_x_mirror( \
145 arm_2dp_rgb32_tile_copy_with_x_mirror( \
151#define arm_2d_c8bit_tile_copy_with_y_mirror( \
155 arm_2dp_c8bit_tile_copy_with_y_mirror( \
161#define arm_2d_rgb16_tile_copy_with_y_mirror( \
165 arm_2dp_rgb16_tile_copy_with_y_mirror( \
171#define arm_2d_rgb32_tile_copy_with_y_mirror( \
175 arm_2dp_rgb32_tile_copy_with_y_mirror( \
181#define arm_2d_c8bit_tile_copy_with_xy_mirror( \
185 arm_2dp_c8bit_tile_copy_with_xy_mirror( \
191#define arm_2d_rgb16_tile_copy_with_xy_mirror( \
195 arm_2dp_rgb16_tile_copy_with_xy_mirror( \
201#define arm_2d_rgb32_tile_copy_with_xy_mirror( \
205 arm_2dp_rgb32_tile_copy_with_xy_mirror( \
211#define arm_2d_c8bit_tile_fill_only( \
215 arm_2dp_c8bit_tile_fill_only(NULL, \
220#define arm_2d_rgb16_tile_fill_only( \
224 arm_2dp_rgb16_tile_fill_only(NULL, \
229#define arm_2d_rgb32_tile_fill_only( \
233 arm_2dp_rgb32_tile_fill_only(NULL, \
238#define arm_2d_c8bit_tile_fill_with_x_mirror( \
242 arm_2dp_c8bit_tile_fill_with_x_mirror( \
248#define arm_2d_rgb16_tile_fill_with_x_mirror( \
252 arm_2dp_rgb16_tile_fill_with_x_mirror( \
258#define arm_2d_rgb32_tile_fill_with_x_mirror( \
262 arm_2dp_rgb32_tile_fill_with_x_mirror( \
268#define arm_2d_c8bit_tile_fill_with_y_mirror( \
272 arm_2dp_c8bit_tile_fill_with_y_mirror( \
278#define arm_2d_rgb16_tile_fill_with_y_mirror( \
282 arm_2dp_rgb16_tile_fill_with_y_mirror( \
288#define arm_2d_rgb32_tile_fill_with_y_mirror( \
292 arm_2dp_rgb32_tile_fill_with_y_mirror( \
298#define arm_2d_c8bit_tile_fill_with_xy_mirror( \
302 arm_2dp_c8bit_tile_fill_with_xy_mirror( \
308#define arm_2d_rgb16_tile_fill_with_xy_mirror( \
312 arm_2dp_rgb16_tile_fill_with_xy_mirror( \
318#define arm_2d_rgb32_tile_fill_with_xy_mirror( \
322 arm_2dp_rgb32_tile_fill_with_xy_mirror( \
328#define arm_2d_c8bit_tile_copy_with_colour_keying( \
334 arm_2dp_c8bit_tile_copy_with_colour_keying( \
338 (__DES_REGION_ADDR), \
343#define arm_2d_rgb16_tile_copy_with_colour_keying( \
349 arm_2dp_rgb16_tile_copy_with_colour_keying( \
353 (__DES_REGION_ADDR), \
357#define arm_2d_rgb32_tile_copy_with_colour_keying( \
363 arm_2dp_rgb32_tile_copy_with_colour_keying( \
367 (__DES_REGION_ADDR), \
371#define arm_2d_c8bit_tile_copy_with_colour_keying_only( \
376 arm_2dp_c8bit_tile_copy_with_colour_keying_only( \
380 (__DES_REGION_ADDR), \
384#define arm_2d_rgb16_tile_copy_with_colour_keying_only( \
389 arm_2dp_rgb16_tile_copy_with_colour_keying_only( \
393 (__DES_REGION_ADDR), \
396#define arm_2d_rgb32_tile_copy_with_colour_keying_only( \
401 arm_2dp_rgb32_tile_copy_with_colour_keying_only( \
405 (__DES_REGION_ADDR), \
409#define arm_2d_c8bit_tile_copy_with_colour_keying_and_x_mirror( \
414 arm_2dp_c8bit_tile_copy_with_colour_keying_and_x_mirror( \
418 (__DES_REGION_ADDR), \
421#define arm_2d_rgb16_tile_copy_with_colour_keying_and_x_mirror( \
426 arm_2dp_rgb16_tile_copy_with_colour_keying_and_x_mirror( \
430 (__DES_REGION_ADDR), \
433#define arm_2d_rgb32_tile_copy_with_colour_keying_and_x_mirror( \
438 arm_2dp_rgb32_tile_copy_with_colour_keying_and_x_mirror( \
442 (__DES_REGION_ADDR), \
445#define arm_2d_c8bit_tile_copy_with_colour_keying_and_y_mirror( \
450 arm_2dp_c8bit_tile_copy_with_colour_keying_and_y_mirror( \
454 (__DES_REGION_ADDR), \
457#define arm_2d_rgb16_tile_copy_with_colour_keying_and_y_mirror( \
462 arm_2dp_rgb16_tile_copy_with_colour_keying_and_y_mirror( \
466 (__DES_REGION_ADDR), \
469#define arm_2d_rgb32_tile_copy_with_colour_keying_and_y_mirror( \
474 arm_2dp_rgb32_tile_copy_with_colour_keying_and_y_mirror( \
478 (__DES_REGION_ADDR), \
481#define arm_2d_c8bit_tile_copy_with_colour_keying_and_xy_mirror( \
486 arm_2dp_c8bit_tile_copy_with_colour_keying_and_xy_mirror( \
490 (__DES_REGION_ADDR), \
493#define arm_2d_rgb16_tile_copy_with_colour_keying_and_xy_mirror( \
498 arm_2dp_rgb16_tile_copy_with_colour_keying_and_xy_mirror( \
502 (__DES_REGION_ADDR), \
505#define arm_2d_rgb32_tile_copy_with_colour_keying_and_xy_mirror( \
510 arm_2dp_rgb32_tile_copy_with_colour_keying_and_xy_mirror( \
514 (__DES_REGION_ADDR), \
517#define arm_2d_c8bit_tile_fill_with_colour_keying_only( \
522 arm_2dp_c8bit_tile_fill_with_colour_keying_only( \
526 (__DES_REGION_ADDR), \
530#define arm_2d_rgb16_tile_fill_with_colour_keying_only( \
535 arm_2dp_rgb16_tile_fill_with_colour_keying_only( \
539 (__DES_REGION_ADDR), \
542#define arm_2d_rgb32_tile_fill_with_colour_keying_only( \
547 arm_2dp_rgb32_tile_fill_with_colour_keying_only( \
551 (__DES_REGION_ADDR), \
555#define arm_2d_c8bit_tile_fill_with_colour_keying_and_x_mirror( \
560 arm_2dp_c8bit_tile_fill_with_colour_keying_and_x_mirror( \
564 (__DES_REGION_ADDR), \
567#define arm_2d_rgb16_tile_fill_with_colour_keying_and_x_mirror( \
572 arm_2dp_rgb16_tile_fill_with_colour_keying_and_x_mirror( \
576 (__DES_REGION_ADDR), \
579#define arm_2d_rgb32_tile_fill_with_colour_keying_and_x_mirror( \
584 arm_2dp_rgb32_tile_fill_with_colour_keying_and_x_mirror( \
588 (__DES_REGION_ADDR), \
591#define arm_2d_c8bit_tile_fill_with_colour_keying_and_y_mirror( \
596 arm_2dp_c8bit_tile_fill_with_colour_keying_and_y_mirror( \
600 (__DES_REGION_ADDR), \
603#define arm_2d_rgb16_tile_fill_with_colour_keying_and_y_mirror( \
608 arm_2dp_rgb16_tile_fill_with_colour_keying_and_y_mirror( \
612 (__DES_REGION_ADDR), \
615#define arm_2d_rgb32_tile_fill_with_colour_keying_and_y_mirror( \
620 arm_2dp_rgb32_tile_fill_with_colour_keying_and_y_mirror( \
624 (__DES_REGION_ADDR), \
627#define arm_2d_c8bit_tile_fill_with_colour_keying_and_xy_mirror( \
632 arm_2dp_c8bit_tile_fill_with_colour_keying_and_xy_mirror( \
636 (__DES_REGION_ADDR), \
639#define arm_2d_rgb16_tile_fill_with_colour_keying_and_xy_mirror( \
644 arm_2dp_rgb16_tile_fill_with_colour_keying_and_xy_mirror( \
648 (__DES_REGION_ADDR), \
651#define arm_2d_rgb32_tile_fill_with_colour_keying_and_xy_mirror( \
656 arm_2dp_rgb32_tile_fill_with_colour_keying_and_xy_mirror( \
660 (__DES_REGION_ADDR), \
689#define __arm_2d_get_address_and_region_from_tile( __TILE_PTR, \
690 __VALID_REGION_NAME, \
691 __LOCATION_OFFSET_PTR, \
694 arm_2d_region_t __VALID_REGION_NAME; \
695 assert(NULL != (__TILE_PTR)); \
696 __TYPE *(__BUF_PTR_NAME) = NULL; \
698 (__TILE_PTR) = arm_2d_tile_get_root((__TILE_PTR), \
699 &__VALID_REGION_NAME, \
700 __LOCATION_OFFSET_PTR); \
702 if (NULL != (__TILE_PTR)) { \
703 (__BUF_PTR_NAME) = ((__TYPE *)((__TILE_PTR)->pchBuffer)) \
704 + (__TILE_PTR)->tRegion.tSize.iWidth * \
705 __VALID_REGION_NAME.tLocation.iY \
706 + __VALID_REGION_NAME.tLocation.iX; \
710#define arm_2d_get_address_and_region_from_tile(__TILE_PTR, \
711 __VALID_REGION_NAME, \
712 __LOCATION_OFFSET_PTR, \
715 __arm_2d_get_address_and_region_from_tile( __TILE_PTR, \
716 __VALID_REGION_NAME, \
717 __LOCATION_OFFSET_PTR, \
722#define __arm_2d_get_address_and_region_from_tile_with_mirroring( \
724 __VALID_REGION_NAME, \
725 __LOCATION_OFFSET_PTR, \
729 arm_2d_region_t __VALID_REGION_NAME; \
730 assert(NULL != (__TILE_PTR)); \
731 __TYPE *(__BUF_PTR_NAME) = NULL; \
733 (__TILE_PTR) = arm_2d_tile_get_root((__TILE_PTR), \
734 &__VALID_REGION_NAME, \
735 __LOCATION_OFFSET_PTR); \
737 if (NULL != (__TILE_PTR)) { \
738 arm_2d_location_t tOffset = __VALID_REGION_NAME.tLocation; \
739 if ((__MODE) & ARM_2D_CP_MODE_X_MIRROR) { \
742 if ((__MODE) & ARM_2D_CP_MODE_Y_MIRROR) { \
745 (__BUF_PTR_NAME) = ((__TYPE *)((__TILE_PTR)->pchBuffer)) \
746 + (__TILE_PTR)->tRegion.tSize.iWidth * tOffset.iY \
751#define arm_2d_get_address_and_region_from_tile_with_mirroring( \
753 __VALID_REGION_NAME, \
754 __LOCATION_OFFSET_PTR, \
758 __arm_2d_get_address_and_region_from_tile_with_mirroring( \
760 __VALID_REGION_NAME, \
761 __LOCATION_OFFSET_PTR, \
767#define arm_2d_tile_width_compare(__target_tile_ptr, __ref_tile_ptr, ...) \
768 __arm_2d_tile_width_compare((__target_tile_ptr), \
770 (true, ##__VA_ARGS__))
772#define arm_2d_tile_height_compare(__target_tile_ptr, __ref_tile_ptr, ...) \
773 __arm_2d_tile_height_compare((__target_tile_ptr), \
775 (true, ##__VA_ARGS__))
777#define arm_2dp_c8bit_tile_fill( __OPCODE_PTR, \
783 arm_fsm_rt_t tResult = (arm_fsm_rt_t)ARM_2D_ERR_UNKNOWN; \
784 switch ( (ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) \
785 & ARM_2D_CP_MODE_XY_MIRROR) { \
786 case ARM_2D_CP_MODE_NO_MIRROR: \
787 tResult = arm_2dp_c8bit_tile_fill_only( \
793 case ARM_2D_CP_MODE_X_MIRROR: \
794 tResult = arm_2dp_c8bit_tile_fill_with_x_mirror( \
800 case ARM_2D_CP_MODE_Y_MIRROR: \
801 tResult = arm_2dp_c8bit_tile_fill_with_y_mirror( \
807 case ARM_2D_CP_MODE_XY_MIRROR: \
808 tResult = arm_2dp_c8bit_tile_fill_with_xy_mirror( \
818#define arm_2d_c8bit_tile_fill( __SOURCE_ADDR, \
822 arm_2dp_c8bit_tile_fill(NULL, \
828#define arm_2dp_rgb16_tile_fill( __OPCODE_PTR, \
834 arm_fsm_rt_t tResult = (arm_fsm_rt_t)ARM_2D_ERR_UNKNOWN; \
835 switch ( (ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) \
836 & ARM_2D_CP_MODE_XY_MIRROR) { \
837 case ARM_2D_CP_MODE_NO_MIRROR: \
838 tResult = arm_2dp_rgb16_tile_fill_only( \
844 case ARM_2D_CP_MODE_X_MIRROR: \
845 tResult = arm_2dp_rgb16_tile_fill_with_x_mirror( \
851 case ARM_2D_CP_MODE_Y_MIRROR: \
852 tResult = arm_2dp_rgb16_tile_fill_with_y_mirror( \
858 case ARM_2D_CP_MODE_XY_MIRROR: \
859 tResult = arm_2dp_rgb16_tile_fill_with_xy_mirror( \
869#define arm_2d_rgb16_tile_fill( __SOURCE_ADDR, \
873 arm_2dp_rgb16_tile_fill(NULL, \
879#define arm_2dp_rgb32_tile_fill( __OPCODE_PTR, \
885 arm_fsm_rt_t tResult = (arm_fsm_rt_t)ARM_2D_ERR_UNKNOWN; \
886 switch ( (ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) \
887 & ARM_2D_CP_MODE_XY_MIRROR) { \
888 case ARM_2D_CP_MODE_NO_MIRROR: \
889 tResult = arm_2dp_rgb32_tile_fill_only( \
895 case ARM_2D_CP_MODE_X_MIRROR: \
896 tResult = arm_2dp_rgb32_tile_fill_with_x_mirror( \
902 case ARM_2D_CP_MODE_Y_MIRROR: \
903 tResult = arm_2dp_rgb32_tile_fill_with_y_mirror( \
909 case ARM_2D_CP_MODE_XY_MIRROR: \
910 tResult = arm_2dp_rgb32_tile_fill_with_xy_mirror( \
920#define arm_2d_rgb32_tile_fill( __SOURCE_ADDR, \
924 arm_2dp_rgb32_tile_fill(NULL, \
940#define arm_2dp_c8bit_tile_copy( __OPCODE_PTR, \
946 arm_fsm_rt_t tResult = (arm_fsm_rt_t)ARM_2D_ERR_UNKNOWN; \
947 if ((ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) & ARM_2D_CP_MODE_FILL) { \
948 tResult = arm_2dp_c8bit_tile_fill( \
955 switch ( (ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) \
956 & ARM_2D_CP_MODE_XY_MIRROR) { \
957 case ARM_2D_CP_MODE_NO_MIRROR: \
958 tResult = arm_2dp_c8bit_tile_copy_only( \
964 case ARM_2D_CP_MODE_X_MIRROR: \
965 tResult = arm_2dp_c8bit_tile_copy_with_x_mirror( \
971 case ARM_2D_CP_MODE_Y_MIRROR: \
972 tResult = arm_2dp_c8bit_tile_copy_with_y_mirror( \
978 case ARM_2D_CP_MODE_XY_MIRROR: \
979 tResult = arm_2dp_c8bit_tile_copy_with_xy_mirror( \
1000#define arm_2dp_rgb16_tile_copy( __OPCODE_PTR, \
1006 arm_fsm_rt_t tResult = (arm_fsm_rt_t)ARM_2D_ERR_UNKNOWN; \
1007 if ((ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) & ARM_2D_CP_MODE_FILL) { \
1008 tResult = arm_2dp_rgb16_tile_fill( \
1015 switch ( (ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) \
1016 & ARM_2D_CP_MODE_XY_MIRROR) { \
1017 case ARM_2D_CP_MODE_NO_MIRROR: \
1018 tResult = arm_2dp_rgb16_tile_copy_only( \
1024 case ARM_2D_CP_MODE_X_MIRROR: \
1025 tResult = arm_2dp_rgb16_tile_copy_with_x_mirror( \
1031 case ARM_2D_CP_MODE_Y_MIRROR: \
1032 tResult = arm_2dp_rgb16_tile_copy_with_y_mirror( \
1038 case ARM_2D_CP_MODE_XY_MIRROR: \
1039 tResult = arm_2dp_rgb16_tile_copy_with_xy_mirror( \
1060#define arm_2dp_rgb32_tile_copy( __OPCODE_PTR, \
1066 arm_fsm_rt_t tResult = (arm_fsm_rt_t)ARM_2D_ERR_UNKNOWN; \
1067 if ((ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) & ARM_2D_CP_MODE_FILL) { \
1068 tResult = arm_2dp_rgb32_tile_fill( \
1075 switch ( (ARM_2D_CP_MODE_NO_MIRROR, ##__VA_ARGS__) \
1076 & ARM_2D_CP_MODE_XY_MIRROR) { \
1077 case ARM_2D_CP_MODE_NO_MIRROR: \
1078 tResult = arm_2dp_rgb32_tile_copy_only( \
1084 case ARM_2D_CP_MODE_X_MIRROR: \
1085 tResult = arm_2dp_rgb32_tile_copy_with_x_mirror( \
1091 case ARM_2D_CP_MODE_Y_MIRROR: \
1092 tResult = arm_2dp_rgb32_tile_copy_with_y_mirror( \
1098 case ARM_2D_CP_MODE_XY_MIRROR: \
1099 tResult = arm_2dp_rgb32_tile_copy_with_xy_mirror( \
1150 return ptTile->tInfo.bIsRoot;
1307 bool bQuitWhenFindVirtualScreen);
1329 bool bQuitWhenFindVirtualScreen);
1385 bool bValidateBeforeReturn);
1409 bool bOnVirtualScreen);
1422 bool bClipBeforeCompare);
1434 bool bClipBeforeCompare);
1487 uint_fast8_t chBytesPerPixel);
1497 ARM_2D_CP_MODE_COPY = 0,
1498 ARM_2D_CP_MODE_FILL = _BV(0),
1499 ARM_2D_CP_MODE_NO_MIRROR = 0,
1500 ARM_2D_CP_MODE_Y_MIRROR = _BV(2),
1501 ARM_2D_CP_MODE_X_MIRROR = _BV(3),
1502 ARM_2D_CP_MODE_XY_MIRROR = ARM_2D_CP_MODE_X_MIRROR |
1503 ARM_2D_CP_MODE_Y_MIRROR,
2018 uint8_t chMaskColour,
2041 uint16_t hwMaskColour,
2065 uint32_t wMaskColour,
2090 uint8_t chMaskColour);
2111 uint16_t hwMaskColour);
2133 uint32_t wMaskColour);
2157 uint8_t chMaskColour);
2178 uint16_t hwMaskColour);
2200 uint32_t wMaskColour);
2224 uint8_t chMaskColour);
2245 uint16_t hwMaskColour);
2267 uint32_t wMaskColour);
2290 uint8_t chMaskColour);
2311 uint16_t hwMaskColour);
2333 uint32_t wMaskColour);
2357 uint8_t chMaskColour);
2378 uint16_t hwMaskColour);
2400 uint32_t wMaskColour);
2424 uint8_t chMaskColour);
2445 uint16_t hwMaskColour);
2467 uint32_t wMaskColour);
2491 uint8_t chMaskColour);
2512 uint16_t hwMaskColour);
2534 uint32_t wMaskColour);
2557 uint8_t chMaskColour);
2578 uint16_t hwMaskColour);
2600 uint32_t wMaskColour);