Difference between revisions of "Talk:MythTV on Mac x86"

From MythTV Official Wiki
Jump to: navigation, search
(Binary Packages?)
Line 1: Line 1:
 
== Binary Packages? ==
 
== Binary Packages? ==
 
 
Great work here!  Thanks a lot for helping out the growing Intel/Mac community.  But I have been trying these steps for two straight days with nothing to show for it.  Are you guys ever planning on releasing binary packages?  Or do you know of anywhere I can get them?
 
 
(mmead) whose binary are you using?
 
 
(tji) Do we have any place to host binaries at?
 
 
(Tux541) Sure, I have access to an open T1.  Should do the trick.
 
  
 
(Tux541) Well I've posted a working version of Myth Frontend v0.19-Fixes without MMX support.  Anyone who wants to download it can find it here:
 
(Tux541) Well I've posted a working version of Myth Frontend v0.19-Fixes without MMX support.  Anyone who wants to download it can find it here:
  
 
[http://www.wipzradio.com/files/mythfrontend-0-19-fixes-x86-nommx.dmg  www.wipzradio.com mythfrontend]
 
[http://www.wipzradio.com/files/mythfrontend-0-19-fixes-x86-nommx.dmg  www.wipzradio.com mythfrontend]
 
(tji) Hey Tux, I finally got the MMX version to build..  Do you have an ftp server I can xfer it to you on?
 
 
(Tux541) Sure, ftp, login as anonymous and dump the file in the upload directory.  As soon as it's done I will post it for you.
 
 
(tji) It's in transit now..  I just tar'd up the app and bzipped it.  It is just the frontend, and doesn't include any of the plugins.  Thanks!
 
  
 
(Tux541) Here is the updated version of Myth Frontend v0.19-Fixes with MMX support from tji.
 
(Tux541) Here is the updated version of Myth Frontend v0.19-Fixes with MMX support from tji.
Line 36: Line 21:
 
Interestingly, if I turn off 'Scale Video as Necessary' in TV Settings->Playback, then the problem goes away, at least for the 480i content. There is a corresponding impact to the profile information that Shark reports. The difference appears to be the YUV422_UC_ToRGB32BitColorBGRA QuickTimeComponents function, which is the primary consumer of cycles in everything except the '480i, do not scale video' case. Checking/unchecking the scale video setting has no effect on the performance of 1080i playback.
 
Interestingly, if I turn off 'Scale Video as Necessary' in TV Settings->Playback, then the problem goes away, at least for the 480i content. There is a corresponding impact to the profile information that Shark reports. The difference appears to be the YUV422_UC_ToRGB32BitColorBGRA QuickTimeComponents function, which is the primary consumer of cycles in everything except the '480i, do not scale video' case. Checking/unchecking the scale video setting has no effect on the performance of 1080i playback.
  
<pre>
+
(tji) I don't see the YUV2RGB conversion at all on mine, that is done in hardware.   What kind of system is this?  Is it running an unaccelerated video driver?  Is it non-Apple hardware?
Shark Time Profile of Mythfrontend Intel MMX build playing 1080i content at 1920x1080 on core duo 1.66GHz mac mini
 
 
 
26.5% 26.5% QuickTimeComponents YUV422_UC_ToRGB32BitColorBGRA
 
18.7% 18.7% mythtv non_vec_yuv420_2vuy(unsigned char*, unsigned char*, unsigned char*, unsigned char*, int, int, int, int, int)
 
8.8% 8.8% mythavcodec mpeg_decode_mb
 
5.3% 5.3% mythavcodec ff_simple_idct_add_mmx
 
3.8% 3.8% mach_kernel ml_set_interrupts_enabled
 
3.4% 3.4% mythavcodec put_pixels16_xy2_mmx
 
3.3% 3.3% mythavcodec put_pixels16_mmx
 
2.9% 2.9% mythavcodec MPV_decode_mb
 
2.9% 2.9% mythavcodec put_pixels8_mmx
 
1.9% 1.9% mythavcodec ff_simple_idct_put_mmx
 
 
 
Shark Time Profile of Mythfrontend Intel MMX build playing 480i content at 1920x1080 (With TV Settings->Scale Video as Necessary checked) on core duo 1.66GHz mac mini
 
 
 
56.8% 56.8% QuickTimeComponents YUV422_UC_ToRGB32BitColorBGRA
 
11.9% 11.9% mach_kernel ml_set_interrupts_enabled
 
5.4% 5.4% mythtv non_vec_yuv420_2vuy(unsigned char*, unsigned char*, unsigned char*, unsigned char*, int, int, int, int, int)
 
3.2% 3.2% mythavcodec mpeg_decode_mb
 
2.5% 2.5% mythavcodec ff_mpa_synth_filter
 
2.1% 2.1% mythavcodec ff_simple_idct_add_mmx
 
1.3% 1.3% mythavcodec put_pixels8_mmx
 
1.0% 1.0% AudioToolbox Resampler2::ConvertAltivec(float*, float*, unsigned long, int)
 
1.0% 1.0% mythavcodec put_pixels16_mmx
 
0.9% 0.9% mythavcodec MPV_decode_mb
 
0.7% 0.7% mythtv AvFormatDecoder::MpegPreProcessPkt(AVStream*, AVPacket*)
 
0.6% 0.6% mythavcodec put_pixels16_xy2_mmx
 
0.5% 0.5% mythavcodec MPV_motion
 
 
 
Shark Time Profile of Mythfrontend Intel MMX build playing 480i content at 1920x1080 (With TV Settings->Scale Video as Necessary unchecked) on core duo 1.66GHz mac mini
 
 
 
23.9% 23.9% mach_kernel ml_set_interrupts_enabled
 
9.5% 9.5% mythtv non_vec_yuv420_2vuy(unsigned char*, unsigned char*, unsigned char*, unsigned char*, int, int, int, int, int)
 
7.8% 7.8% commpage [libSystem.B.dylib] __memcpy
 
6.9% 6.9% mythavcodec mpeg_decode_mb
 
5.9% 5.9% mythavcodec ff_mpa_synth_filter
 
4.8% 4.8% mythavcodec ff_simple_idct_add_mmx
 
3.2% 3.2% AudioToolbox Resampler2::ConvertAltivec(float*, float*, unsigned long, int)
 
2.1% 2.1% mythavcodec put_pixels8_mmx
 
1.8% 1.8% mythavcodec put_pixels16_mmx
 
1.8% 1.8% mythavcodec MPV_decode_mb
 
 
 
Here's the call tree for how mythtv reaches the expensive Quicktime function:
 
 
 
27.2% 27.2% QuickTimeComponents YUV422_UC_ToRGB32BitColorBGRA
 
0.0% 27.2% QuickTimeComponents FinalGlueBeforeTheBlit
 
0.0% 27.2% QuickTimeComponents PrepareForBlitThenDoBlit
 
0.0% 27.2% QuickTimeComponents ScalingCodecComponentDispatch
 
0.0% 27.2% CarbonCore CallComponentDispatch
 
0.0% 27.2% QuickTimeComponents ImageCodecDrawBand
 
0.0% 27.2% QuickTimeComponents BaseCodec_DecompressWorkFunction
 
0.0% 27.2% CarbonCore InvokeComponentMPWorkFunctionUPP
 
0.0% 27.2% QuickTimeComponents BaseCodec_DecompressCallBack_Common
 
0.0% 27.2% QuickTimeComponents Base_CDBandDecompress
 
0.0% 27.2% CarbonCore CallComponentFunctionCommon
 
0.0% 27.2% QuickTimeComponents Base_CDComponentDispatch
 
0.0% 27.2% QuickTimeComponents ScalingCodecComponentDispatch
 
0.0% 27.2% QuickTimeComponents YUV422CodecComponentDispatch
 
0.0% 27.2% CarbonCore CallComponentDispatch
 
0.0% 27.2% QuickTime ImageCodecBandDecompress
 
0.0% 27.2% QuickTime DoBandedDecompress
 
0.0% 27.2% QuickTime ICMAction
 
0.0% 27.2% QuickTime ICMDeviceLoop
 
0.0% 27.2% QuickTime DecompressSequenceFrameWhen
 
0.0% 27.2% mythtv VideoOutputQuartzView::Show()
 
</pre>
 
  
 
== Build Status ==
 
== Build Status ==

Revision as of 14:35, 12 April 2006

Binary Packages?

(Tux541) Well I've posted a working version of Myth Frontend v0.19-Fixes without MMX support. Anyone who wants to download it can find it here:

www.wipzradio.com mythfrontend

(Tux541) Here is the updated version of Myth Frontend v0.19-Fixes with MMX support from tji.

www.wipzradio.com MythFrontend-MMX

(mmead) Thanks for the updated MMX instructions - I've gotten a (non fixes branch) 0.19 built with MMX at www.goof.com Mythfrontend-0.19-intel-mmx.dmg.bz2. Using a Mac mini intel duo core 1.66Ghz, I see ~85% CPU use by mythfrontend when playing 1080i with bob deinterlacing over nfs and ~68% when playing 720p over nfs.

(mmead) www.goof.com Mythfrontend-0.19-fixes-20060407-intel-mmx.dmg.bz2

(tji) That's similar performance to what I'm seeing.. I got between 85-95% with 1080i filmed material, and 95-99% with 1080i sports video. I think that's because of the field/frame rate of the source material. With 720p, I also got around 70% cpu.

In looking at the performance info via 'shark', the two biggest CPU users are the yuv420-2vuy colorspace conversion, and for 1080i, the deinterlacing. The deinterlacing is already MMX accelerated. But, the colorspace conversion is not. If we can find/create mmx code to do that, we can probably save 5-10% more cpu time.

(flaggz) I'm getting very choppy performance on a 1.66GHz core duo with the MMX enabled binaries linked below. This applies to both 1080i content, and scaled 480i content, which I found pretty strange. For comparison, the latest trunk builds of VLC play these same files perfectly over the network, so the machine is clearly capable.

Interestingly, if I turn off 'Scale Video as Necessary' in TV Settings->Playback, then the problem goes away, at least for the 480i content. There is a corresponding impact to the profile information that Shark reports. The difference appears to be the YUV422_UC_ToRGB32BitColorBGRA QuickTimeComponents function, which is the primary consumer of cycles in everything except the '480i, do not scale video' case. Checking/unchecking the scale video setting has no effect on the performance of 1080i playback.

(tji) I don't see the YUV2RGB conversion at all on mine, that is done in hardware. What kind of system is this? Is it running an unaccelerated video driver? Is it non-Apple hardware?

Build Status

(tji) My current status:

  • 0.20 SVN non-MMX:

Frontend runs, communicates with backend, and can view live TV. My Core Duo mini is not fast enough to display smooth HD 1080i with this build.

I must have a MySQL version imcompatibility. My FE/BE communications have some problems.. displaying the list of recorded shows fails. I can see the data being transferred, but it hangs requesting channel icons ( 2006-03-17 10:17:23.454 MSqlQuery: SELECT icon FROM channel WHERE chanid = '1020' ; ) It hangs, repeating that sql request every half second. Anyone else seeing this?

(jpg)I had/have a similar problem [SELECT icon FROM channel]... it's not actually hanging for me, if you hit escape you will go back to the menu.

  • 0.20 SVN with MMX enabled:

Same as above, except 1080i HD displays smoothly, taking 85-95% of one CPU on a Core Duo Mini.

  • 0.19-fixes non-MMX:

Builds cleanly. Requires some of the older patches, since this branch wasn't updated with all the 0.20 fixes. All menus and program listings work fine. Can play live video or select recorded. Cannot play smooth HD video on Core Cuo Mini (needs MMX enhancements).

  • 0.19-fixes with-MMX:

Same as above, except MMX is working, and I'm getting video playback with less than 100% cpu.

MySQL

(Gaspode) Yes I have the same problem as (tji) - the Mac frontend communicates with the linux backend - and the linux backed responds - but the frontend does not seem to receive it.


(tji) Do you get complete failure of communication, or partial? On mine, I can view Live TV, and navigate some menus, but viewing the recorded program list fails, and navigating into setup menus fail.

running "mythfrontend -v all" from the command line shows more debugging info. When I try to access the recorded programs menu, it just scrolls the same message "MSqlQuery: SELECT icon FROM channel WHERE chanid = '1020' ;" I did a network sniff, and verified the communication is working, and the response appears to be okay, but the frontend doesn't accept it.

I'm wondering if it's a version incompatibility between MySQL client libs and server..


(Tux541) I had the same problem with mine, but only once. The very first time I tried to connect my frontend to my backend, after that it was fine.


(TTT_Travis) I opened the app it showed the setup screen so I set it up and then when I open it it just hangs sorta, icon just bounces and bounces for like minutes then closes


(Tux541) Try running it from a terminal. That happened to me when it can't connect to your database. If you run it from a terminal you will see it sits there trying to connect, then times out after 60 seconds, then tries again. If so try rm -rf /Users/*username*/.mythtv. This will blow out your settings, then try it again. This might be related to some of MySQL problems were seeing. By the way... What version of MythTV are running on the backend and what version of MySQL.


(Gaspode) Partial failure - Live tv works - menus work (except menus that trigger an sql query - (eg. setup, recorded programs) I used ethereal to sniff the network and the backend does respond to the front end. Also logged in to the backend mysql using the client on the frontend and verified that communication works.

I don't think it is a version problem (I have the same mysql version on the backend and the frontend) .It's either QT doing something strange to the data or the frontend itself.


(tji) Good info.. I'll try a newer version of QT, once I go back to messing with 0.20. I used the '20060321' snapshot of 3.3.6 with MythTV 0.19-fixes, and it worked fine there.


(Gaspode) Sorry , I should clarify that - I think it's either QT doing something strange to the data, or it is something in the frontend code.