Blender
V3.3
|
a MemoryBuffer contains access to the data of a chunk More...
#include <COM_MemoryBuffer.h>
Public Member Functions | |
MemoryBuffer (MemoryProxy *memory_proxy, const rcti &rect, MemoryBufferState state) | |
construct new temporarily MemoryBuffer for an area More... | |
MemoryBuffer (DataType data_type, const rcti &rect, bool is_a_single_elem=false) | |
construct new temporarily MemoryBuffer for an area More... | |
MemoryBuffer (float *buffer, int num_channels, int width, int height, bool is_a_single_elem=false) | |
MemoryBuffer (float *buffer, int num_channels, const rcti &rect, bool is_a_single_elem=false) | |
MemoryBuffer (const MemoryBuffer &src) | |
~MemoryBuffer () | |
destructor More... | |
bool | is_a_single_elem () const |
float & | operator[] (int index) |
const float & | operator[] (int index) const |
intptr_t | get_coords_offset (int x, int y) const |
float * | get_elem (int x, int y) |
const float * | get_elem (int x, int y) const |
void | read_elem (int x, int y, float *out) const |
void | read_elem_checked (int x, int y, float *out) const |
void | read_elem_checked (float x, float y, float *out) const |
void | read_elem_bilinear (float x, float y, float *out) const |
void | read_elem_sampled (float x, float y, PixelSampler sampler, float *out) const |
void | read_elem_filtered (float x, float y, float dx[2], float dy[2], float *out) const |
float & | get_value (int x, int y, int channel) |
const float & | get_value (int x, int y, int channel) const |
const float * | get_row_end (int y) const |
int | get_memory_width () const |
int | get_memory_height () const |
uint8_t | get_num_channels () const |
uint8_t | get_elem_bytes_len () const |
BufferRange< float > | as_range () |
BufferRange< const float > | as_range () const |
BufferArea< float > | get_buffer_area (const rcti &area) |
BufferArea< const float > | get_buffer_area (const rcti &area) const |
BuffersIterator< float > | iterate_with (Span< MemoryBuffer * > inputs) |
BuffersIterator< float > | iterate_with (Span< MemoryBuffer * > inputs, const rcti &area) |
float * | get_buffer () |
get the data of this MemoryBuffer More... | |
float * | release_ownership_buffer () |
MemoryBuffer * | inflate () const |
void | wrap_pixel (int &x, int &y, MemoryBufferExtend extend_x, MemoryBufferExtend extend_y) |
void | wrap_pixel (float &x, float &y, MemoryBufferExtend extend_x, MemoryBufferExtend extend_y) const |
void | read (float *result, int x, int y, MemoryBufferExtend extend_x=MemoryBufferExtend::Clip, MemoryBufferExtend extend_y=MemoryBufferExtend::Clip) |
void | read_no_check (float *result, int x, int y, MemoryBufferExtend extend_x=MemoryBufferExtend::Clip, MemoryBufferExtend extend_y=MemoryBufferExtend::Clip) |
void | write_pixel (int x, int y, const float color[4]) |
void | add_pixel (int x, int y, const float color[4]) |
void | read_bilinear (float *result, float x, float y, MemoryBufferExtend extend_x=MemoryBufferExtend::Clip, MemoryBufferExtend extend_y=MemoryBufferExtend::Clip) const |
void | readEWA (float *result, const float uv[2], const float derivatives[2][2]) |
bool | is_temporarily () const |
is this MemoryBuffer a temporarily buffer (based on an area, not on a chunk) More... | |
void | apply_processor (ColormanageProcessor &processor, const rcti area) |
Apply a color processor on the given area. More... | |
void | copy_from (const MemoryBuffer *src, const rcti &area) |
void | copy_from (const MemoryBuffer *src, const rcti &area, int to_x, int to_y) |
void | copy_from (const MemoryBuffer *src, const rcti &area, int channel_offset, int elem_size, int to_channel_offset) |
void | copy_from (const MemoryBuffer *src, const rcti &area, int channel_offset, int elem_size, int to_x, int to_y, int to_channel_offset) |
void | copy_from (const uchar *src, const rcti &area) |
void | copy_from (const uchar *src, const rcti &area, int channel_offset, int elem_size, int elem_stride, int row_stride, int to_channel_offset) |
void | copy_from (const uchar *src, const rcti &area, int channel_offset, int elem_size, int elem_stride, int row_stride, int to_x, int to_y, int to_channel_offset) |
void | copy_from (const struct ImBuf *src, const rcti &area, bool ensure_linear_space=false) |
void | copy_from (const struct ImBuf *src, const rcti &area, int channel_offset, int elem_size, int to_channel_offset, bool ensure_linear_space=false) |
void | copy_from (const struct ImBuf *src, const rcti &src_area, int channel_offset, int elem_size, int to_x, int to_y, int to_channel_offset, bool ensure_linear_space=false) |
void | fill (const rcti &area, const float *value) |
void | fill (const rcti &area, int channel_offset, const float *value, int value_size) |
void | fill_from (const MemoryBuffer &src) |
add the content from other_buffer to this MemoryBuffer More... | |
const rcti & | get_rect () const |
get the rect of this MemoryBuffer More... | |
const int | get_width () const |
get the width of this MemoryBuffer More... | |
const int | get_height () const |
get the height of this MemoryBuffer More... | |
void | clear () |
clear the buffer. Make all pixels black transparent. More... | |
float | get_max_value () const |
float | get_max_value (const rcti &rect) const |
Public Attributes | |
int | elem_stride |
int | row_stride |
a MemoryBuffer contains access to the data of a chunk
Definition at line 43 of file COM_MemoryBuffer.h.
blender::compositor::MemoryBuffer::MemoryBuffer | ( | MemoryProxy * | memory_proxy, |
const rcti & | rect, | ||
MemoryBufferState | state | ||
) |
construct new temporarily MemoryBuffer for an area
Definition at line 32 of file COM_MemoryBuffer.cc.
References blender::compositor::COM_data_type_num_channels(), blender::compositor::MemoryProxy::get_data_type(), MEM_mallocN_aligned, and state.
Referenced by inflate().
blender::compositor::MemoryBuffer::MemoryBuffer | ( | DataType | data_type, |
const rcti & | rect, | ||
bool | is_a_single_elem = false |
||
) |
construct new temporarily MemoryBuffer for an area
Definition at line 47 of file COM_MemoryBuffer.cc.
References blender::compositor::COM_data_type_num_channels(), is_a_single_elem(), MEM_mallocN_aligned, and blender::compositor::Temporary.
blender::compositor::MemoryBuffer::MemoryBuffer | ( | float * | buffer, |
int | num_channels, | ||
int | width, | ||
int | height, | ||
bool | is_a_single_elem = false |
||
) |
Construct MemoryBuffer from a float buffer. MemoryBuffer is not responsible for freeing it.
Definition at line 62 of file COM_MemoryBuffer.cc.
blender::compositor::MemoryBuffer::MemoryBuffer | ( | float * | buffer, |
int | num_channels, | ||
const rcti & | rect, | ||
bool | is_a_single_elem = false |
||
) |
Construct MemoryBuffer from a float buffer area. MemoryBuffer is not responsible for freeing given buffer.
Definition at line 68 of file COM_MemoryBuffer.cc.
References buffer, blender::compositor::COM_num_channels_data_type(), is_a_single_elem(), and blender::compositor::Temporary.
blender::compositor::MemoryBuffer::MemoryBuffer | ( | const MemoryBuffer & | src | ) |
Copy constructor
Definition at line 85 of file COM_MemoryBuffer.cc.
References fill_from(), and src.
blender::compositor::MemoryBuffer::~MemoryBuffer | ( | ) |
Definition at line 405 of file COM_MemoryBuffer.cc.
References color, get_coords_offset(), offset, src, x, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by blender::compositor::GlareGhostOperation::generate_glare().
void blender::compositor::MemoryBuffer::apply_processor | ( | ColormanageProcessor & | processor, |
const rcti | area | ||
) |
Apply a color processor on the given area.
Definition at line 277 of file COM_MemoryBuffer.cc.
References blender::compositor::area(), BLI_rcti_size_x(), BLI_rcti_size_y(), get_elem(), get_num_channels(), get_width(), height, IMB_colormanagement_processor_apply(), usdtokens::out(), row_stride, width, and y.
|
inline |
Get all buffer elements as a range with no offsets.
Definition at line 336 of file COM_MemoryBuffer.h.
References elem_stride.
|
inline |
Definition at line 341 of file COM_MemoryBuffer.h.
References elem_stride.
void blender::compositor::MemoryBuffer::clear | ( | ) |
clear the buffer. Make all pixels black transparent.
Definition at line 106 of file COM_MemoryBuffer.cc.
Referenced by blender::compositor::GlareStreaksOperation::generate_glare().
void blender::compositor::MemoryBuffer::copy_from | ( | const MemoryBuffer * | src, |
const rcti & | area | ||
) |
Definition at line 176 of file COM_MemoryBuffer.cc.
References blender::compositor::area(), and src.
Referenced by copy_from(), blender::compositor::DebugInfo::export_operation(), fill(), fill_from(), inflate(), blender::compositor::VectorBlurOperation::update_memory_buffer(), blender::compositor::CompositorOperation::update_memory_buffer_partial(), blender::compositor::OutputSingleLayerOperation::update_memory_buffer_partial(), blender::compositor::OutputOpenExrMultiLayerOperation::update_memory_buffer_partial(), and blender::compositor::ViewerOperation::update_memory_buffer_partial().
void blender::compositor::MemoryBuffer::copy_from | ( | const MemoryBuffer * | src, |
const rcti & | area, | ||
int | channel_offset, | ||
int | elem_size, | ||
int | to_channel_offset | ||
) |
Definition at line 190 of file COM_MemoryBuffer.cc.
References blender::compositor::area(), copy_from(), and src.
void blender::compositor::MemoryBuffer::copy_from | ( | const MemoryBuffer * | src, |
const rcti & | area, | ||
int | channel_offset, | ||
int | elem_size, | ||
int | to_x, | ||
int | to_y, | ||
int | to_channel_offset | ||
) |
Definition at line 199 of file COM_MemoryBuffer.cc.
References blender::compositor::area(), BLI_assert, is_a_single_elem(), and src.
void blender::compositor::MemoryBuffer::copy_from | ( | const MemoryBuffer * | src, |
const rcti & | area, | ||
int | to_x, | ||
int | to_y | ||
) |
Definition at line 181 of file COM_MemoryBuffer.cc.
References blender::compositor::area(), BLI_assert, copy_from(), get_num_channels(), and src.
void blender::compositor::MemoryBuffer::copy_from | ( | const struct ImBuf * | src, |
const rcti & | area, | ||
bool | ensure_linear_space = false |
||
) |
void blender::compositor::MemoryBuffer::copy_from | ( | const struct ImBuf * | src, |
const rcti & | area, | ||
int | channel_offset, | ||
int | elem_size, | ||
int | to_channel_offset, | ||
bool | ensure_linear_space = false |
||
) |
void blender::compositor::MemoryBuffer::copy_from | ( | const struct ImBuf * | src, |
const rcti & | src_area, | ||
int | channel_offset, | ||
int | elem_size, | ||
int | to_x, | ||
int | to_y, | ||
int | to_channel_offset, | ||
bool | ensure_linear_space = false |
||
) |
Definition at line 221 of file COM_MemoryBuffer.cc.
References blender::compositor::area(), copy_from(), elem_stride, get_num_channels(), get_width(), row_stride, and src.
void blender::compositor::MemoryBuffer::copy_from | ( | const uchar * | src, |
const rcti & | area, | ||
int | channel_offset, | ||
int | elem_size, | ||
int | elem_stride, | ||
int | row_stride, | ||
int | to_channel_offset | ||
) |
Definition at line 228 of file COM_MemoryBuffer.cc.
References blender::compositor::area(), copy_from(), elem_stride, row_stride, and src.
void blender::compositor::MemoryBuffer::copy_from | ( | const uchar * | src, |
const rcti & | area, | ||
int | channel_offset, | ||
int | elem_size, | ||
int | elem_stride, | ||
int | row_stride, | ||
int | to_x, | ||
int | to_y, | ||
int | to_channel_offset | ||
) |
Definition at line 247 of file COM_MemoryBuffer.cc.
References blender::compositor::area(), ASSERT_BUFFER_CONTAINS_AREA_AT_COORDS, ASSERT_VALID_ELEM_SIZE, BLI_rcti_size_x(), BLI_rcti_size_y(), elem_stride, float(), get_value(), height, row_stride, src, width, and y.
Definition at line 373 of file COM_MemoryBuffer.cc.
References blender::compositor::area(), and get_num_channels().
void blender::compositor::MemoryBuffer::fill | ( | const rcti & | area, |
int | channel_offset, | ||
const float * | value, | ||
int | value_size | ||
) |
Definition at line 378 of file COM_MemoryBuffer.cc.
References blender::compositor::area(), copy_from(), and get_rect().
void blender::compositor::MemoryBuffer::fill_from | ( | const MemoryBuffer & | src | ) |
add the content from other_buffer to this MemoryBuffer
other_buffer | source buffer |
Definition at line 387 of file COM_MemoryBuffer.cc.
References copy_from(), MAX2, MIN2, src, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by blender::compositor::WriteBufferOperation::execute_opencl_region(), get_max_value(), and MemoryBuffer().
|
inline |
get the data of this MemoryBuffer
Definition at line 363 of file COM_MemoryBuffer.h.
Referenced by blender::compositor::convolve(), blender::compositor::WriteBufferOperation::execute_opencl_region(), blender::compositor::AntiAliasOperation::execute_pixel(), blender::compositor::BokehBlurOperation::execute_pixel(), blender::compositor::DilateErodeThresholdOperation::execute_pixel(), blender::compositor::DilateDistanceOperation::execute_pixel(), blender::compositor::ErodeDistanceOperation::execute_pixel(), blender::compositor::GaussianAlphaXBlurOperation::execute_pixel(), blender::compositor::GaussianAlphaYBlurOperation::execute_pixel(), blender::compositor::GaussianBokehBlurOperation::execute_pixel(), blender::compositor::GaussianBlurReferenceOperation::execute_pixel(), blender::compositor::GaussianXBlurOperation::execute_pixel(), blender::compositor::GaussianYBlurOperation::execute_pixel(), blender::compositor::IDMaskOperation::execute_pixel(), blender::compositor::KeyingBlurOperation::execute_pixel(), blender::compositor::KeyingClipOperation::execute_pixel(), blender::compositor::VariableSizeBokehBlurOperation::execute_pixel(), blender::compositor::WriteBufferOperation::execute_region(), blender::compositor::DenoiseOperation::generate_denoise(), blender::compositor::GlareGhostOperation::generate_glare(), blender::compositor::GlareSimpleStarOperation::generate_glare(), blender::compositor::GlareStreaksOperation::generate_glare(), blender::compositor::VectorBlurOperation::generate_vector_blur(), blender::compositor::BufferOperation::get_constant_elem(), blender::compositor::DoubleEdgeMaskOperation::initialize_tile_data(), blender::compositor::FastGaussianBlurValueOperation::initialize_tile_data(), blender::compositor::InpaintSimpleOperation::initialize_tile_data(), blender::compositor::GlareBaseOperation::update_memory_buffer(), and blender::compositor::DoubleEdgeMaskOperation::update_memory_buffer().
|
inline |
Definition at line 346 of file COM_MemoryBuffer.h.
References blender::compositor::area(), elem_stride, and get_width().
|
inline |
Definition at line 351 of file COM_MemoryBuffer.h.
References blender::compositor::area(), elem_stride, and get_width().
|
inline |
Get offset needed to jump from buffer start to given coordinates.
Definition at line 171 of file COM_MemoryBuffer.h.
References elem_stride, row_stride, x, rcti::xmin, y, and rcti::ymin.
Referenced by add_pixel(), get_elem(), get_row_end(), get_value(), operator[](), read(), read_no_check(), and write_pixel().
|
inline |
Get buffer element at given coordinates.
Definition at line 179 of file COM_MemoryBuffer.h.
References BLI_assert, get_coords_offset(), x, and y.
Referenced by apply_processor(), blender::compositor::blur_pixel(), blender::compositor::colorspace_to_scene_linear(), read_elem(), blender::compositor::MixBaseOperation::update_memory_buffer_partial(), blender::compositor::BilateralBlurOperation::update_memory_buffer_partial(), blender::compositor::BokehBlurOperation::update_memory_buffer_partial(), and blender::compositor::GaussianBlurReferenceOperation::update_memory_buffer_partial().
|
inline |
Get buffer element at given coordinates.
Definition at line 188 of file COM_MemoryBuffer.h.
References BLI_assert, get_coords_offset(), x, and y.
|
inline |
Definition at line 328 of file COM_MemoryBuffer.h.
References float().
Referenced by read_elem(), and read_elem_bilinear().
|
inline |
get the height of this MemoryBuffer
Definition at line 650 of file COM_MemoryBuffer.h.
References BLI_rcti_size_y().
Referenced by blender::compositor::blur_pixel(), blender::compositor::OpenCLDevice::COM_cl_enqueue_range(), blender::compositor::convolve(), blender::compositor::WriteBufferOperation::execute_opencl_region(), blender::compositor::AntiAliasOperation::execute_pixel(), blender::compositor::KeyingBlurOperation::execute_pixel(), blender::compositor::KeyingClipOperation::execute_pixel(), blender::compositor::VariableSizeBokehBlurOperation::execute_pixel(), blender::compositor::DebugInfo::export_operation(), blender::compositor::GlareGhostOperation::generate_glare(), blender::compositor::GlareStreaksOperation::generate_glare(), get_memory_height(), operator[](), read_bilinear(), read_elem_bilinear(), read_elem_filtered(), readEWA(), and wrap_pixel().
float blender::compositor::MemoryBuffer::get_max_value | ( | ) | const |
Definition at line 133 of file COM_MemoryBuffer.cc.
References result, and size().
Referenced by blender::compositor::VariableSizeBokehBlurOperation::execute_opencl(), get_max_value(), and blender::compositor::VariableSizeBokehBlurOperation::update_memory_buffer_partial().
Definition at line 151 of file COM_MemoryBuffer.cc.
References BLI_assert, BLI_rcti_is_empty(), BLI_rcti_isect(), fill_from(), and get_max_value().
|
inline |
Get number of elements in memory for a column. For single element buffers it will always be 1.
Definition at line 318 of file COM_MemoryBuffer.h.
References get_height(), and is_a_single_elem().
|
inline |
Get the number of elements in memory for a row. For single element buffers it will always be 1.
Definition at line 309 of file COM_MemoryBuffer.h.
References get_width(), and is_a_single_elem().
|
inline |
Definition at line 323 of file COM_MemoryBuffer.h.
Referenced by apply_processor(), blender::compositor::colorspace_to_scene_linear(), copy_from(), blender::compositor::OpenCLDevice::determine_image_format(), blender::compositor::WriteBufferOperation::execute_region(), blender::compositor::DebugInfo::export_operation(), and fill().
|
inline |
get the rect of this MemoryBuffer
Definition at line 634 of file COM_MemoryBuffer.h.
Referenced by blender::compositor::OpenCLDevice::COM_cl_attach_memory_buffer_offset_to_kernel_parameter(), blender::compositor::convolve(), blender::compositor::BokehBlurOperation::execute_pixel(), blender::compositor::DilateErodeThresholdOperation::execute_pixel(), blender::compositor::DilateDistanceOperation::execute_pixel(), blender::compositor::ErodeDistanceOperation::execute_pixel(), blender::compositor::GaussianAlphaXBlurOperation::execute_pixel(), blender::compositor::GaussianAlphaYBlurOperation::execute_pixel(), blender::compositor::GaussianBokehBlurOperation::execute_pixel(), blender::compositor::GaussianXBlurOperation::execute_pixel(), blender::compositor::GaussianYBlurOperation::execute_pixel(), blender::compositor::DebugInfo::export_operation(), fill(), blender::compositor::DenoiseOperation::generate_denoise(), blender::compositor::GlareStreaksOperation::generate_glare(), blender::compositor::BokehBlurOperation::update_memory_buffer_partial(), blender::compositor::FlipOperation::update_memory_buffer_partial(), and blender::compositor::VariableSizeBokehBlurOperation::update_memory_buffer_partial().
|
inline |
Get the buffer row end.
Definition at line 299 of file COM_MemoryBuffer.h.
References BLI_assert, get_coords_offset(), get_width(), is_a_single_elem(), and y.
|
inline |
Get channel value at given coordinates.
Definition at line 281 of file COM_MemoryBuffer.h.
References BLI_assert, get_coords_offset(), x, and y.
Referenced by copy_from().
|
inline |
Get channel value at given coordinates.
Definition at line 290 of file COM_MemoryBuffer.h.
References BLI_assert, get_coords_offset(), x, and y.
|
inline |
get the width of this MemoryBuffer
Definition at line 642 of file COM_MemoryBuffer.h.
References BLI_rcti_size_x().
Referenced by apply_processor(), blender::compositor::blur_pixel(), blender::compositor::colorspace_to_scene_linear(), blender::compositor::OpenCLDevice::COM_cl_enqueue_range(), blender::compositor::convolve(), copy_from(), blender::compositor::WriteBufferOperation::execute_opencl_region(), blender::compositor::AntiAliasOperation::execute_pixel(), blender::compositor::BokehBlurOperation::execute_pixel(), blender::compositor::DilateErodeThresholdOperation::execute_pixel(), blender::compositor::DilateDistanceOperation::execute_pixel(), blender::compositor::ErodeDistanceOperation::execute_pixel(), blender::compositor::GaussianAlphaXBlurOperation::execute_pixel(), blender::compositor::GaussianAlphaYBlurOperation::execute_pixel(), blender::compositor::GaussianBokehBlurOperation::execute_pixel(), blender::compositor::GaussianXBlurOperation::execute_pixel(), blender::compositor::GaussianYBlurOperation::execute_pixel(), blender::compositor::IDMaskOperation::execute_pixel(), blender::compositor::KeyingBlurOperation::execute_pixel(), blender::compositor::KeyingClipOperation::execute_pixel(), blender::compositor::VariableSizeBokehBlurOperation::execute_pixel(), blender::compositor::WriteBufferOperation::execute_region(), blender::compositor::DebugInfo::export_operation(), blender::compositor::GlareGhostOperation::generate_glare(), blender::compositor::GlareStreaksOperation::generate_glare(), get_buffer_area(), get_memory_width(), get_row_end(), operator[](), read_bilinear(), read_elem_bilinear(), read_elem_filtered(), readEWA(), and wrap_pixel().
MemoryBuffer * blender::compositor::MemoryBuffer::inflate | ( | ) | const |
Converts a single elem buffer to a full size buffer (allocates memory for all elements in resolution).
Definition at line 125 of file COM_MemoryBuffer.cc.
References BLI_assert, copy_from(), is_a_single_elem(), and MemoryBuffer().
Referenced by blender::compositor::DenoiseOperation::generate_denoise(), blender::compositor::BufferOperation::initialize_tile_data(), blender::compositor::DoubleEdgeMaskOperation::update_memory_buffer(), and blender::compositor::VectorBlurOperation::update_memory_buffer().
|
inline |
Whether buffer is a single element in memory independently of its resolution. True for set operations buffers.
Definition at line 149 of file COM_MemoryBuffer.h.
Referenced by blender::compositor::BufferOperation::BufferOperation(), copy_from(), blender::compositor::BufferOperation::deinit_execution(), blender::compositor::DenoiseOperation::generate_denoise(), blender::compositor::BufferOperation::get_constant_elem(), get_memory_height(), get_memory_width(), get_row_end(), inflate(), blender::compositor::BufferOperation::init_execution(), blender::compositor::BufferOperation::initialize_tile_data(), MemoryBuffer(), blender::compositor::DebugInfo::operation_rendered(), blender::compositor::DoubleEdgeMaskOperation::update_memory_buffer(), and blender::compositor::VectorBlurOperation::update_memory_buffer().
|
inline |
is this MemoryBuffer a temporarily buffer (based on an area, not on a chunk)
Definition at line 563 of file COM_MemoryBuffer.h.
References blender::compositor::Temporary.
BuffersIterator< float > blender::compositor::MemoryBuffer::iterate_with | ( | Span< MemoryBuffer * > | inputs | ) |
Definition at line 111 of file COM_MemoryBuffer.cc.
References inputs.
BuffersIterator< float > blender::compositor::MemoryBuffer::iterate_with | ( | Span< MemoryBuffer * > | inputs, |
const rcti & | area | ||
) |
Definition at line 116 of file COM_MemoryBuffer.cc.
References blender::compositor::BuffersIteratorBuilder< T >::add_input(), blender::compositor::area(), blender::compositor::BuffersIteratorBuilder< T >::build(), elem_stride, input, and inputs.
|
inline |
Definition at line 154 of file COM_MemoryBuffer.h.
References BLI_assert, get_coords_offset(), get_height(), and get_width().
|
inline |
Definition at line 161 of file COM_MemoryBuffer.h.
References BLI_assert, get_coords_offset(), get_height(), and get_width().
|
inline |
Definition at line 483 of file COM_MemoryBuffer.h.
References buffer, blender::compositor::Clip, get_coords_offset(), offset, result, v, wrap_pixel(), x, rcti::xmax, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by blender::compositor::blur_pixel(), blender::compositor::DilateErodeThresholdOperation::execute_pixel(), blender::compositor::FastGaussianBlurOperation::execute_pixel(), blender::compositor::FastGaussianBlurValueOperation::execute_pixel(), blender::compositor::ProjectorLensDistortionOperation::execute_pixel(), blender::compositor::VariableSizeBokehBlurOperation::execute_pixel(), blender::compositor::ReadBufferOperation::execute_pixel_extend(), blender::compositor::ReadBufferOperation::execute_pixel_filtered(), blender::compositor::BufferOperation::execute_pixel_sampled(), blender::compositor::ReadBufferOperation::execute_pixel_sampled(), blender::compositor::GlareSimpleStarOperation::generate_glare(), and blender::compositor::GlareStreaksOperation::generate_glare().
|
inline |
Definition at line 528 of file COM_MemoryBuffer.h.
References BLI_bilinear_interpolation_wrap_fl(), copy_vn_fl(), get_height(), get_width(), blender::compositor::Repeat, result, v, wrap_pixel(), x, and y.
Referenced by blender::compositor::ProjectorLensDistortionOperation::execute_pixel(), blender::compositor::ReadBufferOperation::execute_pixel_extend(), blender::compositor::BufferOperation::execute_pixel_sampled(), blender::compositor::ReadBufferOperation::execute_pixel_sampled(), blender::compositor::GlareGhostOperation::generate_glare(), and blender::compositor::GlareStreaksOperation::generate_glare().
Definition at line 194 of file COM_MemoryBuffer.h.
References get_elem(), get_elem_bytes_len(), usdtokens::out(), x, and y.
Referenced by read_elem_checked(), blender::compositor::BokehBlurOperation::update_memory_buffer_partial(), blender::compositor::FlipOperation::update_memory_buffer_partial(), blender::compositor::GaussianBlurReferenceOperation::update_memory_buffer_partial(), and blender::compositor::ProjectorLensDistortionOperation::update_memory_buffer_partial().
|
inline |
Definition at line 214 of file COM_MemoryBuffer.h.
References BLI_bilinear_interpolation_fl(), get_elem_bytes_len(), get_height(), get_width(), usdtokens::out(), x, rcti::xmax, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by read_elem_sampled(), blender::compositor::DisplaceOperation::update_memory_buffer_partial(), blender::compositor::ProjectorLensDistortionOperation::update_memory_buffer_partial(), and blender::compositor::MapUVOperation::update_memory_buffer_started().
|
inline |
Definition at line 209 of file COM_MemoryBuffer.h.
References usdtokens::out(), read_elem_checked(), x, and y.
|
inline |
Definition at line 199 of file COM_MemoryBuffer.h.
References usdtokens::out(), read_elem(), x, and y.
Referenced by blender::compositor::blur_pixel(), read_elem_checked(), read_elem_sampled(), blender::compositor::sample(), blender::compositor::BokehBlurOperation::update_memory_buffer_partial(), blender::compositor::DisplaceSimpleOperation::update_memory_buffer_partial(), blender::compositor::SMAANeighborhoodBlendingOperation::update_memory_buffer_partial(), and blender::compositor::DisplaceOperation::update_memory_buffer_started().
void blender::compositor::MemoryBuffer::read_elem_filtered | ( | float | x, |
float | y, | ||
float | dx[2], | ||
float | dy[2], | ||
float * | out | ||
) | const |
Definition at line 423 of file COM_MemoryBuffer.cc.
References BLI_assert, BLI_ewa_filter(), blender::compositor::Color, float(), get_height(), get_width(), usdtokens::out(), blender::compositor::read_ewa_elem(), x, and y.
Referenced by blender::compositor::DisplaceOperation::update_memory_buffer_partial(), blender::compositor::MapUVOperation::update_memory_buffer_partial(), and blender::compositor::PlaneDistortWarpImageOperation::update_memory_buffer_partial().
|
inline |
Definition at line 262 of file COM_MemoryBuffer.h.
References blender::compositor::Bicubic, blender::compositor::Bilinear, blender::compositor::Nearest, usdtokens::out(), read_elem_bilinear(), read_elem_checked(), sampler(), x, and y.
Referenced by blender::compositor::RotateOperation::update_memory_buffer_partial(), blender::compositor::ScaleOperation::update_memory_buffer_partial(), and blender::compositor::ScaleFixedSizeOperation::update_memory_buffer_partial().
|
inline |
Definition at line 506 of file COM_MemoryBuffer.h.
References BLI_assert, buffer, blender::compositor::Clip, get_coords_offset(), offset, result, v, wrap_pixel(), x, rcti::xmax, y, and rcti::ymax.
Referenced by blender::compositor::SingleThreadedOperation::execute_pixel(), blender::compositor::GaussianBlurReferenceOperation::execute_pixel(), and blender::compositor::VariableSizeBokehBlurOperation::execute_pixel().
void blender::compositor::MemoryBuffer::readEWA | ( | float * | result, |
const float | uv[2], | ||
const float | derivatives[2][2] | ||
) |
Definition at line 459 of file COM_MemoryBuffer.cc.
References BLI_assert, BLI_ewa_filter(), blender::compositor::Color, float(), get_height(), get_width(), blender::compositor::read_ewa_pixel_sampled(), and result.
Referenced by blender::compositor::BufferOperation::execute_pixel_filtered(), and blender::compositor::ReadBufferOperation::execute_pixel_filtered().
|
inline |
Definition at line 368 of file COM_MemoryBuffer.h.
Referenced by blender::compositor::InpaintSimpleOperation::update_memory_buffer().
|
inline |
Definition at line 429 of file COM_MemoryBuffer.h.
References blender::compositor::Clip, blender::compositor::Extend, float(), fmodf, get_height(), get_width(), blender::compositor::Repeat, w(), x, rcti::xmin, y, and rcti::ymin.
|
inline |
Definition at line 380 of file COM_MemoryBuffer.h.
References blender::compositor::Clip, blender::compositor::Extend, get_height(), get_width(), blender::compositor::Repeat, w(), x, rcti::xmin, y, and rcti::ymin.
Referenced by read(), read_bilinear(), and read_no_check().
Definition at line 397 of file COM_MemoryBuffer.cc.
References color, get_coords_offset(), offset, x, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by blender::compositor::GlareFogGlowOperation::generate_glare(), blender::compositor::GlareGhostOperation::generate_glare(), and blender::compositor::GlareSimpleStarOperation::generate_glare().
int blender::compositor::MemoryBuffer::elem_stride |
Offset between elements.
Should always be used for the x dimension when calculating buffer offsets. It will be 0 when is_a_single_elem=true. e.g: buffer_index = y * buffer.row_stride + x * buffer.elem_stride
Definition at line 52 of file COM_MemoryBuffer.h.
Referenced by as_range(), blender::compositor::blur_pixel(), copy_from(), get_buffer_area(), get_coords_offset(), iterate_with(), blender::compositor::MixBaseOperation::update_memory_buffer_partial(), blender::compositor::BilateralBlurOperation::update_memory_buffer_partial(), blender::compositor::BokehBlurOperation::update_memory_buffer_partial(), and blender::compositor::GaussianBlurReferenceOperation::update_memory_buffer_partial().
int blender::compositor::MemoryBuffer::row_stride |
Offset between rows.
Should always be used for the y dimension when calculating buffer offsets. It will be 0 when is_a_single_elem=true. e.g: buffer_index = y * buffer.row_stride + x * buffer.elem_stride
Definition at line 61 of file COM_MemoryBuffer.h.
Referenced by apply_processor(), blender::compositor::blur_pixel(), blender::compositor::colorspace_to_scene_linear(), copy_from(), get_coords_offset(), blender::compositor::BokehBlurOperation::update_memory_buffer_partial(), and blender::compositor::GaussianBlurReferenceOperation::update_memory_buffer_partial().