diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_TonemapOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_TonemapOperation.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/compositor/operations/COM_TonemapOperation.cpp b/source/blender/compositor/operations/COM_TonemapOperation.cpp index 412cdbdf661..7b978e0f87c 100644 --- a/source/blender/compositor/operations/COM_TonemapOperation.cpp +++ b/source/blender/compositor/operations/COM_TonemapOperation.cpp @@ -26,7 +26,7 @@ -TonemapOperation::TonemapOperation(): NodeOperation() +TonemapOperation::TonemapOperation() : NodeOperation() { this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE); this->addOutputSocket(COM_DT_COLOR); @@ -41,9 +41,9 @@ void TonemapOperation::initExecution() NodeOperation::initMutex(); } -void TonemapOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void * data) +void TonemapOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data) { - AvgLogLum * avg = (AvgLogLum*)data; + AvgLogLum *avg = (AvgLogLum *)data; float output[4]; this->imageReader->read(output, x, y, inputBuffers, NULL); @@ -120,10 +120,10 @@ void *TonemapOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuff { lockMutex(); if (this->cachedInstance == NULL) { - MemoryBuffer *tile = (MemoryBuffer*)imageReader->initializeTileData(rect, memoryBuffers); + MemoryBuffer *tile = (MemoryBuffer *)imageReader->initializeTileData(rect, memoryBuffers); AvgLogLum *data = new AvgLogLum(); - float * buffer = tile->getBuffer(); + float *buffer = tile->getBuffer(); float lsum = 0.0f; int p = tile->getWidth() * tile->getHeight(); @@ -131,7 +131,7 @@ void *TonemapOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuff float avl, maxl = -1e10f, minl = 1e10f; const float sc = 1.0f / p; float Lav = 0.f; - float cav[4] = {0.0f,0.0f,0.0f,0.0f}; + float cav[4] = {0.0f, 0.0f, 0.0f, 0.0f}; while (p--) { float L = rgb_to_luma_y(bc); Lav += L; @@ -139,7 +139,7 @@ void *TonemapOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuff lsum += logf(MAX2(L, 0.0f) + 1e-5f); maxl = (L > maxl) ? L : maxl; minl = (L < minl) ? L : minl; - bc+=4; + bc += 4; } data->lav = Lav * sc; mul_v3_v3fl(data->cav, cav, sc); @@ -147,7 +147,7 @@ void *TonemapOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuff data->auto_key = (maxl > minl) ? ((maxl - avl) / (maxl - minl)) : 1.f; float al = exp((double)avl); data->al = (al == 0.f) ? 0.f : (this->data->key / al); - data->igm = (this->data->gamma==0.f) ? 1 : (1.f / this->data->gamma); + data->igm = (this->data->gamma == 0.f) ? 1 : (1.f / this->data->gamma); this->cachedInstance = data; } unlockMutex(); |