![]() |
MT2523 API Reference
LinkIt SDK v4
|
This section introduces the Graphics 2D (G2D) driver APIs including terms and acronyms, supported features, software architecture, details on how to use this driver, G2D Manager function groups, enums, structures and functions. More...
This section introduces the Graphics 2D (G2D) driver APIs including terms and acronyms, supported features, software architecture, details on how to use this driver, G2D Manager function groups, enums, structures and functions.
| Terms | Details |
|---|---|
| G2D | The Graphics 2D Standard. For more information, please refer to 2D computer graphics in Wikipedia. |
Support four layer overlay. Layer 0 is the bottom layer while layer 3 is the top layer. The G2D engine applies the overlay from the lowest (bottom) layer to highest (top) layer.
The rotation function supports seven options, including rotation by 90, 180 and 270 degrees, mirror, mirror and rotate by 90 degrees,
mirror and rotate by 180 degrees, mirror and rotate by 270 degrees. The rotation direction is clockwise.
Rectangle fill enables to fill the user-defined color into a rectangle.
Functions | |
| hal_g2d_status_t | hal_g2d_init (void) |
| This function initializes the G2D module. More... | |
| hal_g2d_status_t | hal_g2d_get_handle (hal_g2d_handle_t **handle_ptr, hal_g2d_codec_type_t codec_type, hal_g2d_get_handle_mode_t handle_mode) |
| This function gets a G2D handle to access and control the G2D engine. More... | |
| hal_g2d_status_t | hal_g2d_release_handle (hal_g2d_handle_t *handle) |
| This function releases the G2D handle and frees its associated resources occupied by this G2D handle. More... | |
| hal_g2d_status_t | hal_g2d_query_rgb_buffer_range (hal_g2d_handle_t *handle, uint32_t *min_width, uint32_t *max_width, uint32_t *min_height, uint32_t *max_height) |
| This function queries the range of the destination buffer. More... | |
| hal_g2d_status_t | hal_g2d_register_callback (hal_g2d_handle_t *handle, hal_g2d_callback_t callback) |
| This function registers a user-defined callback function for the G2D completion events. More... | |
| hal_g2d_status_t | hal_g2d_set_clipping_window (hal_g2d_handle_t *handle, int32_t x, int32_t y, int32_t width, int32_t height) |
| The function sets the clipping window for the destination buffer. More... | |
| hal_g2d_status_t | hal_g2d_replace_color (hal_g2d_handle_t *handle, uint8_t alpha0, uint8_t red0, uint8_t green0, uint8_t blue0, uint8_t alpha1, uint8_t red1, uint8_t green1, uint8_t blue1) |
| The color of the pixel that matches to the combination of the old set (alpha0, red0, green0, blue0) is replaced with the combination of the new set (alpha1, red1, green1, blue1). More... | |
| hal_g2d_status_t | hal_g2d_set_source_key (hal_g2d_handle_t *handle, uint8_t alpha, uint8_t red, uint8_t green, uint8_t blue) |
| hal_g2d_status_t | hal_set_rgb_buffer (hal_g2d_handle_t *handle, uint8_t *buffer, uint32_t size, uint32_t width, uint32_t height, hal_g2d_color_format_t color_format) |
| hal_g2d_status_t | hal_g2d_set_rgb_buffer (hal_g2d_handle_t *handle, uint8_t *buffer, uint32_t size, uint32_t width, uint32_t height, hal_g2d_color_format_t color_format) |
| This function sets the destination buffer. More... | |
| hal_g2d_status_t | hal_g2d_get_status (hal_g2d_handle_t *handle) |
| The function gets the status of G2D engine. More... | |
| hal_g2d_status_t | hal_g2d_query_support (hal_g2d_codec_type_t codec_type, hal_g2d_supported_function_t function_type) |
| This function queries whether a particular function type is supported by the G2D engine. More... | |
| hal_g2d_status_t | hal_g2d_overlay_enable_layer (hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, bool show_layer) |
| This function enables a layer. More... | |
| hal_g2d_status_t | hal_g2d_overlay_set_layer_function (hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, hal_g2d_overlay_layer_function_t function) |
| This function sets an overlay layer function to a specific layer. More... | |
| hal_g2d_status_t | hal_g2d_overlay_set_layer_rectfill_color (hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint32_t rectfill_color) |
| This function sets rectangle fill color to a specific layer. More... | |
| hal_g2d_status_t | hal_g2d_overlay_set_layer_buffer (hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint8_t *buffer, uint32_t size) |
| hal_g2d_status_t | hal_g2d_overlay_set_layer_rgb_buffer (hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint8_t *buffer, uint32_t size, uint32_t width, uint32_t height, hal_g2d_color_format_t color_format) |
| This function sets the RGB buffer information to this layer. More... | |
| hal_g2d_status_t | hal_g2d_overlay_set_layer_yuv_buffer (hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint8_t *buffer[3], uint32_t size[3], uint32_t width, uint32_t height, hal_g2d_color_format_t color_format) |
| hal_g2d_status_t | hal_g2d_overlay_set_layer_window (hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, int32_t x, int32_t y, uint32_t width, uint32_t height) |
| This function sets the rectangle to a layer. More... | |
| hal_g2d_status_t | hal_g2d_overlay_set_layer_source_key (hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint32_t src_key_value) |
| This function enables the source key for a layer. More... | |
| hal_g2d_status_t | hal_g2d_overlay_set_layer_rotation (hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, hal_g2d_rotate_angle_t rotation) |
| This function sets the rotation for a layer. More... | |
| hal_g2d_status_t | hal_g2d_overlay_set_layer_alpha (hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint32_t alpha_value) |
| This function sets the alpha to a layer. More... | |
| hal_g2d_status_t | hal_g2d_overlay_set_background_color (hal_g2d_handle_t *handle, uint32_t bg_color) |
| This function sets the background color. More... | |
| hal_g2d_status_t | hal_g2d_overlay_set_alpha (hal_g2d_handle_t *handle, uint32_t alpha_value) |
| This function sets the destination alpha. More... | |
| hal_g2d_status_t | hal_g2d_overlay_set_window (hal_g2d_handle_t *handle, int32_t x, int32_t y) |
| This function sets the coordinates in the destination window. More... | |
| hal_g2d_status_t | hal_g2d_overlay_set_roi_window (hal_g2d_handle_t *handle, int32_t x, int32_t y, uint32_t width, uint32_t height) |
| This function sets the ROI(region of interest) window. More... | |
| hal_g2d_status_t | hal_g2d_overlay_start (hal_g2d_handle_t *handle) |
| This function starts the overlay. More... | |
| hal_g2d_status_t | hal_g2d_set_dithering (hal_g2d_handle_t *handle, hal_g2d_dithering_mode_t mode, uint8_t red_bit, uint8_t green_bit, uint8_t blue_bit) |
| This function sets the dithering of the destination. More... | |
| hal_g2d_status_t | hal_g2d_overlay_set_layer_font_format (hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, hal_g2d_font_format_t format) |
| This function sets the font format for a layer. More... | |
| hal_g2d_status_t | hal_g2d_overlay_set_layer_font_color (hal_g2d_handle_t *handle, hal_g2d_overlay_layer_t layer, uint32_t color) |
| This function sets the font color for a layer. More... | |
| hal_g2d_status_t | hal_g2d_rectfill_set_destination_window (hal_g2d_handle_t *handle, int32_t x, int32_t y, int32_t width, int32_t height) |
| hal_g2d_status_t | hal_g2d_rectfill_set_color (hal_g2d_handle_t *handle, uint32_t color) |
| hal_g2d_status_t | hal_g2d_rectangle_fill_query_window_range (hal_g2d_handle_t *handle, int32_t *min_x, int32_t *max_x, int32_t *min_y, int32_t *max_y, uint32_t *min_width, uint32_t *max_width, uint32_t *min_height, uint32_t *max_height) |
| hal_g2d_status_t | hal_g2d_rectfill_start (hal_g2d_handle_t *handle) |
Modules | |
| Enum | |
| Struct | |
| Typedef | |
| hal_g2d_status_t hal_g2d_get_handle | ( | hal_g2d_handle_t ** | handle_ptr, |
| hal_g2d_codec_type_t | codec_type, | ||
| hal_g2d_get_handle_mode_t | handle_mode | ||
| ) |
This function gets a G2D handle to access and control the G2D engine.
After getting the handle, users can apply the G2D API to render images.
| [out] | handle_ptr | is a pointer to the G2D handle, after the function returns successfully. |
| [in] | codec_type | specifies the G2D codec type. Currently, only the HAL_G2D_CODEC_TYPE_HW is used. |
| [in] | handle_mode | specifies whether to use blocking mode or non-blocking mode to get the G2D handle. If in blocking mode, the function hal_g2d_overlay_start() will block until G2D is no longer busy. |
| hal_g2d_status_t hal_g2d_get_status | ( | hal_g2d_handle_t * | handle | ) |
The function gets the status of G2D engine.
| [in] | handle | is the G2D handle to get the G2D engine's status. |
| hal_g2d_status_t hal_g2d_init | ( | void | ) |
This function initializes the G2D module.
| hal_g2d_status_t hal_g2d_overlay_enable_layer | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_overlay_layer_t | layer, | ||
| bool | show_layer | ||
| ) |
This function enables a layer.
The layer will be put onto the destination buffer only when it is enabled.
| [in] | handle | specifies the G2D handle. |
| [in] | layer | specifies the layer that to be enabled. (layer 0, layer 1, layer 2 or layer 3). |
| [in] | show_layer | is the flag indicating whether the specified layer should be shown or not. |
| hal_g2d_status_t hal_g2d_overlay_set_alpha | ( | hal_g2d_handle_t * | handle, |
| uint32_t | alpha_value | ||
| ) |
This function sets the destination alpha.
| [in] | handle | specifies the G2D handle. |
| [in] | alpha_value | is the alpha value. |
| hal_g2d_status_t hal_g2d_overlay_set_background_color | ( | hal_g2d_handle_t * | handle, |
| uint32_t | bg_color | ||
| ) |
This function sets the background color.
| [in] | handle | specifies the G2D handle. |
| [in] | bg_color | is the background color. |
| hal_g2d_status_t hal_g2d_overlay_set_layer_alpha | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_overlay_layer_t | layer, | ||
| uint32_t | alpha_value | ||
| ) |
This function sets the alpha to a layer.
| [in] | handle | specifies the G2D handle. |
| [in] | layer | is the layer to set the alpha for. |
| [in] | alpha_value | is alpha value for the layer. |
| hal_g2d_status_t hal_g2d_overlay_set_layer_buffer | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_overlay_layer_t | layer, | ||
| uint8_t * | buffer, | ||
| uint32_t | size | ||
| ) |
This function sets a buffer for a layer.
| [in] | handle | specifies the G2D handle. |
| [in] | layer | is the layer to set a RGB buffer for. |
| [in] | buffer | is the buffer address. |
| [in] | size | is the buffer size. |
| hal_g2d_status_t hal_g2d_overlay_set_layer_font_color | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_overlay_layer_t | layer, | ||
| uint32_t | color | ||
| ) |
This function sets the font color for a layer.
| [in] | handle | is the G2D handle. |
| [in] | layer | is the layer to set the font color for. |
| [in] | color | is the color to draw the font. |
| hal_g2d_status_t hal_g2d_overlay_set_layer_font_format | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_overlay_layer_t | layer, | ||
| hal_g2d_font_format_t | format | ||
| ) |
This function sets the font format for a layer.
| [in] | handle | is the G2D handle. |
| [in] | layer | is the layer to set the font format for. |
| [in] | format | is the format of the font bitstream. |
| hal_g2d_status_t hal_g2d_overlay_set_layer_function | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_overlay_layer_t | layer, | ||
| hal_g2d_overlay_layer_function_t | function | ||
| ) |
This function sets an overlay layer function to a specific layer.
For example, to do the overlay only, set the function to HAL_G2D_OVERLAY_LAYER_FUNCTION_BUFFER.
| [in] | handle | specifies the G2D handle. |
| [in] | layer | is the layer to assign the function to. |
| [in] | function | specifies the function to be assigned to the layer, such as HAL_G2D_OVERLAY_LAYER_FUNCTION_BUFFER. |
| hal_g2d_status_t hal_g2d_overlay_set_layer_rectfill_color | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_overlay_layer_t | layer, | ||
| uint32_t | rectfill_color | ||
| ) |
This function sets rectangle fill color to a specific layer.
| [in] | handle | specifies the G2D handle. |
| [in] | layer | is the layer to set the color for the rectangle fill. |
| [in] | rectfill_color | is the color for the rectangle fill. |
| hal_g2d_status_t hal_g2d_overlay_set_layer_rgb_buffer | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_overlay_layer_t | layer, | ||
| uint8_t * | buffer, | ||
| uint32_t | size, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| hal_g2d_color_format_t | color_format | ||
| ) |
This function sets the RGB buffer information to this layer.
| [in] | handle | specifies the G2D handle. |
| [in] | layer | is the layer to enable. |
| [in] | buffer | is the buffer address. |
| [in] | size | is the buffer size. |
| [in] | width | is the buffer width. |
| [in] | height | is the buffer height. |
| [in] | color_format | is the color format to apply to the buffer. |
| hal_g2d_status_t hal_g2d_overlay_set_layer_rotation | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_overlay_layer_t | layer, | ||
| hal_g2d_rotate_angle_t | rotation | ||
| ) |
This function sets the rotation for a layer.
| [in] | handle | specifies the G2D handle. |
| [in] | layer | is the layer to set the rotation for. |
| [in] | rotation | is the layer's rotation angle. |
| hal_g2d_status_t hal_g2d_overlay_set_layer_source_key | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_overlay_layer_t | layer, | ||
| uint32_t | src_key_value | ||
| ) |
This function enables the source key for a layer.
| [in] | handle | specifies the G2D handle. |
| [in] | layer | is the layer to enable the source key for. |
| [in] | src_key_value | is the source key value. |
| hal_g2d_status_t hal_g2d_overlay_set_layer_window | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_overlay_layer_t | layer, | ||
| int32_t | x, | ||
| int32_t | y, | ||
| uint32_t | width, | ||
| uint32_t | height | ||
| ) |
This function sets the rectangle to a layer.
| [in] | handle | specifies the G2D handle. |
| [in] | layer | is the layer to set a rectangle for. |
| [in] | x | is the coordinate X of the rectangle. |
| [in] | y | is the coordinate Y of the rectangle. |
| [in] | width | is the width of the rectangle. |
| [in] | height | is the height of the rectangle. |
| hal_g2d_status_t hal_g2d_overlay_set_layer_yuv_buffer | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_overlay_layer_t | layer, | ||
| uint8_t * | buffer[3], | ||
| uint32_t | size[3], | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| hal_g2d_color_format_t | color_format | ||
| ) |
This function sets a YUV buffer for a layer.
| [in] | handle | specifies the G2D handle. |
| [in] | layer | is the layer to set the YUV buffer for. |
| [in] | buffer | is the buffer address. |
| [in] | size | is the buffer size. |
| [in] | width | is the buffer width. |
| [in] | height | is the buffer height. |
| [in] | color_format | is the color format to apply to the buffer. |
| hal_g2d_status_t hal_g2d_overlay_set_roi_window | ( | hal_g2d_handle_t * | handle, |
| int32_t | x, | ||
| int32_t | y, | ||
| uint32_t | width, | ||
| uint32_t | height | ||
| ) |
This function sets the ROI(region of interest) window.
| [in] | handle | specifies the G2D handle. |
| [in] | x | is the coordinate X of the ROI window. |
| [in] | y | is the coordinate Y of the ROI window. |
| [in] | width | is the width of the ROI window. |
| [in] | height | is the height of the ROI window. |
| hal_g2d_status_t hal_g2d_overlay_set_window | ( | hal_g2d_handle_t * | handle, |
| int32_t | x, | ||
| int32_t | y | ||
| ) |
This function sets the coordinates in the destination window.
Call the function hal_g2d_overlay_set_roi_window() to set the width and height.
| [in] | handle | specifies the G2D handle. |
| [in] | x | is coordinate X of the destination window. |
| [in] | y | is coordinate Y of the destination window. |
| hal_g2d_status_t hal_g2d_overlay_start | ( | hal_g2d_handle_t * | handle | ) |
This function starts the overlay.
| [in] | handle | specifies the G2D handle. |
| hal_g2d_status_t hal_g2d_query_rgb_buffer_range | ( | hal_g2d_handle_t * | handle, |
| uint32_t * | min_width, | ||
| uint32_t * | max_width, | ||
| uint32_t * | min_height, | ||
| uint32_t * | max_height | ||
| ) |
This function queries the range of the destination buffer.
| [in] | handle | is the G2D handle. |
| [out] | min_width | is the minimum width. |
| [out] | max_width | is the maximum width. |
| [out] | min_height | is the minimum height. |
| [out] | max_height | is the maximum height. |
| hal_g2d_status_t hal_g2d_query_support | ( | hal_g2d_codec_type_t | codec_type, |
| hal_g2d_supported_function_t | function_type | ||
| ) |
This function queries whether a particular function type is supported by the G2D engine.
| [in] | codec_type | specifies the codec type, hardware codec or software codec. |
| [in] | function_type | specifies the function type to be queried. |
| hal_g2d_status_t hal_g2d_rectangle_fill_query_window_range | ( | hal_g2d_handle_t * | handle, |
| int32_t * | min_x, | ||
| int32_t * | max_x, | ||
| int32_t * | min_y, | ||
| int32_t * | max_y, | ||
| uint32_t * | min_width, | ||
| uint32_t * | max_width, | ||
| uint32_t * | min_height, | ||
| uint32_t * | max_height | ||
| ) |
This function queries the range of the destination window.
| [in] | handle | specifies the G2D handle. |
| [out] | min_x | is the minimum of the coordinate X. |
| [out] | max_x | is the maximum of the coordinate X. |
| [out] | min_y | is the minimum of the coordinate Y. |
| [out] | max_y | is the maximum of the coordinate Y. |
| [out] | min_width | is minimum of the width of the window. |
| [out] | max_width | is maximum of the width of the window. |
| [out] | min_height | is minimum of the height of the window. |
| [out] | max_height | is maximum of the height of the window. |
| hal_g2d_status_t hal_g2d_rectfill_set_color | ( | hal_g2d_handle_t * | handle, |
| uint32_t | color | ||
| ) |
This function sets the color for the rectangle fill.
| [in] | handle | specifies the G2D handle. |
| [in] | color | is the color to fill the rectangle. |
| hal_g2d_status_t hal_g2d_rectfill_set_destination_window | ( | hal_g2d_handle_t * | handle, |
| int32_t | x, | ||
| int32_t | y, | ||
| int32_t | width, | ||
| int32_t | height | ||
| ) |
This function sets the rectangle fill region.
| [in] | handle | is the G2D handle. |
| [in] | x | is the coordinate X of the region for the rectangle fill. |
| [in] | y | is the coordinate Y of the region for the rectangle fill. |
| [in] | width | is width of rectangle fill. |
| [in] | height | is height of rectangle fill. |
| hal_g2d_status_t hal_g2d_rectfill_start | ( | hal_g2d_handle_t * | handle | ) |
This function starts the rectangle fill operation.
| [in] | handle | specifies the G2D handle. |
| hal_g2d_status_t hal_g2d_register_callback | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_callback_t | callback | ||
| ) |
This function registers a user-defined callback function for the G2D completion events.
The callback is invoked whenever the G2D engine completes an operation, such as draws an overlay, makes a rotation or fills a rectangle.
| [in] | handle | specifies the G2D handle. |
| [in] | callback | specifies the callback function to be registered. |
| hal_g2d_status_t hal_g2d_release_handle | ( | hal_g2d_handle_t * | handle | ) |
This function releases the G2D handle and frees its associated resources occupied by this G2D handle.
Call this function after all rendering processes are complete.
| [in] | handle | is G2D handle. |
| hal_g2d_status_t hal_g2d_replace_color | ( | hal_g2d_handle_t * | handle, |
| uint8_t | alpha0, | ||
| uint8_t | red0, | ||
| uint8_t | green0, | ||
| uint8_t | blue0, | ||
| uint8_t | alpha1, | ||
| uint8_t | red1, | ||
| uint8_t | green1, | ||
| uint8_t | blue1 | ||
| ) |
The color of the pixel that matches to the combination of the old set (alpha0, red0, green0, blue0) is replaced with the combination of the new set (alpha1, red1, green1, blue1).
| [in] | handle | specifies the G2D handle. |
| [in] | alpha0 | is the old alpha color component. |
| [in] | red0 | is the old red color component. |
| [in] | green0 | is the old green color component. |
| [in] | blue0 | is the old blue color component. |
| [in] | alpha1 | is the new alpha color component. |
| [in] | red1 | is the new red color component. |
| [in] | green1 | is the new green color component. |
| [in] | blue1 | is the new blue color component. |
| hal_g2d_status_t hal_g2d_set_clipping_window | ( | hal_g2d_handle_t * | handle, |
| int32_t | x, | ||
| int32_t | y, | ||
| int32_t | width, | ||
| int32_t | height | ||
| ) |
The function sets the clipping window for the destination buffer.
All data outside the clipping window will remain unchanged.
| [in] | handle | specifies the G2D handle. |
| [in] | x | is the base vertex coordinate X of clipping window. |
| [in] | y | is the base vertex coordinate Y of clipping window. |
| [in] | width | is the width of the clipping window. |
| [in] | height | is the height of the clipping window. |
| hal_g2d_status_t hal_g2d_set_dithering | ( | hal_g2d_handle_t * | handle, |
| hal_g2d_dithering_mode_t | mode, | ||
| uint8_t | red_bit, | ||
| uint8_t | green_bit, | ||
| uint8_t | blue_bit | ||
| ) |
This function sets the dithering of the destination.
| [in] | handle | is the G2D handle. |
| [in] | mode | is the dithering mode. |
| [in] | red_bit | is the dithering bit in red channel. |
| [in] | green_bit | is the dithering bit in green channel. |
| [in] | blue_bit | is the dithering bit in blue channel. |
| hal_g2d_status_t hal_g2d_set_rgb_buffer | ( | hal_g2d_handle_t * | handle, |
| uint8_t * | buffer, | ||
| uint32_t | size, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| hal_g2d_color_format_t | color_format | ||
| ) |
This function sets the destination buffer.
| [in] | handle | specifies the G2D handle. |
| [in] | buffer | is the address of the destination buffer. |
| [in] | size | is the buffer size. |
| [in] | width | is the width of the destination buffer. |
| [in] | height | is the height of the destination buffer. |
| [in] | color_format | specifies the color format(GRAY, RGB565, RGB888, ARGB8888, etc.). |
| hal_g2d_status_t hal_g2d_set_source_key | ( | hal_g2d_handle_t * | handle, |
| uint8_t | alpha, | ||
| uint8_t | red, | ||
| uint8_t | green, | ||
| uint8_t | blue | ||
| ) |
This function sets the source key value.
| [in] | handle | specifies the G2D handle. |
| [in] | alpha | is the alpha color component of source key color. |
| [in] | red | is the red color component of source key color. |
| [in] | green | is the green color component of source key color. |
| [in] | blue | is the blue color component of source key color. |
| hal_g2d_status_t hal_set_rgb_buffer | ( | hal_g2d_handle_t * | handle, |
| uint8_t * | buffer, | ||
| uint32_t | size, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| hal_g2d_color_format_t | color_format | ||
| ) |
This function sets the destination buffer.
| [in] | handle | specifies the G2D handle. |
| [in] | buffer | is the address of the destination buffer. |
| [in] | size | is the buffer size. |
| [in] | width | is the width of the destination buffer. |
| [in] | height | is the height of the destination buffer. |
| [in] | color_format | specifies the color format(GRAY, RGB565, RGB888, ARGB8888, etc.). |