Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
histogram.c File Reference
#include <math.h>
#include <stddef.h>
#include <stdint.h>
#include <assert.h>
#include <stdlib.h>
#include "common/colorspaces_inline_conversions.h"
#include "common/darktable.h"
#include "common/histogram.h"
#include "develop/imageop.h"
+ Include dependency graph for common/histogram.c:

Macros

#define S(V, params)   ((params->mul) * ((float)V))
 
#define P(V, params)   (CLAMP((V), 0, (params->bins_count - 1)))
 
#define PU(V, params)   (MIN((V), (params->bins_count - 1)))
 
#define PS(V, params)   (P(S(V, params), params))
 

Functions

static void histogram_helper_cs_RAW_helper_process_pixel_float (const dt_dev_histogram_collection_params_t *const histogram_params, const float *pixel, uint32_t *histogram)
 
static void histogram_helper_cs_RAW (const dt_dev_histogram_collection_params_t *const histogram_params, const void *pixel, uint32_t *histogram, int j, const dt_iop_order_iccprofile_info_t *const profile_info)
 
static void histogram_helper_cs_RAW_helper_process_pixel_uint16 (const dt_dev_histogram_collection_params_t *const histogram_params, const uint16_t *pixel, uint32_t *histogram)
 
void dt_histogram_helper_cs_RAW_uint16 (const dt_dev_histogram_collection_params_t *const histogram_params, const void *pixel, uint32_t *histogram, int j, const dt_iop_order_iccprofile_info_t *const profile_info)
 
static void __attribute__ ((__unused__))
 
static void histogram_helper_cs_rgb (const dt_dev_histogram_collection_params_t *const histogram_params, const void *pixel, uint32_t *histogram, int j, const dt_iop_order_iccprofile_info_t *const profile_info)
 
static void histogram_helper_cs_rgb_compensated (const dt_dev_histogram_collection_params_t *const histogram_params, const void *pixel, uint32_t *histogram, int j, const dt_iop_order_iccprofile_info_t *const profile_info)
 
static void histogram_helper_cs_Lab (const dt_dev_histogram_collection_params_t *const histogram_params, const void *pixel, uint32_t *histogram, int j, const dt_iop_order_iccprofile_info_t *const profile_info)
 
static void histogram_helper_cs_Lab_LCh (const dt_dev_histogram_collection_params_t *const histogram_params, const void *pixel, uint32_t *histogram, int j, const dt_iop_order_iccprofile_info_t *const profile_info)
 
void dt_histogram_worker (dt_dev_histogram_collection_params_t *const histogram_params, dt_dev_histogram_stats_t *histogram_stats, const void *const pixel, uint32_t **histogram, const dt_worker Worker, const dt_iop_order_iccprofile_info_t *const profile_info)
 
void dt_histogram_helper (dt_dev_histogram_collection_params_t *histogram_params, dt_dev_histogram_stats_t *histogram_stats, const dt_iop_colorspace_type_t cst, const dt_iop_colorspace_type_t cst_to, const void *pixel, uint32_t **histogram, const int compensate_middle_grey, const dt_iop_order_iccprofile_info_t *const profile_info)
 
void dt_histogram_max_helper (const dt_dev_histogram_stats_t *const histogram_stats, const dt_iop_colorspace_type_t cst, const dt_iop_colorspace_type_t cst_to, uint32_t **histogram, uint32_t *histogram_max)
 

Macro Definition Documentation

◆ P

#define P (   V,
  params 
)    (CLAMP((V), 0, (params->bins_count - 1)))

◆ PS

#define PS (   V,
  params 
)    (P(S(V, params), params))

◆ PU

#define PU (   V,
  params 
)    (MIN((V), (params->bins_count - 1)))

◆ S

#define S (   V,
  params 
)    ((params->mul) * ((float)V))

Function Documentation

◆ __attribute__()

static void __attribute__ ( (__unused__)  )
inlinestatic

References B, PS, and R.

◆ dt_histogram_helper()

void dt_histogram_helper ( dt_dev_histogram_collection_params_t histogram_params,
dt_dev_histogram_stats_t histogram_stats,
const dt_iop_colorspace_type_t  cst,
const dt_iop_colorspace_type_t  cst_to,
const void pixel,
uint32_t **  histogram,
const int  compensate_middle_grey,
const dt_iop_order_iccprofile_info_t *const  profile_info 
)

◆ dt_histogram_helper_cs_RAW_uint16()

void dt_histogram_helper_cs_RAW_uint16 ( const dt_dev_histogram_collection_params_t *const  histogram_params,
const void pixel,
uint32_t *  histogram,
int  j,
const dt_iop_order_iccprofile_info_t *const  profile_info 
)
inline

◆ dt_histogram_max_helper()

void dt_histogram_max_helper ( const dt_dev_histogram_stats_t *const  histogram_stats,
const dt_iop_colorspace_type_t  cst,
const dt_iop_colorspace_type_t  cst_to,
uint32_t **  histogram,
uint32_t *  histogram_max 
)

◆ dt_histogram_worker()

◆ histogram_helper_cs_Lab()

static void histogram_helper_cs_Lab ( const dt_dev_histogram_collection_params_t *const  histogram_params,
const void pixel,
uint32_t *  histogram,
int  j,
const dt_iop_order_iccprofile_info_t *const  profile_info 
)
inlinestatic

◆ histogram_helper_cs_Lab_LCh()

static void histogram_helper_cs_Lab_LCh ( const dt_dev_histogram_collection_params_t *const  histogram_params,
const void pixel,
uint32_t *  histogram,
int  j,
const dt_iop_order_iccprofile_info_t *const  profile_info 
)
inlinestatic

◆ histogram_helper_cs_RAW()

static void histogram_helper_cs_RAW ( const dt_dev_histogram_collection_params_t *const  histogram_params,
const void pixel,
uint32_t *  histogram,
int  j,
const dt_iop_order_iccprofile_info_t *const  profile_info 
)
inlinestatic

◆ histogram_helper_cs_RAW_helper_process_pixel_float()

static void histogram_helper_cs_RAW_helper_process_pixel_float ( const dt_dev_histogram_collection_params_t *const  histogram_params,
const float *  pixel,
uint32_t *  histogram 
)
inlinestatic

References PS.

Referenced by histogram_helper_cs_RAW().

◆ histogram_helper_cs_RAW_helper_process_pixel_uint16()

static void histogram_helper_cs_RAW_helper_process_pixel_uint16 ( const dt_dev_histogram_collection_params_t *const  histogram_params,
const uint16_t *  pixel,
uint32_t *  histogram 
)
inlinestatic

References PU.

Referenced by dt_histogram_helper_cs_RAW_uint16().

◆ histogram_helper_cs_rgb()

static void histogram_helper_cs_rgb ( const dt_dev_histogram_collection_params_t *const  histogram_params,
const void pixel,
uint32_t *  histogram,
int  j,
const dt_iop_order_iccprofile_info_t *const  profile_info 
)
inlinestatic

◆ histogram_helper_cs_rgb_compensated()

static void histogram_helper_cs_rgb_compensated ( const dt_dev_histogram_collection_params_t *const  histogram_params,
const void pixel,
uint32_t *  histogram,
int  j,
const dt_iop_order_iccprofile_info_t *const  profile_info 
)
inlinestatic