i.MX6Q: Using DirectFB as backend for SDL

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

i.MX6Q: Using DirectFB as backend for SDL

跳至解决方案
4,315 次查看
Tarek
Senior Contributor I

Hello,

According to Linux Reference Manual DirectFB utilizes the Vivante GPU. If that's the case and I'm using SDL where DirectFB is the backend do I get the same hardware acceleration?

Is there a special configuration that I need to pass to SDL for using the GPU?

Thanks

标签 (3)
0 项奖励
回复
1 解答
2,150 次查看
andre_silva
NXP Employee
NXP Employee

Sorry for the confusion, if you run SDL on top of DirectFB, it will be accelerated, you just need to follow the DirectFB installation and then makes the SDL uses it.

在原帖中查看解决方案

0 项奖励
回复
8 回复数
2,150 次查看
rebelalliance
Contributor III

Anyone have luck compiling SDL with DirectFB??

I got DirectFB compiled and its shared libs are on my rootfs but I am having trouble pointing SDL's configuration script to DirectFB. 

0 项奖励
回复
2,150 次查看
andre_silva
NXP Employee
NXP Employee

if you use the OpenGL libraries provided by freescale and the gpu driver correct loaded, it will be accelerated.

0 项奖励
回复
2,150 次查看
Tarek
Senior Contributor I

Hi Andre,

I don't agree with you for 2 reasons:

1. OpenGL is too complicated to be used as a replacement for SDL. The software overhead (Source code complexity ) is not acceptable.

2. Using video freamebuffer as OpenGL texture overloads the processor. Even for i.MX6Q the CPU load is quite high. I have tested the application you posted on your blog and the CPU utilization is 25% for one video stream. In my application I need to play 16 video streams which is not achievable on i.MX6Q using your recommended method.

In my opinion OpenGL is great tool for 3D graphics applications. If the main focus is to implement multimedia application "displaying video on flat windows and no 3D shapes" then OpenGL is a bad choice.

T

0 项奖励
回复
2,150 次查看
andre_silva
NXP Employee
NXP Employee

Sorry, you didn´t get my point, what I meant, is that, you should build SDL, on top of our GL drivers, this is the only way to get it accelerated. Another thing, did you use the Vivante functions to write the texture data directly in the GPU Buffer ?

0 项奖励
回复
2,150 次查看
Tarek
Senior Contributor I

Yes, I'm using the Vivante functions to write the texture data directly in the GPU Buffer. In facet I have less buffer copying than your example.

This method is fine for small buffers  160x120 only 3% CPU load. but when I used the Wildlife.avi file it's killing the processor.

Anyway I will not use OpenGL as it's too complicated for my application. I need something like SDL or DirectFB to display multiple YUV video buffers and One overlay RGBA GUI.

How do I build SDL on top of your GL drivers?

0 项奖励
回复
2,150 次查看
andre_silva
NXP Employee
NXP Employee

I never build SDL before, but I believe it will check for the GL libs automatically during its configuration, so, as you are cross-building it, just make sure to point your rootfs (with FSL GL libs) and the FSL GL libs will be used.

0 项奖励
回复
2,150 次查看
Tarek
Senior Contributor I

So I take it that the document "i.MX 6Dual/6Quad Linux Reference Manual, Rev. 12.09.01 (GA), 10/2012" is worng !!!

It says in chapter 10  paragraph 10.1.1 that DirectFB is GPU accelerated I quote from the document on page 81 :

"DirectFB acceleration utilizes the Vivante GPU."

What does that mean?

0 项奖励
回复
2,151 次查看
andre_silva
NXP Employee
NXP Employee

Sorry for the confusion, if you run SDL on top of DirectFB, it will be accelerated, you just need to follow the DirectFB installation and then makes the SDL uses it.

0 项奖励
回复