39 int num_features = use_time ? 11 : 10;
44 int num_pixels = (
high.y -
low.y) * (
high.x -
low.x) * tile_info->num_frames;
89 int max_rank =
min(num_features, num_pixels / 3);
90 if (pca_threshold < 0.0f) {
91 float threshold_energy = 0.0f;
92 for (
int i = 0; i < num_features; i++) {
93 threshold_energy += feature_matrix[i * num_features + i];
95 threshold_energy *= 1.0f - (-pca_threshold);
97 float reduced_energy = 0.0f;
98 for (
int i = 0; i < max_rank; i++, (*rank)++) {
99 if (i >= 2 && reduced_energy >= threshold_energy)
101 float s = feature_matrix[i * num_features + i];
106 for (
int i = 0; i < max_rank; i++, (*rank)++) {
107 float s = feature_matrix[i * num_features + i];
108 if (i >= 2 &&
sqrtf(s) < pca_threshold)
114 for (
int i = 0; i < (*rank); i++) {
_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
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
#define CCL_FILTER_TILE_INFO
ccl_device_inline void filter_get_features(int3 pixel, const ccl_global float *ccl_restrict buffer, float *features, bool use_time, const float *ccl_restrict mean, int pass_stride)
#define END_FOR_PIXEL_WINDOW
ccl_device_inline void filter_get_feature_scales(int3 pixel, const ccl_global float *ccl_restrict buffer, float *scales, bool use_time, const float *ccl_restrict mean, int pass_stride)
ccl_device_inline void filter_calculate_scale(float *scale, bool use_time)
#define CCL_NAMESPACE_END
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer
__forceinline ssef low(const avxf &a)
__forceinline ssef high(const avxf &a)
ccl_device_inline void math_matrix_transpose(ccl_global float *A, int n, int stride)
ccl_device_inline void math_vector_add(float *a, const float *ccl_restrict b, int n)
ccl_device_inline void math_matrix_zero(float *A, int n)
ccl_device_inline void math_vector_zero(float *v, int n)
ccl_device void math_matrix_jacobi_eigendecomposition(float *A, ccl_global float *V, int n, int v_stride)
ccl_device_inline void math_vector_max(float *a, const float *ccl_restrict b, int n)
ccl_device_inline void math_vector_scale(float *a, float b, int n)
ccl_device_inline void math_matrix_add_gramian(float *A, int n, const float *ccl_restrict v, float weight)
ccl_device_inline void math_vector_mul(float *a, const float *ccl_restrict b, int n)
ccl_device_inline size_t align_up(size_t offset, size_t alignment)