Ansel 0.0
A darktable fork - bloat + design vision
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
rcd.c File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RCD_TILESIZE   112
 
#define RCD_BORDER   9
 
#define RCD_MARGIN   6
 
#define RCD_TILEVALID   (RCD_TILESIZE - 2 * RCD_BORDER)
 
#define w1   RCD_TILESIZE
 
#define w2   (2 * RCD_TILESIZE)
 
#define w3   (3 * RCD_TILESIZE)
 
#define w4   (4 * RCD_TILESIZE)
 
#define eps   1e-5f
 
#define epssq   1e-10f
 

Functions

static INLINE float safe_in (float a, float scale)
 
static void rcd_ppg_border (float *const out, const float *const in, const int width, const int height, const uint32_t filters, const int margin)
 
static void rcd_demosaic (dt_dev_pixelpipe_iop_t *piece, float *const restrict out, const float *const restrict in, dt_iop_roi_t *const roi_out, const dt_iop_roi_t *const roi_in, const uint32_t filters)
 

Macro Definition Documentation

◆ eps

#define eps   1e-5f

◆ epssq

#define epssq   1e-10f

◆ RCD_BORDER

#define RCD_BORDER   9

◆ RCD_MARGIN

#define RCD_MARGIN   6

◆ RCD_TILESIZE

#define RCD_TILESIZE   112

◆ RCD_TILEVALID

#define RCD_TILEVALID   (RCD_TILESIZE - 2 * RCD_BORDER)

◆ w1

#define w1   RCD_TILESIZE

◆ w2

#define w2   (2 * RCD_TILESIZE)

◆ w3

#define w3   (3 * RCD_TILESIZE)

◆ w4

#define w4   (4 * RCD_TILESIZE)

Function Documentation

◆ rcd_demosaic()

static void rcd_demosaic ( dt_dev_pixelpipe_iop_t piece,
float *const restrict  out,
const float *const restrict  in,
dt_iop_roi_t *const  roi_out,
const dt_iop_roi_t *const  roi_in,
const uint32_t  filters 
)
static
Todo:
: CRITICAL: need to handle the case where we couldn't alloc the memory,
Todo:
: figure out what part of rgb is being accessed without initialization on partial tiles

References c1, DT_ALIGNED_PIXEL, dt_alloc_align_float(), dt_control_log(), dt_free_align, eps, epssq, FC(), height, dt_iop_roi_t::height, intp(), MIN, dt_dev_pixelpipe_iop_t::pipe, RCD_BORDER, RCD_MARGIN, rcd_ppg_border(), RCD_TILESIZE, RCD_TILEVALID, safe_in(), sqf(), w1, w2, w3, w4, width, and dt_iop_roi_t::width.

Referenced by process().

◆ rcd_ppg_border()

static void rcd_ppg_border ( float *const  out,
const float *const  in,
const int  width,
const int  height,
const uint32_t  filters,
const int  margin 
)
static

This is basically ppg adopted to only write data to RCD_MARGIN

References f(), FC(), height, m, and width.

Referenced by rcd_demosaic().

◆ safe_in()

static INLINE float safe_in ( float  a,
float  scale 
)
static

Referenced by rcd_demosaic().