Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
shadhi.c File Reference
#include "bauhaus/bauhaus.h"
#include "common/bilateral.h"
#include "common/bilateralcl.h"
#include "common/debug.h"
#include "common/gaussian.h"
#include "common/opencl.h"
#include "control/control.h"
#include "develop/develop.h"
#include "develop/imageop.h"
#include "develop/imageop_math.h"
#include "develop/imageop_gui.h"
#include "develop/tiling.h"
#include "dtgtk/togglebutton.h"
#include "gui/gtk.h"
#include "gui/presets.h"
#include "iop/iop_api.h"
#include <assert.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <inttypes.h>
+ Include dependency graph for shadhi.c:

Go to the source code of this file.

Data Structures

struct  dt_iop_shadhi_params1_t
 
struct  dt_iop_shadhi_params2_t
 
struct  dt_iop_shadhi_params3_t
 
struct  dt_iop_shadhi_params4_t
 
struct  dt_iop_shadhi_params_t
 
struct  dt_iop_shadhi_gui_data_t
 
struct  dt_iop_shadhi_data_t
 

Macros

#define UNBOUND_L   1
 
#define UNBOUND_A   2
 
#define UNBOUND_B   4
 
#define UNBOUND_SHADOWS_L   UNBOUND_L
 
#define UNBOUND_SHADOWS_A   UNBOUND_A
 
#define UNBOUND_SHADOWS_B   UNBOUND_B
 
#define UNBOUND_HIGHLIGHTS_L   (UNBOUND_L << 3) /* 8 */
 
#define UNBOUND_HIGHLIGHTS_A   (UNBOUND_A << 3) /* 16 */
 
#define UNBOUND_HIGHLIGHTS_B   (UNBOUND_B << 3) /* 32 */
 
#define UNBOUND_GAUSSIAN   64
 
#define UNBOUND_BILATERAL   128 /* not implemented yet */
 
#define UNBOUND_DEFAULT
 

Typedefs

typedef enum dt_iop_shadhi_algo_t dt_iop_shadhi_algo_t
 
typedef struct dt_iop_shadhi_params1_t dt_iop_shadhi_params1_t
 
typedef struct dt_iop_shadhi_params2_t dt_iop_shadhi_params2_t
 
typedef struct dt_iop_shadhi_params3_t dt_iop_shadhi_params3_t
 
typedef struct dt_iop_shadhi_params4_t dt_iop_shadhi_params4_t
 
typedef struct dt_iop_shadhi_params_t dt_iop_shadhi_params_t
 
typedef struct dt_iop_shadhi_gui_data_t dt_iop_shadhi_gui_data_t
 
typedef struct dt_iop_shadhi_data_t dt_iop_shadhi_data_t
 

Enumerations

enum  dt_iop_shadhi_algo_t {
  SHADHI_ALGO_GAUSSIAN ,
  SHADHI_ALGO_BILATERAL
}
 

Functions

const char * name ()
 
int flags ()
 
int default_group ()
 
int default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
 
const char ** description (struct dt_iop_module_t *self)
 
int legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version)
 
static void _Lab_scale (const float *i, float *o)
 
static void _Lab_rescale (const float *i, float *o)
 
static float sign (float x)
 
__DT_CLONE_TARGETS__ 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 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)
 
void commit_params (struct dt_iop_module_t *self, dt_iop_params_t *p1, 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 (struct dt_iop_module_t *self)
 

Macro Definition Documentation

◆ UNBOUND_A

#define UNBOUND_A   2

Definition at line 72 of file shadhi.c.

◆ UNBOUND_B

#define UNBOUND_B   4

Definition at line 73 of file shadhi.c.

◆ UNBOUND_BILATERAL

#define UNBOUND_BILATERAL   128 /* not implemented yet */

Definition at line 81 of file shadhi.c.

◆ UNBOUND_DEFAULT

#define UNBOUND_DEFAULT
Value:
#define UNBOUND_SHADOWS_L
Definition shadhi.c:74
#define UNBOUND_GAUSSIAN
Definition shadhi.c:80
#define UNBOUND_HIGHLIGHTS_L
Definition shadhi.c:77
#define UNBOUND_HIGHLIGHTS_A
Definition shadhi.c:78
#define UNBOUND_SHADOWS_A
Definition shadhi.c:75
#define UNBOUND_SHADOWS_B
Definition shadhi.c:76
#define UNBOUND_HIGHLIGHTS_B
Definition shadhi.c:79

Definition at line 82 of file shadhi.c.

◆ UNBOUND_GAUSSIAN

#define UNBOUND_GAUSSIAN   64

Definition at line 80 of file shadhi.c.

◆ UNBOUND_HIGHLIGHTS_A

#define UNBOUND_HIGHLIGHTS_A   (UNBOUND_A << 3) /* 16 */

Definition at line 78 of file shadhi.c.

◆ UNBOUND_HIGHLIGHTS_B

#define UNBOUND_HIGHLIGHTS_B   (UNBOUND_B << 3) /* 32 */

Definition at line 79 of file shadhi.c.

◆ UNBOUND_HIGHLIGHTS_L

#define UNBOUND_HIGHLIGHTS_L   (UNBOUND_L << 3) /* 8 */

Definition at line 77 of file shadhi.c.

◆ UNBOUND_L

#define UNBOUND_L   1

Definition at line 71 of file shadhi.c.

◆ UNBOUND_SHADOWS_A

#define UNBOUND_SHADOWS_A   UNBOUND_A

Definition at line 75 of file shadhi.c.

◆ UNBOUND_SHADOWS_B

#define UNBOUND_SHADOWS_B   UNBOUND_B

Definition at line 76 of file shadhi.c.

◆ UNBOUND_SHADOWS_L

#define UNBOUND_SHADOWS_L   UNBOUND_L

Definition at line 74 of file shadhi.c.

Typedef Documentation

◆ dt_iop_shadhi_algo_t

◆ dt_iop_shadhi_data_t

◆ dt_iop_shadhi_gui_data_t

◆ dt_iop_shadhi_params1_t

◆ dt_iop_shadhi_params2_t

◆ dt_iop_shadhi_params3_t

◆ dt_iop_shadhi_params4_t

◆ dt_iop_shadhi_params_t

Enumeration Type Documentation

◆ dt_iop_shadhi_algo_t

Enumerator
SHADHI_ALGO_GAUSSIAN 
SHADHI_ALGO_BILATERAL 

Definition at line 88 of file shadhi.c.

Function Documentation

◆ _Lab_rescale()

static void _Lab_rescale ( const float *  i,
float *  o 
)
inlinestatic

Definition at line 309 of file shadhi.c.

References i.

Referenced by process().

◆ _Lab_scale()

static void _Lab_scale ( const float *  i,
float *  o 
)
inlinestatic

Definition at line 301 of file shadhi.c.

References i.

Referenced by process().

◆ 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 537 of file shadhi.c.

References dt_dev_pixelpipe_iop_t::data, and dt_free_align.

◆ commit_params()

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

Definition at line 512 of file shadhi.c.

References d, dt_dev_pixelpipe_iop_t::data, and p.

◆ 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 207 of file shadhi.c.

References IOP_CS_LAB.

◆ default_group()

int default_group ( )

Definition at line 202 of file shadhi.c.

References IOP_GROUP_TONES.

◆ description()

const char ** description ( struct dt_iop_module_t self)

Definition at line 212 of file shadhi.c.

References dt_iop_set_description().

◆ flags()

int flags ( )

◆ gui_init()

◆ init_pipe()

void init_pipe ( struct dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t 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 
)

◆ name()

const char * name ( )

Definition at line 192 of file shadhi.c.

◆ process()

◆ sign()

static float sign ( float  x)
inlinestatic

Definition at line 316 of file shadhi.c.

References x.

◆ tiling_callback()