![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <assert.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "common/darktable.h"
#include "develop/imageop_math.h"
Go to the source code of this file.
Macros | |
#define | MIN_FLOAT exp2f(-16.0f) |
#define | LOOP(fn) |
Typedefs | |
typedef enum dt_iop_luminance_mask_method_t | dt_iop_luminance_mask_method_t |
Enumerations | |
enum | dt_iop_luminance_mask_method_t { DT_TONEEQ_MEAN = 0 , DT_TONEEQ_LIGHTNESS , DT_TONEEQ_VALUE , DT_TONEEQ_NORM_1 , DT_TONEEQ_NORM_2 , DT_TONEEQ_NORM_POWER , DT_TONEEQ_GEOMEAN , DT_TONEEQ_LAST } |
Functions | |
static __DT_CLONE_TARGETS__ float | linear_contrast (const float pixel, const float fulcrum, const float contrast) |
static __DT_CLONE_TARGETS__ void | pixel_rgb_mean (const float *const restrict image, float *const restrict luminance, const size_t k, const size_t ch, const float exposure_boost, const float fulcrum, const float contrast_boost) |
static __DT_CLONE_TARGETS__ void | pixel_rgb_value (const float *const restrict image, float *const restrict luminance, const size_t k, const size_t ch, const float exposure_boost, const float fulcrum, const float contrast_boost) |
static __DT_CLONE_TARGETS__ void | pixel_rgb_lightness (const float *const restrict image, float *const restrict luminance, const size_t k, const size_t ch, const float exposure_boost, const float fulcrum, const float contrast_boost) |
static __DT_CLONE_TARGETS__ void | pixel_rgb_norm_1 (const float *const restrict image, float *const restrict luminance, const size_t k, const size_t ch, const float exposure_boost, const float fulcrum, const float contrast_boost) |
static __DT_CLONE_TARGETS__ void | pixel_rgb_norm_2 (const float *const restrict image, float *const restrict luminance, const size_t k, const size_t ch, const float exposure_boost, const float fulcrum, const float contrast_boost) |
static __DT_CLONE_TARGETS__ void | pixel_rgb_norm_power (const float *const restrict image, float *const restrict luminance, const size_t k, const size_t ch, const float exposure_boost, const float fulcrum, const float contrast_boost) |
static __DT_CLONE_TARGETS__ void | pixel_rgb_geomean (const float *const restrict image, float *const restrict luminance, const size_t k, const size_t ch, const float exposure_boost, const float fulcrum, const float contrast_boost) |
static __DT_CLONE_TARGETS__ void | luminance_mask (const float *const restrict in, float *const restrict out, const size_t width, const size_t height, const size_t ch, const dt_iop_luminance_mask_method_t method, const float exposure_boost, const float fulcrum, const float contrast_boost) |
#define LOOP | ( | fn | ) |
#define MIN_FLOAT exp2f(-16.0f) |
|
static |
DOCUMENTATION
Lightness map computation
Flatten an RGB image into a lightness/luminance map (grey image) using several vector norms, and other pseudo-norms.
These functions are all written to be vectorizable, using the base image pointer and the explicit index of the current pixel. They perform exposure and contrast compensation as well, for better cache handling.
Buffers need to be 64-bits aligned.
The outputs are clipped to avoid negative and close-to-zero results that could backfire in the exposure computations.
References MIN_FLOAT.
Referenced by pixel_rgb_geomean(), pixel_rgb_lightness(), pixel_rgb_mean(), pixel_rgb_norm_1(), pixel_rgb_norm_2(), pixel_rgb_norm_power(), and pixel_rgb_value().
|
inlinestatic |
References DT_TONEEQ_GEOMEAN, DT_TONEEQ_LIGHTNESS, DT_TONEEQ_MEAN, DT_TONEEQ_NORM_1, DT_TONEEQ_NORM_2, DT_TONEEQ_NORM_POWER, DT_TONEEQ_VALUE, height, LOOP, pixel_rgb_geomean(), pixel_rgb_lightness(), pixel_rgb_mean(), pixel_rgb_norm_1(), pixel_rgb_norm_2(), pixel_rgb_norm_power(), pixel_rgb_value(), and width.
Referenced by compute_luminance_mask().
|
static |
References linear_contrast().
Referenced by luminance_mask().
|
static |
References linear_contrast().
Referenced by luminance_mask().
|
static |
References linear_contrast().
Referenced by luminance_mask().
|
static |
References linear_contrast().
Referenced by luminance_mask().
|
static |
References linear_contrast().
Referenced by luminance_mask().
|
static |
References linear_contrast().
Referenced by luminance_mask(), and test_pixel_rgb_norm_power().
|
static |
References linear_contrast().
Referenced by luminance_mask().