i.MX6Q: Using DirectFB as backend for SDL

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6Q: Using DirectFB as backend for SDL

Jump to solution
3,482 Views
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

Labels (3)
0 Kudos
1 Solution
1,317 Views
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.

View solution in original post

0 Kudos
8 Replies
1,317 Views
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 Kudos
1,317 Views
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 Kudos
1,317 Views
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 Kudos
1,317 Views
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 Kudos
1,317 Views
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 Kudos
1,317 Views
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 Kudos
1,317 Views
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 Kudos
1,318 Views
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 Kudos