From 6a1d82490e49d1f5d73b5082516b087d44010fb8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 26 Jun 2012 01:22:05 +0000 Subject: use m_ prefix for compositor class members (all compositor operations). --- .../compositor/operations/COM_TonemapOperation.cpp | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'source/blender/compositor/operations/COM_TonemapOperation.cpp') diff --git a/source/blender/compositor/operations/COM_TonemapOperation.cpp b/source/blender/compositor/operations/COM_TonemapOperation.cpp index 7b978e0f87c..b5daf85b390 100644 --- a/source/blender/compositor/operations/COM_TonemapOperation.cpp +++ b/source/blender/compositor/operations/COM_TonemapOperation.cpp @@ -30,14 +30,14 @@ TonemapOperation::TonemapOperation() : NodeOperation() { this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE); this->addOutputSocket(COM_DT_COLOR); - this->imageReader = NULL; - this->data = NULL; - this->cachedInstance = NULL; + this->m_imageReader = NULL; + this->m_data = NULL; + this->m_cachedInstance = NULL; this->setComplex(true); } void TonemapOperation::initExecution() { - this->imageReader = this->getInputSocketReader(0); + this->m_imageReader = this->getInputSocketReader(0); NodeOperation::initMutex(); } @@ -46,11 +46,11 @@ void TonemapOperation::executePixel(float *color, int x, int y, MemoryBuffer *in AvgLogLum *avg = (AvgLogLum *)data; float output[4]; - this->imageReader->read(output, x, y, inputBuffers, NULL); + this->m_imageReader->read(output, x, y, inputBuffers, NULL); mul_v3_fl(output, avg->al); - float dr = output[0] + this->data->offset; - float dg = output[1] + this->data->offset; - float db = output[2] + this->data->offset; + float dr = output[0] + this->m_data->offset; + float dg = output[1] + this->m_data->offset; + float db = output[2] + this->m_data->offset; output[0] /= ((dr == 0.f) ? 1.0f : dr); output[1] /= ((dg == 0.f) ? 1.0f : dg); output[2] /= ((db == 0.f) ? 1.0f : db); @@ -66,14 +66,14 @@ void TonemapOperation::executePixel(float *color, int x, int y, MemoryBuffer *in void PhotoreceptorTonemapOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data) { AvgLogLum *avg = (AvgLogLum *)data; - NodeTonemap *ntm = this->data; + NodeTonemap *ntm = this->m_data; - const float f = expf(-this->data->f); + const float f = expf(-this->m_data->f); const float m = (ntm->m > 0.0f) ? ntm->m : (0.3f + 0.7f * powf(avg->auto_key, 1.4f)); const float ic = 1.0f - ntm->c, ia = 1.0f - ntm->a; float output[4]; - this->imageReader->read(output, x, y, inputBuffers, NULL); + this->m_imageReader->read(output, x, y, inputBuffers, NULL); const float L = rgb_to_luma_y(output); float I_l = output[0] + ic * (L - output[0]); @@ -94,9 +94,9 @@ void PhotoreceptorTonemapOperation::executePixel(float *color, int x, int y, Mem void TonemapOperation::deinitExecution() { - this->imageReader = NULL; - if (this->cachedInstance) { - delete cachedInstance; + this->m_imageReader = NULL; + if (this->m_cachedInstance) { + delete this->m_cachedInstance; } NodeOperation::deinitMutex(); } @@ -119,8 +119,8 @@ bool TonemapOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferO void *TonemapOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers) { lockMutex(); - if (this->cachedInstance == NULL) { - MemoryBuffer *tile = (MemoryBuffer *)imageReader->initializeTileData(rect, memoryBuffers); + if (this->m_cachedInstance == NULL) { + MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect, memoryBuffers); AvgLogLum *data = new AvgLogLum(); float *buffer = tile->getBuffer(); @@ -146,12 +146,12 @@ void *TonemapOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuff maxl = log((double)maxl + 1e-5); minl = log((double)minl + 1e-5); avl = lsum * sc; 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); - this->cachedInstance = data; + data->al = (al == 0.0f) ? 0.0f : (this->m_data->key / al); + data->igm = (this->m_data->gamma == 0.f) ? 1 : (1.f / this->m_data->gamma); + this->m_cachedInstance = data; } unlockMutex(); - return this->cachedInstance; + return this->m_cachedInstance; } void TonemapOperation::deinitializeTileData(rcti *rect, MemoryBuffer **memoryBuffers, void *data) -- cgit v1.2.3