32 #define PEQ(X, Y) (fabsf(*X - *Y) < 1e-3f)
33 #define PCPY(DST, SRC) \
112 const int buffer_width = input_buffer->
get_width(), buffer_height = input_buffer->
get_height();
113 if (y < 0 || y >= buffer_height || x < 0 || x >= buffer_width) {
118 const float *row_curr = &
buffer[
y * buffer_width];
119 if (
x == 0 ||
x == buffer_width - 1 ||
y == 0 ||
y == buffer_height - 1) {
123 const float *row_prev = &
buffer[(
y - 1) * buffer_width],
124 *row_next = &
buffer[(
y + 1) * buffer_width];
147 unsigned char result = ((3 * ninepix[0] + 5 * ninepix[1] + 3 * ninepix[2] + 5 * ninepix[3] +
148 6 * ninepix[4] + 5 * ninepix[5] + 3 * ninepix[6] + 5 * ninepix[7] +
185 const rcti &output_area,
190 r_input_area.
xmax = output_area.
xmax + 1;
191 r_input_area.
xmin = output_area.
xmin - 1;
192 r_input_area.
ymax = output_area.
ymax + 1;
193 r_input_area.
ymin = output_area.
ymin - 1;
201 const rcti &input_area =
input->get_rect();
205 const float *row_curr =
input->get_elem(
area.xmin,
y);
206 const float *row_prev = row_curr -
input->row_stride;
207 const float *row_next = row_curr +
input->row_stride;
211 if (
x == input_area.
xmin ||
x == input_area.
xmax - 1 ||
y == input_area.
xmin ||
212 y == input_area.
ymax - 1) {
213 out[0] = row_curr[x_offset];
226 &row_prev[x_offset -
input->elem_stride],
228 &row_prev[x_offset +
input->elem_stride],
229 &row_curr[x_offset -
input->elem_stride],
231 &row_curr[x_offset +
input->elem_stride],
232 &row_next[x_offset -
input->elem_stride],
234 &row_next[x_offset +
input->elem_stride])) {
237 unsigned char result = ((3 * ninepix[0] + 5 * ninepix[1] + 3 * ninepix[2] +
238 5 * ninepix[3] + 6 * ninepix[4] + 5 * ninepix[5] +
239 3 * ninepix[6] + 5 * ninepix[7] + 3 * ninepix[8]) *
246 out[0] = row_curr[x_offset];
#define UNUSED_VARS_NDEBUG(...)
_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
void execute_pixel(float output[4], int x, int y, void *data) override
void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) override
Get input operation area being read by this operation on rendering given output area.
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
void deinit_execution() override
SocketReader * value_reader_
Cached reference to the reader.
bool determine_depending_area_of_interest(rcti *input, ReadBufferOperation *read_operation, rcti *output) override
void * initialize_tile_data(rcti *rect) override
void init_execution() override
a MemoryBuffer contains access to the data of a chunk
const int get_width() const
get the width of this MemoryBuffer
const int get_height() const
get the height of this MemoryBuffer
float * get_buffer()
get the data of this MemoryBuffer
NodeOperation contains calculation logic.
void add_output_socket(DataType datatype)
SocketReader * get_input_socket_reader(unsigned int index)
NodeOperationFlags flags_
NodeOperation * get_input_operation(int index)
virtual bool determine_depending_area_of_interest(rcti *input, ReadBufferOperation *read_operation, rcti *output)
void add_input_socket(DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
virtual void * initialize_tile_data(rcti *)
ccl_global float * buffer
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_global KernelShaderEvalInput * input
static void area(int d1, int d2, int e1, int e2, float weights[2])
static int extrapolate9(float *E0, float *E1, float *E2, float *E3, float *E4, float *E5, float *E6, float *E7, float *E8, const float *A, const float *B, const float *C, const float *D, const float *E, const float *F, const float *G, const float *H, const float *I)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static bNodeSocketTemplate inputs[]