123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935 |
- /*
- * Copyright (c) 2020 Actions Technology Co., Ltd
- *
- * SPDX-License-Identifier: Apache-2.0
- */
- /**
- * @file
- * @brief Utilities of sw rotation API
- */
- #ifndef ZEPHYR_FRAMEWORK_INCLUDE_DISPLAY_SW_ROTATE_H_
- #define ZEPHYR_FRAMEWORK_INCLUDE_DISPLAY_SW_ROTATE_H_
- #include <stdbool.h>
- #include "sw_math.h"
- /**
- * @defgroup display-util Display Utilities
- * @ingroup display_libraries
- * @{
- */
- #ifdef __cplusplus
- extern "C" {
- #endif
- /**
- * @brief Enumeration with possible predefined transformations
- */
- enum {
- SW_FLIP_H = 0x1, /* Flip source image horizontally */
- SW_FLIP_V = 0x2, /* Flip source image verticallye */
- SW_ROT_90 = 0x4, /* Rotate source image 90 degrees clock-wise */
- SW_ROT_180 = 0x3, /* Rotate source image 180 degrees clock-wise */
- SW_ROT_270 = 0x7, /* Rotate source image 270 degrees clock-wise */
- };
- /**
- * @struct sw_matrix
- * @brief Structure holding 2x3 affine transform.
- *
- * [ sx shx tx ]
- * [ shy sy ty ]
- * [ 0 0 1 ]
- *
- * Where:
- * sx and sy define scaling in the x and y directions, respectively;
- * shx and shy define shearing in the x and y directions, respectively;
- * tx and ty define translation in the x and y directions, respectively;
- *
- * An affine transformation maps a point (x, y) into the point (x', y') using
- * matrix multiplication:
- *
- * [ sx shx tx ] [x] [ x * sx + y * shx + tx ]
- * [ shy sy ty ] [y] = [ x * shy + y * sy + ty ]
- * [ 0 0 1 ] [1] [ 1 ]
- *
- * that is:
- * x' = sx * x + shx * y + tx
- * y' = shy * x + sy * y + ty
- */
- typedef struct sw_matrix {
- int32_t tx;
- int32_t ty;
- int32_t sx;
- int32_t shy;
- int32_t shx;
- int32_t sy;
- } sw_matrix_t;
- /*
- * @brief generate a rotation configuration width scaling first
- *
- * The src is scaled then rotated to dest.
- *
- * @param img_x x coord of top-left corner of image src before rotation in the display coordinate
- * @param img_y y coord of top-left corner of image src before rotation in the display coordinate
- * @param pivot_x rotate/scale pivot X offset relative to top-left corner of the image
- * @param pivot_y rotate/scale pivot Y offset relative to top-left corner of the image
- * @param angle rotation angle in 0.1 degree [0, 3600)
- * @param scale_x scale factor X, equal to "(1 << scale_bits) * dest_w / src_w"
- * @param scale_y scale factor Y, equal to "(1 << scale_bits) * dest_h / src_h"
- * @param scale_bits scale factor bits of scale_x and scale_y
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_config(int16_t img_x, int16_t img_y,
- int16_t pivot_x, int16_t pivot_y, uint16_t angle,
- uint16_t scale_x, uint16_t scale_y, uint16_t scale_bits,
- sw_matrix_t *matrix);
- /*
- * @brief generate a 90 (CW) degree rotation configuration
- *
- * Assume the top-left corner of image are (0, 0) in the display coordinate system
- * both before and after transformation.
- *
- * @param src_w transformed area width of source image
- * @param src_h transformed area height of source image
- * @param mode transformation mode
- *
- * @retval N/A
- */
- void sw_transform_config_with_mode(uint16_t img_w, uint16_t img_h,
- uint8_t mode, sw_matrix_t *matrix);
- /*
- * @brief rotate an rgb565 image over rgb565 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_rgb565_over_rgb565(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an rgb565 image over rg888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_rgb565_over_rgb888(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an rgb565 image over argb8888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_rgb565_over_argb8888(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an rgb565a8 image over rgb565 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_opa address of src opa image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_opa_pitch stride in bytes of src opa image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_rgb565a8_over_rgb565(void *dst, const void *src, const void *src_opa,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_opa_pitch,
- uint16_t src_w, uint16_t src_h, int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an rgb565a8 image over rg888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_opa address of src opa image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_opa_pitch stride in bytes of src opa image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_rgb565a8_over_rgb888(void *dst, const void *src, const void *src_opa,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_opa_pitch,
- uint16_t src_w, uint16_t src_h, int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an rgb565a8 image over argb8888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_opa address of src opa image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_opa_pitch stride in bytes of src opa image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_rgb565a8_over_argb8888(void *dst, const void *src, const void *src_opa,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_opa_pitch,
- uint16_t src_w, uint16_t src_h, int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an argb8565 image over rgb565 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_argb8565_over_rgb565(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an argb8565 image over rgb888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_argb8565_over_rgb888(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an argb8565 image over argb8888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_argb8565_over_argb8888(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an argb6666 image over rgb565 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_argb6666_over_rgb565(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an argb6666 image over rgb888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_argb6666_over_rgb888(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an argb6666 image over argb8888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_argb6666_over_argb8888(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an argb8888 image over rgb565 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_argb8888_over_rgb565(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an argb8888 image over rgb888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_argb8888_over_rgb888(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an argb8888 image over argb8888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_argb8888_over_argb8888(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an xrgb888 image over rgb565 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param color color of src image
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_xrgb8888_over_rgb565(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an xrgb888 image over rgb888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param color color of src image
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_xrgb8888_over_rgb888(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an xrgb888 image over argb8888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param color color of src image
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_xrgb8888_over_argb8888(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an rgb888 image over rgb565 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param color color of src image
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_rgb888_over_rgb565(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an rgb888 image over rgb888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param color color of src image
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_rgb888_over_rgb888(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an rgb888 image over argb8888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param color color of src image
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_rgb888_over_argb8888(void *dst, const void *src,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an a8 image over rgb565 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_color color of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_a8_over_rgb565(void *dst, const void *src, uint32_t src_color,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an a8 image over rgb888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_color color of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_a8_over_rgb888(void *dst, const void *src, uint32_t src_color,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an a8 image over argb8888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_color color of src image
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_a8_over_argb8888(void *dst, const void *src, uint32_t src_color,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an index8 image over rgb565 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_clut address of src clut (ARGB8888 color lookup table)
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_index8_over_rgb565(void *dst, const void *src, const uint32_t *src_clut,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an index8 image over rgb888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_clut address of src clut (ARGB8888 color lookup table)
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_index8_over_rgb888(void *dst, const void *src, const uint32_t *src_clut,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an index8 image over argb8888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_clut address of src clut (ARGB8888 color lookup table)
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_index8_over_argb8888(void *dst, const void *src, const uint32_t *src_clut,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an index4 (big endian) image over rgb565 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_clut address of src clut (ARGB8888 color lookup table)
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_index4_over_rgb565(void *dst, const void *src, const uint32_t *src_clut,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an index4 (big endian) image over rgb888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_clut address of src clut (ARGB8888 color lookup table)
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_index4_over_rgb888(void *dst, const void *src, const uint32_t *src_clut,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an index4 (big endian) image over argb8888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_clut address of src clut (ARGB8888 color lookup table)
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_index4_over_argb8888(void *dst, const void *src, const uint32_t *src_clut,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an index2 (big endian) image over rgb565 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_clut address of src clut (ARGB8888 color lookup table)
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_index2_over_rgb565(void *dst, const void *src, const uint32_t *src_clut,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an index2 (big endian) image over rgb888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_clut address of src clut (ARGB8888 color lookup table)
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_index2_over_rgb888(void *dst, const void *src, const uint32_t *src_clut,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an index2 (big endian) image over argb8888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_clut address of src clut (ARGB8888 color lookup table)
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_index2_over_argb8888(void *dst, const void *src, const uint32_t *src_clut,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an index1 (big endian) image over rgb565 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_clut address of src clut (ARGB8888 color lookup table)
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_index1_over_rgb565(void *dst, const void *src, const uint32_t *src_clut,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an index1 (big endian) image over rgb888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_clut address of src clut (ARGB8888 color lookup table)
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_index1_over_rgb888(void *dst, const void *src, const uint32_t *src_clut,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- /*
- * @brief rotate an index1 (big endian) image over argb8888 image
- *
- * @param dst address of dst image
- * @param src address of src image
- * @param src_clut address of src clut (ARGB8888 color lookup table)
- * @param dst_pitch stride in bytes of dst image
- * @param src_pitch stride in bytes of src image
- * @param src_w width in pixels of src image
- * @param src_h height in pixels of src image
- * @param x x coordinate of the draw area in the display coordinate
- * @param y y coordinate of the draw area in the display coordinate
- * @param w width in pixels of the draw area
- * @param h height in pixels of the draw area
- * @param matrix matrix generated in func sw_transform_config()
- *
- * @retval N/A
- */
- void sw_transform_index1_over_argb8888(void *dst, const void *src, const uint32_t *src_clut,
- uint16_t dst_pitch, uint16_t src_pitch, uint16_t src_w, uint16_t src_h,
- int16_t x, int16_t y, uint16_t w, uint16_t h,
- const sw_matrix_t *matrix);
- #ifdef __cplusplus
- }
- #endif
- /**
- * @}
- */
- #endif /* ZEPHYR_FRAMEWORK_INCLUDE_DISPLAY_SW_ROTATE_H_ */
|