Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

mali_egl_image official headers

To accelerate image IO operations I use mali_egl_image* functions from libMali.so
I see them by objdump and got function prototypes from somewhere in internet

objdump --syms /usr/lib/libMali.so | grep mali_egl_image
00000000 l df *ABS* 00000000 mali_egl_image.c
000c5dc0 l O .data 00000004 current_mali_egl_image_version
0005bb50 g F .text 0000002e mali_egl_image_unset_sync
0005b746 g F .text 00000052 mali_egl_image_unlock_ptr
0005b7fe g F .text 0000002e mali_egl_image_get_width
0005b9b2 g F .text 00000040 mali_egl_image_get_buffer_width
0005b950 g F .text 00000062 mali_egl_image_unmap_buffer
0005b4ee g F .text 00000092 mali_egl_image_parse_attribute_list
0005baa6 g F .text 0000004e mali_egl_image_get_buffer_layout
0005ba32 g F .text 00000074 mali_egl_image_get_buffer_secure_id
0005b4b8 g F .text 00000006 mali_egl_image_get_error
0005b6f4 g F .text 00000052 mali_egl_image_lock_ptr
0005bb22 g F .text 0000002e mali_egl_image_set_sync
0005b484 g F .text 0000000a mali_egl_image_set_error
0005b798 g F .text 00000066 mali_egl_image_set_data
0005baf4 g F .text 0000002e mali_egl_image_create_sync
0005bb7e g F .text 00000036 mali_egl_image_wait_sync
0005b894 g F .text 0000002e mali_egl_image_get_miplevels
0005bc30 g F .text 00000042 mali_egl_image_destroy
0005b8c2 g F .text 0000008e mali_egl_image_map_buffer
0005b82c g F .text 0000002e mali_egl_image_get_height
0005b9f2 g F .text 00000040 mali_egl_image_get_buffer_height
0005bbb4 g F .text 0000007c mali_egl_image_create
0005b580 g F .text 00000174 mali_egl_image_create_parse_attribute_list
0005b85a g F .text 0000003a mali_egl_image_get_format
0005b48e g F .text 0000002a mali_egl_image_init
0005b4be g F .text 00000030 mali_egl_image_verify_image

Looking through Mali SDK i didn't find prototypes for these functions.
I imagine, that libMali.so while develipment had some file like mali_egl_image.h
Where this file is available for download?
  • Where this file is available for download?

    This file isn't available publicly, sorry. What are you actually trying to do? We might be able to suggest an alternative.

    Cheers,
    Pete

  • I access GPU memory directly to accelerate data reading

    void EGLImageWrapper::CopyToCpuUnpack(cv::Mat1b &dst)
    {
        static EGLint attribs_rgba[] =
        {
            MALI_EGL_IMAGE_PLANE, MALI_EGL_IMAGE_PLANE_Y,
            MALI_EGL_IMAGE_ACCESS_MODE, MALI_EGL_IMAGE_ACCESS_READ_WRITE,
            EGL_NONE
        };
        {
            void *mali_elg_img = mali_egl_image_lock_ptr(gl_img_);
            unsigned char *p_buf = (unsigned char*)mali_egl_image_map_buffer(mali_elg_img, attribs_rgba);
            unsigned char *p_tmp = tmp_buf_.ptr();
            for (int i = 0; i < roi_height_adj_; i+= 16, p_tmp += roi_block_size_, p_buf += block_size_)
            {
                memcpy(p_tmp, p_buf, roi_block_size_);
            }
            mali_egl_image_unmap_buffer(mali_elg_img, attribs_rgba);
            mali_egl_image_unlock_ptr(gl_img_);
        }
    
        dst.create(cv::Size(roi_width_, roi_height_*4));
    // Repack data here
    }