[vlc-devel] [PATCH] blend: Handle alpha when blending in RGBA?buffers

Martin Storsjö martin at martin.st
Fri Jan 17 11:12:31 CET 2014


On Thu, 16 Jan 2014, Martin Storsjö wrote:

> On Thu, 16 Jan 2014, Steinar H. Gunderson wrote:
>
>> On Thu, Jan 16, 2014 at 10:43:06PM +0800, Rémi Denis-Courmont wrote:
>>> Is this patch not preventing unrolling? If so, performance will be rather
>>> badly affected? (Yes, obviously this depends on the compiler)
>> 
>> Well, obviously you won't know without testing, but ifs in general don't
>> prevent unrolling. (Of course, the ideal case here is that the if is 
>> hoisted
>> out of the loop.)
>
> In this case, has_alpha is actually a template parameter so the ifs should 
> (didn't check but I'd hope so) be stripped out by the compiler altogether.

So is there any other objections to the patch, given that has_alpha is a 
compile-time constant?

// Martin


More information about the vlc-devel mailing list