forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Installing the Mplayer vo PS3
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> spu-medialib
View previous topic :: View next topic  
Author Message
unsolo



Joined: 16 Apr 2007
Posts: 155
Location: OSLO Norway

PostPosted: Sun Oct 07, 2007 9:53 am    Post subject: Installing the Mplayer vo PS3 Reply with quote

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
_________________
Don't do it alone.


Last edited by unsolo on Fri Oct 19, 2007 2:38 am; edited 6 times in total
Back to top
View user's profile Send private message
fusuke



Joined: 08 Oct 2007
Posts: 19
Location: Vancouver, Canada

PostPosted: Mon Oct 08, 2007 9:51 pm    Post subject: Problem compiling Mplayer on YDL 5.02 Reply with quote

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?
Back to top
View user's profile Send private message
ldesnogu



Joined: 17 Apr 2004
Posts: 97

PostPosted: Mon Oct 08, 2007 10:25 pm    Post subject: Re: Problem compiling Mplayer on YDL 5.02 Reply with quote

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:
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
Back to top
View user's profile Send private message
unsolo



Joined: 16 Apr 2007
Posts: 155
Location: OSLO Norway

PostPosted: Tue Oct 09, 2007 8:20 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
fusuke



Joined: 08 Oct 2007
Posts: 19
Location: Vancouver, Canada

PostPosted: Tue Oct 09, 2007 9:44 am    Post subject: 32/64-bit nightmare Reply with quote

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?
Back to top
View user's profile Send private message
fusuke



Joined: 08 Oct 2007
Posts: 19
Location: Vancouver, Canada

PostPosted: Tue Oct 09, 2007 10:45 am    Post subject: update Reply with quote

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

That would seem much simpler.
Back to top
View user's profile Send private message
fusuke



Joined: 08 Oct 2007
Posts: 19
Location: Vancouver, Canada

PostPosted: Tue Oct 09, 2007 3:41 pm    Post subject: Compiles fine, but mplayer yields black unresponsive screen Reply with quote

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:

MPlayer dev-SVN-r24734-4.1.1 (C) 2000-2007 MPlayer Team
AltiVec found
CPU: PowerPC

Playing some-file.avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO:  [XVID]  624x352  12bpp  23.976 fps  976.4 kbps (119.2 kbyte/s)
Clip info:
 Software: HUH?
 Name:
 Subject:
 Artist:
 Copyright:
 Comments:
ps3 suboptions:
           debug:1
           noscale:0
           full:0
           adj:0
           snapshot:0
vo_ps3:preinit: Initialized framebuffer & disabled console
FB is 1280x768
==========================================================================
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: 48000 Hz, 2 ch, s16be, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [alsa] 48000Hz 2ch s16be (2 bytes per sample)
Starting playback...
VDec: vo config request - 624 x 352 (preferred colorspace: Planar YV12)
vo_ps3:query_format: Called for Planar YV12 (0x32315659)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.77:1 - prescaling to correct movie aspect.
VO: [ps3] 624x352 => 624x352 Planar YV12
vo_ps3:query_format: Called for Planar YV12 (0x32315659)
vo_ps3:config: Times called:0 Setting up for src=624x352, suggested dst=624x352,
 format=Planar YV12 (32315659)
                     vo_fs:0, vo_doublebuffering:1, vo_directrendering:0, vo_scr
eenwidth:0, vo_screenheight:0
vo_ps3:config: Set vo_screen(width/heigh) to 1280x768, forced direct rendering,
& double buffering
vo_ps3:config: src_buf_siz=329472, src_stride[]={624,312,312}, src_p_siz[]={2196
48,54912,54912}
                     dst_buf_siz=329472, dst_stride[]={624,312,312}, dst_p_siz[]
={219648,54912,54912}
                     maxWxmaxH=1280x768, max_buf_siz=1966080, offset=0
vo_ps3:setup_screen: Using destination image size WxH:624x352
vo_ps3:init_spu_medialib: Started spu-medialib's spu_yuv2argb_scaler runing
Back to top
View user's profile Send private message
unsolo



Joined: 16 Apr 2007
Posts: 155
Location: OSLO Norway

PostPosted: Tue Oct 09, 2007 5:03 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
fusuke



Joined: 08 Oct 2007
Posts: 19
Location: Vancouver, Canada

PostPosted: Wed Oct 10, 2007 1:34 pm    Post subject: SSH results Reply with quote

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

Code:

MPlayer dev-SVN-r24734-4.1.1 (C) 2000-2007 MPlayer Team
AltiVec found
CPU: PowerPC

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

Back to top
View user's profile Send private message
darkshadow



Joined: 10 Oct 2007
Posts: 10
Location: Canada

PostPosted: Wed Oct 10, 2007 2:42 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
fusuke



Joined: 08 Oct 2007
Posts: 19
Location: Vancouver, Canada

PostPosted: Wed Oct 10, 2007 3:54 pm    Post subject: Reply with quote

I think that libps3lib.a is a typo in unsolo's earlier post. It was probably meant to be libps3fb.a .
Back to top
View user's profile Send private message
unsolo



Joined: 16 Apr 2007
Posts: 155
Location: OSLO Norway

PostPosted: Wed Oct 10, 2007 4:10 pm    Post subject: Reply with quote

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:

vo_ps3:init_spu_medialib: Started spu-medialib's spu_yuv2argb_scaler runing


now you also get
Code:
spu_yuv2argb_scaler: SRC width 624,DST width -2147483648
spu_yuv2argb_scaler: SRC height 352,DST height 0
spu_yuv2argb_scaler: DST offset 0
spu_yuv2argb_scaler: Starting Up
spu_yuv2argb_scaler: Scaling, computing shuffle filters
spu_yuv2argb_scaler: Computing Crshuffle filter
spu_yuv2argb_scaler: 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.
Back to top
View user's profile Send private message
fusuke



Joined: 08 Oct 2007
Posts: 19
Location: Vancouver, Canada

PostPosted: Wed Oct 10, 2007 4:18 pm    Post subject: 64bit compilation results Reply with quote

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:


MPlayer dev-SVN-r24734-4.1.1 (C) 2000-2007 MPlayer Team
AltiVec found
CPU: PowerPC

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


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


MPlayer interrupted by signal 6 in module: uninit_vo

Back to top
View user's profile Send private message
fusuke



Joined: 08 Oct 2007
Posts: 19
Location: Vancouver, Canada

PostPosted: Wed Oct 10, 2007 4:23 pm    Post subject: libps3lib.a Reply with quote

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]
Back to top
View user's profile Send private message
unsolo



Joined: 16 Apr 2007
Posts: 155
Location: OSLO Norway

PostPosted: Wed Oct 10, 2007 4:29 pm    Post subject: Reply with quote

Sorry cleared out now.
_________________
Don't do it alone.
Back to top
View user's profile Send private message
fusuke



Joined: 08 Oct 2007
Posts: 19
Location: Vancouver, Canada

PostPosted: Wed Oct 10, 2007 5:17 pm    Post subject: 32-bit compilation run from failsafe terminal Reply with quote

Hi Unsolo,

So I went back to a 32bit compilation to test out -vo ps3 outside of gnome. Still doesn't work.
Back to top
View user's profile Send private message
unsolo



Joined: 16 Apr 2007
Posts: 155
Location: OSLO Norway

PostPosted: Thu Oct 11, 2007 1:37 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
darkshadow



Joined: 10 Oct 2007
Posts: 10
Location: Canada

PostPosted: Thu Oct 11, 2007 3:56 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
darkshadow



Joined: 10 Oct 2007
Posts: 10
Location: Canada

PostPosted: Thu Oct 11, 2007 4:03 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
unsolo



Joined: 16 Apr 2007
Posts: 155
Location: OSLO Norway

PostPosted: Thu Oct 11, 2007 5:25 am    Post subject: Reply with quote

spu-medialib is still very in work ..
Im going to look into making a proper configure etc for it.
_________________
Don't do it alone.
Back to top
View user's profile Send private message
fusuke



Joined: 08 Oct 2007
Posts: 19
Location: Vancouver, Canada

PostPosted: Thu Oct 11, 2007 6:11 am    Post subject: Reply with quote

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:

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 $(PPU_CFLAGS)
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=$(SPU_BIN0)_csf.o
SPU_CSF1=$(SPU_BIN1)_csf.o
SPU_CSF2=$(SPU_BIN2)_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: spu embed lib

spu:
        $(SPU_CC) $(SPU_CFLAGS) yuv2rgb/spu_yuv2rgb.c -o $(SPU_BIN0) $(SPU_LDFLAGS)
        $(SPU_CC) $(SPU_CFLAGS) yuvscaler/spu_yuvscaler.c -o $(SPU_BIN1) $(SPU_LDFLAGS)
        $(SPU_CC) $(SPU_CFLAGS) yuv420scaler2argb/spu_yuv2argb_scaler.c -o $(SPU_BIN2) $(SPU_LDFLAGS)

embed:
        embedspu $(SPU_HANDLE0) $(SPU_BIN0) $(SPU_CSF0)
        embedspu $(SPU_HANDLE1) $(SPU_BIN1) $(SPU_CSF1)
        embedspu $(SPU_HANDLE2) $(SPU_BIN2) $(SPU_CSF2)

lib:
        $(PPU_CC) $(PPU_CFLAGS64) -c yuvscaler/yuvscaler.c -o yuvscaler.o
        $(PPU_CC) $(PPU_CFLAGS64) -c yuv2rgb/yuv2rgb.c -o yuv2rgb.o
        $(PPU_CC) $(PPU_CFLAGS64) -c yuv420scaler2argb/yuv2argb_scaler.c -o yuv2argb_scaler.o

        ar rcs libspu-medialib.a yuvscaler.o yuv2rgb.o yuv2argb_scaler.o $(SPU_CSF0) $(SPU_CSF1) $(SPU_CSF2)

clean:
        rm -rf *.o scaleandconvert spu_yuv2rgb spu_yuvscaler spu_yuv2argb_scaler libspu-medialib.a

install: install-lib install-inc

install-lib: lib
        install -d "$(PREFIX)/lib"
        install -m 644 $(INS_LIB) "$(PREFIX)/lib"

install-inc:
        install -d "$(PREFIX)/include/spu-medialib"
        install -m 644 $(INS_INC) "$(PREFIX)/include/spu-medialib"

uninstall:
        rm -f $(addprefix $(PREFIX)/lib/, $(notdir $(INS_LIB)))
        rm -f $(addprefix $(PREFIX)/include/spu-medialib/, $(notdir $(INS_INC)))
        -rmdir "$(PREFIX)/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.
Back to top
View user's profile Send private message
unsolo



Joined: 16 Apr 2007
Posts: 155
Location: OSLO Norway

PostPosted: Thu Oct 11, 2007 7:13 am    Post subject: Reply with quote

new rev of spu-medialib on svn migth solve the problems for 32 bit users.
_________________
Don't do it alone.
Back to top
View user's profile Send private message
fusuke



Joined: 08 Oct 2007
Posts: 19
Location: Vancouver, Canada

PostPosted: Thu Oct 11, 2007 8:08 am    Post subject: possible success Reply with quote

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.
Back to top
View user's profile Send private message
darkshadow



Joined: 10 Oct 2007
Posts: 10
Location: Canada

PostPosted: Thu Oct 11, 2007 2:56 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
unsolo



Joined: 16 Apr 2007
Posts: 155
Location: OSLO Norway

PostPosted: Thu Oct 11, 2007 3:59 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
darkshadow



Joined: 10 Oct 2007
Posts: 10
Location: Canada

PostPosted: Thu Oct 11, 2007 4:10 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
fusuke



Joined: 08 Oct 2007
Posts: 19
Location: Vancouver, Canada

PostPosted: Thu Oct 11, 2007 4:59 pm    Post subject: playback results Reply with quote

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:

vo_ps3:init_spu_medialib: Started spu-medialib's spu_yuv2argb_scaler runing
spu_yuv2argb_scaler: SRC width 620,DST width 620 ??% ??% ??,?% 0 0 $<50>
spu_yuv2argb_scaler: SRC height 256,DST height 274
spu_yuv2argb_scaler: DST offset 328010
spu_yuv2argb_scaler: Starting Up
spu_yuv2argb_scaler: Scaling, computing shuffle filters
spu_yuv2argb_scaler: Computing Crshuffle filter
spu_yuv2argb_scaler: Initiation completed
Failed to recive result from spe: 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:

A:2427.0 V:2427.0 A-V:  0.009 ct:  0.115 58189/58189  7% 22%  1.7% 0 0
A:2427.1 V:2427.1 A-V:  0.013 ct:  0.117 58193/58193  7% 22%  1.8% 0 0
A:2560.6 V:2560.6 A-V:  0.032 ct:  0.002 61393/61393 ??% ??% ??,?% 0 0
vo_ps3:uninit: Told yuv2argb_scaler to stop
spu_yuvscaler: Stopping
vo_ps3:uninit: Destroyed spu-medialib's scaler/converter
vo_ps3:uninit: Cleaned up FrameBuffer and re-enabled console.
vo_ps3:uninit: These SHOULD BE ZERO:
        yuvcsc_not_ready:0
vo_ps3:uninit: Statistics:
        draw_frame calls:0
        draw_slice calls:9394
        draw_image calls:427
        flip_page calls:427
        get_image calls:2
   Played src some-file.avi (624x352) 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!
Back to top
View user's profile Send private message
fusuke



Joined: 08 Oct 2007
Posts: 19
Location: Vancouver, Canada

PostPosted: Thu Oct 11, 2007 5:02 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
darkshadow



Joined: 10 Oct 2007
Posts: 10
Location: Canada

PostPosted: Thu Oct 11, 2007 5:25 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
unsolo



Joined: 16 Apr 2007
Posts: 155
Location: OSLO Norway

PostPosted: Thu Oct 11, 2007 8:16 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> spu-medialib All times are GMT + 10 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group