[mythtv] Choppy performance on Mac Intel builds / scaling issue?

Todd Ignasiak ignasiak at gmail.com
Sun Mar 26 20:49:51 UTC 2006


On 3/26/06, James Mitchell <mitchell at bruteforce.org> wrote:
> In contrast to some other reports of good 1080i performance
> via the MMX enabled builds of 0.19, I'm experiencing issues
> with both 1080i content, and scaled 480i content.

When you say 'choppy' what do you mean?   Does it momentarily pause
completely, or just have motion that's not smooth?

In my non-MMX builds, I got pauses when the CPU load was to high to
keep up with the video.  With MMX enabled, I don't get the pauses.  
But, I do get a pretty severe "judder" effect on one of my locals when
they do film sourced material.    I tried it on my Linux frontend, and
the judder was barely detectable there.

When looking at my performance in Shark, YUV422_UC_ToRGB32BitColorBGRA
is not even listed.   I'm not sure when / why that comes into play.


> I'm getting very choppy performance on a 1.66GHz core duo
> with the MMX enabled binaries linked from:
>
> http://www.mythtv.org/wiki/index.php/Myth_on_Mac_x86
>
> 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.
>
> The function in question is called out of libmythtv
> VideoOutputQuartzView::Show(), and appears to be seperate
> from the non-optimized yuv420-2vuy colorspace conversion
> within the libmythtv code that some have mentioned.
>
> Is anyone else seeing this effect? Any ideas on what might
> be done to address it?
>
> I've included some of the Shark output from different test
> scenarios:
>
> 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
>
> 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%  QuickTimeComponents YUV422_UC_ToRGB32BitColorBGRA
> 0.0%   QuickTimeComponents FinalGlueBeforeTheBlit
> 0.0%   QuickTimeComponents PrepareForBlitThenDoBlit
> 0.0%   QuickTimeComponents ScalingCodecComponentDispatch
> 0.0%   CarbonCore CallComponentDispatch
> 0.0%   QuickTimeComponents ImageCodecDrawBand
> 0.0%   QuickTimeComponents BaseCodec_DecompressWorkFunction
> 0.0%   CarbonCore InvokeComponentMPWorkFunctionUPP
> 0.0%   QuickTimeComponents BaseCodec_DecompressCallBack_Common
> 0.0%   QuickTimeComponents Base_CDBandDecompress
> 0.0%   CarbonCore CallComponentFunctionCommon
> 0.0%   QuickTimeComponents Base_CDComponentDispatch
> 0.0%   QuickTimeComponents ScalingCodecComponentDispatch
> 0.0%   QuickTimeComponents YUV422CodecComponentDispatch
> 0.0%   CarbonCore CallComponentDispatch
> 0.0%   QuickTime ImageCodecBandDecompress
> 0.0%   QuickTime DoBandedDecompress
> 0.0%   QuickTime ICMAction
> 0.0%   QuickTime ICMDeviceLoop
> 0.0%   QuickTime DecompressSequenceFrameWhen
> 0.0%   mythtv VideoOutputQuartzView::Show()
>
> Thanks,
>
> James
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>


More information about the mythtv-dev mailing list