Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
nlmeans_core.c File Reference
#include "common/math.h"
#include "common/opencl.h"
#include "control/control.h"
#include "develop/imageop.h"
#include "develop/imageop_math.h"
#include "develop/tiling.h"
#include "iop/iop_api.h"
#include "common/nlmeans_core.h"
#include <stdbool.h>
#include <stdlib.h>
+ Include dependency graph for nlmeans_core.c:

Data Structures

struct  patch_t
 

Macros

#define SLICE_WIDTH   72
 
#define SLICE_HEIGHT   60
 
#define NUM_BUCKETS   4
 
#define _mm_prefetch(where, hint)
 

Typedefs

typedef struct patch_t patch_t
 

Functions

static float gh (const float f)
 
static int sign (int a)
 
static int scatter (const float scale, const float scattering, const int index1, const int index2)
 
static struct patch_tdefine_patches (const dt_nlmeans_param_t *const params, const int stride, int *num_patches, int *max_shift)
 
static float compute_center_pixel_norm (const float center_weight, const int radius)
 
static float pixel_difference (const float *const pix1, const float *pix2, const dt_aligned_pixel_t norm)
 
static float diff_of_pixels_diff (const float *const pix1, const float *pix2, const float *const pix3, const float *pix4, const dt_aligned_pixel_t norm)
 
static void init_column_sums (float *const col_sums, const patch_t *const patch, const float *const in, const int row, const int chunk_left, const int chunk_right, const int height, const int width, const int stride, const int radius, const float *const norm)
 
static int compute_slice_height (const int height)
 
static int compute_slice_width (const int width)
 
__DT_CLONE_TARGETS__ void nlmeans_denoise (const float *const inbuf, float *const outbuf, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const dt_nlmeans_param_t *const params)
 

Macro Definition Documentation

◆ _mm_prefetch

#define _mm_prefetch (   where,
  hint 
)

◆ NUM_BUCKETS

#define NUM_BUCKETS   4

◆ SLICE_HEIGHT

#define SLICE_HEIGHT   60

◆ SLICE_WIDTH

#define SLICE_WIDTH   72

Typedef Documentation

◆ patch_t

typedef struct patch_t patch_t

Function Documentation

◆ compute_center_pixel_norm()

static float compute_center_pixel_norm ( const float  center_weight,
const int  radius 
)
static

References width.

Referenced by nlmeans_denoise().

◆ compute_slice_height()

static int compute_slice_height ( const int  height)
static

References height, and SLICE_HEIGHT.

Referenced by nlmeans_denoise().

◆ compute_slice_width()

static int compute_slice_width ( const int  width)
static

References SLICE_WIDTH, and width.

Referenced by nlmeans_denoise().

◆ define_patches()

static struct patch_t * define_patches ( const dt_nlmeans_param_t *const  params,
const int  stride,
int *  num_patches,
int *  max_shift 
)
static

◆ diff_of_pixels_diff()

static float diff_of_pixels_diff ( const float *const  pix1,
const float *  pix2,
const float *const  pix3,
const float *  pix4,
const dt_aligned_pixel_t  norm 
)
inlinestatic

References for_each_channel.

Referenced by nlmeans_denoise().

◆ gh()

static float gh ( const float  f)
inlinestatic

◆ init_column_sums()

static void init_column_sums ( float *const  col_sums,
const patch_t *const  patch,
const float *const  in,
const int  row,
const int  chunk_left,
const int  chunk_right,
const int  height,
const int  width,
const int  stride,
const int  radius,
const float *const  norm 
)
static

◆ nlmeans_denoise()

◆ pixel_difference()

static float pixel_difference ( const float *const  pix1,
const float *  pix2,
const dt_aligned_pixel_t  norm 
)
inlinestatic

References for_each_channel.

Referenced by init_column_sums(), and nlmeans_denoise().

◆ scatter()

static int scatter ( const float  scale,
const float  scattering,
const int  index1,
const int  index2 
)
static

References sign().

Referenced by define_patches().

◆ sign()