![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <assert.h>
#include <math.h>
#include <stdlib.h>
#include "common/box_filters.h"
#include "common/darktable.h"
#include "develop/imageop.h"
#include "develop/imageop_math.h"
Macros | |
#define | DT_PREFETCH(addr) |
#define | PREFETCH_NTA(addr) |
Functions | |
static void | blur_horizontal_1ch (float *const restrict buf, const int height, const int width, const int radius, float *const restrict scanlines, const size_t padded_size) |
static void | blur_horizontal_2ch (float *const restrict buf, const int height, const int width, const int radius, float *const restrict scanlines, const size_t padded_size) |
static void | load_add_4wide (float *const restrict out, dt_aligned_pixel_t accum, const float *const restrict values) |
static void | sub_4wide (float *const restrict accum, const dt_aligned_pixel_t values) |
static void | load_add_4wide_Kahan (float *const restrict out, dt_aligned_pixel_t accum, const float *const restrict values, float *const restrict comp) |
static void | sub_4wide_Kahan (float *const restrict accum, const dt_aligned_pixel_t values, float *const restrict comp) |
static void | store_scaled_4wide (float *const restrict out, const dt_aligned_pixel_t in, const float scale) |
static void | sub_16wide (float *const restrict accum, const float *const restrict values) |
static void | load_add_16wide (float *const restrict out, float *const restrict accum, const float *const restrict in) |
static void | sub_16wide_Kahan (float *const restrict accum, const float *const restrict values, float *const restrict comp) |
static void | load_add_16wide_Kahan (float *const restrict out, float *const restrict accum, const float *const restrict in, float *const restrict comp) |
static void | store_16wide (float *const restrict out, const float *const restrict in) |
static void | store_scaled_16wide (float *const restrict out, const float *const restrict in, const float scale) |
static void | sub_Nwide_Kahan (const size_t N, float *const restrict accum, const float *const restrict values, float *const restrict comp) |
static void | load_add_Nwide_Kahan (const size_t N, float *const restrict out, float *const restrict accum, const float *const restrict in, float *const restrict comp) |
static void | store_scaled_Nwide (const size_t N, float *const restrict out, const float *const restrict in, const float scale) |
static void | blur_horizontal_4ch (float *const restrict buf, const size_t height, const size_t width, const size_t radius, float *const restrict scanlines, const size_t padded_size) |
static void | blur_horizontal_4ch_Kahan (float *const restrict buf, const size_t width, const size_t radius, float *const restrict scratch) |
static void | blur_horizontal_Nch_Kahan (const size_t N, float *const restrict buf, const size_t width, const size_t radius, float *const restrict scratch) |
static void | blur_vertical_1wide (float *const restrict buf, const size_t height, const size_t width, const size_t radius, float *const restrict scratch) |
static void | blur_vertical_1wide_Kahan (float *const restrict buf, const size_t height, const size_t width, const size_t radius, float *const restrict scratch) |
static void | blur_vertical_4wide (float *const restrict buf, const size_t height, const size_t width, const size_t radius, float *const restrict scratch) |
static void | blur_vertical_4wide_Kahan (float *const restrict buf, const size_t height, const size_t width, const size_t radius, float *const restrict scratch) |
static void | blur_vertical_16wide (float *const restrict buf, const size_t height, const size_t width, const size_t radius, float *const restrict scratch) |
static void | blur_vertical_16wide_Kahan (float *const restrict buf, const size_t height, const size_t width, const size_t radius, float *const restrict scratch) |
static void | blur_vertical_1ch (float *const restrict buf, const size_t height, const size_t width, const size_t radius, float *const restrict scanlines, const size_t padded_size) |
static size_t | _compute_effective_height (const size_t height, const size_t radius) |
static void | dt_box_mean_1ch (float *const buf, const size_t height, const size_t width, const size_t radius, const unsigned iterations) |
static void | dt_box_mean_4ch (float *const buf, const int height, const int width, const int radius, const unsigned iterations) |
static void | box_mean_vert_1ch_Kahan (float *const buf, const int height, const size_t width, const size_t radius) |
static void | dt_box_mean_4ch_Kahan (float *const buf, const size_t height, const size_t width, const int radius, const unsigned iterations) |
static void | box_mean_2ch (float *const restrict in, const size_t height, const size_t width, const int radius, const unsigned iterations) |
void | dt_box_mean (float *const buf, const size_t height, const size_t width, const int ch, const int radius, const unsigned iterations) |
void | dt_box_mean_horizontal (float *const restrict buf, const size_t width, const int ch, const int radius, float *const restrict user_scratch) |
void | dt_box_mean_vertical (float *const buf, const size_t height, const size_t width, const int ch, const int radius) |
static float | window_max (const float *x, int n) |
static void | box_max_1d (int N, const float *const restrict x, float *const restrict y, size_t stride_y, int w) |
static void | set_16wide (float *const restrict out, const float value) |
static void | update_max_16wide (float m[16], const float *const restrict base) |
static void | load_update_max_16wide (float *const restrict out, float m[16], const float *const restrict base) |
static void | box_max_vert_16wide (const int N, float *const restrict scratch, float *const restrict buf, const int stride, const int w, const size_t mask) |
static void | box_max_1ch (float *const buf, const size_t height, const size_t width, const unsigned w) |
void | dt_box_max (float *const buf, const size_t height, const size_t width, const int ch, const int radius) |
static float | window_min (const float *x, int n) |
static void | box_min_1d (int N, const float *x, float *y, size_t stride_y, int w) |
static void | update_min_16wide (float m[16], const float *const restrict base) |
static void | load_update_min_16wide (float *const restrict out, float m[16], const float *const restrict base) |
static void | box_min_vert_16wide (const int N, float *const restrict scratch, float *const restrict buf, const int stride, const int w, const size_t mask) |
static void | box_min_1ch (float *const buf, const size_t height, const size_t width, const int w) |
void | dt_box_min (float *const buf, const size_t height, const size_t width, const int ch, const int radius) |
#define DT_PREFETCH | ( | addr | ) |
#define PREFETCH_NTA | ( | addr | ) |
|
static |
Referenced by box_max_1ch(), box_mean_2ch(), box_mean_vert_1ch_Kahan(), box_min_1ch(), dt_box_mean_1ch(), and dt_box_mean_4ch().
|
static |
References dt_get_perthread, height, MIN, and width.
Referenced by dt_box_mean_1ch().
|
static |
References dt_get_perthread, height, MIN, and width.
Referenced by box_mean_2ch().
|
static |
References dt_get_perthread, height, load_add_4wide(), MIN, store_scaled_4wide(), sub_4wide(), and width.
Referenced by dt_box_mean_4ch().
|
static |
References load_add_4wide_Kahan(), MIN, store_scaled_4wide(), sub_4wide_Kahan(), and width.
Referenced by dt_box_mean_4ch_Kahan(), and dt_box_mean_horizontal().
|
static |
References DT_ALIGNED_ARRAY, load_add_Nwide_Kahan(), MIN, N, store_scaled_Nwide(), sub_Nwide_Kahan(), and width.
Referenced by dt_box_mean_horizontal().
|
static |
References darktable_t::codepath, darktable, DT_ALIGNED_ARRAY, height, load_add_16wide(), MIN, PREFETCH_NTA, dt_codepath_t::SSE2, store_scaled_16wide(), sub_16wide(), and width.
Referenced by blur_vertical_1ch().
|
static |
References DT_ALIGNED_ARRAY, DT_PREFETCH, height, load_add_16wide_Kahan(), MIN, store_scaled_16wide(), sub_16wide_Kahan(), and width.
Referenced by box_mean_vert_1ch_Kahan().
|
static |
References blur_vertical_16wide(), blur_vertical_1wide(), blur_vertical_4wide(), dt_get_perthread, height, and width.
Referenced by box_mean_2ch(), dt_box_mean_1ch(), and dt_box_mean_4ch().
|
static |
References height, MIN, PREFETCH_NTA, and width.
Referenced by blur_vertical_1ch().
|
static |
References height, Kahan_sum(), MIN, PREFETCH_NTA, and width.
Referenced by box_mean_vert_1ch_Kahan().
|
static |
References darktable_t::codepath, darktable, DT_PREFETCH, height, load_add_4wide(), MIN, dt_codepath_t::SSE2, store_scaled_4wide(), sub_4wide(), and width.
Referenced by blur_vertical_1ch().
|
static |
References DT_PREFETCH, height, load_add_4wide_Kahan(), MIN, store_scaled_4wide(), sub_4wide_Kahan(), and width.
Referenced by box_mean_vert_1ch_Kahan().
|
static |
References _compute_effective_height(), box_max_1d(), box_max_vert_16wide(), dt_alloc_perthread_float(), dt_free_align, dt_get_perthread, height, MAX, and width.
Referenced by dt_box_max().
|
inlinestatic |
References m, MAX, MIN, N, and window_max().
Referenced by box_max_1ch().
|
inlinestatic |
References DT_ALIGNED_ARRAY, load_update_max_16wide(), m, MIN, N, PREFETCH_NTA, set_16wide(), store_16wide(), and update_max_16wide().
Referenced by box_max_1ch().
|
inlinestatic |
References _compute_effective_height(), blur_horizontal_2ch(), blur_vertical_1ch(), dt_alloc_perthread_float(), dt_free_align, height, MAX, and width.
Referenced by dt_box_mean().
|
static |
|
static |
References _compute_effective_height(), box_min_1d(), box_min_vert_16wide(), dt_alloc_perthread_float(), dt_free_align, dt_get_perthread, height, MAX, and width.
Referenced by dt_box_min().
|
inlinestatic |
References m, MIN, N, and window_min().
Referenced by box_min_1ch().
|
inlinestatic |
References DT_ALIGNED_ARRAY, load_update_min_16wide(), m, MIN, N, PREFETCH_NTA, set_16wide(), store_16wide(), and update_min_16wide().
Referenced by box_min_1ch().
void dt_box_max | ( | float *const | buf, |
const size_t | height, | ||
const size_t | width, | ||
const int | ch, | ||
const int | radius | ||
) |
References box_max_1ch(), dt_unreachable_codepath, height, and width.
Referenced by transition_map().
void dt_box_mean | ( | float *const | buf, |
const size_t | height, | ||
const size_t | width, | ||
const int | ch, | ||
const int | radius, | ||
const unsigned | iterations | ||
) |
References box_mean_2ch(), BOXFILTER_KAHAN_SUM, dt_box_mean_1ch(), dt_box_mean_4ch(), dt_box_mean_4ch_Kahan(), dt_unreachable_codepath, height, and width.
Referenced by dt_focuspeaking(), fast_surface_blur(), guided_filter_tiling(), process(), process_laplacian_bayer(), and variance_analyse().
|
static |
References _compute_effective_height(), blur_horizontal_1ch(), blur_vertical_1ch(), dt_alloc_perthread_float(), dt_free_align, height, MAX, size, and width.
Referenced by dt_box_mean().
|
static |
References _compute_effective_height(), blur_horizontal_4ch(), blur_vertical_1ch(), dt_alloc_perthread_float(), dt_free_align, height, MAX, size, and width.
Referenced by dt_box_mean().
|
static |
References blur_horizontal_4ch_Kahan(), box_mean_vert_1ch_Kahan(), dt_alloc_perthread_float(), dt_free_align, dt_get_perthread, height, and width.
Referenced by dt_box_mean().
void dt_box_mean_horizontal | ( | float *const restrict | buf, |
const size_t | width, | ||
const int | ch, | ||
const int | radius, | ||
float *const restrict | user_scratch | ||
) |
References blur_horizontal_4ch_Kahan(), blur_horizontal_Nch_Kahan(), BOXFILTER_KAHAN_SUM, dt_alloc_align_float(), dt_free_align, dt_unreachable_codepath, and width.
Referenced by guided_filter_tiling().
void dt_box_mean_vertical | ( | float *const | buf, |
const size_t | height, | ||
const size_t | width, | ||
const int | ch, | ||
const int | radius | ||
) |
References box_mean_vert_1ch_Kahan(), BOXFILTER_KAHAN_SUM, dt_unreachable_codepath, height, and width.
Referenced by guided_filter_tiling().
void dt_box_min | ( | float *const | buf, |
const size_t | height, | ||
const size_t | width, | ||
const int | ch, | ||
const int | radius | ||
) |
References box_min_1ch(), dt_unreachable_codepath, height, and width.
Referenced by dark_channel(), and process().
|
static |
Referenced by blur_vertical_16wide().
|
static |
Referenced by blur_vertical_16wide_Kahan().
|
static |
References for_four_channels.
Referenced by blur_horizontal_4ch(), and blur_vertical_4wide().
|
static |
References for_four_channels.
Referenced by blur_horizontal_4ch_Kahan(), and blur_vertical_4wide_Kahan().
|
static |
References N.
Referenced by blur_horizontal_Nch_Kahan().
|
inlinestatic |
References m.
Referenced by box_max_vert_16wide().
|
inlinestatic |
References m.
Referenced by box_min_vert_16wide().
|
static |
Referenced by box_max_vert_16wide(), and box_min_vert_16wide().
|
static |
Referenced by box_max_vert_16wide(), and box_min_vert_16wide().
|
static |
Referenced by blur_vertical_16wide(), and blur_vertical_16wide_Kahan().
|
static |
References for_four_channels.
Referenced by blur_horizontal_4ch(), blur_horizontal_4ch_Kahan(), blur_vertical_4wide(), and blur_vertical_4wide_Kahan().
|
static |
References N.
Referenced by blur_horizontal_Nch_Kahan().
|
static |
Referenced by blur_vertical_16wide().
|
static |
Referenced by blur_vertical_16wide_Kahan().
|
static |
References for_four_channels.
Referenced by blur_horizontal_4ch(), and blur_vertical_4wide().
|
static |
References for_four_channels.
Referenced by blur_horizontal_4ch_Kahan(), and blur_vertical_4wide_Kahan().
|
static |
References N.
Referenced by blur_horizontal_Nch_Kahan().
|
inlinestatic |
References m.
Referenced by box_max_vert_16wide().
|
inlinestatic |
References m.
Referenced by box_min_vert_16wide().
|
inlinestatic |
Referenced by box_max_1d().
|
inlinestatic |
Referenced by box_min_1d().