:: Re: [Frei0r] [PATCH] Add "colgate",…
Top Pagina
Delete this message
Reply to this message
Auteur: Dan Dennedy
Datum:  
Aan: Minimalistic plugin API for video effects
Onderwerp: Re: [Frei0r] [PATCH] Add "colgate", a new color correction plugin.
On Wed, Sep 19, 2012 at 11:06 AM, Steinar H. Gunderson
<sgunderson@???> wrote:
> On Wed, Sep 19, 2012 at 10:57:28AM -0700, Dan Dennedy wrote:
>> a couple of other plugins are doing:
>>
>> #if defined(_MSC_VER)
>> __inline const long int lrintf(float x){
>>         return (long int)(x+0.5);
>> }
>> #endif /* _MSC_VER */

>
> That is wrong, though; it is mis-rounding both negative numbers (like -0.7)
> and some positive numbers (like 0.5). It is also slow (exactly how slow
> depends on the instruction set available; with SSE, it's okay-ish,
> but on x87, it involves fiddling with the control word).
>
> The “const” seems redundant, by the way.
>
>> Do you want to provide an update with that?
>
> For colgate, we can probably live with a wrong-and-slow lrintf() replacement,
> so if it helps you, I can include that, sure.


We can incude your plugin as-is. Then, the next time someone tries to
build on MSVC and fails, they may provide a patch that basically
copies the above into colgate and we negligently commit. So, you can
provide an updated patch with a better rounding for MSVC, or not. Your
choice. Personally, I don't use MSVC, and we have no quality control
mechanism in place to ensure MSVC compatibility anyways. So, it's not
like we can make the claim and guarantee support for it. Instead, we
let those who need it tend to it.

--
+-DRD-+