![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "develop/imageop_math.h"
#include <assert.h>
#include <glib.h>
#include <math.h>
#include "common/darktable.h"
#include "common/imageio.h"
#include "common/interpolation.h"
#include "develop/imageop.h"
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_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 (float *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) |
void | dt_iop_clip_and_zoom_roi (float *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) |
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_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_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 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) |
void | dt_iop_clip_and_zoom_demosaic_half_size_f (float *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_demosaic_third_size_xtrans_f (float *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_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) |
static void | mat4inv (const float X[][4], float R[][4]) |
static void | mat4mulv (float dst[4], const float mat[4][4], const float v[4]) |
void | dt_iop_estimate_cubic (const float x[4], const float y[4], float a[4]) |
void dt_iop_clip_and_zoom | ( | float * | 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 | ||
) |
References dt_interpolation_new(), dt_interpolation_resample(), and DT_INTERPOLATION_USERPREF.
Referenced by _init_base_buffer(), and _init_f().
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 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 process().
void dt_iop_clip_and_zoom_demosaic_passthrough_monochrome_f | ( | float * | 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 | ||
) |
References 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 process().
void dt_iop_clip_and_zoom_demosaic_third_size_xtrans_f | ( | float * | 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 CLAMPS, 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 process().
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 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 | ||
) |
References dt_interpolation_new(), dt_interpolation_resample_roi(), and DT_INTERPOLATION_USERPREF.
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().
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 |
References R.
Referenced by dt_iop_estimate_cubic().
|
static |
Referenced by dt_iop_estimate_cubic().