| View previous topic :: View next topic |
| Author |
Message |
ps3fanboy
Joined: 06 Jul 2008 Posts: 66
|
Posted: Fri Apr 03, 2009 6:49 pm Post subject: SDL Cell support |
|
|
according to a post on the SDL mailing list Cell support has been integrated into the SDL svn.
this should speed up media players like mplayer, xine, etc. quite a bit.
has anybody already tried that out? _________________ http://playstation3-homebrew-multimedia.blogspot.com/ |
|
| Back to top |
|
 |
ouasse
Joined: 30 Jul 2007 Posts: 90 Location: Paris, France
|
Posted: Sat Apr 04, 2009 1:37 am Post subject: |
|
|
I could not find anything about Cell support in the SDL svn log.
| Code: | | svn log -r '{'20090101'}':HEAD http://svn.libsdl.org/ | returned nothing Cell-related.
But I am definitely interested about testing SPU acceleration in SDL :) |
|
| Back to top |
|
 |
ps3fanboy
Joined: 06 Jul 2008 Posts: 66
|
Posted: Sat Apr 04, 2009 3:18 am Post subject: |
|
|
| Quote: | > last week I posted a patch to this list that contained a basic
> impementation
> of a framebuffer driver with acceleration on local SPEs.
Thank you very much! I've applied your patch to subversion.
See ya,
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC |
i think it's in sdl-1.2 _________________ http://playstation3-homebrew-multimedia.blogspot.com/ |
|
| Back to top |
|
 |
ouasse
Joined: 30 Jul 2007 Posts: 90 Location: Paris, France
|
Posted: Sat Apr 04, 2009 5:06 pm Post subject: |
|
|
| oops, I just found the comment. it concerns revision 4476 of the svn. I'll give it a try tonight or tomorrow. |
|
| Back to top |
|
 |
androvsky
Joined: 11 Nov 2007 Posts: 33
|
Posted: Sun Apr 05, 2009 4:36 am Post subject: |
|
|
| Quote: | Hello.
This patch provides basic support for video on the Sony PS3
Linux framebuffer. Scaling, format-conversion, and drawing is
done from the SPEs, so there is little performance impact to
PPE applications. This is by no means production quality code,
but it is a very good start and a good example of how to use the
PS3's hardware capabilities to accelerate video playback on
the box.
The driver has been verified to work with ffplay, mplayer and xine.
This piece of software has been developed at the IBM R&D Lab
in Boeblingen, Germany and is now returned to the community.
Enjoy !
|
Found here: http://www.libsdl.org/cgi/viewvc.cgi/branches/?view=log&pathrev=4476
Looks very interesting, much fuller support than I expected. |
|
| Back to top |
|
 |
ouasse
Joined: 30 Jul 2007 Posts: 90 Location: Paris, France
|
Posted: Sun Apr 05, 2009 9:58 pm Post subject: |
|
|
I compiled SDL with Cell support (following instructions from the README.PS3 file).
Then, I compiled mplayer with SDL support.
And then, playing videos (using options : -vo sdl) does not make use of spu's at all, according to spu-top.
I tested in X, and in fullscreen framebuffer mode. |
|
| Back to top |
|
 |
jonathan
Joined: 21 Sep 2007 Posts: 23 Location: Tasmania, Australia
|
Posted: Sun Apr 05, 2009 11:30 pm Post subject: |
|
|
You need to specify the SDL driver
| Code: | | mplayer -vo sdl:driver=PS3 moviefile |
Seems to be working for me.
I say seems to be because the PS3 is currently headless - without the PS3 driver I see mplayer with ~100% cpu utilisation. With the above, I see ~80% CPU (fluctuating) and two SPU processes listed in spu-top. |
|
| Back to top |
|
 |
ouasse
Joined: 30 Jul 2007 Posts: 90 Location: Paris, France
|
Posted: Tue Apr 07, 2009 7:01 am Post subject: |
|
|
Thanks jonathan for the help. Unfortunately mplayer does not work on my setup.
I tried running mplayer using -vo sdl:driver=PS3.
Here is the output from my self-compiled mplayer
| Code: | MPlayer SVN-r29148-4.3.3 (C) 2000-2009 MPlayer Team
Playing anthology.avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [XVID] 400x300 24bpp 50.000 fps 3436.6 kbps (419.5 kbyte/s)
[VO_SDL] Using driver: ps3.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16be, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
[AO ESD] esd_open_sound failed: No such file or directory
[AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16be
AO: [sdl] 44100Hz 2ch s16be (2 bytes per sample)
Starting playback...
[mpeg4 @ 0x107d5148]Invalid and inefficient vfw-avi packed B frames detected
VDec: vo config request - 400 x 300 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [sdl] 400x300 => 400x300 Planar YV12
A: 0.0 V: 0.0 A-V: 0.031 ct: 0.000 1/ 1 ??% ??% ??,?% 0 0 ESC[J^MNew_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
MPlayer interrupted by signal 11 in module: flip_page
- MPlayer crashed by bad usage of CPU/FPU/RAM.
Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
- MPlayer crashed. This shouldn't happen.
It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
gcc version. If you think it's MPlayer's fault, please read
DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
won't help unless you provide this information when reporting a possible bug.
|
Tests done on a Debian squeeze system :
- kernel 2.6.27.5 from kernel.org, compiled using ps3_defconfig default configuration
- X.Org X Server 1.4.2, tested in WUXGA and 720p screen modes
in framebuffer mode, SDL does not detect any screen.
For more precisions, please ask. |
|
| Back to top |
|
 |
Kali
Joined: 14 Apr 2008 Posts: 10
|
Posted: Tue Apr 07, 2009 10:35 am Post subject: |
|
|
| jonathan wrote: | You need to specify the SDL driver
| Code: | | mplayer -vo sdl:driver=PS3 moviefile |
Seems to be working for me.
I say seems to be because the PS3 is currently headless - without the PS3 driver I see mplayer with ~100% cpu utilisation. With the above, I see ~80% CPU (fluctuating) and two SPU processes listed in spu-top. |
same results
but i can't see any performance improvement |
|
| Back to top |
|
 |
ps3fanboy
Joined: 06 Jul 2008 Posts: 66
|
Posted: Tue Apr 07, 2009 11:03 pm Post subject: |
|
|
| Kali wrote: | | jonathan wrote: | You need to specify the SDL driver
| Code: | | mplayer -vo sdl:driver=PS3 moviefile |
Seems to be working for me.
I say seems to be because the PS3 is currently headless - without the PS3 driver I see mplayer with ~100% cpu utilisation. With the above, I see ~80% CPU (fluctuating) and two SPU processes listed in spu-top. |
same results
but i can't see any performance improvement |
what would you expect other than ppe utilization going down? _________________ http://playstation3-homebrew-multimedia.blogspot.com/ |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Apr 08, 2009 6:43 am Post subject: |
|
|
| ps3fanboy wrote: | | Kali wrote: | | jonathan wrote: | You need to specify the SDL driver
| Code: | | mplayer -vo sdl:driver=PS3 moviefile |
Seems to be working for me.
I say seems to be because the PS3 is currently headless - without the PS3 driver I see mplayer with ~100% cpu utilisation. With the above, I see ~80% CPU (fluctuating) and two SPU processes listed in spu-top. |
same results
but i can't see any performance improvement |
what would you expect other than ppe utilization going down? |
Yeah, video playing at 24 FPS doesn't suddenly jump to 100 FPS because you increased the power. :D |
|
| Back to top |
|
 |
Kali
Joined: 14 Apr 2008 Posts: 10
|
Posted: Wed Apr 08, 2009 9:38 am Post subject: |
|
|
i hope for 720p and 1080p playback :D
hd video on xmb support is limited, i have to encode ~60% of the video, and other ~40% need only to change the container :/ |
|
| Back to top |
|
 |
ps3fanboy
Joined: 06 Jul 2008 Posts: 66
|
Posted: Wed Apr 08, 2009 9:58 pm Post subject: |
|
|
| Kali wrote: | i hope for 720p and 1080p playback :D
hd video on xmb support is limited, i have to encode ~60% of the video, and other ~40% need only to change the container :/ |
for that the mpeg2 decoder is probably the bottleneck. _________________ http://playstation3-homebrew-multimedia.blogspot.com/ |
|
| Back to top |
|
 |
jonathan
Joined: 21 Sep 2007 Posts: 23 Location: Tasmania, Australia
|
Posted: Thu Apr 09, 2009 2:28 pm Post subject: |
|
|
I've tried several different 720p and 1080p mp4 and mkv contained videos - nothing plays fast enough with -vo sdl:driver=PS3.
-vo fbdev is significantly better for the 720p mp4 I tried. Still dropping frames in places, but mostly watchable. |
|
| Back to top |
|
 |
|