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

Data Structures

struct  dt_iop_colorreconstruct_params1_t
 
struct  dt_iop_colorreconstruct_params2_t
 
struct  dt_iop_colorreconstruct_params_t
 
struct  dt_iop_colorreconstruct_Lab_t
 
struct  dt_iop_colorreconstruct_bilateral_frozen_t
 
struct  dt_iop_colorreconstruct_gui_data_t
 
struct  dt_iop_colorreconstruct_data_t
 
struct  dt_iop_colorreconstruct_global_data_t
 
struct  dt_iop_colorreconstruct_bilateral_t
 

Macros

#define DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_S   500
 
#define DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_R   100
 
#define DT_COLORRECONSTRUCT_SPATIAL_APPROX   100.0f
 

Typedefs

typedef enum dt_iop_colorreconstruct_precedence_t dt_iop_colorreconstruct_precedence_t
 
typedef struct dt_iop_colorreconstruct_params1_t dt_iop_colorreconstruct_params1_t
 
typedef struct dt_iop_colorreconstruct_params2_t dt_iop_colorreconstruct_params2_t
 
typedef struct dt_iop_colorreconstruct_params_t dt_iop_colorreconstruct_params_t
 
typedef struct dt_iop_colorreconstruct_Lab_t dt_iop_colorreconstruct_Lab_t
 
typedef struct dt_iop_colorreconstruct_bilateral_frozen_t dt_iop_colorreconstruct_bilateral_frozen_t
 
typedef struct dt_iop_colorreconstruct_gui_data_t dt_iop_colorreconstruct_gui_data_t
 
typedef struct dt_iop_colorreconstruct_data_t dt_iop_colorreconstruct_data_t
 
typedef struct dt_iop_colorreconstruct_global_data_t dt_iop_colorreconstruct_global_data_t
 
typedef struct dt_iop_colorreconstruct_bilateral_t dt_iop_colorreconstruct_bilateral_t
 

Enumerations

enum  dt_iop_colorreconstruct_precedence_t {
  COLORRECONSTRUCT_PRECEDENCE_NONE ,
  COLORRECONSTRUCT_PRECEDENCE_CHROMA ,
  COLORRECONSTRUCT_PRECEDENCE_HUE
}
 

Functions

const char * name ()
 
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)
 
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 float hue_conversion (const float HSL_Hue)
 
static void image_to_grid (const dt_iop_colorreconstruct_bilateral_t *const b, const float i, const float j, const float L, float *x, float *y, float *z)
 
static void grid_rescale (const dt_iop_colorreconstruct_bilateral_t *const b, const int i, const int j, const dt_iop_roi_t *roi, const float scale, float *px, float *py)
 
static void dt_iop_colorreconstruct_bilateral_dump (dt_iop_colorreconstruct_bilateral_frozen_t *bf)
 
static void dt_iop_colorreconstruct_bilateral_free (dt_iop_colorreconstruct_bilateral_t *b)
 
static dt_iop_colorreconstruct_bilateral_tdt_iop_colorreconstruct_bilateral_init (const dt_iop_roi_t *roi, const float iscale, const float sigma_s, const float sigma_r)
 
static dt_iop_colorreconstruct_bilateral_frozen_tdt_iop_colorreconstruct_bilateral_freeze (dt_iop_colorreconstruct_bilateral_t *b)
 
static dt_iop_colorreconstruct_bilateral_tdt_iop_colorreconstruct_bilateral_thaw (dt_iop_colorreconstruct_bilateral_frozen_t *bf)
 
static void dt_iop_colorreconstruct_bilateral_splat (dt_iop_colorreconstruct_bilateral_t *b, const float *const in, const float threshold, dt_iop_colorreconstruct_precedence_t precedence, const float *params)
 
static void blur_line (dt_iop_colorreconstruct_Lab_t *buf, const int offset1, const int offset2, const int offset3, const int size1, const int size2, const int size3)
 
static void dt_iop_colorreconstruct_bilateral_blur (dt_iop_colorreconstruct_bilateral_t *b)
 
static void dt_iop_colorreconstruct_bilateral_slice (const dt_iop_colorreconstruct_bilateral_t *const b, const float *const in, float *const out, const float threshold, const dt_iop_roi_t *const roi, const float iscale)
 
void process (struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out)
 
static size_t dt_iop_colorreconstruct_bilateral_memory_use (const int width, const int height, const float sigma_s, const float sigma_r)
 
static size_t dt_iop_colorreconstruct_bilateral_singlebuffer_size (const int width, const int height, const float sigma_s, const float sigma_r)
 
void tiling_callback (struct dt_iop_module_t *self, struct dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *roi_in, const dt_iop_roi_t *roi_out, struct dt_develop_tiling_t *tiling)
 
void gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous)
 
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_update (struct dt_iop_module_t *self)
 
void init_global (dt_iop_module_so_t *module)
 
void cleanup_global (dt_iop_module_so_t *module)
 
void gui_init (struct dt_iop_module_t *self)
 
void gui_cleanup (struct dt_iop_module_t *self)
 

Macro Definition Documentation

◆ DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_R

#define DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_R   100

◆ DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_S

#define DT_COLORRECONSTRUCT_BILATERAL_MAX_RES_S   500

◆ DT_COLORRECONSTRUCT_SPATIAL_APPROX

#define DT_COLORRECONSTRUCT_SPATIAL_APPROX   100.0f

Typedef Documentation

◆ dt_iop_colorreconstruct_bilateral_frozen_t

◆ dt_iop_colorreconstruct_bilateral_t

◆ dt_iop_colorreconstruct_data_t

◆ dt_iop_colorreconstruct_global_data_t

◆ dt_iop_colorreconstruct_gui_data_t

◆ dt_iop_colorreconstruct_Lab_t

◆ dt_iop_colorreconstruct_params1_t

◆ dt_iop_colorreconstruct_params2_t

◆ dt_iop_colorreconstruct_params_t

◆ dt_iop_colorreconstruct_precedence_t

Enumeration Type Documentation

◆ dt_iop_colorreconstruct_precedence_t

Enumerator
COLORRECONSTRUCT_PRECEDENCE_NONE 
COLORRECONSTRUCT_PRECEDENCE_CHROMA 
COLORRECONSTRUCT_PRECEDENCE_HUE 

Function Documentation

◆ blur_line()

static void blur_line ( dt_iop_colorreconstruct_Lab_t buf,
const int  offset1,
const int  offset2,
const int  offset3,
const int  size1,
const int  size2,
const int  size3 
)
static

◆ cleanup_global()

◆ cleanup_pipe()

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

◆ commit_params()

◆ default_colorspace()

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

References IOP_CS_LAB.

◆ default_group()

int default_group ( )

References IOP_GROUP_REPAIR.

◆ description()

const char ** description ( struct dt_iop_module_t self)

◆ dt_iop_colorreconstruct_bilateral_blur()

static void dt_iop_colorreconstruct_bilateral_blur ( dt_iop_colorreconstruct_bilateral_t b)
static

References blur_line().

Referenced by process().

◆ dt_iop_colorreconstruct_bilateral_dump()

◆ dt_iop_colorreconstruct_bilateral_free()

static void dt_iop_colorreconstruct_bilateral_free ( dt_iop_colorreconstruct_bilateral_t b)
static

◆ dt_iop_colorreconstruct_bilateral_freeze()

◆ dt_iop_colorreconstruct_bilateral_init()

static dt_iop_colorreconstruct_bilateral_t * dt_iop_colorreconstruct_bilateral_init ( const dt_iop_roi_t roi,
const float  iscale,
const float  sigma_s,
const float  sigma_r 
)
static

◆ dt_iop_colorreconstruct_bilateral_memory_use()

static size_t dt_iop_colorreconstruct_bilateral_memory_use ( const int  width,
const int  height,
const float  sigma_s,
const float  sigma_r 
)
static

◆ dt_iop_colorreconstruct_bilateral_singlebuffer_size()

static size_t dt_iop_colorreconstruct_bilateral_singlebuffer_size ( const int  width,
const int  height,
const float  sigma_s,
const float  sigma_r 
)
static

◆ dt_iop_colorreconstruct_bilateral_slice()

static void dt_iop_colorreconstruct_bilateral_slice ( const dt_iop_colorreconstruct_bilateral_t *const  b,
const float *const  in,
float *const  out,
const float  threshold,
const dt_iop_roi_t *const  roi,
const float  iscale 
)
static

◆ dt_iop_colorreconstruct_bilateral_splat()

static void dt_iop_colorreconstruct_bilateral_splat ( dt_iop_colorreconstruct_bilateral_t b,
const float *const  in,
const float  threshold,
dt_iop_colorreconstruct_precedence_t  precedence,
const float *  params 
)
static

◆ dt_iop_colorreconstruct_bilateral_thaw()

◆ flags()

◆ grid_rescale()

static void grid_rescale ( const dt_iop_colorreconstruct_bilateral_t *const  b,
const int  i,
const int  j,
const dt_iop_roi_t roi,
const float  scale,
float *  px,
float *  py 
)
inlinestatic

◆ gui_changed()

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

◆ gui_cleanup()

◆ gui_init()

◆ gui_update()

◆ hue_conversion()

static float hue_conversion ( const float  HSL_Hue)
inlinestatic

References dt_XYZ_to_Lab(), hsl2rgb(), and Lab().

Referenced by process().

◆ image_to_grid()

static void image_to_grid ( const dt_iop_colorreconstruct_bilateral_t *const  b,
const float  i,
const float  j,
const float  L,
float *  x,
float *  y,
float *  z 
)
inlinestatic

◆ init_global()

◆ init_pipe()

◆ legacy_params()

◆ name()

const char * name ( )

◆ process()

void process ( struct dt_iop_module_t self,
dt_dev_pixelpipe_iop_t piece,
const void *const  ivoid,
void *const  ovoid,
const dt_iop_roi_t *const  roi_in,
const dt_iop_roi_t *const  roi_out 
)

◆ tiling_callback()