![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/image.h"
#include "develop/imageop.h"
#include <glib.h>
#include <math.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | RED 0 |
#define | GREEN 1 |
#define | BLUE 2 |
#define | ALPHA 3 |
Functions | |
void | dt_iop_flip_and_zoom_8 (const uint8_t *in, int32_t iw, int32_t ih, uint8_t *out, int32_t ow, int32_t oh, const dt_image_orientation_t orientation, uint32_t *width, uint32_t *height) |
void | dt_iop_clip_and_zoom (float *out, const float *const in, const struct dt_iop_roi_t *const roi_out, const struct dt_iop_roi_t *const roi_in, const int32_t out_stride, const int32_t in_stride) |
void | dt_iop_clip_and_zoom_roi (float *out, const float *const in, const struct dt_iop_roi_t *const roi_out, const struct dt_iop_roi_t *const roi_in, const int32_t out_stride, const int32_t in_stride) |
void | dt_iop_clip_and_zoom_mosaic_half_size_f (float *const out, const float *const in, const dt_iop_roi_t *const roi_out, const dt_iop_roi_t *const roi_in, const int32_t out_stride, const int32_t in_stride, const uint32_t filters) |
void | dt_iop_clip_and_zoom_mosaic_half_size (uint16_t *const out, const uint16_t *const in, const dt_iop_roi_t *const roi_out, const dt_iop_roi_t *const roi_in, const int32_t out_stride, const int32_t in_stride, const uint32_t filters) |
void | dt_iop_clip_and_zoom_mosaic_third_size_xtrans (uint16_t *const out, const uint16_t *const in, const dt_iop_roi_t *const roi_out, const dt_iop_roi_t *const roi_in, const int32_t out_stride, const int32_t in_stride, const uint8_t(*const xtrans)[6]) |
void | dt_iop_clip_and_zoom_mosaic_third_size_xtrans_f (float *const out, const float *const in, const dt_iop_roi_t *const roi_out, const dt_iop_roi_t *const roi_in, const int32_t out_stride, const int32_t in_stride, const uint8_t(*const xtrans)[6]) |
void | dt_iop_clip_and_zoom_demosaic_passthrough_monochrome_f (float *out, const float *const in, const struct dt_iop_roi_t *const roi_out, const struct dt_iop_roi_t *const roi_in, const int32_t out_stride, const int32_t in_stride) |
void | dt_iop_clip_and_zoom_demosaic_half_size_f (float *out, const float *const in, const struct dt_iop_roi_t *const roi_out, const struct dt_iop_roi_t *const roi_in, const int32_t out_stride, const int32_t in_stride, const uint32_t filters) |
void | dt_iop_clip_and_zoom_demosaic_third_size_xtrans_f (float *out, const float *const in, const struct dt_iop_roi_t *const roi_out, const struct dt_iop_roi_t *const roi_in, const int32_t out_stride, const int32_t in_stride, const uint8_t(*const xtrans)[6]) |
void | dt_iop_clip_and_zoom_8 (const uint8_t *i, int32_t ix, int32_t iy, int32_t iw, int32_t ih, int32_t ibw, int32_t ibh, uint8_t *o, int32_t ox, int32_t oy, int32_t ow, int32_t oh, int32_t obw, int32_t obh) |
void | dt_iop_YCbCr_to_RGB (const dt_aligned_pixel_t yuv, dt_aligned_pixel_t rgb) |
void | dt_iop_RGB_to_YCbCr (const dt_aligned_pixel_t rgb, dt_aligned_pixel_t yuv) |
void | dt_iop_estimate_cubic (const float x[4], const float y[4], float a[4]) |
static float | dt_iop_eval_cubic (const float *const a, const float x) |
static void | dt_iop_estimate_exp (const float *const x, const float *const y, const int num, float *coeff) |
static float | dt_iop_eval_exp (const float *const coeff, const float x) |
static void | dt_iop_alpha_copy (const void *const ivoid, void *const ovoid, const size_t width, const size_t height) |
static int | FC (const size_t row, const size_t col, const uint32_t filters) |
static int | FCxtrans (const int row, const int col, const dt_iop_roi_t *const roi, const uint8_t(*const xtrans)[6]) |
static int | fcol (const int row, const int col, const uint32_t filters, const uint8_t(*const xtrans)[6]) |
#define ALPHA 3 |
#define BLUE 2 |
#define GREEN 1 |
#define RED 0 |
|
inlinestatic |
Copy alpha channel 1:1 from input to output
Referenced by process(), process(), process(), process(), process(), process(), process_common_cleanup(), process_cpu(), process_floyd_steinberg(), process_internal(), process_nlmeans_cpu(), process_random(), process_wavelets(), and process_wavelets().
void dt_iop_clip_and_zoom | ( | float * | out, |
const float *const | in, | ||
const struct dt_iop_roi_t *const | roi_out, | ||
const struct dt_iop_roi_t *const | roi_in, | ||
const int32_t | out_stride, | ||
const int32_t | in_stride | ||
) |
for homebrew pixel pipe: zoom pixel array.
void dt_iop_clip_and_zoom_8 | ( | const uint8_t * | i, |
int32_t | ix, | ||
int32_t | iy, | ||
int32_t | iw, | ||
int32_t | ih, | ||
int32_t | ibw, | ||
int32_t | ibh, | ||
uint8_t * | o, | ||
int32_t | ox, | ||
int32_t | oy, | ||
int32_t | ow, | ||
int32_t | oh, | ||
int32_t | obw, | ||
int32_t | obh | ||
) |
void dt_iop_clip_and_zoom_demosaic_half_size_f | ( | float * | out, |
const float *const | in, | ||
const struct dt_iop_roi_t *const | roi_out, | ||
const struct dt_iop_roi_t *const | roi_in, | ||
const int32_t | out_stride, | ||
const int32_t | in_stride, | ||
const uint32_t | filters | ||
) |
void dt_iop_clip_and_zoom_demosaic_passthrough_monochrome_f | ( | float * | out, |
const float *const | in, | ||
const struct dt_iop_roi_t *const | roi_out, | ||
const struct dt_iop_roi_t *const | roi_in, | ||
const int32_t | out_stride, | ||
const int32_t | in_stride | ||
) |
void dt_iop_clip_and_zoom_demosaic_third_size_xtrans_f | ( | float * | out, |
const float *const | in, | ||
const struct dt_iop_roi_t *const | roi_out, | ||
const struct dt_iop_roi_t *const | roi_in, | ||
const int32_t | out_stride, | ||
const int32_t | in_stride, | ||
const uint8_t(*) | xtrans[6] | ||
) |
x-trans sensor downscaling
void dt_iop_clip_and_zoom_mosaic_half_size | ( | uint16_t *const | out, |
const uint16_t *const | in, | ||
const dt_iop_roi_t *const | roi_out, | ||
const dt_iop_roi_t *const | roi_in, | ||
const int32_t | out_stride, | ||
const int32_t | in_stride, | ||
const uint32_t | filters | ||
) |
References CLAMPS, FC(), dt_iop_roi_t::height, MIN, dt_iop_roi_t::scale, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by _init_f().
void dt_iop_clip_and_zoom_mosaic_half_size_f | ( | float *const | out, |
const float *const | in, | ||
const dt_iop_roi_t *const | roi_out, | ||
const dt_iop_roi_t *const | roi_in, | ||
const int32_t | out_stride, | ||
const int32_t | in_stride, | ||
const uint32_t | filters | ||
) |
References FC(), dt_iop_roi_t::height, MIN, dt_iop_roi_t::scale, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by _init_f().
void dt_iop_clip_and_zoom_mosaic_third_size_xtrans | ( | uint16_t *const | out, |
const uint16_t *const | in, | ||
const dt_iop_roi_t *const | roi_out, | ||
const dt_iop_roi_t *const | roi_in, | ||
const int32_t | out_stride, | ||
const int32_t | in_stride, | ||
const uint8_t(*) | xtrans[6] | ||
) |
downscales and clips a Fujifilm X-Trans mosaiced buffer (in) to the given region of interest (r_*) and writes it to out.
References FCxtrans(), dt_iop_roi_t::height, MAX, MIN, dt_iop_roi_t::scale, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by _init_f().
void dt_iop_clip_and_zoom_mosaic_third_size_xtrans_f | ( | float *const | out, |
const float *const | in, | ||
const dt_iop_roi_t *const | roi_out, | ||
const dt_iop_roi_t *const | roi_in, | ||
const int32_t | out_stride, | ||
const int32_t | in_stride, | ||
const uint8_t(*) | xtrans[6] | ||
) |
References FCxtrans(), dt_iop_roi_t::height, MAX, MIN, dt_iop_roi_t::scale, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by _init_f().
void dt_iop_clip_and_zoom_roi | ( | float * | out, |
const float *const | in, | ||
const struct dt_iop_roi_t *const | roi_out, | ||
const struct dt_iop_roi_t *const | roi_in, | ||
const int32_t | out_stride, | ||
const int32_t | in_stride | ||
) |
zoom pixel array for roi buffers.
void dt_iop_estimate_cubic | ( | const float | x[4], |
const float | y[4], | ||
float | a[4] | ||
) |
takes four points (x,y) in two arrays and fills the cubic coefficients a, such that y = [X] * a, where [X] is the matrix containing all x^3 x^2 x^1 x^0 lines for all four x.
References mat4inv(), and mat4mulv().
|
inlinestatic |
estimates an exponential form f(x) = a*x^g from a few (num) points (x, y). the largest point should be (1.0, y) to really get good data.
Referenced by _area_draw_callback(), _generate_curve_lut(), _init_unbounded_coeffs(), commit_params(), commit_params(), dt_iop_basecurve_draw(), and dt_iop_tonecurve_draw().
|
inlinestatic |
evaluates the cubic fit, i.e. returns y = a^t [x^3 x^2 x^1 1]
|
inlinestatic |
evaluates the exp fit.
Referenced by _area_draw_callback(), apply_curve(), apply_legacy_curve(), dt_iop_basecurve_draw(), dt_iop_tonecurve_draw(), process(), process(), process(), process_cmatrix_bm(), process_cmatrix_proper(), and process_fastpath_apply_tonecurves().
void dt_iop_flip_and_zoom_8 | ( | const uint8_t * | in, |
int32_t | iw, | ||
int32_t | ih, | ||
uint8_t * | out, | ||
int32_t | ow, | ||
int32_t | oh, | ||
const dt_image_orientation_t | orientation, | ||
uint32_t * | width, | ||
uint32_t * | height | ||
) |
flip according to orientation bits, also zoom to given size.
References bpp, height, MAX, MIN, ORIENTATION_FLIP_X, ORIENTATION_FLIP_Y, ORIENTATION_SWAP_XY, and width.
Referenced by _init_8(), and _load_jpg().
void dt_iop_RGB_to_YCbCr | ( | const dt_aligned_pixel_t | rgb, |
dt_aligned_pixel_t | yuv | ||
) |
void dt_iop_YCbCr_to_RGB | ( | const dt_aligned_pixel_t | yuv, |
dt_aligned_pixel_t | rgb | ||
) |
|
inlinestatic |
Calculate the bayer pattern color from the row and column
Referenced by fcol().
|
inlinestatic |
References FC(), and FCxtrans().
Referenced by lin_interpolate(), and vng_interpolate().
|
inlinestatic |
Calculate the xtrans pattern color from the row and column
References dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by fcol().