![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "develop/imageop_gui.h"#include "common/module_versioning.h"#include "system/target_clones.h"#include "pixel/interpolation.h"#include "math/math.h"#include "develop/develop.h"#include "develop/geometry/geometry.h"#include "develop/imageop.h"#include "iop/iop_api.h"#include <stdlib.h>#include "widgets/label.h"
Include dependency graph for rotatepixels.c:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_rotatepixels_gui_data_t |
| struct | dt_iop_rotatepixels_params_t |
| struct | dt_iop_rotatepixels_data_t |
Typedefs | |
| typedef struct dt_iop_rotatepixels_gui_data_t | dt_iop_rotatepixels_gui_data_t |
| typedef struct dt_iop_rotatepixels_params_t | dt_iop_rotatepixels_params_t |
| typedef struct dt_iop_rotatepixels_data_t | dt_iop_rotatepixels_data_t |
Functions | |
| static void | get_corner (const float *aabb, const int i, float *p) |
| static void | adjust_aabb (const float *p, float *aabb) |
| const char * | name () |
| int | flags () |
| int | default_group () |
| int | operation_tags () |
| int | default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece) |
| const char ** | description (struct dt_iop_module_t *self) |
| static void | transform (const dt_iop_rotatepixels_data_t *const d, const float scale, const float *const x, float *o) |
| static void | backtransform (const dt_iop_rotatepixels_data_t *const d, const float scale, const float *const x, float *o) |
| static void | _rotatepixels_map_size (const dt_iop_rotatepixels_data_t *const d, const dt_iop_roi_t *const roi_in, dt_iop_roi_t *roi_out) |
| Input rect -> output rect: the inner rectangle of the 45-degree rotation. | |
| int | distort_transform (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, float *const restrict points, size_t points_count) |
| int | distort_backtransform (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, float *const restrict points, size_t points_count) |
| void | distort_mask (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const float *const in, float *const out, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out) |
| void | modify_roi_out (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_roi_t *roi_out, const dt_iop_roi_t *const roi_in) |
| void | modify_roi_in (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *const roi_out, dt_iop_roi_t *roi_in) |
| __DT_CLONE_TARGETS__ int | process (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid) |
| static void | _rotatepixels_resolve (const dt_iop_rotatepixels_params_t *const p, dt_iop_rotatepixels_data_t *d) |
| Params -> committed data. THE constructor, shared with geometry_record(). | |
| void | commit_params (dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| static void | _rotatepixels_geometry_map_size (const void *data, const dt_iop_roi_t *const in, dt_iop_roi_t *out) |
| static int | _rotatepixels_geometry_transform (const void *data, const dt_geometry_record_t *const record, dt_geometry_chain_t *chain, float *points, size_t points_count) |
| static int | _rotatepixels_geometry_backtransform (const void *data, const dt_geometry_record_t *const record, dt_geometry_chain_t *chain, float *points, size_t points_count) |
| gboolean | geometry_record (dt_iop_module_t *self, const void *params, dt_geometry_record_t *record) |
| void | init_pipe (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | cleanup_pipe (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | reload_defaults (dt_iop_module_t *self) |
| void | gui_update (dt_iop_module_t *self) |
| Refresh GUI controls from current params and configuration. | |
| void | gui_init (dt_iop_module_t *self) |
Variables | |
| static const dt_geometry_vtable_t | _rotatepixels_geometry_vtable |
| typedef struct dt_iop_rotatepixels_data_t dt_iop_rotatepixels_data_t |
| typedef struct dt_iop_rotatepixels_gui_data_t dt_iop_rotatepixels_gui_data_t |
| typedef struct dt_iop_rotatepixels_params_t dt_iop_rotatepixels_params_t |
|
static |
Definition at line 369 of file rotatepixels.c.
References backtransform(), d, i, dt_geometry_record_t::in, and dt_iop_roi_t::scale.
|
static |
Definition at line 349 of file rotatepixels.c.
References _rotatepixels_map_size(), and out.
|
static |
Definition at line 354 of file rotatepixels.c.
References d, i, dt_geometry_record_t::in, dt_iop_roi_t::scale, and transform().
|
static |
Input rect -> output rect: the inner rectangle of the 45-degree rotation.
NOTE the non-parameter input: the output size depends on the user's interpolator preference, because the margin this trims is the interpolation kernel's width. A record captures it at publish time, which is correct as long as changing that preference re-publishes – it forces a pipeline rebuild, which republishes the geometry.
Definition at line 155 of file rotatepixels.c.
References d, dt_interpolation_new(), DT_INTERPOLATION_USERPREF, dt_iop_roi_t::height, MAX, dt_iop_roi_t::scale, dt_iop_roi_t::width, dt_interpolation::width, and x.
Referenced by _rotatepixels_geometry_map_size(), and modify_roi_out().
|
static |
Params -> committed data. THE constructor, shared with geometry_record().
Definition at line 322 of file rotatepixels.c.
Referenced by commit_params(), and geometry_record().
|
static |
|
static |
Definition at line 137 of file rotatepixels.c.
References d, mul_mat_vec_2(), and x.
Referenced by _rotatepixels_geometry_backtransform(), distort_backtransform(), modify_roi_in(), and process().
| void cleanup_pipe | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 419 of file rotatepixels.c.
References dt_dev_pixelpipe_iop_t::data, and dt_free_align.
| void commit_params | ( | dt_iop_module_t * | self, |
| dt_iop_params_t * | p1, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 334 of file rotatepixels.c.
References _rotatepixels_resolve(), d, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::enabled, and p.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 105 of file rotatepixels.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 95 of file rotatepixels.c.
References IOP_GROUP_TECHNICAL.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 110 of file rotatepixels.c.
References dt_iop_set_description().
| int distort_backtransform | ( | dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| float *const restrict | points, | ||
| size_t | points_count | ||
| ) |
Definition at line 197 of file rotatepixels.c.
References __OMP_PARALLEL_FOR_SIMD__, backtransform(), dt_dev_pixelpipe_iop_t::buf_in, dt_dev_pixelpipe_iop_t::data, i, and dt_iop_roi_t::scale.
| void distort_mask | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| struct dt_dev_pixelpipe_iop_t * | piece, | ||
| const float *const | in, | ||
| float *const | out, | ||
| const dt_iop_roi_t *const | roi_in, | ||
| const dt_iop_roi_t *const | roi_out | ||
| ) |
Definition at line 218 of file rotatepixels.c.
References dt_iop_roi_t::height, out, void(), and dt_iop_roi_t::width.
| int distort_transform | ( | dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| float *const restrict | points, | ||
| size_t | points_count | ||
| ) |
Definition at line 176 of file rotatepixels.c.
References __OMP_PARALLEL_FOR_SIMD__, dt_dev_pixelpipe_iop_t::buf_in, dt_dev_pixelpipe_iop_t::data, i, dt_iop_roi_t::scale, and transform().
| int flags | ( | ) |
Definition at line 89 of file rotatepixels.c.
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_ONE_INSTANCE, IOP_FLAGS_TILING_FULL_ROI, and IOP_FLAGS_UNSAFE_COPY.
| gboolean geometry_record | ( | dt_iop_module_t * | self, |
| const void * | params, | ||
| dt_geometry_record_t * | record | ||
| ) |
Definition at line 391 of file rotatepixels.c.
References _rotatepixels_geometry_vtable, _rotatepixels_resolve(), dt_geometry_record_t::data, dt_free_gpointer(), FALSE, dt_geometry_record_t::free_data, IS_NULL_PTR, dt_iop_rotatepixels_data_t::rx, dt_iop_rotatepixels_data_t::ry, TRUE, and dt_geometry_record_t::vtable.
|
static |
Definition at line 70 of file rotatepixels.c.
Referenced by modify_roi_in().
| void gui_init | ( | dt_iop_module_t * | self | ) |
Definition at line 446 of file rotatepixels.c.
References dt_ui_label_new(), dt_iop_module_t::gui, IOP_GUI_ALLOC, TRUE, and dt_iop_module_gui_t::widget.
| void gui_update | ( | dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
Definition at line 440 of file rotatepixels.c.
References dt_iop_module_t::default_enabled, dt_iop_module_t::gui, and dt_iop_module_gui_t::widget.
| void init_pipe | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 413 of file rotatepixels.c.
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
| void modify_roi_in | ( | dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece, | ||
| const dt_iop_roi_t *const | roi_out, | ||
| dt_iop_roi_t * | roi_in | ||
| ) |
Definition at line 238 of file rotatepixels.c.
References adjust_aabb(), backtransform(), dt_dev_pixelpipe_iop_t::buf_in, dt_dev_pixelpipe_iop_t::data, dt_interpolation_new(), DT_INTERPOLATION_USERPREF, get_corner(), dt_iop_roi_t::height, p, dt_iop_roi_t::scale, dt_iop_roi_t::width, dt_interpolation::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
| void modify_roi_out | ( | dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece, | ||
| dt_iop_roi_t * | roi_out, | ||
| const dt_iop_roi_t *const | roi_in | ||
| ) |
Definition at line 230 of file rotatepixels.c.
References _rotatepixels_map_size(), and dt_dev_pixelpipe_iop_t::data.
| const char * name | ( | ) |
Definition at line 84 of file rotatepixels.c.
| int operation_tags | ( | ) |
Definition at line 100 of file rotatepixels.c.
References IOP_TAG_DISTORT.
| __DT_CLONE_TARGETS__ int process | ( | dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const | ivoid, | ||
| void *const | ovoid | ||
| ) |
Definition at line 284 of file rotatepixels.c.
References __OMP_PARALLEL_FOR__, backtransform(), ch, dt_iop_buffer_dsc_t::channels, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::dsc_in, dt_interpolation_compute_pixel4c(), dt_interpolation_new(), DT_INTERPOLATION_USERPREF, dt_iop_roi_t::height, i, out, ovoid, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, dt_iop_roi_t::scale, void(), dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
| void reload_defaults | ( | dt_iop_module_t * | self | ) |
Definition at line 425 of file rotatepixels.c.
References d, dt_iop_module_t::default_enabled, dt_iop_module_t::default_params, dt_iop_module_t::dev, dt_image_t::fuji_rotation_pos, dt_iop_module_t::hide_enable_button, and dt_develop_t::image_storage.
|
static |
Definition at line 127 of file rotatepixels.c.
References d, mul_mat_vec_2(), and x.
Referenced by _rotatepixels_geometry_transform(), and distort_transform().
|
static |
Definition at line 385 of file rotatepixels.c.
Referenced by geometry_record().