diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-04 14:20:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-04 14:20:16 +0400 |
commit | 7579a9ec37ba476b0379af227b4c704d966e8158 (patch) | |
tree | 1a57bbf41e66a3e16b924b92d5d79ebf99cab168 /source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp | |
parent | fae6c35ca7ae4e73cc32a0f5c235fd0ff8f00be1 (diff) |
code cleanup: double promotions
Diffstat (limited to 'source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp index efdf0134c4b..592ad114113 100644 --- a/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp +++ b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp @@ -86,8 +86,8 @@ static void FHT(fREAL *data, unsigned int M, unsigned int inverse) fREAL *data_nbd = &data_n[bd]; fREAL *data_bd = &data[bd]; for (k = bl; k < len; k += istep) { - t1 = fc * data_n[k] + fs * data_nbd[k]; - t2 = fs * data_n[k] - fc * data_nbd[k]; + t1 = fc * (double)data_n[k] + fs * (double)data_nbd[k]; + t2 = fs * (double)data_n[k] - fc * (double)data_nbd[k]; data_n[k] = data[k] - t1; data_nbd[k] = data_bd[k] - t2; data[k] += t1; @@ -395,7 +395,7 @@ void GlareFogGlowOperation::generateGlare(float *data, MemoryBuffer *inputTile, // linear window good enough here, visual result counts, not scientific analysis //w = (1.f-fabs(u))*(1.f-fabs(v)); // actually, Hanning window is ok, cos^2 for some reason is slower - w = (0.5f + 0.5f * cos((double)u * M_PI)) * (0.5f + 0.5f * cos((double)v * M_PI)); + w = (0.5f + 0.5f * cosf(u * (float)M_PI)) * (0.5f + 0.5f * cosf(v * (float)M_PI)); mul_v3_fl(fcol, w); ckrn->writePixel(x, y, fcol); } |