[mythtv] Building 0.20svn on MacOS x86? Change reverted

Nigel Pearson nigel at ind.tansu.com.au
Wed Jul 19 04:16:21 UTC 2006

>> So, now the conversion routine is set to NULL when altivec is not
>> available.   The change before defaulted to a non altivec routine.
>> (shown here: http://www.mythtv.org/wiki/index.php/Myth_on_Mac_x86)

	Isaac is right, 'twas never committed.
Todd, I suspect you must have had some of
those patches in your local SVN HEAD tree?

	I didn't commit the patch on the Wiki
because I was never happy with it, and thought
it would wait until I got a Intel Core Mac to
do some testing on. That ain't happened yet,
so I will have to use my brain instead:

1) videoout_quartz.cpp and yuv2rgb.*

@ -1315,10 +1315,12 @@
      data->windowedMode = 
gContext->GetNumSetting("RunFrontendInWindow", 0);
      data->correctGamma = gContext->GetNumSetting("MacGammaCorrect", 0);

      if (gContext->GetNumSetting("MacYuvConversion", 1))
          data->yuvConverter = yuv2vuy_init_altivec();
-        data->yuvConverter = NULL;
+        data->yuvConverter = yuv2vuy_init_plain();

Note that on an AltiVec machine, if the user doesn't have
"Use Altivec-enhanced color space conversion" set then the
converter is still set to NULL, and there is no crashing.
Every occurrence of data->yuvConverter has an if around it.
I am at a loss to explain why this is needed?

2) libs/libavcodec/liba52/resample.c

@@ -13,14 +13,14 @@

  #include "resample_c.c"

-#ifdef ARCH_X86
+#ifdef HAVE_MMX
  #include "resample_mmx.c"

  void* a52_resample_init(uint32_t mm_accel,int flags,int chans){
  void* tmp;

-#ifdef ARCH_X86
+#ifdef HAVE_MMX


@@ -725,7 +725,7 @@
         necessitate to modify mpegvideo.c. The problem comes from the
         fact they decided to store the quantized DC (which would lead
         to problems if Q could vary !) */
-#if (defined(ARCH_X86) || defined(ARCH_X86_64)) && !defined PIC
+#if defined(HAVE_MMX) && (defined(ARCH_X86) || defined(ARCH_X86_64)) 
&& !defined PIC
      asm volatile(
          "movl %3, %%eax         \n\t"

Probably safe, but I don't understand why:
1) other non-MMX X86 users haven't complained about this.
2) it is even necessary, given that Intel Core cpus have MMX,
and the configure script seems to set HAVE_MMX on an Intel Mac

Nigel Pearson, nigel at ind.tansu.com.au|"Now the world has gone to bed,
Telstra Net. Eng., Sydney, Australia | Darkness won't engulf my head,
Office: 9202 3900    Fax:  9261 3912 | I can see by infrared,
Mobile: 0408 664435  Home: 9792 6998 | How I hate the night." -Marvin

More information about the mythtv-dev mailing list