[mythtv] MMX/3DNow!/SSE OSD blends

Andrew Mahone andrewmahone at eml.cc
Wed Feb 18 03:42:59 EST 2004


On Tuesday 17 February 2004 13:00, Isaac Richards wrote:
> It's pretty close, but there are minor differences that may make
> consolidation difficult..  Font blending is a single static source color
> with the alpha channel provided in the font bitmap, the position sliders
> are generated from the first column of an image, the edit slider is
> generated like the normal sliders, but with multiple images, etc, etc...

The constant color blend is probably worth a special case, as I can set up the 
"unpacked" color values once at the beginning, instead of having to fetch and 
unpack them.  I haven't looked too deeply at osdtypes, but I think maybe I 
can come up with something that could handle most of them.  The blend 
function I'm already working on will blend an arbitrary rectangular region of 
the source image onto the destination.  Would that be enough for all of the 
cases in osdtypes, with the allowance that some may need to do more than one 
blend?

I also noticed an oddity in the loop in ttfont, which starts with something 
along the lines of:

for (y = 0; y < height; y++)
{
    if (y + ystart < 0)
        continue;
...

Since no other operations are performed before the continue, wouldn't this be 
equivalent:

for (y = -ystart; y < height; y++)
{
...

I'd imagine the second version is more efficient, unless gcc does some very 
smart optimization here.
-- 
Andrew Mahone
andrewmahone AT eml DOT cc


More information about the mythtv-dev mailing list