HW acceleration

Dear all,

How do I get HW acceleration under Linux with SDL?
Is all just a matter of correct SDL-calls, or do I have to configure the X-server
properly?

The first lines of output of ‘xvinfo’ on my machine look like this:
#X-Video Extension version 2.2
screen #0
Adaptor #0: "Matrox G-Series Backend Scaler"
number of ports: 1
port base: 46
operations supported: PutImage …

So, I think my hardware should be ready for HW accel.
My problem is, that I dont see any speed improvement when using “SDL HW calls”.
I create my SDL_Surface mit the 'SDL_HWSURFACE | SDL_HWACCEL | SDL_DOUBLEBUF’
flags.
Afertwards I use an YUVOverlay to display my picture (video output).

But before this calls I use,
m_video_info = SDL_GetVideoInfo ();
and the m_video_info->hw_available flag is 0.

Is this the correct way to test, whether HW accel. is used, or ist there a better
way?

Thank you in advance
Christian

How do I get HW acceleration under Linux with SDL?
I take that according to the rest of your post you mean YUV
overlay acceleration…

Is all just a matter of correct SDL-calls, or do I have to configure
the X-server properly?

I think it’s both. It looks according to your xvinfo that X-server part is
fine.

Adaptor #0: "Matrox G-Series Backend Scaler"
I have similar setup (G400).

So, I think my hardware should be ready for HW accel. My problem is,
that I dont see any speed improvement when using “SDL HW calls”. I
create my SDL_Surface mit the ‘SDL_HWSURFACE | SDL_HWACCEL |
SDL_DOUBLEBUF’ flags.
Afertwards I use an YUVOverlay to display my picture (video output).

But before this calls I use,
m_video_info = SDL_GetVideoInfo ();
and the m_video_info->hw_available flag is 0.

Is this the correct way to test, whether HW accel. is used, or ist there a better
way?

I’m not sure. I use:

overlay = SDL_CreateYUVOverlay(…)
if (overlay->hw_overlay) printf(“hardware support!\n”)

and it seems to work. No that you have to request hw supported overlay
mode…

  • MikkoOn Mon, 23 Jul 2001, Christian Spitzner wrote: