![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/darktable.h"#include "develop/imageop.h"#include "develop/imageop_math.h"#include "iop/highlights/gather.h"#include <math.h>#include <string.h>
Include dependency graph for gather.c:Go to the source code of this file.
Functions | |
| __DT_CLONE_TARGETS__ void | _interpolate_and_mask (const float *const restrict input, float *const restrict interpolated, float *const restrict clipping_mask, const dt_aligned_pixel_t clips_in, const dt_aligned_pixel_t det_scale, const dt_aligned_pixel_t white_balance, const uint32_t filters, const size_t width, const size_t height) |
| __DT_CLONE_TARGETS__ void | _compute_laplacian_normalization (const float *const restrict input, const dt_iop_roi_t *const roi_in, const uint32_t filters, const uint8_t(*const xtrans)[6], dt_aligned_pixel_t normalization) |
| __DT_CLONE_TARGETS__ void | _build_xtrans_bilinear_lookup (int32_t lookup[6][6][32], const dt_iop_roi_t *const roi_in, const uint8_t(*const xtrans)[6]) |
| __DT_CLONE_TARGETS__ void | _interpolate_and_mask_xtrans (const float *const restrict input, float *const restrict interpolated, float *const restrict clipping_mask, const dt_aligned_pixel_t clips, const dt_aligned_pixel_t white_balance, const dt_iop_roi_t *const roi_in, const int32_t lookup[6][6][32], const uint8_t(*const xtrans)[6], const size_t width, const size_t height) |
| __DT_CLONE_TARGETS__ void | _remosaic_and_replace (const float *const restrict input, const float *const restrict input_raw, const float *const restrict interpolated, const float *const restrict clipping_mask, float *const restrict output, const dt_aligned_pixel_t white_balance, const dt_aligned_pixel_t clips, const int clip_is_floor, const uint32_t filters, const size_t width, const size_t height) |
| __DT_CLONE_TARGETS__ void | _remosaic_and_replace_xtrans (const float *const restrict input, const float *const restrict input_raw, const float *const restrict interpolated, const float *const restrict clipping_mask, float *const restrict output, const dt_aligned_pixel_t white_balance, const dt_aligned_pixel_t clips, const int clip_is_floor, const dt_iop_roi_t *const roi_in, const uint8_t(*const xtrans)[6], const size_t width, const size_t height) |
| __DT_CLONE_TARGETS__ void _build_xtrans_bilinear_lookup | ( | int32_t | lookup[6][6][32], |
| const dt_iop_roi_t *const | roi_in, | ||
| const uint8_t(*) | xtrans[6] | ||
| ) |
Build the X-Trans bilinear interpolation lookup for the current ROI phase.
The lookup keeps the contributing 3x3 neighbours explicit for each position of the 6x6 X-Trans period so CPU and OpenCL guided-laplacian paths start from the same simple bilinear reconstruction.
Definition at line 258 of file gather.c.
References __OMP_PARALLEL_FOR__, f, FCxtrans(), lookup(), row, weight(), and x.
Referenced by process_harmonic_cl(), process_harmonic_xtrans(), process_laplacian_xtrans(), and process_laplacian_xtrans_cl().
| __DT_CLONE_TARGETS__ void _compute_laplacian_normalization | ( | const float *const restrict | input, |
| const dt_iop_roi_t *const | roi_in, | ||
| const uint32_t | filters, | ||
| const uint8_t(*) | xtrans[6], | ||
| dt_aligned_pixel_t | normalization | ||
| ) |
Compute channel normalization factors from the current raw ROI.
Guided Laplacians only needs a relative RGB normalization before the temporary bilinear reconstruction. Using the average measured value of each CFA color in the current tile keeps the normalization explicit and local to the data being reconstructed, instead of relying on the white balance declared upstream.
Definition at line 222 of file gather.c.
References __OMP_PARALLEL_FOR__, ALPHA, BLUE, FC(), FCxtrans(), GREEN, dt_iop_roi_t::height, i, RED, value, and dt_iop_roi_t::width.
Referenced by process_harmonic_bayer(), process_harmonic_cl(), process_harmonic_xtrans(), process_laplacian_bayer(), and process_laplacian_xtrans().
| __DT_CLONE_TARGETS__ void _interpolate_and_mask | ( | const float *const restrict | input, |
| float *const restrict | interpolated, | ||
| float *const restrict | clipping_mask, | ||
| const dt_aligned_pixel_t | clips_in, | ||
| const dt_aligned_pixel_t | det_scale, | ||
| const dt_aligned_pixel_t | white_balance, | ||
| const uint32_t | filters, | ||
| const size_t | width, | ||
| const size_t | height | ||
| ) |
Definition at line 66 of file gather.c.
References __OMP_PARALLEL_FOR__, B, BLUE, FC(), for_each_channel, for_four_channels, GREEN, height, i, k, R, RED, RGB, and width.
Referenced by process_harmonic_bayer(), and process_laplacian_bayer().
| __DT_CLONE_TARGETS__ void _interpolate_and_mask_xtrans | ( | const float *const restrict | input, |
| float *const restrict | interpolated, | ||
| float *const restrict | clipping_mask, | ||
| const dt_aligned_pixel_t | clips, | ||
| const dt_aligned_pixel_t | white_balance, | ||
| const dt_iop_roi_t *const | roi_in, | ||
| const int32_t | lookup[6][6][32], | ||
| const uint8_t(*) | xtrans[6], | ||
| const size_t | width, | ||
| const size_t | height | ||
| ) |
Bilinearly demosaic the X-Trans raw mosaic and record clipped colors.
Guided Laplacians operates on temporary RGB data. For X-Trans we use the same lightweight bilinear neighbourhood as the linear VNG stage so the diffusion begins from a simple and explicit reconstruction.
Definition at line 298 of file gather.c.
References __OMP_PARALLEL_FOR__, ALPHA, BLUE, f, FCxtrans(), for_each_channel, GREEN, height, i, k, lookup(), MAX, MIN, RED, RGB, value, width, and x.
Referenced by process_harmonic_xtrans(), and process_laplacian_xtrans().
| __DT_CLONE_TARGETS__ void _remosaic_and_replace | ( | const float *const restrict | input, |
| const float *const restrict | input_raw, | ||
| const float *const restrict | interpolated, | ||
| const float *const restrict | clipping_mask, | ||
| float *const restrict | output, | ||
| const dt_aligned_pixel_t | white_balance, | ||
| const dt_aligned_pixel_t | clips, | ||
| const int | clip_is_floor, | ||
| const uint32_t | filters, | ||
| const size_t | width, | ||
| const size_t | height | ||
| ) |
Definition at line 405 of file gather.c.
References __OMP_PARALLEL_FOR__, ALPHA, FC(), height, i, and width.
Referenced by process_harmonic_bayer(), and process_laplacian_bayer().
| __DT_CLONE_TARGETS__ void _remosaic_and_replace_xtrans | ( | const float *const restrict | input, |
| const float *const restrict | input_raw, | ||
| const float *const restrict | interpolated, | ||
| const float *const restrict | clipping_mask, | ||
| float *const restrict | output, | ||
| const dt_aligned_pixel_t | white_balance, | ||
| const dt_aligned_pixel_t | clips, | ||
| const int | clip_is_floor, | ||
| const dt_iop_roi_t *const | roi_in, | ||
| const uint8_t(*) | xtrans[6], | ||
| const size_t | width, | ||
| const size_t | height | ||
| ) |
Reproject the reconstructed RGB back onto the X-Trans mosaic.
Definition at line 436 of file gather.c.
References __OMP_PARALLEL_FOR__, ALPHA, FCxtrans(), height, i, and width.
Referenced by process_harmonic_xtrans(), and process_laplacian_xtrans().