Blender V5.3
BLI_math_interp.hh File Reference
#include "BLI_math_base.hh"
#include "BLI_math_base_c.hh"
#include "BLI_math_vector_types.hh"
#include "BLI_simd.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::math

Macros

#define EWA_MAXIDX   255

Typedefs

using blender::ewa_filter_read_pixel_cb = void (*)(void *userdata, int x, int y, float result[4])

Enumerations

enum class  blender::math::InterpWrapMode { blender::math::Extend , blender::math::Repeat , blender::math::Border }

Functions

BLI_INLINE int32_t blender::math::wrap_coord (float u, int32_t size, InterpWrapMode wrap)
BLI_INLINE void blender::math::interpolate_nearest_wrapmode_fl (const float *buffer, float *output, int width, int height, int components, float u, float v, InterpWrapMode wrap_u, InterpWrapMode wrap_v)
void blender::math::interpolate_nearest_border_byte (const uchar *buffer, uchar *output, int width, int height, float u, float v)
uchar4 blender::math::interpolate_nearest_border_byte (const uchar *buffer, int width, int height, float u, float v)
void blender::math::interpolate_nearest_border_fl (const float *buffer, float *output, int width, int height, int components, float u, float v)
float4 blender::math::interpolate_nearest_border_fl (const float *buffer, int width, int height, float u, float v)
void blender::math::interpolate_nearest_byte (const uchar *buffer, uchar *output, int width, int height, float u, float v)
uchar4 blender::math::interpolate_nearest_byte (const uchar *buffer, int width, int height, float u, float v)
void blender::math::interpolate_nearest_fl (const float *buffer, float *output, int width, int height, int components, float u, float v)
float4 blender::math::interpolate_nearest_fl (const float *buffer, int width, int height, float u, float v)
int32_t blender::math::wrap_coord (float u, int32_t size)
void blender::math::interpolate_nearest_wrap_byte (const uchar *buffer, uchar *output, int width, int height, float u, float v)
uchar4 blender::math::interpolate_nearest_wrap_byte (const uchar *buffer, int width, int height, float u, float v)
void blender::math::interpolate_nearest_wrap_fl (const float *buffer, float *output, int width, int height, int components, float u, float v)
float4 blender::math::interpolate_nearest_wrap_fl (const float *buffer, int width, int height, float u, float v)
BLI_INLINE void blender::math::interpolate_bilinear_wrapmode_fl (const float *buffer, float *output, int width, int height, int components, float u, float v, InterpWrapMode wrap_x, InterpWrapMode wrap_y)
uchar4 blender::math::interpolate_bilinear_border_byte (const uchar *buffer, int width, int height, float u, float v)
float4 blender::math::interpolate_bilinear_border_fl (const float *buffer, int width, int height, float u, float v)
void blender::math::interpolate_bilinear_border_fl (const float *buffer, float *output, int width, int height, int components, float u, float v)
uchar4 blender::math::interpolate_bilinear_byte (const uchar *buffer, int width, int height, float u, float v)
float4 blender::math::interpolate_bilinear_fl (const float *buffer, int width, int height, float u, float v)
void blender::math::interpolate_bilinear_fl (const float *buffer, float *output, int width, int height, int components, float u, float v)
uchar4 blender::math::interpolate_bilinear_wrap_byte (const uchar *buffer, int width, int height, float u, float v)
float4 blender::math::interpolate_bilinear_wrap_fl (const float *buffer, int width, int height, float u, float v)
uchar4 blender::math::interpolate_cubic_bspline_byte (const uchar *buffer, int width, int height, float u, float v)
float4 blender::math::interpolate_cubic_bspline_fl (const float *buffer, int width, int height, float u, float v)
void blender::math::interpolate_cubic_bspline_fl (const float *buffer, float *output, int width, int height, int components, float u, float v)
void blender::math::interpolate_cubic_bspline_wrapmode_fl (const float *buffer, float *output, int width, int height, int components, float u, float v, InterpWrapMode wrap_u, InterpWrapMode wrap_v)
uchar4 blender::math::interpolate_cubic_mitchell_byte (const uchar *buffer, int width, int height, float u, float v)
float4 blender::math::interpolate_cubic_mitchell_fl (const float *buffer, int width, int height, float u, float v)
void blender::math::interpolate_cubic_mitchell_fl (const float *buffer, float *output, int width, int height, int components, float u, float v)
void blender::BLI_ewa_imp2radangle (float A, float B, float C, float F, float *a, float *b, float *th, float *ecc)
void blender::BLI_ewa_filter (int width, int height, bool intpol, bool use_alpha, const float uv[2], const float du[2], const float dv[2], ewa_filter_read_pixel_cb read_pixel_cb, void *userdata, float result[4], bool clip=true)

Variables

const float blender::EWA_WTS [EWA_MAXIDX+1]

Detailed Description

2D image sampling with filtering functions.

All functions take (u, v) texture coordinate, non-normalized (i.e. ranging from (0,0) to (width,height) over the image).

Any filtering done on texel values just blends them without color space or gamma conversions.

For sampling float images, there are "fully generic" functions that take arbitrary image channel counts, and arbitrary texture coordinate wrapping modes. However if you do not need full flexibility, use less generic functions, they will be faster (e.g. #interpolate_nearest_border_fl is faster than #interpolate_nearest_wrapmode_fl).

Definition in file BLI_math_interp.hh.

Macro Definition Documentation

◆ EWA_MAXIDX

#define EWA_MAXIDX   255

Definition at line 491 of file BLI_math_interp.hh.

Referenced by blender::BLI_ewa_filter().