Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2021-03-26 14:39:54 +0300
committerJeroen Bakker <jeroen@blender.org>2021-03-26 17:51:06 +0300
commite5fb7eac85f60a301f7bf742b12bb04a795d0f31 (patch)
treefee496a0bbea0192537832a3a88fa11b9de01eff /source/blender
parent23b1872d6e45fd40aaf5040c1553bfbd524e0a11 (diff)
Cleanup: Use Enum Class For PixelSampler.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/compositor/intern/COM_SocketReader.h12
-rw-r--r--source/blender/compositor/operations/COM_BlurBaseOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.cc10
-rw-r--r--source/blender/compositor/operations/COM_CompositorOperation.cc6
-rw-r--r--source/blender/compositor/operations/COM_DirectionalBlurOperation.cc4
-rw-r--r--source/blender/compositor/operations/COM_DisplaceOperation.cc8
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.cc12
-rw-r--r--source/blender/compositor/operations/COM_MapUVOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_MovieClipOperation.cc6
-rw-r--r--source/blender/compositor/operations/COM_MovieDistortionOperation.cc4
-rw-r--r--source/blender/compositor/operations/COM_MultilayerImageOperation.cc6
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_PreviewOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.cc8
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.cc6
-rw-r--r--source/blender/compositor/operations/COM_RotateOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_ScaleOperation.cc10
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cc4
-rw-r--r--source/blender/compositor/operations/COM_SplitOperation.cc4
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_ViewerOperation.cc6
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.cc2
26 files changed, 65 insertions, 65 deletions
diff --git a/source/blender/compositor/intern/COM_SocketReader.h b/source/blender/compositor/intern/COM_SocketReader.h
index 7c4132efe60..4074f5e759f 100644
--- a/source/blender/compositor/intern/COM_SocketReader.h
+++ b/source/blender/compositor/intern/COM_SocketReader.h
@@ -29,11 +29,11 @@
# include "MEM_guardedalloc.h"
#endif
-typedef enum PixelSampler {
- COM_PS_NEAREST = 0,
- COM_PS_BILINEAR = 1,
- COM_PS_BICUBIC = 2,
-} PixelSampler;
+enum class PixelSampler {
+ Nearest = 0,
+ Bilinear = 1,
+ Bicubic = 2,
+};
class MemoryBuffer;
@@ -81,7 +81,7 @@ class SocketReader {
*/
virtual void executePixel(float output[4], int x, int y, void * /*chunkData*/)
{
- executePixelSampled(output, x, y, COM_PS_NEAREST);
+ executePixelSampled(output, x, y, PixelSampler::Nearest);
}
/**
diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.cc b/source/blender/compositor/operations/COM_BlurBaseOperation.cc
index fe6ca1cfd4e..b5c60b638d8 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.cc
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cc
@@ -167,7 +167,7 @@ void BlurBaseOperation::updateSize()
{
if (!this->m_sizeavailable) {
float result[4];
- this->getInputSocketReader(1)->readSampled(result, 0, 0, COM_PS_NEAREST);
+ this->getInputSocketReader(1)->readSampled(result, 0, 0, PixelSampler::Nearest);
this->m_size = result[0];
this->m_sizeavailable = true;
}
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cc b/source/blender/compositor/operations/COM_BokehBlurOperation.cc
index 7bb8cd49bfc..8041cb2c6cf 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.cc
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cc
@@ -76,7 +76,7 @@ void BokehBlurOperation::executePixel(float output[4], int x, int y, void *data)
float tempBoundingBox[4];
float bokeh[4];
- this->m_inputBoundingBoxReader->readSampled(tempBoundingBox, x, y, COM_PS_NEAREST);
+ this->m_inputBoundingBoxReader->readSampled(tempBoundingBox, x, y, PixelSampler::Nearest);
if (tempBoundingBox[0] > 0.0f) {
float multiplier_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
@@ -90,7 +90,7 @@ void BokehBlurOperation::executePixel(float output[4], int x, int y, void *data)
zero_v4(color_accum);
if (pixelSize < 2) {
- this->m_inputProgram->readSampled(color_accum, x, y, COM_PS_NEAREST);
+ this->m_inputProgram->readSampled(color_accum, x, y, PixelSampler::Nearest);
multiplier_accum[0] = 1.0f;
multiplier_accum[1] = 1.0f;
multiplier_accum[2] = 1.0f;
@@ -115,7 +115,7 @@ void BokehBlurOperation::executePixel(float output[4], int x, int y, void *data)
for (int nx = minx; nx < maxx; nx += step) {
float u = this->m_bokehMidX - (nx - x) * m;
float v = this->m_bokehMidY - (ny - y) * m;
- this->m_inputBokehProgram->readSampled(bokeh, u, v, COM_PS_NEAREST);
+ this->m_inputBokehProgram->readSampled(bokeh, u, v, PixelSampler::Nearest);
madd_v4_v4v4(color_accum, bokeh, &buffer[bufferindex]);
add_v4_v4(multiplier_accum, bokeh);
bufferindex += offsetadd;
@@ -127,7 +127,7 @@ void BokehBlurOperation::executePixel(float output[4], int x, int y, void *data)
output[3] = color_accum[3] * (1.0f / multiplier_accum[3]);
}
else {
- this->m_inputProgram->readSampled(output, x, y, COM_PS_NEAREST);
+ this->m_inputProgram->readSampled(output, x, y, PixelSampler::Nearest);
}
}
@@ -224,7 +224,7 @@ void BokehBlurOperation::updateSize()
{
if (!this->m_sizeavailable) {
float result[4];
- this->getInputSocketReader(3)->readSampled(result, 0, 0, COM_PS_NEAREST);
+ this->getInputSocketReader(3)->readSampled(result, 0, 0, PixelSampler::Nearest);
this->m_size = result[0];
CLAMP(this->m_size, 0.0f, 10.0f);
this->m_sizeavailable = true;
diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cc b/source/blender/compositor/operations/COM_CompositorOperation.cc
index 0454bae8b38..e011d81443f 100644
--- a/source/blender/compositor/operations/COM_CompositorOperation.cc
+++ b/source/blender/compositor/operations/COM_CompositorOperation.cc
@@ -196,14 +196,14 @@ void CompositorOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/)
for (x = x1; x < x2 && (!breaked); x++) {
int input_x = x + dx, input_y = y + dy;
- this->m_imageInput->readSampled(color, input_x, input_y, COM_PS_NEAREST);
+ this->m_imageInput->readSampled(color, input_x, input_y, PixelSampler::Nearest);
if (this->m_useAlphaInput) {
- this->m_alphaInput->readSampled(&(color[3]), input_x, input_y, COM_PS_NEAREST);
+ this->m_alphaInput->readSampled(&(color[3]), input_x, input_y, PixelSampler::Nearest);
}
copy_v4_v4(buffer + offset4, color);
- this->m_depthInput->readSampled(color, input_x, input_y, COM_PS_NEAREST);
+ this->m_depthInput->readSampled(color, input_x, input_y, PixelSampler::Nearest);
zbuffer[offset] = color[0];
offset4 += COM_NUM_CHANNELS_COLOR;
offset++;
diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cc b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cc
index 1a2701a681d..59f06a96141 100644
--- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cc
+++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cc
@@ -66,7 +66,7 @@ void DirectionalBlurOperation::executePixel(float output[4], int x, int y, void
const int iterations = pow(2.0f, this->m_data->iter);
float col[4] = {0.0f, 0.0f, 0.0f, 0.0f};
float col2[4] = {0.0f, 0.0f, 0.0f, 0.0f};
- this->m_inputProgram->readSampled(col2, x, y, COM_PS_BILINEAR);
+ this->m_inputProgram->readSampled(col2, x, y, PixelSampler::Bilinear);
float ltx = this->m_tx;
float lty = this->m_ty;
float lsc = this->m_sc;
@@ -82,7 +82,7 @@ void DirectionalBlurOperation::executePixel(float output[4], int x, int y, void
this->m_inputProgram->readSampled(col,
cs * u + ss * v + this->m_center_x_pix,
cs * v - ss * u + this->m_center_y_pix,
- COM_PS_BILINEAR);
+ PixelSampler::Bilinear);
add_v4_v4(col2, col);
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.cc b/source/blender/compositor/operations/COM_DisplaceOperation.cc
index 12c7d29a210..89ad169785d 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.cc
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.cc
@@ -56,7 +56,7 @@ void DisplaceOperation::executePixelSampled(float output[4],
pixelTransform(xy, uv, deriv);
if (is_zero_v2(deriv[0]) && is_zero_v2(deriv[1])) {
- this->m_inputColorProgram->readSampled(output, uv[0], uv[1], COM_PS_BILINEAR);
+ this->m_inputColorProgram->readSampled(output, uv[0], uv[1], PixelSampler::Bilinear);
}
else {
/* EWA filtering (without nearest it gets blurry with NO distortion) */
@@ -76,7 +76,7 @@ bool DisplaceOperation::read_displacement(
}
float col[4];
- m_inputVectorProgram->readSampled(col, x, y, COM_PS_BILINEAR);
+ m_inputVectorProgram->readSampled(col, x, y, PixelSampler::Bilinear);
r_u = origin[0] - col[0] * xscale;
r_v = origin[1] - col[1] * yscale;
return true;
@@ -88,9 +88,9 @@ void DisplaceOperation::pixelTransform(const float xy[2], float r_uv[2], float r
float uv[2]; /* temporary variables for derivative estimation */
int num;
- m_inputScaleXProgram->readSampled(col, xy[0], xy[1], COM_PS_NEAREST);
+ m_inputScaleXProgram->readSampled(col, xy[0], xy[1], PixelSampler::Nearest);
float xs = col[0];
- m_inputScaleYProgram->readSampled(col, xy[0], xy[1], COM_PS_NEAREST);
+ m_inputScaleYProgram->readSampled(col, xy[0], xy[1], PixelSampler::Nearest);
float ys = col[0];
/* clamp x and y displacement to triple image resolution -
* to prevent hangs from huge values mistakenly plugged in eg. z buffers */
diff --git a/source/blender/compositor/operations/COM_ImageOperation.cc b/source/blender/compositor/operations/COM_ImageOperation.cc
index 06e8db7b467..6245f97fdb4 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.cc
+++ b/source/blender/compositor/operations/COM_ImageOperation.cc
@@ -123,13 +123,13 @@ static void sampleImageAtLocation(
{
if (ibuf->rect_float) {
switch (sampler) {
- case COM_PS_NEAREST:
+ case PixelSampler::Nearest:
nearest_interpolation_color(ibuf, nullptr, color, x, y);
break;
- case COM_PS_BILINEAR:
+ case PixelSampler::Bilinear:
bilinear_interpolation_color(ibuf, nullptr, color, x, y);
break;
- case COM_PS_BICUBIC:
+ case PixelSampler::Bicubic:
bicubic_interpolation_color(ibuf, nullptr, color, x, y);
break;
}
@@ -137,13 +137,13 @@ static void sampleImageAtLocation(
else {
unsigned char byte_color[4];
switch (sampler) {
- case COM_PS_NEAREST:
+ case PixelSampler::Nearest:
nearest_interpolation_color(ibuf, byte_color, nullptr, x, y);
break;
- case COM_PS_BILINEAR:
+ case PixelSampler::Bilinear:
bilinear_interpolation_color(ibuf, byte_color, nullptr, x, y);
break;
- case COM_PS_BICUBIC:
+ case PixelSampler::Bicubic:
bicubic_interpolation_color(ibuf, byte_color, nullptr, x, y);
break;
}
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cc b/source/blender/compositor/operations/COM_MapUVOperation.cc
index 7328de7f49f..dd0fbf89e3a 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.cc
+++ b/source/blender/compositor/operations/COM_MapUVOperation.cc
@@ -89,7 +89,7 @@ bool MapUVOperation::read_uv(float x, float y, float &r_u, float &r_v, float &r_
}
float vector[3];
- m_inputUVProgram->readSampled(vector, x, y, COM_PS_BILINEAR);
+ m_inputUVProgram->readSampled(vector, x, y, PixelSampler::Bilinear);
r_u = vector[0] * m_inputColorProgram->getWidth();
r_v = vector[1] * m_inputColorProgram->getHeight();
r_alpha = vector[2];
diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.cc b/source/blender/compositor/operations/COM_MovieClipOperation.cc
index 5d5880e14b0..d7f8cdb50bd 100644
--- a/source/blender/compositor/operations/COM_MovieClipOperation.cc
+++ b/source/blender/compositor/operations/COM_MovieClipOperation.cc
@@ -101,13 +101,13 @@ void MovieClipBaseOperation::executePixelSampled(float output[4],
}
else {
switch (sampler) {
- case COM_PS_NEAREST:
+ case PixelSampler::Nearest:
nearest_interpolation_color(ibuf, nullptr, output, x, y);
break;
- case COM_PS_BILINEAR:
+ case PixelSampler::Bilinear:
bilinear_interpolation_color(ibuf, nullptr, output, x, y);
break;
- case COM_PS_BICUBIC:
+ case PixelSampler::Bicubic:
bicubic_interpolation_color(ibuf, nullptr, output, x, y);
break;
}
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cc b/source/blender/compositor/operations/COM_MovieDistortionOperation.cc
index fcd482a69ef..46083e3977a 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cc
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cc
@@ -107,10 +107,10 @@ void MovieDistortionOperation::executePixelSampled(float output[4],
float u = out[0] * aspx /* + 0.5 * overscan * w */,
v = (out[1] * aspy /* + 0.5 * overscan * h */) * pixel_aspect;
- this->m_inputOperation->readSampled(output, u, v, COM_PS_BILINEAR);
+ this->m_inputOperation->readSampled(output, u, v, PixelSampler::Bilinear);
}
else {
- this->m_inputOperation->readSampled(output, x, y, COM_PS_BILINEAR);
+ this->m_inputOperation->readSampled(output, x, y, PixelSampler::Bilinear);
}
}
diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.cc b/source/blender/compositor/operations/COM_MultilayerImageOperation.cc
index 60936ee1939..312bce55eea 100644
--- a/source/blender/compositor/operations/COM_MultilayerImageOperation.cc
+++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.cc
@@ -86,13 +86,13 @@ void MultilayerColorOperation::executePixelSampled(float output[4],
else {
if (this->m_numberOfChannels == 4) {
switch (sampler) {
- case COM_PS_NEAREST:
+ case PixelSampler::Nearest:
nearest_interpolation_color(this->m_buffer, nullptr, output, x, y);
break;
- case COM_PS_BILINEAR:
+ case PixelSampler::Bilinear:
bilinear_interpolation_color(this->m_buffer, nullptr, output, x, y);
break;
- case COM_PS_BICUBIC:
+ case PixelSampler::Bicubic:
bicubic_interpolation_color(this->m_buffer, nullptr, output, x, y);
break;
}
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cc b/source/blender/compositor/operations/COM_OutputFileOperation.cc
index a6135ef064c..e8d08153626 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.cc
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.cc
@@ -191,7 +191,7 @@ static void write_buffer_rect(rcti *rect,
for (y = y1; y < y2 && (!breaked); y++) {
for (x = x1; x < x2 && (!breaked); x++) {
- reader->readSampled(color, x, y, COM_PS_NEAREST);
+ reader->readSampled(color, x, y, PixelSampler::Nearest);
for (i = 0; i < size; i++) {
buffer[offset + i] = color[i];
diff --git a/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc b/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc
index bcf79e1c6c6..598135ede6f 100644
--- a/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc
+++ b/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc
@@ -60,7 +60,7 @@ static void readCornersFromSockets(rcti *rect, SocketReader *readers[4], float c
{
for (int i = 0; i < 4; i++) {
float result[4] = {0.0f, 0.0f, 0.0f, 0.0f};
- readers[i]->readSampled(result, rect->xmin, rect->ymin, COM_PS_NEAREST);
+ readers[i]->readSampled(result, rect->xmin, rect->ymin, PixelSampler::Nearest);
corners[i][0] = result[0];
corners[i][1] = result[1];
}
diff --git a/source/blender/compositor/operations/COM_PreviewOperation.cc b/source/blender/compositor/operations/COM_PreviewOperation.cc
index 6d1199ab118..e347ff706b9 100644
--- a/source/blender/compositor/operations/COM_PreviewOperation.cc
+++ b/source/blender/compositor/operations/COM_PreviewOperation.cc
@@ -104,7 +104,7 @@ void PreviewOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/)
color[1] = 0.0f;
color[2] = 0.0f;
color[3] = 1.0f;
- this->m_input->readSampled(color, rx, ry, COM_PS_NEAREST);
+ this->m_input->readSampled(color, rx, ry, PixelSampler::Nearest);
IMB_colormanagement_processor_apply_v4(cm_processor, color);
rgba_float_to_uchar(this->m_outputBuffer + offset, color);
offset += 4;
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cc b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cc
index 5494c3cd46b..086d1da5816 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cc
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cc
@@ -103,7 +103,7 @@ void ProjectorLensDistortionOperation::updateDispersion()
this->lockMutex();
if (!this->m_dispersionAvailable) {
float result[4];
- this->getInputSocketReader(1)->readSampled(result, 1, 1, COM_PS_NEAREST);
+ this->getInputSocketReader(1)->readSampled(result, 1, 1, PixelSampler::Nearest);
this->m_dispersion = result[0];
this->m_kr = 0.25f * max_ff(min_ff(this->m_dispersion, 1.0f), 0.0f);
this->m_kr2 = this->m_kr * 20;
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cc b/source/blender/compositor/operations/COM_ReadBufferOperation.cc
index 2977e6685d2..433b24edb8c 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.cc
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cc
@@ -60,14 +60,14 @@ void ReadBufferOperation::executePixelSampled(float output[4],
}
else {
switch (sampler) {
- case COM_PS_NEAREST:
+ case PixelSampler::Nearest:
m_buffer->read(output, x, y);
break;
- case COM_PS_BILINEAR:
+ case PixelSampler::Bilinear:
default:
m_buffer->readBilinear(output, x, y);
break;
- case COM_PS_BICUBIC:
+ case PixelSampler::Bicubic:
m_buffer->readBilinear(output, x, y);
break;
}
@@ -85,7 +85,7 @@ void ReadBufferOperation::executePixelExtend(float output[4],
/* write buffer has a single value stored at (0,0) */
m_buffer->read(output, 0, 0);
}
- else if (sampler == COM_PS_NEAREST) {
+ else if (sampler == PixelSampler::Nearest) {
m_buffer->read(output, x, y, extend_x, extend_y);
}
else {
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cc b/source/blender/compositor/operations/COM_RenderLayersProg.cc
index d622e14b585..c3d127473ae 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.cc
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cc
@@ -92,7 +92,7 @@ void RenderLayersProg::doInterpolation(float output[4], float x, float y, PixelS
}
switch (sampler) {
- case COM_PS_NEAREST: {
+ case PixelSampler::Nearest: {
offset = (iy * width + ix) * this->m_elementsize;
if (this->m_elementsize == 1) {
@@ -107,12 +107,12 @@ void RenderLayersProg::doInterpolation(float output[4], float x, float y, PixelS
break;
}
- case COM_PS_BILINEAR:
+ case PixelSampler::Bilinear:
BLI_bilinear_interpolation_fl(
this->m_inputBuffer, output, width, height, this->m_elementsize, x, y);
break;
- case COM_PS_BICUBIC:
+ case PixelSampler::Bicubic:
BLI_bicubic_interpolation_fl(
this->m_inputBuffer, output, width, height, this->m_elementsize, x, y);
break;
diff --git a/source/blender/compositor/operations/COM_RotateOperation.cc b/source/blender/compositor/operations/COM_RotateOperation.cc
index c2105efe246..01b4252ddf1 100644
--- a/source/blender/compositor/operations/COM_RotateOperation.cc
+++ b/source/blender/compositor/operations/COM_RotateOperation.cc
@@ -48,7 +48,7 @@ inline void RotateOperation::ensureDegree()
{
if (!this->m_isDegreeSet) {
float degree[4];
- this->m_degreeSocket->readSampled(degree, 0, 0, COM_PS_NEAREST);
+ this->m_degreeSocket->readSampled(degree, 0, 0, PixelSampler::Nearest);
double rad;
if (this->m_doDegree2RadConversion) {
rad = DEG2RAD((double)degree[0]);
diff --git a/source/blender/compositor/operations/COM_ScaleOperation.cc b/source/blender/compositor/operations/COM_ScaleOperation.cc
index b0c9bfb2663..917d0d453e3 100644
--- a/source/blender/compositor/operations/COM_ScaleOperation.cc
+++ b/source/blender/compositor/operations/COM_ScaleOperation.cc
@@ -28,7 +28,7 @@
BaseScaleOperation::BaseScaleOperation()
{
#ifdef USE_FORCE_BILINEAR
- m_sampler = (int)COM_PS_BILINEAR;
+ m_sampler = (int)PixelSampler::Bilinear;
#else
m_sampler = -1;
#endif
@@ -89,8 +89,8 @@ bool ScaleOperation::determineDependingAreaOfInterest(rcti *input,
float scaleX[4];
float scaleY[4];
- this->m_inputXOperation->readSampled(scaleX, 0, 0, COM_PS_NEAREST);
- this->m_inputYOperation->readSampled(scaleY, 0, 0, COM_PS_NEAREST);
+ this->m_inputXOperation->readSampled(scaleX, 0, 0, PixelSampler::Nearest);
+ this->m_inputYOperation->readSampled(scaleY, 0, 0, PixelSampler::Nearest);
const float scx = scaleX[0];
const float scy = scaleY[0];
@@ -174,8 +174,8 @@ bool ScaleAbsoluteOperation::determineDependingAreaOfInterest(rcti *input,
float scaleX[4];
float scaleY[4];
- this->m_inputXOperation->readSampled(scaleX, 0, 0, COM_PS_NEAREST);
- this->m_inputYOperation->readSampled(scaleY, 0, 0, COM_PS_NEAREST);
+ this->m_inputXOperation->readSampled(scaleX, 0, 0, PixelSampler::Nearest);
+ this->m_inputYOperation->readSampled(scaleY, 0, 0, PixelSampler::Nearest);
const float scx = scaleX[0];
const float scy = scaleY[0];
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cc b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cc
index d5918dfa6f5..824957336a2 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cc
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cc
@@ -83,12 +83,12 @@ void *ScreenLensDistortionOperation::initializeTileData(rcti * /*rect*/)
if (!m_distortion_const) {
float result[4];
- getInputSocketReader(1)->readSampled(result, 0, 0, COM_PS_NEAREST);
+ getInputSocketReader(1)->readSampled(result, 0, 0, PixelSampler::Nearest);
m_distortion = result[0];
}
if (!m_dispersion_const) {
float result[4];
- getInputSocketReader(2)->readSampled(result, 0, 0, COM_PS_NEAREST);
+ getInputSocketReader(2)->readSampled(result, 0, 0, PixelSampler::Nearest);
m_dispersion = result[0];
}
diff --git a/source/blender/compositor/operations/COM_SplitOperation.cc b/source/blender/compositor/operations/COM_SplitOperation.cc
index 25438259973..b0a0cc8c68c 100644
--- a/source/blender/compositor/operations/COM_SplitOperation.cc
+++ b/source/blender/compositor/operations/COM_SplitOperation.cc
@@ -58,10 +58,10 @@ void SplitOperation::executePixelSampled(float output[4],
this->m_splitPercentage * this->getHeight() / 100.0f;
bool image1 = this->m_xSplit ? x > perc : y > perc;
if (image1) {
- this->m_image1Input->readSampled(output, x, y, COM_PS_NEAREST);
+ this->m_image1Input->readSampled(output, x, y, PixelSampler::Nearest);
}
else {
- this->m_image2Input->readSampled(output, x, y, COM_PS_NEAREST);
+ this->m_image2Input->readSampled(output, x, y, PixelSampler::Nearest);
}
}
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.cc b/source/blender/compositor/operations/COM_TranslateOperation.cc
index 7efd655b1df..639247def00 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.cc
+++ b/source/blender/compositor/operations/COM_TranslateOperation.cc
@@ -56,7 +56,7 @@ void TranslateOperation::executePixelSampled(float output[4],
float originalXPos = x - this->getDeltaX();
float originalYPos = y - this->getDeltaY();
- this->m_inputOperation->readSampled(output, originalXPos, originalYPos, COM_PS_BILINEAR);
+ this->m_inputOperation->readSampled(output, originalXPos, originalYPos, PixelSampler::Bilinear);
}
bool TranslateOperation::determineDependingAreaOfInterest(rcti *input,
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.h b/source/blender/compositor/operations/COM_TranslateOperation.h
index d55cc9096c0..2f1d6522169 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.h
+++ b/source/blender/compositor/operations/COM_TranslateOperation.h
@@ -54,9 +54,9 @@ class TranslateOperation : public NodeOperation {
{
if (!this->m_isDeltaSet) {
float tempDelta[4];
- this->m_inputXOperation->readSampled(tempDelta, 0, 0, COM_PS_NEAREST);
+ this->m_inputXOperation->readSampled(tempDelta, 0, 0, PixelSampler::Nearest);
this->m_deltaX = tempDelta[0];
- this->m_inputYOperation->readSampled(tempDelta, 0, 0, COM_PS_NEAREST);
+ this->m_inputYOperation->readSampled(tempDelta, 0, 0, PixelSampler::Nearest);
this->m_deltaY = tempDelta[0];
this->m_isDeltaSet = true;
}
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc
index ea33f3cd787..0b032d9a2d5 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc
@@ -319,7 +319,7 @@ void *InverseSearchRadiusOperation::initializeTileData(rcti *rect)
// for (int x2 = 0 ; x2 < DIVIDER ; x2 ++) {
// for (int y2 = 0 ; y2 < DIVIDER ; y2 ++) {
- // this->m_inputRadius->read(temp, rx+x2, ry+y2, COM_PS_NEAREST);
+ // this->m_inputRadius->read(temp, rx+x2, ry+y2, PixelSampler::Nearest);
// if (radius < temp[0]) {
// radius = temp[0];
// maxx = x2;
diff --git a/source/blender/compositor/operations/COM_ViewerOperation.cc b/source/blender/compositor/operations/COM_ViewerOperation.cc
index ea5937d8afb..7bbc239eae8 100644
--- a/source/blender/compositor/operations/COM_ViewerOperation.cc
+++ b/source/blender/compositor/operations/COM_ViewerOperation.cc
@@ -98,12 +98,12 @@ void ViewerOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/)
for (y = y1; y < y2 && (!breaked); y++) {
for (x = x1; x < x2; x++) {
- this->m_imageInput->readSampled(&(buffer[offset4]), x, y, COM_PS_NEAREST);
+ this->m_imageInput->readSampled(&(buffer[offset4]), x, y, PixelSampler::Nearest);
if (this->m_useAlphaInput) {
- this->m_alphaInput->readSampled(alpha, x, y, COM_PS_NEAREST);
+ this->m_alphaInput->readSampled(alpha, x, y, PixelSampler::Nearest);
buffer[offset4 + 3] = alpha[0];
}
- this->m_depthInput->readSampled(depth, x, y, COM_PS_NEAREST);
+ this->m_depthInput->readSampled(depth, x, y, PixelSampler::Nearest);
depthbuffer[offset] = depth[0];
offset++;
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cc b/source/blender/compositor/operations/COM_WriteBufferOperation.cc
index e426bc76ef3..f60315c4eea 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.cc
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cc
@@ -97,7 +97,7 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/
for (y = y1; y < y2 && (!breaked); y++) {
int offset4 = (y * memoryBuffer->getWidth() + x1) * num_channels;
for (x = x1; x < x2; x++) {
- this->m_input->readSampled(&(buffer[offset4]), x, y, COM_PS_NEAREST);
+ this->m_input->readSampled(&(buffer[offset4]), x, y, PixelSampler::Nearest);
offset4 += num_channels;
}
if (isBraked()) {