74 output[0] = (inputColor[0] + inputColor[1] + inputColor[2]) / 3.0f;
163 output[0] = (input[0] + input[1] + input[2]) / 3.0f;
200 inputColor[0], inputColor[1], inputColor[2], &color[0], &color[1], &color[2], this->m_mode);
205 output[3] = inputColor[3];
251 output[3] = inputColor[3];
276 output[3] = inputColor[3];
301 output[3] = inputColor[3];
320 output[3] = inputColor[3];
342 output[3] = inputColor[3];
362 alpha = inputValue[3];
392 alpha = inputValue[3];
406 this->m_inputOperation =
nullptr;
415 this->m_inputOperation =
nullptr;
425 output[0] = input[this->m_channel];
438 this->m_inputChannel1Operation =
nullptr;
439 this->m_inputChannel2Operation =
nullptr;
440 this->m_inputChannel3Operation =
nullptr;
441 this->m_inputChannel4Operation =
nullptr;
454 this->m_inputChannel1Operation =
nullptr;
455 this->m_inputChannel2Operation =
nullptr;
456 this->m_inputChannel3Operation =
nullptr;
457 this->m_inputChannel4Operation =
nullptr;
466 if (this->m_inputChannel1Operation) {
467 this->m_inputChannel1Operation->
readSampled(input,
x,
y, sampler);
470 if (this->m_inputChannel2Operation) {
471 this->m_inputChannel2Operation->
readSampled(input,
x,
y, sampler);
474 if (this->m_inputChannel3Operation) {
475 this->m_inputChannel3Operation->
readSampled(input,
x,
y, sampler);
478 if (this->m_inputChannel4Operation) {
479 this->m_inputChannel4Operation->
readSampled(input,
x,
y, sampler);
MINLINE float max_ff(float a, float b)
void hsv_to_rgb_v(const float hsv[3], float r_rgb[3])
void rgb_to_hsv_v(const float rgb[3], float r_hsv[3])
#define BLI_YUV_ITU_BT709
#define BLI_YCC_JFIF_0_255
void ycc_to_rgb(float y, float cb, float cr, float *r_r, float *r_g, float *r_b, int colorspace)
#define BLI_YCC_ITU_BT601
void rgb_to_ycc(float r, float g, float b, float *r_y, float *r_cb, float *r_cr, int colorspace)
void rgb_to_yuv(float r, float g, float b, float *r_y, float *r_u, float *r_v, int colorspace)
void yuv_to_rgb(float y, float u, float v, float *r_r, float *r_g, float *r_b, int colorspace)
#define BLI_YCC_ITU_BT709
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void zero_v3(float r[3])
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
BLI_INLINE float IMB_colormanagement_get_luminance(const float rgb[3])
CombineChannelsOperation()
void deinitExecution() override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void initExecution() override
void deinitExecution() override
SocketReader * m_inputOperation
void initExecution() override
ConvertColorToBWOperation()
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
ConvertColorToValueOperation()
ConvertColorToVectorOperation()
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
ConvertHSVToRGBOperation()
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
ConvertPremulToStraightOperation()
ConvertRGBToHSVOperation()
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
ConvertRGBToYCCOperation()
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
ConvertRGBToYUVOperation()
ConvertStraightToPremulOperation()
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
ConvertValueToColorOperation()
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
ConvertValueToVectorOperation()
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
ConvertVectorToColorOperation()
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
ConvertVectorToValueOperation()
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
ConvertYCCToRGBOperation()
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
ConvertYUVToRGBOperation()
void readSampled(float result[4], float x, float y, PixelSampler sampler)
void addInputSocket(DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
void addOutputSocket(DataType datatype)
void setResolutionInputSocketIndex(unsigned int index)
set the index of the input socket that will determine the resolution of this operation
SocketReader * getInputSocketReader(unsigned int inputSocketindex)
void deinitExecution() override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void initExecution() override
SeparateChannelOperation()
static CCL_NAMESPACE_BEGIN const double alpha
@ Vector
Vector data type.