[mythtv] [PATCH] Denoise3D MMX support patch

Andrew Mahone andrewmahone at eml.cc
Tue Oct 14 08:20:27 EDT 2003


This patch adds CPU detection and MMX support to the denoise3d filter port.  
There is a very tiny different in the output of the MMX/non-MMX filters, as 
the original filter does temporal filtering on the top-left pixel first, and 
the MMX version does horizontal, then vertical, then temporal for each row.  
This should not have a visible effect on the output.  On my Athlon XP 2100+, 
watching with non-MMX filter floats from 80-85% CPU, MMX floats from 60-75% 
CPU (not sure why the much wider variation), and unfiltered runs around 60% 
CPU, all with 480x480 video.  I'd be interested in hearing how this runs on 
slower CPUs.

I'm not quite up to inline assembly with GCC, so my code uses the builtin 
vector types and functions.  I've looked over the assembly output, and to my 
eye, it doesn't look like GCC generates terrible code.  For pre-3.1 GCC, 
removing the MMX_BUILTINS define in settings.pro and the -mmmx argument to 
gcc in filters/denoise3d/denoise3d.pro will allow it to compile without MMX 
support.  If somebody better with inline assembly wants to port these 
changes, the builtins are used inside addLineMMX and subLineMMX, and to call 
emms at the end of denoise3DFilterMMX.  I've split the defines for the 
builtins into a separate header file, mmx_builtins.h.

This patch is bloated significantly by the fact that I've run indent on the 
source files, to clean up the different code styles between the stuff I 
wrote, the stuff I borrowed from linearblend, and the stuff I borrowed from 
mplayer.  I've bzipped it in case of message size limits.
-- 
  Andrew Mahone
  andrewmahone AT eml DOT cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythtv-denoise3d-mmx.patch.bz2
Type: application/x-bzip2
Size: 5661 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20031014/1b462234/mythtv-denoise3d-mmx.patch.bin


More information about the mythtv-dev mailing list