56 const struct dt_iop_roi_t *
const roi_in,
const int32_t out_stride,
57 const int32_t in_stride);
61 const struct dt_iop_roi_t *
const roi_in,
const int32_t out_stride,
62 const int32_t in_stride);
75 const int32_t out_stride,
const int32_t in_stride,
76 const uint32_t filters);
80 const int32_t out_stride,
const int32_t in_stride,
81 const uint32_t filters);
85 const dt_iop_roi_t *
const roi_in,
const int32_t out_stride,
86 const int32_t in_stride,
const uint8_t (*
const xtrans)[6]);
90 const dt_iop_roi_t *
const roi_in,
const int32_t out_stride,
91 const int32_t in_stride,
const uint8_t (*
const xtrans)[6]);
96 const int32_t out_stride,
97 const int32_t in_stride);
101 const struct dt_iop_roi_t *
const roi_in,
const int32_t out_stride,
102 const int32_t in_stride,
const uint32_t filters);
109 const int32_t out_stride,
const int32_t in_stride,
110 const uint8_t (*
const xtrans)[6]);
114 int32_t ibh, uint8_t *o, int32_t ox, int32_t oy, int32_t ow, int32_t oh,
115 int32_t obw, int32_t obh);
128 const float x4[4] = {
x *
x *
x,
x *
x,
x, 1.0f };
129 return a[3] * x4[3] + a[2] * x4[2] + a[1] * x4[1] + a[0] * x4[0];
139 const float x0 =
x[num - 1], y0 = y[num - 1];
147 for(
int k = 0;
k < num - 1;
k++)
149 const float yy = y[
k] / y0, xx =
x[
k] / x0;
150 if(yy > 0.0f && xx > 0.0f)
152 const float gg = logf(y[
k] / y0) / logf(
x[
k] / x0);
161 coeff[0] = 1.0f / x0;
177static inline
void dt_iop_alpha_copy(const
void *const ivoid,
181 const float *
const __restrict__ in = (
const float *
const)ivoid;
182 float *
const __restrict__
out = (
float *
const)
ovoid;
189static inline int FC(
const size_t row,
const size_t col,
const uint32_t filters)
191 return filters >> (((
row << 1 & 14) + (col & 1)) << 1) & 3;
201 const uint8_t (*
const xtrans)[6])
207 int irow =
row + 600;
208 int icol = col + 600;
209 assert(irow >= 0 && icol >= 0);
217 return xtrans[irow % 6][icol % 6];
222static inline
int fcol(const
int row, const
int col, const uint32_t filters, const uint8_t (*const xtrans)[6])
227 return FC(
row, col, filters);
const float i
Definition colorspaces_inline_conversions.h:440
static dt_aligned_pixel_t rgb
Definition colorspaces_inline_conversions.h:344
const float g
Definition colorspaces_inline_conversions.h:674
static const int row
Definition colorspaces_inline_conversions.h:35
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
#define __OMP_DECLARE_SIMD__(...)
Definition darktable.h:263
#define __OMP_FOR_SIMD__(...)
Definition darktable.h:260
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
Definition darktable.h:281
dt_image_orientation_t
Definition image.h:169
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)
Definition imageop_math.c:97
void *const ovoid
Definition imageop_math.h:178
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(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 *const const size_t const size_t height
Definition imageop_math.h:180
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)
Definition imageop_math.c:243
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])
static int FC(const size_t row, const size_t col, const uint32_t filters)
Definition imageop_math.h:189
static float dt_iop_eval_cubic(const float *const a, const float x)
Definition imageop_math.h:125
void dt_iop_YCbCr_to_RGB(const dt_aligned_pixel_t yuv, dt_aligned_pixel_t rgb)
Definition imageop_math.c:871
void dt_iop_RGB_to_YCbCr(const dt_aligned_pixel_t rgb, dt_aligned_pixel_t yuv)
Definition imageop_math.c:864
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)
Definition imageop_math.c:36
for(size_t k=3;k< width *height *4;k+=4) out[k]
static int FCxtrans(const int row, const int col, const dt_iop_roi_t *const roi, const uint8_t(*const xtrans)[6])
Definition imageop_math.h:200
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)
Definition imageop_math.c:176
static void dt_iop_estimate_exp(const float *const x, const float *const y, const int num, float *coeff)
Definition imageop_math.h:134
void dt_iop_estimate_cubic(const float x[4], const float y[4], float a[4])
Definition imageop_math.c:955
static int fcol(const int row, const int col, const uint32_t filters, const uint8_t(*const xtrans)[6])
Definition imageop_math.h:222
int dt_iop_clip_and_zoom_roi_cl(int devid, cl_mem dev_out, cl_mem dev_in, const struct dt_iop_roi_t *const roi_out, const struct dt_iop_roi_t *const roi_in)
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)
float *const __restrict__ out
Definition imageop_math.h:182
static float dt_iop_eval_exp(const float *const coeff, const float x)
Definition imageop_math.h:169
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])
Definition imageop_math.c:430
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 *const const size_t width
Definition imageop_math.h:179
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])
Definition imageop_math.c:470
int dt_iop_clip_and_zoom_cl(int devid, cl_mem dev_out, cl_mem dev_in, const struct dt_iop_roi_t *const roi_out, const struct dt_iop_roi_t *const roi_in)
static const float x
Definition iop_profile.h:235
const float *const const float coeff[3]
Definition iop_profile.h:240
float *const restrict const size_t k
Definition luminance_mask.h:78
float dt_aligned_pixel_t[4]
Definition noiseprofile.c:28
Region of interest passed through the pixelpipe.
Definition imageop.h:72
int x
Definition imageop.h:73
int y
Definition imageop.h:73