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

Go to the source code of this file.

Data Structures

struct  dt_iop_cacorrect_params_t
 
struct  dt_iop_cacorrect_gui_data_t
 
struct  dt_iop_cacorrect_data_t
 

Macros

#define INLINE   inline
 
#define CA_SIZE_MINIMUM   (1600)
 

Typedefs

typedef enum dt_iop_cacorrect_multi_t dt_iop_cacorrect_multi_t
 WARNING: mem allocs are not protected against out-of-memory (NULL buffers) because the code is a mess, this module is deprecated and fuck life. If your system runs out of memory, this module will crash. Your eyes are made for crying, use them. With love, Aurélien, 2025.
 
typedef struct dt_iop_cacorrect_params_t dt_iop_cacorrect_params_t
 
typedef struct dt_iop_cacorrect_gui_data_t dt_iop_cacorrect_gui_data_t
 
typedef struct dt_iop_cacorrect_data_t dt_iop_cacorrect_data_t
 

Enumerations

enum  dt_iop_cacorrect_multi_t {
  CACORRETC_MULTI_1 = 1 ,
  CACORRETC_MULTI_2 = 2 ,
  CACORRETC_MULTI_3 = 3 ,
  CACORRETC_MULTI_4 = 4 ,
  CACORRETC_MULTI_5 = 5
}
 WARNING: mem allocs are not protected against out-of-memory (NULL buffers) because the code is a mess, this module is deprecated and fuck life. If your system runs out of memory, this module will crash. Your eyes are made for crying, use them. With love, Aurélien, 2025. More...
 

Functions

const char * name ()
 
const char ** description (struct dt_iop_module_t *self)
 
int default_group ()
 
int flags ()
 
int default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
 
void input_format (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_buffer_dsc_t *dsc)
 
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 SQR (float x)
 
static float LIM (const float a, const float b, const float c)
 
static float intp (const float a, const float b, const float c)
 
static __DT_CLONE_TARGETS__ gboolean LinEqSolve (int nDim, double *pfMatr, double *pfVect, double *pfSolution)
 
static void pixSort (float *a, float *b)
 
__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 i, void *const o)
 
static gboolean _cacorrect_supported (const dt_image_t *img)
 
void reload_defaults (dt_iop_module_t *module)
 
gboolean force_enable (struct dt_iop_module_t *self, const gboolean current_state)
 
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_update (dt_iop_module_t *self)
 
void gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous)
 
void gui_cleanup (dt_iop_module_t *self)
 
void gui_init (dt_iop_module_t *self)
 

Macro Definition Documentation

◆ CA_SIZE_MINIMUM

#define CA_SIZE_MINIMUM   (1600)

Definition at line 316 of file cacorrect.c.

◆ INLINE

#define INLINE   inline

Definition at line 167 of file cacorrect.c.

Typedef Documentation

◆ dt_iop_cacorrect_data_t

◆ dt_iop_cacorrect_gui_data_t

◆ dt_iop_cacorrect_multi_t

WARNING: mem allocs are not protected against out-of-memory (NULL buffers) because the code is a mess, this module is deprecated and fuck life. If your system runs out of memory, this module will crash. Your eyes are made for crying, use them. With love, Aurélien, 2025.

◆ dt_iop_cacorrect_params_t

Enumeration Type Documentation

◆ dt_iop_cacorrect_multi_t

WARNING: mem allocs are not protected against out-of-memory (NULL buffers) because the code is a mess, this module is deprecated and fuck life. If your system runs out of memory, this module will crash. Your eyes are made for crying, use them. With love, Aurélien, 2025.

Enumerator
CACORRETC_MULTI_1 
CACORRETC_MULTI_2 
CACORRETC_MULTI_3 
CACORRETC_MULTI_4 
CACORRETC_MULTI_5 

Definition at line 80 of file cacorrect.c.

Function Documentation

◆ _cacorrect_supported()

static gboolean _cacorrect_supported ( const dt_image_t img)
static

◆ 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 1451 of file cacorrect.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 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 1431 of file cacorrect.c.

References d, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::dev, dt_image_pipe_class(), dt_image_pipe_class_name(), dt_iop_fmt_log, dt_dev_pixelpipe_iop_t::enabled, dt_develop_t::image_storage, 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 134 of file cacorrect.c.

References IOP_CS_RAW.

◆ default_group()

int default_group ( )

Definition at line 124 of file cacorrect.c.

References IOP_GROUP_REPAIR.

◆ description()

const char ** description ( struct dt_iop_module_t self)

Definition at line 114 of file cacorrect.c.

References dt_iop_set_description().

◆ flags()

int flags ( )

Definition at line 129 of file cacorrect.c.

References IOP_FLAGS_DEPRECATED, and IOP_FLAGS_ONE_INSTANCE.

◆ force_enable()

gboolean force_enable ( struct dt_iop_module_t self,
const gboolean  current_state 
)

◆ gui_changed()

◆ gui_cleanup()

void gui_cleanup ( dt_iop_module_t self)

Definition at line 1491 of file cacorrect.c.

References IOP_GUI_FREE.

◆ gui_init()

◆ gui_update()

◆ init_pipe()

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

◆ input_format()

◆ intp()

static float intp ( const float  a,
const float  b,
const float  c 
)
inlinestatic

Definition at line 180 of file cacorrect.c.

Referenced by dual_demosaic(), process(), and rcd_demosaic().

◆ 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 147 of file cacorrect.c.

References dt_iop_cacorrect_params_t::avoidshift, FALSE, and n.

◆ LIM()

static float LIM ( const float  a,
const float  b,
const float  c 
)
inlinestatic

Definition at line 176 of file cacorrect.c.

References MAX, and MIN.

Referenced by process().

◆ LinEqSolve()

static __DT_CLONE_TARGETS__ gboolean LinEqSolve ( int  nDim,
double pfMatr,
double pfVect,
double pfSolution 
)
static

Definition at line 214 of file cacorrect.c.

References FALSE, i, k, m, and TRUE.

Referenced by process().

◆ name()

const char * name ( )

Definition at line 108 of file cacorrect.c.

◆ pixSort()

static void pixSort ( float *  a,
float *  b 
)
inlinestatic

Definition at line 301 of file cacorrect.c.

Referenced by process().

◆ process()

◆ reload_defaults()

◆ SQR()

static float SQR ( float  x)
inlinestatic

Definition at line 171 of file cacorrect.c.

References x.