« Return to Thread: Re: Premultiply pixel formats

Re: Premultiply pixel formats

by Lorne Laliberte :: Rate this Message:

Reply to Author | View in Thread

I'm not sure, to be honest. It isn't something I've profiled. However,
even rendering solid primitives will end up as premultiplied colors in
the destination buffer if you use (for example) bgra32 or bgra32_pre.
Only if you use bgra32_plain will the destination buffer still have
non-premultiplied colors. It's conceivable that _plain might perform a
demultiply in order to accomplish this (I haven't checked) so I
wouldn't assume it's faster for your needs without checking /
profiling it first. :)

Lorne Laliberte
Senior Software Developer, Indigo Rose Software



On Tue, Apr 28, 2009 at 9:22 AM, Vinnie <thevinn@...> wrote:

>
>> From: Vinnie <thevinn@...>
>> Whats with all the "premultiply" variations? And
>> whats the difference between regular and "plain"?
>>
>> From: Lorne Laliberte <lorne@...>
>> Ah, that's a million dollar question. The short answer:
>> I'd recommend doing everything in premultiplied colors
>> You will probably find this post in the mailing list very
>> useful:
>> http://thread.gmane.org/gmane.comp.graphics.agg/3110/focus=3112
>
> You got me excited for a moment about an easy speed-up using premultiplied pixel formats. But I have to point out that I am not using agg for doing any bitmap operations at all (with the obvious exception of sending all output into one).
>
> So I'm not doing bitmap rotation, scaling, compositing, or anything, with agg. I am performing those operations using my own optimized code. There isn't a whole lot of it, even then.
>
> Did I understand you correctly, that if I'm just rendering solid primitives there isn't much benefit to using premultiplied color values? They get premultiplied once on input, and then that calculation used throughout the rendering pipeline?
>
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> Vector-agg-general mailing list
> Vector-agg-general@...
> https://lists.sourceforge.net/lists/listinfo/vector-agg-general
>

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Vector-agg-general mailing list
Vector-agg-general@...
https://lists.sourceforge.net/lists/listinfo/vector-agg-general

 « Return to Thread: Re: Premultiply pixel formats