This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/compositor/operations/COM_ConvertOperation.h
Campbell Barton 65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00

199 lines
4.9 KiB
C++

/*
* Copyright 2011, Blender Foundation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __COM_CONVERTOPERATION_H__
#define __COM_CONVERTOPERATION_H__
#include "COM_NodeOperation.h"
class ConvertBaseOperation : public NodeOperation {
protected:
SocketReader *m_inputOperation;
public:
ConvertBaseOperation();
void initExecution();
void deinitExecution();
};
class ConvertValueToColorOperation : public ConvertBaseOperation {
public:
ConvertValueToColorOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class ConvertColorToValueOperation : public ConvertBaseOperation {
public:
ConvertColorToValueOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class ConvertColorToBWOperation : public ConvertBaseOperation {
public:
ConvertColorToBWOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class ConvertColorToVectorOperation : public ConvertBaseOperation {
public:
ConvertColorToVectorOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class ConvertValueToVectorOperation : public ConvertBaseOperation {
public:
ConvertValueToVectorOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class ConvertVectorToColorOperation : public ConvertBaseOperation {
public:
ConvertVectorToColorOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class ConvertVectorToValueOperation : public ConvertBaseOperation {
public:
ConvertVectorToValueOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class ConvertRGBToYCCOperation : public ConvertBaseOperation {
private:
/** YCbCr mode (Jpeg, ITU601, ITU709) */
int m_mode;
public:
ConvertRGBToYCCOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
/** Set the YCC mode */
void setMode(int mode);
};
class ConvertYCCToRGBOperation : public ConvertBaseOperation {
private:
/** YCbCr mode (Jpeg, ITU601, ITU709) */
int m_mode;
public:
ConvertYCCToRGBOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
/** Set the YCC mode */
void setMode(int mode);
};
class ConvertRGBToYUVOperation : public ConvertBaseOperation {
public:
ConvertRGBToYUVOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class ConvertYUVToRGBOperation : public ConvertBaseOperation {
public:
ConvertYUVToRGBOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class ConvertRGBToHSVOperation : public ConvertBaseOperation {
public:
ConvertRGBToHSVOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class ConvertHSVToRGBOperation : public ConvertBaseOperation {
public:
ConvertHSVToRGBOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class ConvertPremulToStraightOperation : public ConvertBaseOperation {
public:
ConvertPremulToStraightOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class ConvertStraightToPremulOperation : public ConvertBaseOperation {
public:
ConvertStraightToPremulOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class SeparateChannelOperation : public NodeOperation {
private:
SocketReader *m_inputOperation;
int m_channel;
public:
SeparateChannelOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
void setChannel(int channel) { this->m_channel = channel; }
};
class CombineChannelsOperation : public NodeOperation {
private:
SocketReader *m_inputChannel1Operation;
SocketReader *m_inputChannel2Operation;
SocketReader *m_inputChannel3Operation;
SocketReader *m_inputChannel4Operation;
public:
CombineChannelsOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
};
#endif