Installing the Mplayer vo PS3

"A collection of spu programs to accelerate media related applications for the CellBE ( PS3 ) platform" - unsolo

Moderator: unsolo

unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Installing the Mplayer vo PS3

Post by unsolo »

Id like to thank Bill Garrett for his work on this vo module for mplayer i hope it brings more people to the community and more joy to the ps3 owners out there.

Notes:
needs to do direct rendering, but you don't have
to specify -dr on the command line because vo will
enable it automatically if it can

needs to double buffer, but you don't have to specify that either (-double)

doesn't do windows - takes over framebuffer for now

h264 issues:
currently not working
video currently doesn't direct render unless u post process with -vf pp
broken on PS3 (regardless of vo) - too slow & audio strange
try with -demuxer 35 -lavdopts fast:threads=2 for improvement, but still not usable
try with -vo null and still broken (see, it's not vo's fault :) )

configure now autodetects ps3

works with:
'f' for fullscreen scaling toggle
'space' for pausing
'. for single frame stepping

use -vo ps3:snapshot to save a .yuv file of current buffers on pause

Dependencies:
spu-medialib & ps3fb must be installed
must be able to find:
libspe2.h
spu-medialib/spu_control.h
spu-medialib/yuv2argb_scaler.h
ps3fb/libps3fb.h
libspu-medialib.a
libps3fb.a

Installation:
install libps3fb (http://forums.ps2dev.org/viewtopic.php?p=59150#59150)
install spu-medialib (http://wiki.ps2dev.org/ps3:spu-medialib:install)
get mplayer (currently tested with rev. 24714)
svn co svn://svn.mplayerhq.hu/mplayer/trunk mplayer
get patch
svn co svn://svn.ps2dev.org/ps3ware/trunk/mplayer-vo mplayer-vo
cd mplayer & patch:
$ patch -p0 < ../mplayer-vo/latest.patch
patching file libvo/video_out.c
patching file libvo/vo_ps3.c
patching file configure
./configure;
make && make install)

Usage:

$ ps3videomode (any should work please report the ones not working)
$ mplayer -vo ps3 /lost/video/watch-ppu-usage.mpg
Last edited by unsolo on Fri Oct 19, 2007 2:38 am, edited 6 times in total.
Don't do it alone.
fusuke
Posts: 19
Joined: Mon Oct 08, 2007 1:27 pm
Location: Vancouver, Canada

Problem compiling Mplayer on YDL 5.02

Post by fusuke »

I've installed libspe2, libspu-medialib and libps3fb. The first two were placed in /usr/lib64 and the last was placed in /usr/local/lib. No errors when compiling all three.

So far so good. The problem is with Mplayer, where `configure` refused to validate the PS3 option. Forcing the option leads to the following errors while doing the Make operation:

/usr/bin/ld: skipping incompatible /usr/lib64/libspe2.so when searching for -lspe2
/usr/bin/ld: skipping incompatible /usr/lib64/libspe2.a when searching for -lspe2

The same goes for spu-medialib. There are no problems with libps3fb. Could there be a compatibility issue with 64bit versions of library files?
ldesnogu
Posts: 94
Joined: Sat Apr 17, 2004 10:37 pm

Re: Problem compiling Mplayer on YDL 5.02

Post by ldesnogu »

fusuke wrote:/usr/bin/ld: skipping incompatible /usr/lib64/libspe2.so when searching for -lspe2
/usr/bin/ld: skipping incompatible /usr/lib64/libspe2.a when searching for -lspe2

The same goes for spu-medialib. There are no problems with libps3fb. Could there be a compatibility issue with 64bit versions of library files?
Welcome to 32/64 bit hell :)

Check the output of:

Code: Select all

file /usr/lib64/libspe2.so
And then do a file on the files to be linked with libspe2.so. All of them should either be 32 exclusive-or 64 bit.
Laurent
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

The problem is as ldesnogu sais either 32 or 64 bit

whatever your compiler is default set up to compile to is what you need to change the lib to .. or change your default compiler to compile 32 or 64 bit.

Depending on whatever your lib is
Don't do it alone.
fusuke
Posts: 19
Joined: Mon Oct 08, 2007 1:27 pm
Location: Vancouver, Canada

32/64-bit nightmare

Post by fusuke »

So this is going to be harder than I thought.

I've recompiled libps3fb as a 64-bit library, similar to libspu-medialib and libspe2. Unfortunately most of my system library functions are 32-bit.

When I `configure` mplayer with the 64-bit compiler option, it now recognizes the PS3 option but many other important libraries are unavailable e.g libGL, libX11, ALSA etc. Vice versa if I switch back to the 32-bit option.

I could try to locate and install 64-bit versions of each library, but first of all I'm not sure what libraries I would need. The list that `configure` goes through is rather long.

Any suggestions on a quick way to gather all the 64-bit libraries required by Mplayer?
fusuke
Posts: 19
Joined: Mon Oct 08, 2007 1:27 pm
Location: Vancouver, Canada

update

Post by fusuke »

Or I could just compile libspe2, libps3fb and libspu-medialib as 32 bit files.

That would seem much simpler.
fusuke
Posts: 19
Joined: Mon Oct 08, 2007 1:27 pm
Location: Vancouver, Canada

Compiles fine, but mplayer yields black unresponsive screen

Post by fusuke »

So I've compiled the necessary files in 32-bit form; No error messages.

However, mplayer doesn't work with -vo ps3 (works with x11). The screen goes black, there's no audio and I can't cancel the program. The only option is to reset gnome.

This occurs for ps3videomodes 1, 3 and 11 (my only attempts).

Mplayer output is posted below.

I was poking around the makefiles in spu-medialib and I noticed references to `libfb`, which I don't have. It wasn't mentioned in the installation instructions and I don't see any compiler warnings about it, so I assume it's a relic of prevous iterations.

Code: Select all

MPlayer dev-SVN-r24734-4.1.1 &#40;C&#41; 2000-2007 MPlayer Team
AltiVec found
CPU&#58; PowerPC

Playing some-file.avi.
AVI file format detected.
&#91;aviheader&#93; Video stream found, -vid 0
&#91;aviheader&#93; Audio stream found, -aid 1
VIDEO&#58;  &#91;XVID&#93;  624x352  12bpp  23.976 fps  976.4 kbps &#40;119.2 kbyte/s&#41;
Clip info&#58;
 Software&#58; HUH?
 Name&#58; 
 Subject&#58; 
 Artist&#58; 
 Copyright&#58; 
 Comments&#58; 
ps3 suboptions&#58;
           debug&#58;1
           noscale&#58;0
           full&#58;0
           adj&#58;0
           snapshot&#58;0
vo_ps3&#58;preinit&#58; Initialized framebuffer & disabled console
FB is 1280x768
==========================================================================
Opening video decoder&#58; &#91;ffmpeg&#93; FFmpeg's libavcodec codec family
Selected video codec&#58; &#91;ffodivx&#93; vfm&#58; ffmpeg &#40;FFmpeg MPEG-4&#41;
==========================================================================
==========================================================================
Opening audio decoder&#58; &#91;mp3lib&#93; MPEG layer-2, layer-3
AUDIO&#58; 48000 Hz, 2 ch, s16be, 128.0 kbit/8.33% &#40;ratio&#58; 16000->192000&#41;
Selected audio codec&#58; &#91;mp3&#93; afm&#58; mp3lib &#40;mp3lib MPEG layer-2, layer-3&#41;
==========================================================================
AO&#58; &#91;alsa&#93; 48000Hz 2ch s16be &#40;2 bytes per sample&#41;
Starting playback...
VDec&#58; vo config request - 624 x 352 &#40;preferred colorspace&#58; Planar YV12&#41;
vo_ps3&#58;query_format&#58; Called for Planar YV12 &#40;0x32315659&#41;
VDec&#58; using Planar YV12 as output csp &#40;no 0&#41;
Movie-Aspect is 1.77&#58;1 - prescaling to correct movie aspect.
VO&#58; &#91;ps3&#93; 624x352 => 624x352 Planar YV12 
vo_ps3&#58;query_format&#58; Called for Planar YV12 &#40;0x32315659&#41;
vo_ps3&#58;config&#58; Times called&#58;0 Setting up for src=624x352, suggested dst=624x352,
 format=Planar YV12 &#40;32315659&#41;
                     vo_fs&#58;0, vo_doublebuffering&#58;1, vo_directrendering&#58;0, vo_scr
eenwidth&#58;0, vo_screenheight&#58;0
vo_ps3&#58;config&#58; Set vo_screen&#40;width/heigh&#41; to 1280x768, forced direct rendering, 
& double buffering
vo_ps3&#58;config&#58; src_buf_siz=329472, src_stride&#91;&#93;=&#123;624,312,312&#125;, src_p_siz&#91;&#93;=&#123;2196
48,54912,54912&#125;
                     dst_buf_siz=329472, dst_stride&#91;&#93;=&#123;624,312,312&#125;, dst_p_siz&#91;&#93;
=&#123;219648,54912,54912&#125;
                     maxWxmaxH=1280x768, max_buf_siz=1966080, offset=0
vo_ps3&#58;setup_screen&#58; Using destination image size WxH&#58;624x352
vo_ps3&#58;init_spu_medialib&#58; Started spu-medialib's spu_yuv2argb_scaler runing
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

It is probably some relic as libps3fb previusly was called libfb.

Anyhow could you try this over a ssh to se what happens my best bet is that theres and addressing problem related to 32 vs 64 bit adressess.

one more case with a 32 bit would pretty much confirm this and we will in any case have to solve this.

I can se from your post that the spu code is executed so that is good however it looks also like the first DMA fails.

We will have to look into that and maybe give out a fix to this

cheers
unsolo
Don't do it alone.
fusuke
Posts: 19
Joined: Mon Oct 08, 2007 1:27 pm
Location: Vancouver, Canada

SSH results

Post by fusuke »

Here is the output from mplayer -vo ps3 using 32bit compiled libraries accessed via ssh.

Code: Select all

MPlayer dev-SVN-r24734-4.1.1 &#40;C&#41; 2000-2007 MPlayer Team
AltiVec found
CPU&#58; PowerPC

Playing some-file.avi.
AVI file format detected.
&#91;aviheader&#93; Video stream found, -vid 0
&#91;aviheader&#93; Audio stream found, -aid 1
VIDEO&#58;  &#91;XVID&#93;  624x352  12bpp  23.976 fps  976.4 kbps &#40;119.2 kbyte/s&#41;
Clip info&#58;
 Software&#58; HUH?
 Name&#58; 
 Subject&#58; 
 Artist&#58; 
 Copyright&#58; 
 Comments&#58; 
ps3 suboptions&#58;
           debug&#58;0
           noscale&#58;0
           full&#58;0
           adj&#58;0
           snapshot&#58;0
vo_ps3&#58;preinit&#58; Initialized framebuffer & disabled console
FB is 0x0
==========================================================================
Opening video decoder&#58; &#91;ffmpeg&#93; FFmpeg's libavcodec codec family
Selected video codec&#58; &#91;ffodivx&#93; vfm&#58; ffmpeg &#40;FFmpeg MPEG-4&#41;
==========================================================================
==========================================================================
Opening audio decoder&#58; &#91;mp3lib&#93; MPEG layer-2, layer-3
AUDIO&#58; 48000 Hz, 2 ch, s16be, 128.0 kbit/8.33% &#40;ratio&#58; 16000->192000&#41;
Selected audio codec&#58; &#91;mp3&#93; afm&#58; mp3lib &#40;mp3lib MPEG layer-2, layer-3&#41;
==========================================================================
Audio&#58; no sound
Starting playback...
VDec&#58; vo config request - 624 x 352 &#40;preferred colorspace&#58; Planar YV12&#41;
vo_ps3&#58;query_format&#58; Called for Planar YV12 &#40;0x32315659&#41;
VDec&#58; using Planar YV12 as output csp &#40;no 0&#41;
Movie-Aspect is 1.77&#58;1 - prescaling to correct movie aspect.
VO&#58; &#91;ps3&#93; 624x352 => 624x352 Planar YV12 
vo_ps3&#58;query_format&#58; Called for Planar YV12 &#40;0x32315659&#41;
vo_ps3&#58;config&#58; Times called&#58;0 Setting up for src=624x352, suggested dst=624x352,
 format=Planar YV12 &#40;32315659&#41;
                     vo_fs&#58;0, vo_doublebuffering&#58;1, vo_directrendering&#58;0, vo_scr
eenwidth&#58;0, vo_screenheight&#58;0
vo_ps3&#58;config&#58; Set vo_screen&#40;width/heigh&#41; to 0x0, forced direct rendering, & dou
ble buffering
vo_ps3&#58;config&#58; src_buf_siz=329472, src_stride&#91;&#93;=&#123;624,312,312&#125;, src_p_siz&#91;&#93;=&#123;2196
48,54912,54912&#125;
                     dst_buf_siz=329472, dst_stride&#91;&#93;=&#123;624,312,312&#125;, dst_p_siz&#91;&#93;
=&#123;219648,54912,54912&#125;
                     maxWxmaxH=0x0, max_buf_siz=0, offset=0
vo_ps3&#58;setup_screen&#58; Using destination image size WxH&#58;0x0
vo_ps3&#58;init_spu_medialib&#58; Started spu-medialib's spu_yuv2argb_scaler runing
spu_yuv2argb_scaler&#58; SRC width 624,DST width -2147483648
spu_yuv2argb_scaler&#58; SRC height 352,DST height 0
spu_yuv2argb_scaler&#58; DST offset 0
spu_yuv2argb_scaler&#58; Starting Up
spu_yuv2argb_scaler&#58; Scaling, computing shuffle filters
spu_yuv2argb_scaler&#58; Computing Crshuffle filter
spu_yuv2argb_scaler&#58; Initiation completed
V&#58;   0.0   1/  1 ??% ??% ??,?% 0 0 $<50>

darkshadow
Posts: 10
Joined: Wed Oct 10, 2007 2:35 pm
Location: Canada

Post by darkshadow »

I just bought a ps3 and installed Yellow Dog Linux 5.0.1 on it and I am working to get this all setup. I have done all the dependencies except the last one (libps3lib.a) which I have no idea on what to install to get this. Any suggestions?
fusuke
Posts: 19
Joined: Mon Oct 08, 2007 1:27 pm
Location: Vancouver, Canada

Post by fusuke »

I think that libps3lib.a is a typo in unsolo's earlier post. It was probably meant to be libps3fb.a .
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

darkshadow
take a look here!

http://forums.ps2dev.org/viewtopic.php?p=59150#59150
this post Does not mention anything but libps3fb


fusuke
this was your last code post the last time

Code: Select all

vo_ps3&#58;init_spu_medialib&#58; Started spu-medialib's spu_yuv2argb_scaler runing 
now you also get

Code: Select all

spu_yuv2argb_scaler&#58; SRC width 624,DST width -2147483648
spu_yuv2argb_scaler&#58; SRC height 352,DST height 0
spu_yuv2argb_scaler&#58; DST offset 0
spu_yuv2argb_scaler&#58; Starting Up
spu_yuv2argb_scaler&#58; Scaling, computing shuffle filters
spu_yuv2argb_scaler&#58; Computing Crshuffle filter
spu_yuv2argb_scaler&#58; Initiation completed 
From what i can make of that your first DMA goes well
does it just lock up after that ?
Could you also try this also from console outside gnome and se what happens
Im working on installing a stage 4 gentoo 32 bit so i can actually try this. so please be patient :)
Don't do it alone.
fusuke
Posts: 19
Joined: Mon Oct 08, 2007 1:27 pm
Location: Vancouver, Canada

64bit compilation results

Post by fusuke »

Hi Unsolo,

I've recompiled mplayer and the ps3 dependencies in 64-bit. Once again same problem: blank screen, no audio.

Mplayer does work with fbdev. I don't have too many other libraries (x11, etc), but I think the problem lies with the -vo ps3 option.

Here are my results from an ssh connection:

Code: Select all


MPlayer dev-SVN-r24734-4.1.1 &#40;C&#41; 2000-2007 MPlayer Team
AltiVec found
CPU&#58; PowerPC

Playing lost.101.hdtv-lol.avi.
AVI file format detected.
&#91;aviheader&#93; Video stream found, -vid 0
&#91;aviheader&#93; Audio stream found, -aid 1
VIDEO&#58;  &#91;XVID&#93;  624x352  12bpp  23.976 fps  976.4 kbps &#40;119.2 kbyte/s&#41;
Clip info&#58;
 Software&#58; HUH?
 Name&#58; 
 Subject&#58; 
 Artist&#58; 
 Copyright&#58; 
 Comments&#58; 
ps3 suboptions&#58;
           debug&#58;0
           noscale&#58;0
           full&#58;0
           adj&#58;0
           snapshot&#58;0
vo_ps3&#58;preinit&#58; Initialized framebuffer & disabled console
FB is 1280x768
==========================================================================
Opening video decoder&#58; &#91;ffmpeg&#93; FFmpeg's libavcodec codec family
Selected video codec&#58; &#91;ffodivx&#93; vfm&#58; ffmpeg &#40;FFmpeg MPEG-4&#41;
==========================================================================
==========================================================================
Opening audio decoder&#58; &#91;mp3lib&#93; MPEG layer-2, layer-3
AUDIO&#58; 48000 Hz, 2 ch, s16be, 128.0 kbit/8.33% &#40;ratio&#58; 16000->192000&#41;
Selected audio codec&#58; &#91;mp3&#93; afm&#58; mp3lib &#40;mp3lib MPEG layer-2, layer-3&#41;
==========================================================================
AO&#58; &#91;oss&#93; 48000Hz 2ch s16be &#40;2 bytes per sample&#41;
Starting playback...
VDec&#58; vo config request - 624 x 352 &#40;preferred colorspace&#58; Planar YV12&#41;
vo_ps3&#58;query_format&#58; Called for Planar YV12 &#40;0x32315659&#41;
VDec&#58; using Planar YV12 as output csp &#40;no 0&#41;
Movie-Aspect is 1.77&#58;1 - prescaling to correct movie aspect.
VO&#58; &#91;ps3&#93; 624x352 => 624x352 Planar YV12 
vo_ps3&#58;query_format&#58; Called for Planar YV12 &#40;0x32315659&#41;
vo_ps3&#58;control&#58; todo&#58; handle UPDATE_SCREENINFO &#40;32&#41;
vo_ps3&#58;config&#58; Times called&#58;0 Setting up for src=624x352, suggested dst=624x352, format=Planar YV12 &#40;32315659&#41;
                     vo_fs&#58;0, vo_doublebuffering&#58;1, vo_directrendering&#58;0, vo_screenwidth&#58;0, vo_screenheight&#58;0
vo_ps3&#58;config&#58; Set vo_screen&#40;width/heigh&#41; to 1280x768, forced direct rendering, & double buffering
vo_ps3&#58;config&#58; src_buf_siz=329472, src_stride&#91;&#93;=&#123;624,312,312&#125;, src_p_siz&#91;&#93;=&#123;219648,54912,54912&#125;
                     dst_buf_siz=329472, dst_stride&#91;&#93;=&#123;624,312,312&#125;, dst_p_siz&#91;&#93;=&#123;219648,54912,54912&#125;
                     maxWxmaxH=1280x768, max_buf_siz=1966080, offset=0
vo_ps3&#58;setup_screen&#58; Using destination image size WxH&#58;624x352
vo_ps3&#58;init_spu_medialib&#58; Started spu-medialib's spu_yuv2argb_scaler runing


MPlayer interrupted by signal 11 in module&#58; decode_video
- 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.


MPlayer interrupted by signal 11 in module&#58; uninit_vcodec
vo_ps3&#58;uninit&#58; Told yuv2argb_scaler to stop
*** glibc detected *** mplayer&#58; double free or corruption &#40;!prev&#41;&#58; 0x000000001097c220 ***
======= Backtrace&#58; =========
/lib64/libc.so.6&#91;0x80ae1b692c&#93;
/lib64/libc.so.6&#40;__libc_free-0xec418&#41;&#91;0x80ae1b6b98&#93;
mplayer&#40;demux_close_avi-0x6c7a0c&#41;&#91;0x1011fe74&#93;
mplayer&#40;free_demuxer-0x6d14c8&#41;&#91;0x10116198&#93;
mplayer&#40;uninit_player-0x7b0164&#41;&#91;0x1003157c&#93;
mplayer&#40;exit_player_with_rc-0x7afbb8&#41;&#91;0x10031b48&#93;
&#91;0x100448&#93;
/usr/lib64/libspe2.so.2&#40;check_spe_elf-0x16000&#41;&#91;0x400000257d8&#93;
/usr/lib64/libspe2.so.2&#40;load_spe_elf-0x15f48&#41;&#91;0x400000258a0&#93;
/usr/lib64/libspe2.so.2&#40;_base_spe_program_load-0x15030&#41;&#91;0x40000026888&#93;
/usr/lib64/libspe2.so.2&#40;spe_program_load-0x1dab8&#41;&#91;0x4000001d580&#93;
mplayer&#91;0x105ed734&#93;
/lib64/libpthread.so.0&#91;0x400000736f0&#93;
/lib64/libc.so.6&#40;__clone-0x811d0&#41;&#91;0x80ae225070&#93;
======= Memory map&#58; ========
00100000-00103000 r-xp 00100000 00&#58;00 0                                  &#91;vdso&#93;
10000000-10748000 r-xp 00000000 fe&#58;02 2263957                            /usr/local/bin/mplayer
10758000-10817000 rw-p 00748000 fe&#58;02 2263957                            /usr/local/bin/mplayer
10817000-10a28000 rw-p 10817000 00&#58;00 0                                  &#91;heap&#93;
80ae0d0000-80ae0f9000 r-xp 00000000 fe&#58;02 1081388                        /lib64/ld-2.4.so
80ae108000-80ae109000 r--p 00028000 fe&#58;02 1081388                        /lib64/ld-2.4.so
80ae109000-80ae10c000 rw-p 00029000 fe&#58;02 1081388                        /lib64/ld-2.4.so
80ae110000-80ae28c000 r-xp 00000000 fe&#58;02 1081399                        /lib64/libc-2.4.so
80ae28c000-80ae29b000 ---p 0017c000 fe&#58;02 1081399                        /lib64/libc-2.4.so
80ae29b000-80ae29f000 r--p 0017b000 fe&#58;02 1081399                        /lib64/libc-2.4.so
80ae29f000-80ae2af000 rw-p 0017f000 fe&#58;02 1081399                        /lib64/libc-2.4.so
80ae2af000-80ae2b3000 rw-p 80ae2af000 00&#58;00 0 
80ae2c0000-80ae326000 r-xp 00000000 fe&#58;02 2263803                        /usr/lib64/libncurses.so.5.5
80ae326000-80ae336000 ---p 00066000 fe&#58;02 2263803                        /usr/lib64/libncurses.so.5.5
80ae336000-80ae349000 rw-p 00066000 fe&#58;02 2263803                        /usr/lib64/libncurses.so.5.5
80ae350000-80ae401000 r-xp 00000000 fe&#58;02 1081349                        /lib64/libm-2.4.so
80ae401000-80ae410000 ---p 000b1000 fe&#58;02 1081349                        /lib64/libm-2.4.so
80ae410000-80ae411000 r--p 000b0000 fe&#58;02 1081349                        /lib64/libm-2.4.so
80ae411000-80ae41f000 rw-p 000b1000 fe&#58;02 1081349                        /lib64/libm-2.4.so
80ae430000-80ae434000 r-xp 00000000 fe&#58;02 1081364                        /lib64/libdl-2.4.so
80ae434000-80ae443000 ---p 00004000 fe&#58;02 1081364                        /lib64/libdl-2.4.so
80ae443000-80ae444000 r--p 00003000 fe&#58;02 1081364                        /lib64/libdl-2.4.so
80ae444000-80ae445000 rw-p 00004000 fe&#58;02 1081364                        /lib64/libdl-2.4.so
40000000000-40000001000 rw-p 40000000000 00&#58;00 0 
40000001000-40000008000 r--s 00000000 fe&#58;02 2359555                      /usr/lib64/gconv/gconv-modules.cache
40000008000-40000009000 rw-p 40000008000 00&#58;00 0 
40000013000-40000014000 rw-p 40000013000 00&#58;00 0 
40000014000-4000002a000 r-xp 00000000 fe&#58;02 2283758                      /usr/lib64/libspe2.so.2.0.2
4000002a000-4000003a000 ---p 00016000 fe&#58;02 2283758                      /usr/lib64/libspe2.so.2.0.2
4000003a000-4000003c000 rw-p 00016000 fe&#58;02 2283758                      /usr/lib64/libspe2.so.2.0.2
4000003c000-4000003d000 rw-p 4000003c000 00&#58;00 0 
4000003d000-40000056000 r-xp 00000000 fe&#58;02 2265421                      /usr/lib64/libz.so.1.2.3
40000056000-40000065000 ---p 00019000 fe&#58;02 2265421                      /usr/lib64/libz.so.1.2.3
40000065000-40000067000 rw-p 00018000 fe&#58;02 2265421                      /usr/lib64/libz.so.1.2.3
40000067000-40000068000 rw-p 40000067000 00&#58;00 0 
40000068000-40000080000 r-xp 00000000 fe&#58;02 1081398                      /lib64/libpthread-2.4.so
40000080000-4000008f000 ---p 00018000 fe&#58;02 1081398                      /lib64/libpthread-2.4.so
4000008f000-40000090000 r--p 00017000 fe&#58;02 1081398                      /lib64/libpthread-2.4.so
40000090000-40000092000 rw-p 00018000 fe&#58;02 1081398                      /lib64/libpthread-2.4.so
40000092000-40000097000 rw-p 40000092000 00&#58;00 0 
40000097000-400000a1000 r-xp 00000000 fe&#58;02 1081384                      /lib64/librt-2.4.so
400000a1000-400000b1000 ---p 0000a000 fe&#58;02 1081384                      /lib64/librt-2.4.so
400000b1000-400000b2000 r--p 0000a000 fe&#58;02 1081384                      /lib64/librt-2.4.so
400000b2000-400000b3000 rw-p 0000b000 fe&#58;02 1081384                      /lib64/librt-2.4.so
400000b3000-400000b6000 rw-p 400000b3000 00&#58;00 0 
400000b6000-40003482000 r--p 00000000 fe&#58;02 2262161                      /usr/lib/locale/locale-archive
40003713000-40004613000 -w-s 00000000 00&#58;0d 5947                         /dev/fb0
4000463e000-400048c2000 rw-p 4000463e000 00&#58;00 0 
400048c2000-400057c2000 -w-s 00000000 00&#58;0d 5947                         /dev/fb0
400057c2000-40005802000 rw-s 00000000 00&#58;10 71994                        /spu/spethread-7001-278824912/mem
40005802000-40005803000 ---p 40005802000 00&#58;00 0 
40005803000-40006002000 rw-p 40005803000 00&#58;00 0 
fffffc1f000-fffffc34000 rw-p fffffc1f000 00&#58;00 0                         &#91;stack&#93;


MPlayer interrupted by signal 6 in module&#58; uninit_vo

fusuke
Posts: 19
Joined: Mon Oct 08, 2007 1:27 pm
Location: Vancouver, Canada

libps3lib.a

Post by fusuke »

Hi Unsolo,

darkshadow was probably referring to your earlier post on this very thread.
unsolo wrote:Latest And greatest
...
spu-medialib/yuv2argb_scaler.h
ps3fb/libps3fb.h
libspu-medialib.a
libps3lib.a
...
[/quote]
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

Sorry cleared out now.
Don't do it alone.
fusuke
Posts: 19
Joined: Mon Oct 08, 2007 1:27 pm
Location: Vancouver, Canada

32-bit compilation run from failsafe terminal

Post by fusuke »

Hi Unsolo,

So I went back to a 32bit compilation to test out -vo ps3 outside of gnome. Still doesn't work.
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

thanks for testing ..
from what i can se it must be a problem with the 32 bit adresses
probably they need to be sign corrected for MSB63->32 before the dma.. as its 0xFFFFFFFFADRESS in 32 bit but when you stick and adress into a unsigned long it doesnt extend it like that! it ends up as 0x00000000ADRESS so the spu cant dma from that adress as its clearly non existing.

this needs to be solved!
Don't do it alone.
darkshadow
Posts: 10
Joined: Wed Oct 10, 2007 2:35 pm
Location: Canada

Post by darkshadow »

Thanks for the help, I am now having trouble with it detecting the ps3 vo option. It will not auto detect during ./configure and when I force it I get the following error.

/usr/bin/ld: cannot find -lspu-medialib
collect2: ld returned 1 exit status
make: *** [mplayer] Error 1
[root@localhost mplayer]# locate spu-medialib
/usr/include/spu-medialib
/usr/include/spu-medialib/spu_control.h
/usr/include/spu-medialib/yuv2argb_scaler.h
/usr/include/spu-medialib/yuv2rgb.h
/usr/include/spu-medialib/yuvscaler.h
/usr/lib64/libspu-medialib.a
darkshadow
Posts: 10
Joined: Wed Oct 10, 2007 2:35 pm
Location: Canada

Post by darkshadow »

I forgot to say I think it is the 32/64 bit hell. Because even though the file is in /usr/lib64 when I started checking the files with file they show up as 32bit. How do I force my compiler to only use 64bit since that is what the rest are compiled as.
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

spu-medialib is still very in work ..
Im going to look into making a proper configure etc for it.
Don't do it alone.
fusuke
Posts: 19
Joined: Mon Oct 08, 2007 1:27 pm
Location: Vancouver, Canada

Post by fusuke »

unsolo,

Did you look at the error message that I posted when I compiled as 64bit? It's a few posts up.

darkshadow,

This is my experience so far as to 32/64bit. By default, Mplayer's configure will try to compile everything as 32bit. If you want it to detect the `ps3` option, then libspe2, libspu-medialib and libps3fb will have to be compiled in 32bit form.

Following unsolo's instructions on YDL 5.02, you will get libps3fb in 32bit and libspu-medialib in 64 bit. Assuming you already have libspe2 compiled in 32bit, this is what you have to do:

Edit the Makefile of in spu-medialib to change the PPU flags from -m64 to -m32 and change the target dir to /usr/lib instead of /usr/lib64

Here is my 32bit Makefile:

Code: Select all

PPU_CC=gcc
SPU_CC=spu-elf-gcc 
PPU_CFLAGS=-fno-exceptions -I../libfb -Iyuv2rgb -Iyuvscaler -Ispu_utils -I../../libfb/asm -O2 -Wall
PPU_CFLAGS64= -m32 $&#40;PPU_CFLAGS&#41;
SPU_CFLAGS=-std=c99 -O2 -fno-exceptions -g -Ispu_utils -Wall 

SPU_BIN0=spu_yuv2rgb
SPU_BIN1=spu_yuvscaler
SPU_BIN2=spu_yuv2argb_scaler

SPU_HANDLE0=spu_yuvscaler_handle
SPU_HANDLE1=spu_yuv2rgb_handle
SPU_HANDLE2=spu_yuv2argb_scaler_handle

SPU_CSF0=$&#40;SPU_BIN0&#41;_csf.o
SPU_CSF1=$&#40;SPU_BIN1&#41;_csf.o
SPU_CSF2=$&#40;SPU_BIN2&#41;_csf.o

PPU_LDFLAGS=yuvscaler/yuvscaler.c yuv2rgb/yuv2rgb.c -lspe2 
SPU_LDFLAGS=
PREFIX=/usr
INS_LIB=libspu-medialib.a 
INS_INC=spu_utils/spu_control.h yuv2rgb/yuv2rgb.h yuvscaler/yuvscaler.h yuv420scaler2argb/yuv2argb_scaler.h

all&#58; spu embed lib

spu&#58;
        $&#40;SPU_CC&#41; $&#40;SPU_CFLAGS&#41; yuv2rgb/spu_yuv2rgb.c -o $&#40;SPU_BIN0&#41; $&#40;SPU_LDFLAGS&#41;
        $&#40;SPU_CC&#41; $&#40;SPU_CFLAGS&#41; yuvscaler/spu_yuvscaler.c -o $&#40;SPU_BIN1&#41; $&#40;SPU_LDFLAGS&#41;
        $&#40;SPU_CC&#41; $&#40;SPU_CFLAGS&#41; yuv420scaler2argb/spu_yuv2argb_scaler.c -o $&#40;SPU_BIN2&#41; $&#40;SPU_LDFLAGS&#41;

embed&#58;
        embedspu $&#40;SPU_HANDLE0&#41; $&#40;SPU_BIN0&#41; $&#40;SPU_CSF0&#41;
        embedspu $&#40;SPU_HANDLE1&#41; $&#40;SPU_BIN1&#41; $&#40;SPU_CSF1&#41;
        embedspu $&#40;SPU_HANDLE2&#41; $&#40;SPU_BIN2&#41; $&#40;SPU_CSF2&#41;

lib&#58;
        $&#40;PPU_CC&#41; $&#40;PPU_CFLAGS64&#41; -c yuvscaler/yuvscaler.c -o yuvscaler.o
        $&#40;PPU_CC&#41; $&#40;PPU_CFLAGS64&#41; -c yuv2rgb/yuv2rgb.c -o yuv2rgb.o
        $&#40;PPU_CC&#41; $&#40;PPU_CFLAGS64&#41; -c yuv420scaler2argb/yuv2argb_scaler.c -o yuv2argb_scaler.o

        ar rcs libspu-medialib.a yuvscaler.o yuv2rgb.o yuv2argb_scaler.o $&#40;SPU_CSF0&#41; $&#40;SPU_CSF1&#41; $&#40;SPU_CSF2&#41;

clean&#58;
        rm -rf *.o scaleandconvert spu_yuv2rgb spu_yuvscaler spu_yuv2argb_scaler libspu-medialib.a

install&#58; install-lib install-inc

install-lib&#58; lib
        install -d "$&#40;PREFIX&#41;/lib"
        install -m 644 $&#40;INS_LIB&#41; "$&#40;PREFIX&#41;/lib"

install-inc&#58;
        install -d "$&#40;PREFIX&#41;/include/spu-medialib"
        install -m 644 $&#40;INS_INC&#41; "$&#40;PREFIX&#41;/include/spu-medialib"

uninstall&#58;
        rm -f $&#40;addprefix $&#40;PREFIX&#41;/lib/, $&#40;notdir $&#40;INS_LIB&#41;&#41;&#41;
        rm -f $&#40;addprefix $&#40;PREFIX&#41;/include/spu-medialib/, $&#40;notdir $&#40;INS_INC&#41;&#41;&#41;
        -rmdir "$&#40;PREFIX&#41;/include/spu-medialib/"
Alternatively, you could compile everything in 64bit, but YDL lacks a number of 64bit libraries which creates an Mplayer deficient of options.
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

new rev of spu-medialib on svn migth solve the problems for 32 bit users.
Don't do it alone.
fusuke
Posts: 19
Joined: Mon Oct 08, 2007 1:27 pm
Location: Vancouver, Canada

possible success

Post by fusuke »

Just ssh'ed and updated spu-medialib from work. Looks like it is working. I will verify once I get home.

good work unsolo & team.
darkshadow
Posts: 10
Joined: Wed Oct 10, 2007 2:35 pm
Location: Canada

Post by darkshadow »

I just updated spu-medialib and now everything works and I can watch my collection of xvid files.

Is their a way to get this so that when mplayer quits it lets me see X again since I don't plan on always ssh'ing in to my ps3. When I start with runlevel 3 and just use the command line it lets me still see what I am doing after quiting mplayer, but with cutoff words thanks to overscanning or my other choice of black bars if I don't use fullscreen for ps3vidmode.
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

We have started to look into how to get X to redraw etc
however this may take some time.

nice to hear that my changes worked :)
Don't do it alone.
darkshadow
Posts: 10
Joined: Wed Oct 10, 2007 2:35 pm
Location: Canada

Post by darkshadow »

Ok, I am not in much of a hurry. I will just use the command line and work around the overscan problem by starting my videos with a script that is something like this


sudo /sbin/ps3videomode -v 4 -f
mplayer $1
sudo /sbin/ps3videomode -v 4


I am not worried about the security on my ps3 so sudo does not prompt me for any passwords.
fusuke
Posts: 19
Joined: Mon Oct 08, 2007 1:27 pm
Location: Vancouver, Canada

playback results

Post by fusuke »

Here are my results so far:

1) Playback works for some files. I tested mpeg, xvid and divx5: The divx did not work and yielded this:

Code: Select all

vo_ps3&#58;init_spu_medialib&#58; Started spu-medialib's spu_yuv2argb_scaler runing
spu_yuv2argb_scaler&#58; SRC width 620,DST width 620 ??% ??% ??,?% 0 0 $<50>
spu_yuv2argb_scaler&#58; SRC height 256,DST height 274
spu_yuv2argb_scaler&#58; DST offset 328010
spu_yuv2argb_scaler&#58; Starting Up
spu_yuv2argb_scaler&#58; Scaling, computing shuffle filters
spu_yuv2argb_scaler&#58; Computing Crshuffle filter
spu_yuv2argb_scaler&#58; Initiation completed
Failed to recive result from spe&#58; Permission denied
Everything works with the -vo sdl option.

2) The system hangs when closing the framebuffer in Gnome, etc. This doesn't happen in runlevel 3. However, it looks like vo_ps3 completes its task. I think the problem might be with ps3fb_cleanup in libps3fb.

Code: Select all

A&#58;2427.0 V&#58;2427.0 A-V&#58;  0.009 ct&#58;  0.115 58189/58189  7% 22%  1.7% 0 0 
A&#58;2427.1 V&#58;2427.1 A-V&#58;  0.013 ct&#58;  0.117 58193/58193  7% 22%  1.8% 0 0 
A&#58;2560.6 V&#58;2560.6 A-V&#58;  0.032 ct&#58;  0.002 61393/61393 ??% ??% ??,?% 0 0 
vo_ps3&#58;uninit&#58; Told yuv2argb_scaler to stop
spu_yuvscaler&#58; Stopping
vo_ps3&#58;uninit&#58; Destroyed spu-medialib's scaler/converter
vo_ps3&#58;uninit&#58; Cleaned up FrameBuffer and re-enabled console.
vo_ps3&#58;uninit&#58; These SHOULD BE ZERO&#58;
        yuvcsc_not_ready&#58;0
vo_ps3&#58;uninit&#58; Statistics&#58;
        draw_frame calls&#58;0
        draw_slice calls&#58;9394
        draw_image calls&#58;427
        flip_page calls&#58;427
        get_image calls&#58;2
   Played src some-file.avi &#40;624x352&#41; at 1280x768 scaled
3) Full screen scaling is sort of an issue. I was hoping to use one of the VESA ps3videomodes (best in terms of no overscanning or black bars), but it suffers the same effect as a non-full screen yuv videomode: flickering horizontal bar on the top.

I guess it's not too much of a problem if the edges of your video are lost out when in one of the yuv videomodes.

4) Re: flickering, it's especially bad when playing back in Gnome (X, etc) because anything that refreshes rapidly (e.g playback stats in console) becomes clearly visible over your video.

Keep up the good work!
fusuke
Posts: 19
Joined: Mon Oct 08, 2007 1:27 pm
Location: Vancouver, Canada

Post by fusuke »

darkshadow wrote: sudo /sbin/ps3videomode -v 4 -f
mplayer $1
sudo /sbin/ps3videomode -v 4

I don't think you even need sudo to chance the videomode.
darkshadow
Posts: 10
Joined: Wed Oct 10, 2007 2:35 pm
Location: Canada

Post by darkshadow »

That's what I get for assuming you need root for anything in /sbin. Oh well I linked it in /usr/bin so I don't have to type the full path anymore either.
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

Try it outside of X and se if you get the flickering there.

EDIT:
I think this is most likely caused by the X server still trying to draw to the framebuffer. However if we get some sort of overlay this will not be a problem any more or tell X to render offscreen while we are running video playback.
Don't do it alone.
Post Reply