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.

how to create a YUV surface on a specific memory address on EVM2 board?

Other Parts Discussed in Thread: OMAP3530

Hi, all

Now I can create a surface using directdraw interface such as directdraw, But how to create a YUV surface on a specific memory address without using directdraw and the memory address does not belong to DSS?

  • Huai

    Can you give us more detail about what you are trying to achieve here?

    The problem is that AllocSurface() in display driver is called whenever an app request a DDraw surface (to be created in h/w memory) and AllocSurface() currently only allocates from Display reserved memory. One suggestion would be: you could have a buffer in your own specific memory address and then copy the contents to the display surface. But if you want to avoid the copy too, then you will have to look in MSDN and see if directdraw provides any such capabilities.

    Another suggestion would be to create a ddraw surface in display memory and then acquire the physical/virtual address of this buffer and use it in the app as desired.

    -Madhvi

  • I find that when using directdraw to display a vedio file on screen,  the CPU usage is very high, about 40% or so, which does not meet our needs. So I want to alloc dependent memory to put vedio file and create a YUV surface there to display the vedio file.

    Moreover, if I don't want to use the current interface supplied by DDRAW, how can I to displaly the vedio on driver layer not on Application layer?

  • The DSS display driver is implemented to be used by applications written against the DirectDraw or GDI frameworks. The scenario you are describing does not fall into either one of these categories. If I understand well you want to directly decode and display your video file inside the display driver to have better CPU performance. Whereas this could probably be achieved after a heavy load of work creating this custom driver, this would be very hard to use it aside from the regular display driver and have regular graphical applications running on your platform. You would also loose the benefits and modularity of the WinCE standard graphical frameworks.

    If your biggest concern is the high CPU usage, I suggest you try hardware media decoding through the OMAP3530's internal DSP. The DVSDK comes with MPEG4/H264 DirectShow filters and you can also create your own codecs using the provided SDK.