Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
blurs.c File Reference
#include "bauhaus/bauhaus.h"
#include "common/dwt.h"
#include "develop/imageop.h"
#include "develop/imageop_gui.h"
#include "dtgtk/drawingarea.h"
#include "gui/gtk.h"
#include "iop/iop_api.h"
#include <gtk/gtk.h>
#include <stdlib.h>
+ Include dependency graph for blurs.c:

Data Structures

struct  dt_iop_blurs_params_t
 
struct  dt_iop_blurs_gui_data_t
 
struct  dt_iop_blurs_global_data_t
 

Macros

#define FSIZE   5
 
#define DEG_TO_RAD   180.f / M_PI_F
 

Typedefs

typedef enum dt_iop_blur_type_t dt_iop_blur_type_t
 
typedef struct dt_iop_blurs_params_t dt_iop_blurs_params_t
 
typedef struct dt_iop_blurs_gui_data_t dt_iop_blurs_gui_data_t
 
typedef struct dt_iop_blurs_global_data_t dt_iop_blurs_global_data_t
 

Enumerations

enum  dt_iop_blur_type_t {
  DT_BLUR_LENS = 0 ,
  DT_BLUR_MOTION = 1 ,
  DT_BLUR_GAUSSIAN = 2
}
 

Functions

const char * name ()
 
const char * aliases ()
 
const char ** description (struct dt_iop_module_t *self)
 
int flags ()
 
int default_group ()
 
int default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void commit_params (dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
static void blur_2D_Bspline (const float *const restrict in, float *const restrict out, const size_t width, const size_t height)
 
static void init_kernel (float *const restrict buffer, const size_t width, const size_t height)
 
static void create_lens_kernel (float *const restrict buffer, const size_t width, const size_t height, const float n, const float m, const float k, const float rotation)
 
static void create_motion_kernel (float *const restrict buffer, const size_t width, const size_t height, const float angle, const float curvature, const float offset)
 
static void create_gauss_kernel (float *const restrict buffer, const size_t width, const size_t height)
 
static void build_gui_kernel (unsigned char *const buffer, const size_t width, const size_t height, dt_iop_blurs_params_t *p)
 
static float compute_norm (float *const buffer, const size_t width, const size_t height)
 
static void normalize (float *const buffer, const size_t width, const size_t height, const float norm)
 
static void build_pixel_kernel (float *const buffer, const size_t width, const size_t height, dt_iop_blurs_params_t *p)
 
void process (struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const void *const restrict ivoid, void *const restrict ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out)
 
void gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous)
 
static gboolean dt_iop_tonecurve_draw (GtkWidget *widget, cairo_t *crf, gpointer user_data)
 
void gui_update (dt_iop_module_t *self)
 
void gui_init (dt_iop_module_t *self)
 
void gui_cleanup (dt_iop_module_t *self)
 

Macro Definition Documentation

◆ DEG_TO_RAD

#define DEG_TO_RAD   180.f / M_PI_F

◆ FSIZE

#define FSIZE   5

Typedef Documentation

◆ dt_iop_blur_type_t

◆ dt_iop_blurs_global_data_t

◆ dt_iop_blurs_gui_data_t

◆ dt_iop_blurs_params_t

Enumeration Type Documentation

◆ dt_iop_blur_type_t

Enumerator
DT_BLUR_LENS 
DT_BLUR_MOTION 
DT_BLUR_GAUSSIAN 

Function Documentation

◆ aliases()

const char * aliases ( )

◆ blur_2D_Bspline()

static void blur_2D_Bspline ( const float *const restrict  in,
float *const restrict  out,
const size_t  width,
const size_t  height 
)
inlinestatic

◆ build_gui_kernel()

static void build_gui_kernel ( unsigned char *const  buffer,
const size_t  width,
const size_t  height,
dt_iop_blurs_params_t p 
)
inlinestatic

◆ build_pixel_kernel()

static void build_pixel_kernel ( float *const  buffer,
const size_t  width,
const size_t  height,
dt_iop_blurs_params_t p 
)
inlinestatic

◆ commit_params()

◆ compute_norm()

static float compute_norm ( float *const  buffer,
const size_t  width,
const size_t  height 
)
inlinestatic

References height, and width.

Referenced by build_pixel_kernel().

◆ create_gauss_kernel()

static void create_gauss_kernel ( float *const restrict  buffer,
const size_t  width,
const size_t  height 
)
inlinestatic

References height, and width.

Referenced by build_gui_kernel(), and build_pixel_kernel().

◆ create_lens_kernel()

static void create_lens_kernel ( float *const restrict  buffer,
const size_t  width,
const size_t  height,
const float  n,
const float  m,
const float  k,
const float  rotation 
)
inlinestatic

References dt_fast_hypotf(), eps, height, m, M_PI_F, and width.

Referenced by build_gui_kernel(), and build_pixel_kernel().

◆ create_motion_kernel()

static void create_motion_kernel ( float *const restrict  buffer,
const size_t  width,
const size_t  height,
const float  angle,
const float  curvature,
const float  offset 
)
inlinestatic

References A, B, eps, m, M_PI_F, and width.

Referenced by build_gui_kernel(), and build_pixel_kernel().

◆ default_colorspace()

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

References IOP_CS_RGB.

◆ default_group()

int default_group ( )

References IOP_GROUP_SHARPNESS.

◆ description()

const char ** description ( struct dt_iop_module_t self)

◆ dt_iop_tonecurve_draw()

static gboolean dt_iop_tonecurve_draw ( GtkWidget *  widget,
cairo_t *  crf,
gpointer  user_data 
)
static

◆ flags()

◆ gui_changed()

void gui_changed ( dt_iop_module_t self,
GtkWidget *  w,
void previous 
)

◆ gui_cleanup()

void gui_cleanup ( dt_iop_module_t self)

◆ gui_init()

◆ gui_update()

void gui_update ( dt_iop_module_t self)
Todo:
check why needed

References gui_changed().

◆ init_kernel()

static void init_kernel ( float *const restrict  buffer,
const size_t  width,
const size_t  height 
)
inlinestatic

References height, and width.

Referenced by build_gui_kernel(), and build_pixel_kernel().

◆ name()

const char * name ( )

◆ normalize()

static void normalize ( float *const  buffer,
const size_t  width,
const size_t  height,
const float  norm 
)
inlinestatic

◆ process()