:: Re: [Frei0r] [PATCH] Optimize the b…
Góra strony
Delete this message
Reply to this message
Autor: Steinar H. Gunderson
Data:  
Dla: Minimalistic plugin API for video effects
Temat: Re: [Frei0r] [PATCH] Optimize the balanc0r plugin using SSE2
On Fri, Sep 14, 2012 at 10:47:23AM -0700, Dan Dennedy wrote:
> Thank for you trying to help. To other committers, please do not apply
> this because there is uncertainty about its correctness in another
> thread. In that case, perhaps this should only be changed to somehow
> indicate it is deprecated. Plus...


Sorry, I didn't see the rest of your comments until now.

>> +#ifdef __SSE2__
> where is that defined? Looks gcc-specific but also in clang, but is it
> safe or dependent on some recent version of clang? I know some people
> have submitted patches to frei0r for msvc. What about that compiler?


GCC sets it if it knows compile-time that your CPU supports SSE2;
for instance, if compiling for 64-bit, or if -msse2 is given.
I don't know what MSVC or ICC does, but I couldn't find offhand a
define for the same thing.

The intrinsics used are the standard Intel intrinsics for SSE2, which as far
as I know are supported across GCC/Clang/ICC/MSVC.

> I guess it is not too big of deal if last few pixels are skipped when
> (width * height) is not a multiple of 4.


If it's not a multiple of 4, the last few pixels will be done by the scalar
loop below.

/* Steinar */
--
Homepage: http://www.sesse.net/