[mythtv] MacOS X MMX yuv420_2vuy Patch

Todd Ignasiak ignasiak at gmail.com
Wed Aug 30 01:57:57 UTC 2006


On 8/29/06, Nigel Pearson <nigel at ind.tansu.com.au> wrote:
> > Attached is a patch to yuv2rgb.cpp that adds an MMX yuv420 to 2vuy
> > converter.  Using my test harness it appears to be about 8x faster
> > than the standard C implementation.
>
>         Wow. Great work, Mino.

Yes, this is fantastic!

A quick test on my Core Duo Mini shows a nice improvement.   On 1080i
(60fps video source), prior to this MMX patch top showed the
mythfrontend process taking ~94%.  After the patch the process is now
taking ~82%.   That's quite a bit larger improvement than I was
expecting.

The above tests were with recorded programs.  When I tried viewing
Live TV, it initially worked, but when I changed the channel it
crashed, and kept crashing when I restarted.  It sounds like that's
just the frontend, not this patch.

> ...
> > This patch does not fix the Quicktime crash.
>
>         Interesting. I thought the QT crash was fixed
> by a patch which used a non-assembler version,
> yuv2vuy_init_plain(). Doesn't this replace that?

I think this patch can work without the previous patch if the user has
Altivec colorspace conversion enabled..  Mino's patch adds MMX code to
the Altivec pieces.    But, if the user doesn't have that option
enabled, it will still crash.

If both patches are applied, it will run the non_vec code, because
it's IFDEF'd looking for the presence of ALTIVEC (this is what
happened to me when I first applied the patch).  Simply removing the
"#ifdef HAVE_ALTIVEC"/#endif from videoout_quartz.cpp allows it to
work in all cases.


More information about the mythtv-dev mailing list