[mythtv] MacOS X MMX yuv420_2vuy Patch
MythTV
mythtv at taoyama.com
Fri Sep 8 19:41:34 UTC 2006
On Sep 8, 2006, at 1:04 AM, Nigel Pearson wrote:
> Debug builds revealed nothing much
> (unless I want to set breakpoints,
> memory monitors in the video buffers, et c).
>
>
>> I don't think it is the MMX code.
>
> It is looking more and more like it is, to me.
> Not _your_ MMX code, but _any_ MMX code in the vid
> output thread.
>
>
> Try this. Comment out all the MMX stuff in
> yuv2rgb.cpp and verify it all works correctly.
> Then add this:
>
> Index: videoout_quartz.cpp
> ===================================================================
> --- videoout_quartz.cpp (revision 11073)
> +++ videoout_quartz.cpp (working copy)
> @@ -1687,6 +1687,8 @@
> memcpy(pauseFrame.buf, pauseb->buf, pauseb->size);
> }
>
> +#include <libavcodec/i386/mmx.h>
> +
> void VideoOutputQuartz::ProcessFrame(VideoFrame *frame, OSD *osd,
> FilterChain *filterList,
> NuppelVideoPlayer *pipPlayer)
> @@ -1742,6 +1744,7 @@
> data->pixelLock.lock();
> if (data->pixelData)
> {
> +movq_r2r (mm2, mm4);
> if (data->yuvConverter)
> {
> data->yuvConverter((uint8_t *)(data->pixelData),
>
>
>
>
>
> and verify that it has the pausing problem?
>
> --
> Nigel Pearson, nigel at ind.tansu.com.au|"Beware - I am a carrier
> Telstra Net. Eng., Sydney, Australia | of surrealism"
> Office: 9202 3900 Fax: 9261 3912 | D A
> Mobile: 0408 664435 Home: 9792 6998 | L I
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
Nigel,
I think I know what is happening. My lack of experience in MMX
programming is showing.
Enclosed is a one line patch. I'm not at my Myth setup so I can't
test it but it compiles.
In summary, the MMX registers are shared with the Floating Point
Unit. So after you use MMX you need to execute EMMS to reset the
usage for Floating Point. If the EMMS is not executed and you try to
execute a floating point instruction the results are unpredictable.
The patch just adds a call to emms() to the end of the MMX conversion
routine.
Let me know if it works. Otherwise I'll be able to test this later
this evening.
Mino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yuv240mmx.patch
Type: application/octet-stream
Size: 267 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060908/db3c8adc/attachment.obj
More information about the mythtv-dev
mailing list