<br><br><div><span class="gmail_quote">On 6/21/07, <b class="gmail_sendername">Mark Kendall</b> <<a href="mailto:mark.kendall@gmail.com">mark.kendall@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
As I'm off for a week from tomorrow, I thought it was about time I<br>shared my work on ps3 video playback. The patch is against the<br>mythtv-vid branch but this will work fine with a recent version of svn<br>head on your backend. All installed on top of Yellow Dog Linux 5
<br>though I see no reason why it shouldn't work with any other PS3 linux<br>distro.<br><br>Hopefully I've covered off most of the detail in the brain dump below<br>but in general it's working pretty well - some of the 720p playback is
<br>about as good I've seen anywhere and all without the extensive grief<br>of buggy drivers, xorg.conf files etc etc.<br><br>Relevant files are:-<br><br><a href="http://www.btinternet.com/~mark_kendall/mythtvps3.diff">
http://www.btinternet.com/~mark_kendall/mythtvps3.diff</a><br><a href="http://www.btinternet.com/~mark_kendall/joystickmenurc">http://www.btinternet.com/~mark_kendall/joystickmenurc</a><br><a href="http://www.btinternet.com/~mark_kendall/revert.cpp">
http://www.btinternet.com/~mark_kendall/revert.cpp</a><br><br>Any and all feedback much appreciated and I'll get back to it when I'm<br>back from my travels.<br><br>Regards<br><br>Mark<br><br><br>Sanity warning<br>
<br>The kernel process that controls the framebuffer is disabled during<br>playback. If mythtv crashes during this time (and remember, this patch<br>is a work in progress), you will be left with a seemingly unresponsive<br>
ps3. In reality the framebuffer is not being updated. Rather than<br>using control-alt-backspace, download and compile this short program<br>and install it in your path (instructions below). Run<br>mythtv/mythfrontend from a console and if it crashes it should return
<br>you to the text prompt (although you won't be able to see it) - just<br>type revert to restore your desktop.<br><br>cd ~<br>mkdir revert<br>cd revert<br>wget <a href="http://www.btinternet.com/~mark_kendall/revert.cpp">
http://www.btinternet.com/~mark_kendall/revert.cpp</a><br>g++ -o revert revert.cpp<br>su<br>cp revert /usr/bin/revert<br><br><br>What's New<br><br> - new configure option --enable-ps3<br> - new, configurable exit option to boot into the game os. Switch
<br>seemlessly between wasting your time gaming and wasting your time<br>watching tv:)<br> - new video output method and vertical sync that accesses the ps3<br>framebuffer directly. This defaults to using ffmpeg for software
<br>colour conversion and scaling.<br> - if libspe2 is detected, deinterlacing, yuv to rgb colour conversion<br>and scaling are offloaded to (some of) the PS3s 'SPE's.<br><br><br>Performance/Setup<br><br>Once installed, Go to Settings->TV Settings->Playback->Playback
<br>Profiles and setup 1 or more profiles using ps3fb as the renderer.<br>Turn off OSD fade and enable Adaptive x2 as the default deinterlacer<br>(unless it gives you problems - see below).<br><br>If playback is poor (ie low framerate), you've either not compiled
<br>with libspe2 support and it's falling back to ffmpeg<br>conversion/scaling (check your logs for lack of SPU type messages and<br>recompile) or mythtv is using the xvideo display method and falling<br>back to software/x-lib scaling (check your logs and adjust your
<br>display profiles).<br><br>Without the patches, the ps3 is almost unusable as a frontend for even<br>standard definition. Using the 'accelerated' video output, I can<br>comfortably play 720p and 1080i mpeg2 material. I don't have any 1080p
<br>mpeg2 source clips so can't test. The only playback that is currently<br>erratic for me is 1080i displayed downscaled to 720p using the double<br>frame rate deinterlacer - and this looks like it's a limitation with
<br>the main processor/memory rather than the spe's. Hidef h.264 playback<br>does not work.<br><br>I'd recommend using a lightweight window manager, lightweight mythtv<br>theme and turning off as many unnecessary services as you can. This
<br>will save memory and speed up menu navigation, playback startup etc.<br>It may just make things that much more stable as well as any<br>instability seems to be memory related.<br><br>Alternatively, try qt-embedded (video output works just as well
<br>without X). I've run it successfully using qt-embedded-3.3.5.<br><br><br>Using the sixaxis controller<br><br>With YDL 5.0, the sixaxis controller works 'out of the box' when<br>connected via usb. I've put together a simple joystick config file
<br>that you'll need to copy to ~/.mythtv - It's useful if you do try<br>qt-embedded as setting up the mouse/keyboard can be a pain.<br><br><a href="http://www.btinternet.com/~mark_kendall/joystickmenurc">http://www.btinternet.com/~mark_kendall/joystickmenurc
</a><br><br><br>Issues<br><br>Generally it seems to be pretty stable - but re-read the sanity<br>warning above:) Otherwise the main, obvious issue is that the program<br>guide/watch recordings/find programs screens are not rendered properly
<br>when called from playback (livetv or recording). There are also<br>occasional issues with videomode validation - especially when using<br>vesa modes in fullscreen (this appears to be a driver/ioctl bug but<br>you shouldn't need to select a vesa mode using the -f option anyway as
<br>they are already fullscreen). I'd recommend you use something like<br>720p in fullscreen to get you going and experiment from there.<br><br><br>To Do<br><br>Code clean up - especially a re-write of mythspuhandler...
<br>Performance management - currently hardcoded to share the load between<br>2 of the 6 available spu's. This should be adjusted on the fly.<br>xrandr/display res support - should be simple enough to enable display<br>
resolution switching but I want to extend the mythtv code to support<br>interlaced modes as well.<br>deinterlacer - the inbuilt deinterlacer is OK but there should be<br>plenty of horsepower available for better quality.<br>
<br><br>Requirements (over and above a normal mythtv installation from source)<br><br> - libspe2 and libspe2-devel (which enable access to the spe's). You<br>can download these from:-<br> <a href="http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.0/libspe2-2.0.1-1.ppc.rpm">
http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.0/libspe2-2.0.1-1.ppc.rpm</a><br> <a href="http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.0/libspe2-devel-2.0.1-1.ppc.rpm">
http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.0/libspe2-devel-2.0.1-1.ppc.rpm</a><br><br> - the spu development toolchain. If you have spu-gcc and embedspu,<br>you're there...<br><br>Installation
<br><br>cd ~<br>svn co <a href="http://svn.mythtv.org/svn/branches/mythtv-vid">http://svn.mythtv.org/svn/branches/mythtv-vid</a><br>cd mythtv-vid<br>wget <a href="http://www.btinternet.com/~mark_kendall/mythtvps3.diff">http://www.btinternet.com/~mark_kendall/mythtvps3.diff
</a><br>patch -p 1 -i mythtvps3.diff<br>chmod +x libs/libmythtv/cell/make_spu.sh<br>libs/libmythtv/cell/make_spu.sh<br>./configure --enable-ps3<br>qmake <a href="http://mythtv.pro">mythtv.pro</a><br>make<br>sudo make install
<br><br>Installation notes<br><br> - be patient, it takes a couple of hours to compile...<br> - do not try and speed things up by using make -j 2 or similar -<br>you'll just slow it down due to the lack of memory.<br>
- you might want to disable a number of the backend options (e.g.<br>--disable-dvb etc) to shorten compile times.<br>_______________________________________________</blockquote><div><br>Looks interesting. I will give it a shot this weekend. But I might not be able to get it working based on your instructions alone. I've never compiled MythTV before. Just install it from ubuntu packages. The one time I tried compiling a SVN version I must have done something wrong because it very much didn't work.
<br clear="all"></div></div><br>-- <br>_____________<br>Ryan Patterson