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

Go to the source code of this file.

Data Structures

struct  dt_iop_nlmeans_params_v1_t
 
struct  dt_iop_nlmeans_params_t
 
struct  dt_iop_nlmeans_gui_data_t
 
struct  dt_iop_nlmeans_global_data_t
 

Macros

#define USE_NEW_IMPL_CL   0
 
#define NUM_BUCKETS   4
 

Typedefs

typedef struct dt_iop_nlmeans_params_v1_t dt_iop_nlmeans_params_v1_t
 
typedef struct dt_iop_nlmeans_params_t dt_iop_nlmeans_params_t
 
typedef struct dt_iop_nlmeans_gui_data_t dt_iop_nlmeans_gui_data_t
 
typedef dt_iop_nlmeans_params_t dt_iop_nlmeans_data_t
 
typedef struct dt_iop_nlmeans_global_data_t dt_iop_nlmeans_global_data_t
 

Functions

const char * name ()
 
const char * aliases ()
 
const char ** description (struct dt_iop_module_t *self)
 
int default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
 
int legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version)
 
int default_group ()
 
int flags ()
 
static int bucket_next (unsigned int *state, unsigned int max)
 
int process_cl (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out)
 
void tiling_callback (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling)
 
static __attribute__ ((always_inline))
 
int process (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid)
 
void init_global (dt_iop_module_so_t *module)
 
void cleanup_global (dt_iop_module_so_t *module)
 
void commit_params (struct dt_iop_module_t *self, dt_iop_params_t *params, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void cleanup_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void gui_init (dt_iop_module_t *self)
 

Macro Definition Documentation

◆ NUM_BUCKETS

#define NUM_BUCKETS   4

Definition at line 70 of file nlmeans.c.

◆ USE_NEW_IMPL_CL

#define USE_NEW_IMPL_CL   0

Definition at line 66 of file nlmeans.c.

Typedef Documentation

◆ dt_iop_nlmeans_data_t

Definition at line 99 of file nlmeans.c.

◆ dt_iop_nlmeans_global_data_t

◆ dt_iop_nlmeans_gui_data_t

◆ dt_iop_nlmeans_params_t

◆ dt_iop_nlmeans_params_v1_t

Function Documentation

◆ __attribute__()

◆ aliases()

const char * aliases ( )

Definition at line 117 of file nlmeans.c.

◆ bucket_next()

static int bucket_next ( unsigned int *  state,
unsigned int  max 
)
static

Definition at line 163 of file nlmeans.c.

References max, and state.

Referenced by process_cl().

◆ cleanup_global()

◆ cleanup_pipe()

void cleanup_pipe ( struct dt_iop_module_t *  self,
dt_dev_pixelpipe_t *  pipe,
dt_dev_pixelpipe_iop_t *  piece 
)

Definition at line 517 of file nlmeans.c.

References dt_free_align, and piece.

◆ commit_params()

void commit_params ( struct dt_iop_module_t *  self,
dt_iop_params_t *  params,
dt_dev_pixelpipe_t *  pipe,
dt_dev_pixelpipe_iop_t *  piece 
)

commit is the synch point between core and gui, so it copies params to pipe data.

Definition at line 501 of file nlmeans.c.

References d, MAX, p, params, and piece.

◆ default_colorspace()

int default_colorspace ( dt_iop_module_t *  self,
dt_dev_pixelpipe_t *  pipe,
const dt_dev_pixelpipe_iop_t *  piece 
)

Definition at line 131 of file nlmeans.c.

References IOP_CS_LAB.

◆ default_group()

int default_group ( )

Definition at line 152 of file nlmeans.c.

References IOP_GROUP_REPAIR.

◆ description()

const char ** description ( struct dt_iop_module_t *  self)

Definition at line 122 of file nlmeans.c.

References dt_iop_set_description().

◆ flags()

int flags ( )

Definition at line 157 of file nlmeans.c.

References IOP_FLAGS_ALLOW_TILING, and IOP_FLAGS_SUPPORTS_BLENDING.

◆ gui_init()

◆ init_global()

◆ init_pipe()

void init_pipe ( struct dt_iop_module_t *  self,
dt_dev_pixelpipe_t *  pipe,
dt_dev_pixelpipe_iop_t *  piece 
)

Definition at line 511 of file nlmeans.c.

References dt_calloc_align(), and piece.

◆ legacy_params()

int legacy_params ( dt_iop_module_t *  self,
const void *const  old_params,
const int  old_version,
void *  new_params,
const int  new_version 
)

Definition at line 136 of file nlmeans.c.

References dt_iop_nlmeans_params_t::luma, n, and o.

◆ name()

const char * name ( )

Definition at line 112 of file nlmeans.c.

◆ process()

int process ( struct dt_iop_module_t *  self,
const dt_dev_pixelpipe_t *  pipe,
const dt_dev_pixelpipe_iop_t *  piece,
const void *const  ivoid,
void *const  ovoid 
)

Definition at line 466 of file nlmeans.c.

References nlmeans_denoise(), ovoid, piece, and pipe.

◆ process_cl()

◆ tiling_callback()

void tiling_callback ( struct dt_iop_module_t *  self,
const struct dt_dev_pixelpipe_t *  pipe,
const struct dt_dev_pixelpipe_iop_t *  piece,
struct dt_develop_tiling_t *  tiling 
)
Todo:
: check if that's sufficiently large

Definition at line 406 of file nlmeans.c.

References d, NUM_BUCKETS, P, piece, and dt_iop_roi_t::scale.