How to increase video performance from camera source on i.Mx35 ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to increase video performance from camera source on i.Mx35 ?

1,086 次查看
kaieckardt
Contributor II

Hello everyone,

we use an i.Mx35 and have to display a video from a camera without wasting cpu cycles. There are two examples provided in freescales BSP CAMAPP and TVIN. Both use DirectDraw and overlay to show the picture. But they still use a memcpy() to copy every line seperate into the overlay buffer.

from CameraWindow.cpp line 671 in CAMAPP example:

            // If height in bmiHeader is negative, the image is top-up, we just copy it.
            // Or esle the captured image should be bottom-up, so we vertically flip the image.
            if(pCamWin->m_PreviewDataFormat.VideoInfoHeader.bmiHeader.biHeight < 0)
            {
                for (height = 0; height < displayHeight; height++)
                {
                    memcpy(pbyDstBuffer,pbySrcBuffer,(displayWidth * pCamWin->m_ibiBitCount) / 8);

                    pbySrcBuffer += (pCamWin->m_DisplayInfo.imageWidth * pCamWin->m_ibiBitCount) / 8;
                    pbyDstBuffer += (displayWidth * pCamWin->m_ibiBitCount) / 8;
                }
            }

can anyone tell me if it is possible to do this using dma or another cpu cycles saving technique ? An example would be great..

best regards,

Kai

标签 (3)
4 回复数

664 次查看
Yuri
NXP Employee
NXP Employee

  I am afraid the using memcpy() function is most suitable approach, assuming

that memcpy() is highly optimized.
Next, I do not think that SDMA using provides improvements in comparison

with standard memcpy() function, which applies ARM instructions LDM/STM.   

And SDMA-based design will require additional efforts.    

0 项奖励

664 次查看
kaieckardt
Contributor II

So as the IPU has an own DMA controller... is there no chance to simply configure the IPU to do the job without occupying the cpu ? ATM we use WinCE 6 (with an ARM4 compiler). So a memcpy will not use the latest arm instructions.

0 项奖励

664 次查看
Yuri
NXP Employee
NXP Employee

I am afraid we do not have an example (just) for memory-to-memory copying via the IPU.

0 项奖励

664 次查看
kaieckardt
Contributor II

This topic is still not solved. I need an example for a simple memory to memory dma transfer using windows ce6.

0 项奖励