mirror of
https://github.com/openmv/openmv.git
synced 2025-09-26 23:09:13 +08:00
lib/imlib: Add transform support to GPU drivers.
This commit is contained in:
parent
718b4b80a9
commit
20839405a2
@ -50,5 +50,6 @@ int omv_gpu_draw_image(image_t *src_img,
|
||||
int alpha,
|
||||
const uint16_t *color_palette,
|
||||
const uint8_t *alpha_palette,
|
||||
image_hint_t hint);
|
||||
image_hint_t hint,
|
||||
float *transform);
|
||||
#endif // __OMV_GPU_H__
|
||||
|
@ -3056,7 +3056,7 @@ void imlib_draw_image(image_t *dst_img,
|
||||
(hint & (IMAGE_HINT_BILINEAR | IMAGE_HINT_BLACK_BACKGROUND));
|
||||
|
||||
if (!omv_gpu_draw_image(src_img, &src_rect, dst_img, &dst_rect,
|
||||
alpha, color_palette, alpha_palette, gpu_hints)) {
|
||||
alpha, color_palette, alpha_palette, gpu_hints, NULL)) {
|
||||
goto exit_cleanup;
|
||||
}
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ int alif_csi_snapshot(omv_csi_t *csi, image_t *dst_image, uint32_t flags) {
|
||||
|
||||
rectangle_t srect = { fb->x, fb->y, fb->u, fb->v };
|
||||
rectangle_t drect = { 0, 0, fb->u, fb->v };
|
||||
if (omv_gpu_draw_image(&src_cimage, &srect, &dst_cimage, &drect, 255, NULL, NULL, 0) != 0) {
|
||||
if (omv_gpu_draw_image(&src_cimage, &srect, &dst_cimage, &drect, 255, NULL, NULL, 0, NULL) != 0) {
|
||||
return OMV_CSI_ERROR_IO_ERROR;
|
||||
}
|
||||
}
|
||||
|
@ -129,7 +129,8 @@ int omv_gpu_draw_image(image_t *src_img,
|
||||
int alpha,
|
||||
const uint16_t *color_palette,
|
||||
const uint8_t *alpha_palette,
|
||||
image_hint_t hint) {
|
||||
image_hint_t hint,
|
||||
float *transform) {
|
||||
// Belnding is not supported yet.
|
||||
if (color_palette || alpha_palette) {
|
||||
return -1;
|
||||
|
@ -93,7 +93,8 @@ int omv_gpu_draw_image(image_t *src_img,
|
||||
int alpha,
|
||||
const uint16_t *color_palette,
|
||||
const uint8_t *alpha_palette,
|
||||
image_hint_t hint) {
|
||||
image_hint_t hint,
|
||||
float *transform) {
|
||||
OMV_PROFILE_START();
|
||||
|
||||
// GPU2D can only draw on RGB565/GRAYSCALE buffers.
|
||||
@ -191,7 +192,8 @@ int omv_gpu_draw_image(image_t *src_img,
|
||||
int alpha,
|
||||
const uint16_t *color_palette,
|
||||
const uint8_t *alpha_palette,
|
||||
image_hint_t hint) {
|
||||
image_hint_t hint,
|
||||
float *transform) {
|
||||
OMV_PROFILE_START();
|
||||
|
||||
// DMA2D can only draw on RGB565 buffers and the destination/source buffers must be accessible by DMA.
|
||||
|
Loading…
Reference in New Issue
Block a user