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

Nigel Pearson nigel at ind.tansu.com.au
Thu Jul 20 23:34:00 UTC 2006


> But, I can confirm that when it's set to NULL it crashes every time.

	Is it possible for you to run it in GDB
and type 'where' when it crashes?
(even better if you have time to build a debug version)




> FYI - with the plain software routine, this is one of the major CPU
> users.   I have looked around for some MMX code for this in other
> projects, but didn't find any.

	Yes, Jeremiah hand-coded this somehow.
If you have a look in videoout_quartz.cpp:


     if (data->yuvConverter)
     {
         // 2VUY data needs no header
         data->pixelSize = width * height * 2;
         data->pixmapSize = data->pixelSize;
         data->pixmap = (PlanarPixmapInfoYUV420 *) new 
char[data->pixmapSize];
         data->pixelData = data->pixmap;
     }
     else
     {
         // YUV420 uses a descriptive header
         data->pixelSize = (width * height * 3) / 2;
         data->pixmapSize = sizeof(PlanarPixmapInfoYUV420) + 
data->pixelSize;
         data->pixmap = (PlanarPixmapInfoYUV420 *) new 
char[data->pixmapSize];
         data->pixelData = &(data->pixmap[1]);

         long offset = sizeof(PlanarPixmapInfoYUV420);
         data->pixmap->componentInfoY.offset = offset;
         data->pixmap->componentInfoY.rowBytes = width;

         offset += width * height;
         data->pixmap->componentInfoCb.offset = offset;
         data->pixmap->componentInfoCb.rowBytes = width / 2;

         offset += (width * height) / 4;
         data->pixmap->componentInfoCr.offset = offset;
         data->pixmap->componentInfoCr.rowBytes = width / 2;
     }
...
         if (data->yuvConverter)
         {
             int frameSize = frame->width * frame->height;
             data->yuvConverter((uint8_t *)(data->pixelData),
                                frame->buf,
                                &frame->buf[frameSize],
                                &frame->buf[frameSize * 5 / 4],
                                frame->width, frame->height,
                                (frame->width % 2), (frame->width % 2), 
0);
         }
         else
             memcpy(data->pixelData, frame->buf, frame->size);




you will see it does some stuffing around with offsets
into a bitmap array. I suspect there is an endian issue
in some of that math, but without a real Intel machine,
it will be tedious to work this out.

--
Nigel Pearson, nigel at ind.tansu.com.au|"I haven't tested it yet, but
Telstra Net. Eng., Sydney, Australia | it should be perfectly safe."
Office: 9202 3900    Fax:  9261 3912 |"Just a bit or harmless brain
Mobile: 0408 664435  Home: 9792 6998 | manipulation, that's all" - 
Wallace



More information about the mythtv-dev mailing list