Blender  V2.93
Macros | Functions | Variables
math_interp.c File Reference
#include <math.h>
#include "BLI_math.h"
#include "BLI_strict_flags.h"

Go to the source code of this file.

Macros

#define EWA_MAXIDX   255
 

Functions

static float P (float k)
 
static void vector_from_float (const float *data, float vector[4], int components)
 
static void vector_from_byte (const unsigned char *data, float vector[4], int components)
 
BLI_INLINE void bicubic_interpolation (const unsigned char *byte_buffer, const float *float_buffer, unsigned char *byte_output, float *float_output, int width, int height, int components, float u, float v)
 
void BLI_bicubic_interpolation_fl (const float *buffer, float *output, int width, int height, int components, float u, float v)
 
void BLI_bicubic_interpolation_char (const unsigned char *buffer, unsigned char *output, int width, int height, int components, float u, float v)
 
BLI_INLINE void bilinear_interpolation (const unsigned char *byte_buffer, const float *float_buffer, unsigned char *byte_output, float *float_output, int width, int height, int components, float u, float v, bool wrap_x, bool wrap_y)
 
void BLI_bilinear_interpolation_fl (const float *buffer, float *output, int width, int height, int components, float u, float v)
 
void BLI_bilinear_interpolation_char (const unsigned char *buffer, unsigned char *output, int width, int height, int components, float u, float v)
 
void BLI_bilinear_interpolation_wrap_fl (const float *buffer, float *output, int width, int height, int components, float u, float v, bool wrap_x, bool wrap_y)
 
void BLI_bilinear_interpolation_wrap_char (const unsigned char *buffer, unsigned char *output, int width, int height, int components, float u, float v, bool wrap_x, bool wrap_y)
 
static void radangle2imp (float a2, float b2, float th, float *A, float *B, float *C, float *F)
 
void BLI_ewa_imp2radangle (float A, float B, float C, float F, float *a, float *b, float *th, float *ecc)
 
void BLI_ewa_filter (const int width, const int height, const bool intpol, const 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])
 

Variables

const float EWA_WTS [EWA_MAXIDX+1]
 

Macro Definition Documentation

◆ EWA_MAXIDX

#define EWA_MAXIDX   255

Definition at line 518 of file math_interp.c.

Function Documentation

◆ bicubic_interpolation()

BLI_INLINE void bicubic_interpolation ( const unsigned char *  byte_buffer,
const float float_buffer,
unsigned char *  byte_output,
float float_output,
int  width,
int  height,
int  components,
float  u,
float  v 
)

◆ bilinear_interpolation()

BLI_INLINE void bilinear_interpolation ( const unsigned char *  byte_buffer,
const float float_buffer,
unsigned char *  byte_output,
float float_output,
int  width,
int  height,
int  components,
float  u,
float  v,
bool  wrap_x,
bool  wrap_y 
)

◆ BLI_bicubic_interpolation_char()

void BLI_bicubic_interpolation_char ( const unsigned char *  buffer,
unsigned char *  output,
int  width,
int  height,
int  components,
float  u,
float  v 
)

Definition at line 252 of file math_interp.c.

References bicubic_interpolation(), buffer, height, NULL, output, v, and width.

Referenced by bicubic_interpolation_color().

◆ BLI_bicubic_interpolation_fl()

void BLI_bicubic_interpolation_fl ( const float buffer,
float output,
int  width,
int  height,
int  components,
float  u,
float  v 
)

◆ BLI_bilinear_interpolation_char()

void BLI_bilinear_interpolation_char ( const unsigned char *  buffer,
unsigned char *  output,
int  width,
int  height,
int  components,
float  u,
float  v 
)

Definition at line 468 of file math_interp.c.

References bilinear_interpolation(), buffer, height, NULL, output, v, and width.

Referenced by bilinear_interpolation_color(), and do_scale_thread().

◆ BLI_bilinear_interpolation_fl()

void BLI_bilinear_interpolation_fl ( const float buffer,
float output,
int  width,
int  height,
int  components,
float  u,
float  v 
)

◆ BLI_bilinear_interpolation_wrap_char()

void BLI_bilinear_interpolation_wrap_char ( const unsigned char *  buffer,
unsigned char *  output,
int  width,
int  height,
int  components,
float  u,
float  v,
bool  wrap_x,
bool  wrap_y 
)

Definition at line 494 of file math_interp.c.

References bilinear_interpolation(), buffer, height, NULL, output, v, and width.

◆ BLI_bilinear_interpolation_wrap_fl()

void BLI_bilinear_interpolation_wrap_fl ( const float buffer,
float output,
int  width,
int  height,
int  components,
float  u,
float  v,
bool  wrap_x,
bool  wrap_y 
)

◆ BLI_ewa_filter()

void BLI_ewa_filter ( const int  width,
const int  height,
const bool  intpol,
const 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] 
)

◆ BLI_ewa_imp2radangle()

void BLI_ewa_imp2radangle ( float  A,
float  B,
float  C,
float  F,
float a,
float b,
float th,
float ecc 
)

Definition at line 571 of file math_interp.c.

References A, Freestyle::a, atan2f, B, C, F, float(), M_PI, r, and sqrtf.

Referenced by BLI_ewa_filter(), and imagewraposa_aniso().

◆ P()

static float P ( float  k)
static

Definition at line 41 of file math_interp.c.

References max_ff().

Referenced by _btMprVec3PointSegmentDist2(), Mesh::add_vertex(), Mesh::add_vertex_slow(), btDeformableCorotatedForce::addScaledElasticForce(), btDeformableLinearElasticityForce::addScaledElasticForce(), btDeformableNeoHookeanForce::addScaledElasticForce(), btDeformableLinearElasticityForce::addScaledHessian(), assign_final_coords_from_mdisps(), assign_final_elements_from_orig_mdisps(), base_surface_grids_write(), bicubic_interpolation(), Hair::Curve::bounds_grow(), btMprVec3PointTriDist2(), btVec3PointSegmentDist2(), btVec3PointTriDist2(), libmv::Build_Minimal2Point_PolynomialFactor(), BVH(), bvh_aligned_node_intersect(), bvh_instance_pop(), bvh_instance_pop_factor(), bvh_instance_push(), bvh_node_intersect(), bvh_unaligned_node_intersect(), bvh_unaligned_node_intersect_child(), camera_direction_from_point(), camera_distance(), camera_sample_orthographic(), camera_sample_panorama(), camera_sample_perspective(), camera_world_to_ndc(), camera_z_depth(), Freestyle::GridHelpers::closestPointToSegment(), Freestyle::OGF::compute_curvature_tensor(), Freestyle::ComputeMaxError(), Mesh::copy_center_to_motion_step(), decasteljau_bicubic(), decasteljau_cubic(), Freestyle::GeomUtils::distPointSegment(), libmv::EliminateRow(), Freestyle::StrokeShaders::CurvePiece::error(), libmv::EuclideanIntersect(), libmv::EuclideanResect(), libmv::euclidean_resection::EuclideanResectionPPnP(), LinearQuadPatch::eval(), BicubicPatch::eval(), QuadDice::eval_projected(), evaluate_higher_grid_positions_callback(), blender::opensubdiv::CpuEvalOutputAPI::evaluateLimit(), blender::opensubdiv::CpuEvalOutputAPI::evaluatePatchesLimit(), libmv::F_FromCorrespondance_2points(), fast_sinpif(), btDeformableCorotatedForce::firstPiola(), btDeformableLinearElasticityForce::firstPiola(), btDeformableNeoHookeanForce::firstPiola(), libmv::FundamentalFrom7CorrespondencesLinear(), OSLRenderServices::get_object_standard_attribute(), GPU_matrix_bind(), Freestyle::GeomUtils::includePointTriangle(), libmv::ProjectiveReconstruction::InsertCamera(), interp_m3_m3m3(), libmv::isInFrontOfCamera(), kernel_displace_evaluate(), CCL_NAMESPACE_BEGIN::kernel_tex_image_interp_3d(), kernel_tex_image_interp_3d(), libmv::KRt_From_P(), lamp_light_eval(), lamp_light_sample(), light_sample(), light_spread_clamp_area_light(), mikk_get_position(), motion_triangle_intersect(), motion_triangle_refine(), multires_reshape_apply_base_update_mesh_coords(), Freestyle::NewtonRaphsonRootFind(), object_grid_element_to_tangent_displacement(), object_inverse_position_transform(), object_position_transform(), Freestyle::VecMat::operator*(), libmv::P_From_KRt(), libmv::Project(), libmv::ProjectionChangeAspectRatio(), libmv::ProjectionShiftPrincipalPoint(), libmv::ProjectiveResect(), ray_aligned_disk_intersect(), ray_offset(), ray_optical_depth(), ray_triangle_intersect(), rect_light_sample(), libmv::resection::Resection(), reshape_subdiv_refine(), libmv::RootMeanSquareError(), QuadDice::scale_factor(), set_attribute_float3_3(), EdgeDice::set_vert(), shader_setup_from_displace(), shader_setup_from_sample(), single_scattering(), Freestyle::OGF::sphere_clip_vector(), sphere_light_sample(), spherical_stereo_transform(), svm_node_enter_bump_eval(), svm_node_wireframe(), sync_mesh_cached_velocities(), sync_mesh_fluid_motion(), OSLRenderServices::texture3d(), OSLRenderServices::trace(), triangle_intersect(), triangle_light_sample(), triangle_point_normal(), triangle_refine(), triangle_refine_local(), triangle_vertices(), wireframe(), Camera::world_to_raster_size(), and xml_read_mesh().

◆ radangle2imp()

static void radangle2imp ( float  a2,
float  b2,
float  th,
float A,
float B,
float C,
float F 
)
static

Definition at line 559 of file math_interp.c.

References A, B, C, cosf, F, and sinf.

Referenced by BLI_ewa_filter().

◆ vector_from_byte()

static void vector_from_byte ( const unsigned char *  data,
float  vector[4],
int  components 
)
static

Definition at line 75 of file math_interp.c.

References data.

Referenced by bicubic_interpolation().

◆ vector_from_float()

static void vector_from_float ( const float data,
float  vector[4],
int  components 
)
static

Definition at line 62 of file math_interp.c.

References copy_v3_v3(), copy_v4_v4(), and data.

Referenced by bicubic_interpolation().

Variable Documentation

◆ EWA_WTS

const float EWA_WTS[EWA_MAXIDX+1]

Definition at line 519 of file math_interp.c.

Referenced by BLI_ewa_filter(), and feline_eval().