型号: TDA4VM
Memcpy glMapBufferRange返回的指针非常慢,需要40毫秒来复制2534400bytes的数据,我该怎么做以减少此时间?
(SDK版本为7.2)
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
型号: TDA4VM
Memcpy glMapBufferRange返回的指针非常慢,需要40毫秒来复制2534400bytes的数据,我该怎么做以减少此时间?
(SDK版本为7.2)
Hi,
As i understand from the description, it looks like the above memcpy statement takes 40ms on target for 2534400 bytes. But i could not the second statement, Do you mean if the gl buffer is allocated using malloc, it takes only 5ms? Typically malloc buffer is cached, so can you check if gl buffer is cached? This can be one reason why it takes some much time in copying..
Regards,
Brijesh
I am not sure how GL allocates the buffer. Can you please go inside the implementation and check?
Why dont you directly use it for the display? In this case, there will not be need for the memcpy.
If there is someway to get the physical address of this buffer, we can directly use it for the display..
Rgds,
Brijesh
Unsigned char * ptr = (unsigned char *) glMapBufferRange (GL_PIXEL_PACK_BUFFER, 0, static_cast < glSizeIptr > (iSize), GL_MAP_READ_BIT);
"ptr" is two different addresses (using double buffering). TDA4's display interface is created with an address specified as input, so I can't directly use it. Or is there a good way I can use the pointer returned by the display interface as GL's framebuffer?
Hi,
Are you using OpenVX interface for accessing display? There are some OpenVX APIs using which you could provide this buffer pointer to the display node.
How do you get the dPtr in below statement?
memcpy (d st ,ptr ,iSize );
Regards,
Brijesh
Sorry, did not get your question. what is the new idea?
I was asking, do you use OpenVX framework and do you get dPtr from vx_image?
Regards,
Brijesh