Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Performance Sanity Check?



I'd like to get a sanity check on the results I'm seeing. If this all
seems reasonable, fine. But if not, then I know I have more work to do.
Of course, suggestions for improvements are welcome.

The code I'm working on is doing a simple rectangular pixel transfer,
with possible scaling and RGB lookup table. I'm currently testing on a
dual 2GHz PowerMac with Radeon 9600 under 10.3.4. In the test case I'm
scaling a 2K x 1K image down to 700 x 350 pixels for display.

Our QuickDraw code can do this in 45 ms, or 46 ms if a 256-entry RGB LUT
is active. And that's doing a bicubic scale, not linear.

Using OpenGL, I can do this in 20 ms using a texture (and all the Apple-
recommended optimizations) or 17 ms by using glDrawPixels. Good, I'll
take that improvement. It works out to about 395 Mbytes/sec transfer rate.

But if I enable a LUT, then things go wonky. If I use GL_COLOR_TABLE with
a texture, the times go up by a factor of 20x. If I use GL_COLOR_TABLE
with glDrawPixels, it goes up by a factor of 100x! And with glDrawPixels,
there are random horizontal lines through the image if any scaling is
being done.

Judging from the dramatic slowdown, I have to assume that the color table
is being implemented in software, and very poorly at that.

I tried using glPixelMap for the LUT, with similar results.

So am I just doing something stupid? Is it a 9600-specific issue? Or just
the way it is?

-- Bob


"What is wanted is not the will to believe but the wish to find out, which
is the exact opposite" - Bertrand Russell

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.