Mercurial > mxe-octave
changeset 6137:a0ee9eb70abb release
update of-image to v2.14
* src/of-image.mk: update version, checksum
* src/of-image-1-namespace.patch,
src/of-image-1-no-jit.patch
: deleted
* dist-files.mk: remove ref to deleted files
(grafted from ed62832f6489068e9cf0bb190574a737cb9bc2d7)
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sat, 26 Mar 2022 16:10:53 -0400 |
parents | ed702ff01c8e |
children | 2e6af23c6cb7 |
files | dist-files.mk src/of-image-1-namespace.patch src/of-image-1-no-jit.patch src/of-image.mk |
diffstat | 4 files changed, 2 insertions(+), 495 deletions(-) [+] |
line wrap: on
line diff
--- a/dist-files.mk Sat Mar 19 18:23:12 2022 +0100 +++ b/dist-files.mk Sat Mar 26 16:10:53 2022 -0400 @@ -495,8 +495,6 @@ of-geometry.mk \ of-gsl-1-cross-fixes.patch \ of-gsl.mk \ - of-image-1-namespace.patch \ - of-image-1-no-jit.patch \ of-image.mk \ of-instrument-control.mk \ of-interval-1-cross-fixes.patch \
--- a/src/of-image-1-namespace.patch Sat Mar 19 18:23:12 2022 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,357 +0,0 @@ -diff -uNr a/src/bwconncomp.cc b/src/bwconncomp.cc ---- a/src/bwconncomp.cc 2020-02-02 08:20:08.000000000 -0500 -+++ b/src/bwconncomp.cc 2021-08-20 03:40:55.040903123 -0400 -@@ -30,7 +30,7 @@ - #include <octave/oct-map.h> - - #include "connectivity.h" --using namespace octave::image; -+using namespace octave_image; - - static std::vector<std::vector<octave_idx_type>> - connected_components (const boolNDArray& BW, const connectivity& conn) -diff -uNr a/src/bwlabeln.cc b/src/bwlabeln.cc ---- a/src/bwlabeln.cc 2020-02-02 08:20:08.000000000 -0500 -+++ b/src/bwlabeln.cc 2021-08-20 03:41:02.785032122 -0400 -@@ -32,7 +32,7 @@ - #define WANTS_OCTAVE_IMAGE_VALUE 1 - #include "octave-wrappers.h" - --using namespace octave::image; -+using namespace octave_image; - - static union_find - pre_label (NDArray& L, const connectivity& conn) -diff -uNr a/src/conndef.cc b/src/conndef.cc ---- a/src/conndef.cc 2020-02-02 08:20:08.000000000 -0500 -+++ b/src/conndef.cc 2021-08-20 03:41:12.149188253 -0400 -@@ -19,7 +19,7 @@ - #include "config.h" - - #include "connectivity.h" --using namespace octave::image; -+using namespace octave_image; - - // The conndef() function is really really simple and could have easily - // been a m file (actually it once was, check the hg log if it ever needs -diff -uNr a/src/connectivity.cc b/src/connectivity.cc ---- a/src/connectivity.cc 2020-02-02 08:20:08.000000000 -0500 -+++ b/src/connectivity.cc 2021-08-20 03:41:18.001285906 -0400 -@@ -25,7 +25,7 @@ - #define WANTS_OCTAVE_IMAGE_VALUE 1 - #include "octave-wrappers.h" - --using namespace octave::image; -+using namespace octave_image; - - - connectivity::connectivity (const boolNDArray& mask_arg) -@@ -296,7 +296,7 @@ - - - connectivity --octave::image::conndef (const octave_value& _val) -+octave_image::conndef (const octave_value& _val) - { - octave_image::value val (_val); - -diff -uNr a/src/connectivity.h b/src/connectivity.h ---- a/src/connectivity.h 2020-02-02 08:20:08.000000000 -0500 -+++ b/src/connectivity.h 2021-08-20 03:41:28.897467898 -0400 -@@ -29,10 +29,8 @@ - - #include <octave/ov.h> - --namespace octave -+namespace octave_image - { -- namespace image -- { - class connectivity - { - public: -@@ -89,14 +87,13 @@ - }; - - connectivity conndef (const octave_value& val); -- } - } - - // Templated methods - - template<class T, class P> - T --octave::image::connectivity::create_padded (const T& image, const P& val) const -+octave_image::connectivity::create_padded (const T& image, const P& val) const - { - const octave_idx_type pad_ndims = std::min (mask.ndims (), image.ndims ()); - -@@ -117,7 +114,7 @@ - - template<class T> - void --octave::image::connectivity::unpad (T& image) const -+octave_image::connectivity::unpad (T& image) const - { - const octave_idx_type pad_ndims = std::min (mask.ndims (), image.ndims ()); - const dim_vector padded_size = image.dims (); -@@ -134,7 +131,7 @@ - - template<class P> - P --octave::image::connectivity::min_value (void) -+octave_image::connectivity::min_value (void) - { - if (typeid (P) == typeid (bool)) - return false; -@@ -144,7 +141,7 @@ - - template<class T, class P> - void --octave::image::connectivity::set_padding (const dim_vector& size, -+octave_image::connectivity::set_padding (const dim_vector& size, - const dim_vector& padded_size, - T& im, const P& val) - { -diff -uNr a/src/imerode.cc b/src/imerode.cc ---- a/src/imerode.cc 2020-02-02 08:20:08.000000000 -0500 -+++ b/src/imerode.cc 2021-08-20 03:42:06.186092277 -0400 -@@ -32,7 +32,7 @@ - #define WANTS_OCTAVE_IMAGE_VALUE 1 - #include "octave-wrappers.h" - --using namespace octave::image; -+using namespace octave_image; - - // How this works: - // -diff -uNr a/src/imreconstruct.cc b/src/imreconstruct.cc ---- a/src/imreconstruct.cc 2020-02-02 08:20:08.000000000 -0500 -+++ b/src/imreconstruct.cc 2021-08-20 03:42:11.690184639 -0400 -@@ -36,7 +36,7 @@ - - #include "connectivity.h" - --using namespace octave::image; -+using namespace octave_image; - - #define WANTS_OCTAVE_IMAGE_VALUE 1 - #include "octave-wrappers.h" -diff -uNr a/src/strel.cc b/src/strel.cc ---- a/src/strel.cc 2020-02-02 08:20:08.000000000 -0500 -+++ b/src/strel.cc 2021-08-20 03:39:35.059577831 -0400 -@@ -35,7 +35,7 @@ - - // Expects a @strel object, or a boolean matrix (or something - // that can be converted into one with bool_matrix_value() --octave::image::strel::strel (const octave_value& arg) -+octave_image::strel::strel (const octave_value& arg) - { - octave_value se = arg; - // We are only creating a strel object here so that we can use -@@ -105,7 +105,7 @@ - return; - } - --octave::image::strel::strel (const boolNDArray& nhood, const NDArray& height) -+octave_image::strel::strel (const boolNDArray& nhood, const NDArray& height) - : nhood (nhood), height (height) - { - ini_ctor (); -@@ -114,7 +114,7 @@ - return; - } - --octave::image::strel::strel (const boolNDArray& nhood, const NDArray& height, -+octave_image::strel::strel (const boolNDArray& nhood, const NDArray& height, - const Array<octave_idx_type>& origin) - : nhood (nhood), height (height), origin (origin) - { -@@ -125,25 +125,25 @@ - } - - boolNDArray --octave::image::strel::get_nhood (void) const -+octave_image::strel::get_nhood (void) const - { - return nhood; - } - - octave_idx_type --octave::image::strel::get_nnz (void) const -+octave_image::strel::get_nnz (void) const - { - return nnz; - } - - Array<octave_idx_type> --octave::image::strel::get_origin (void) const -+octave_image::strel::get_origin (void) const - { - return origin; - } - --octave::image::strel --octave::image::strel::operator () (const octave_idx_type& i) const -+octave_image::strel -+octave_image::strel::operator () (const octave_idx_type& i) const - { - assert (i >= 0 && i < octave_idx_type (decomposition.size ())); - return decomposition[i]; -@@ -151,7 +151,7 @@ - - // Number of strel elements after decomposition - octave_idx_type --octave::image::strel::numel (void) const -+octave_image::strel::numel (void) const - { - return octave_idx_type (decomposition.size ()); - } -@@ -163,8 +163,8 @@ - // center of the matrix, there will be no change. - // The reason for this is so that we can keep the origin in matrices with - // sides with an even length. --octave::image::strel --octave::image::strel::reflect (void) const -+octave_image::strel -+octave_image::strel::reflect (void) const - { - boolNDArray ref_nhood (size); - NDArray ref_height (size); -@@ -178,11 +178,11 @@ - for (octave_idx_type dim = 0; dim < ndims; dim++) - ref_origin(dim) = size(dim) - origin(dim) -1; - -- return octave::image::strel (ref_nhood, ref_height, ref_origin); -+ return octave_image::strel (ref_nhood, ref_height, ref_origin); - } - - void --octave::image::strel::set_origin (const Array<octave_idx_type>& sub) -+octave_image::strel::set_origin (const Array<octave_idx_type>& sub) - { - origin = sub; - validate_origin (); -@@ -190,7 +190,7 @@ - } - - bool --octave::image::strel::flat (void) const -+octave_image::strel::flat (void) const - { - bool flat = true; - if (! height.all_elements_are_zero ()) -@@ -220,7 +220,7 @@ - // linear shift is [0 1 11 21 22] - // The second element is the matching height for each. - Array<octave_idx_type> --octave::image::strel::offsets (const dim_vector& cum_size) const -+octave_image::strel::offsets (const dim_vector& cum_size) const - { - Array<octave_idx_type> sub (dim_vector (ndims, 1), 0); - Array<octave_idx_type> offsets (dim_vector (nnz, 1)); -@@ -244,7 +244,7 @@ - // at coordinates (0,0) of the input matrix and we need enough padding for - // it. If the shape is "full", then we add the double. - Array<octave_idx_type> --octave::image::strel::pre_pad (const octave_idx_type& mt_ndims, -+octave_image::strel::pre_pad (const octave_idx_type& mt_ndims, - const std::string& shape) const - { - Array<octave_idx_type> pad (dim_vector (mt_ndims, 1), 0); -@@ -274,7 +274,7 @@ - } - - Array<octave_idx_type> --octave::image::strel::post_pad (const octave_idx_type& mt_ndims, -+octave_image::strel::post_pad (const octave_idx_type& mt_ndims, - const std::string& shape) const - { - Array<octave_idx_type> pad (dim_vector (mt_ndims, 1), 0); -@@ -304,7 +304,7 @@ - } - - void --octave::image::strel::ini_ctor () -+octave_image::strel::ini_ctor () - { - size = nhood.dims (); - ndims = nhood.ndims (); -@@ -313,7 +313,7 @@ - } - - Array<octave_idx_type> --octave::image::strel::default_origin () -+octave_image::strel::default_origin () - { - Array<octave_idx_type> origin (dim_vector (ndims, 1)); - for (octave_idx_type dim = 0; dim < ndims; dim++) -@@ -323,14 +323,14 @@ - } - - void --octave::image::strel::end_ctor (void) -+octave_image::strel::end_ctor (void) - { - if (decomposition.empty ()) - decomposition.push_back (*this); - } - - void --octave::image::strel::validate_origin (void) -+octave_image::strel::validate_origin (void) - { - assert (ndims == origin.numel ()); - for (octave_idx_type dim = 0; dim < ndims; dim++) -diff -uNr a/src/strel.h b/src/strel.h ---- a/src/strel.h 2020-02-02 08:20:08.000000000 -0500 -+++ b/src/strel.h 2021-08-20 03:40:39.204639691 -0400 -@@ -45,10 +45,8 @@ - - #include <octave/ov.h> - --namespace octave -+namespace octave_image - { -- namespace image -- { - class strel - { - public: -@@ -109,14 +107,13 @@ - void validate_origin (void); - - }; -- } - } - - // Define it on header or we we need to instantiate it for all - // possible classes in strel.cc - template<class P> - Array<P> --octave::image::strel::true_heights (void) const -+octave_image::strel::true_heights (void) const - { - Array<P> true_heights (dim_vector (nnz, 1)); - for (octave_idx_type ind = 0, found = 0; found < nnz; ind++) -diff -uNr a/src/watershed.cc b/src/watershed.cc ---- a/src/watershed.cc 2020-02-02 08:20:08.000000000 -0500 -+++ b/src/watershed.cc 2021-08-20 03:40:18.700299337 -0400 -@@ -26,7 +26,7 @@ - #include "octave-wrappers.h" - - #include "connectivity.h" --using namespace octave::image; -+using namespace octave_image; - - template<class T> - static boolNDArray -@@ -297,7 +297,7 @@ - - connectivity conn; - if (nargin > 1) -- conn = octave::image::conndef (args(1)); -+ conn = octave_image::conndef (args(1)); - else - { - try
--- a/src/of-image-1-no-jit.patch Sat Mar 19 18:23:12 2022 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,134 +0,0 @@ -Don't use function dim_vector::to_jit. It was thought to be used exclusively by -the JIT compiler and it is removed now. - ---- ./src/connectivity.h.orig 2020-02-02 14:20:08.000000000 +0100 -+++ ./src/connectivity.h 2021-08-11 14:26:19.706581028 +0200 -@@ -153,8 +153,7 @@ octave::image::connectivity::set_padding - const Array<octave_idx_type> lengths = padding_lengths (size, padded_size); - const octave_idx_type* lengths_v = lengths.fortran_vec (); - -- const octave_idx_type* strides_v = size.to_jit (); -- const octave_idx_type row_stride = strides_v[0]; -+ const octave_idx_type row_stride = size.xelem (0); - - std::function<void(const octave_idx_type)> fill; - fill = [&] (const octave_idx_type dim) -> void -@@ -165,7 +164,7 @@ octave::image::connectivity::set_padding - if (dim == 0) - im_v += row_stride; - else -- for (octave_idx_type i = 0; i < strides_v[dim]; i++) -+ for (octave_idx_type i = 0; i < size.xelem (dim); i++) - fill (dim -1); - - for (octave_idx_type i = 0; i < lengths_v[dim]; i++, im_v++) - ---- ./src/imreconstruct.cc.orig 2020-02-02 14:20:08.000000000 +0100 -+++ ./src/imreconstruct.cc 2021-08-11 14:31:36.450682736 +0200 -@@ -110,10 +110,6 @@ scan_raster_order (T& padded_marker, con - - const octave_idx_type n_neighbours = raster_neighbours.numel (); - -- // We probably should not be using this but converting to Array -- // just to have fortran_vec seems a bit too much. -- const octave_idx_type* s = original_size.to_jit (); -- - std::function<void(const octave_idx_type)> scan; - scan = [&] (const octave_idx_type dim) -> void - { -@@ -122,7 +118,7 @@ scan_raster_order (T& padded_marker, con - - if (dim == 0) - { -- for (octave_idx_type k = 0; k < s[0]; k++, J++, I++) -+ for (octave_idx_type k = 0; k < original_size.xelem (0); k++, J++, I++) - { - for (octave_idx_type i = 0; i < n_neighbours; i++) - if (*J < J[neighbours[i]]) -@@ -133,7 +129,7 @@ scan_raster_order (T& padded_marker, con - } - } - else -- for (octave_idx_type i = 0; i < s[dim]; i++) -+ for (octave_idx_type i = 0; i < original_size.xelem (dim); i++) - scan (dim-1); - - J += pads[dim]; -@@ -161,10 +157,6 @@ scan_antiraster_order (T& padded_marker, - - const octave_idx_type n_neighbours = antiraster_neighbours.numel (); - -- // We probably should not be using this but converting to Array -- // just to have fortran_vec seems a bit too much. -- const octave_idx_type* s = original_size.to_jit (); -- - J += padded_marker.numel () -1; - I += padded_marker.numel () -1; - -@@ -178,7 +170,7 @@ scan_antiraster_order (T& padded_marker, - - if (dim == 0) - { -- for (octave_idx_type k = 0; k < s[0]; k++, J--, I--, ind--) -+ for (octave_idx_type k = 0; k < original_size.xelem (0); k++, J--, I--, ind--) - { - for (octave_idx_type i = 0; i < n_neighbours; i++) - if (*J < J[neighbours[i]]) -@@ -193,7 +185,7 @@ scan_antiraster_order (T& padded_marker, - } - } - else -- for (octave_idx_type i = 0; i < s[dim]; i++) -+ for (octave_idx_type i = 0; i < original_size.xelem (dim); i++) - scan (dim-1); - - J -= pads[dim]; - ---- ./src/bwconncomp.cc.orig 2020-02-02 14:20:08.000000000 +0100 -+++ ./src/bwconncomp.cc 2021-08-11 14:41:35.249619414 +0200 -@@ -81,13 +81,11 @@ connected_components (const boolNDArray& - - const dim_vector original_size = BW.dims (); - const dim_vector padded_size = BW_pad.dims (); -- const octave_idx_type* o = original_size.to_jit (); -- const octave_idx_type* p = padded_size.to_jit (); - const octave_idx_type ndims_m1 = BW_pad.ndims () -1; - - std::vector<bool> dim_padded (BW_pad.ndims (), true); - for (octave_idx_type i = 0; i < BW_pad.ndims (); i++) -- if (p[i] == o[i]) -+ if (padded_size.xelem (i) == original_size.xelem (i)) - dim_padded[i] = false; - - for (std::vector<octave_idx_type>& conn_comp : all_components) -@@ -100,21 +98,21 @@ connected_components (const boolNDArray& - { - if (dim_padded[d]) - { -- ind += mult * (offset % p[d] - 1); -- mult *= p[d] - 2; -- offset /= p[d]; -+ ind += mult * (offset % padded_size.xelem (d) - 1); -+ mult *= padded_size.xelem (d) - 2; -+ offset /= padded_size.xelem (d); - } - else - { -- ind += mult * (offset % p[d]); -- mult *= p[d]; -- offset /= p[d]; -+ ind += mult * (offset % padded_size.xelem (d)); -+ mult *= padded_size.xelem (d); -+ offset /= padded_size.xelem (d); - } - } - if (dim_padded[ndims_m1]) -- ind += mult * (offset % p[ndims_m1] - 1); -+ ind += mult * (offset % padded_size.xelem (ndims_m1) - 1); - else -- ind += mult * (offset % p[ndims_m1]); -+ ind += mult * (offset % padded_size.xelem (ndims_m1)); - - offset = ind; - } -
--- a/src/of-image.mk Sat Mar 19 18:23:12 2022 +0100 +++ b/src/of-image.mk Sat Mar 26 16:10:53 2022 -0400 @@ -3,8 +3,8 @@ PKG := of-image $(PKG)_IGNORE := -$(PKG)_VERSION := 2.12.0 -$(PKG)_CHECKSUM := 0d15ba153ea5d4fd5f658b551b7009a27a454cf3 +$(PKG)_VERSION := 2.14.0 +$(PKG)_CHECKSUM := 55cc6479498efcad58e4245af2fb2ffdf69ebfdc $(PKG)_REMOTE_SUBDIR := $(PKG)_SUBDIR := image-$($(PKG)_VERSION) $(PKG)_FILE := image-$($(PKG)_VERSION).tar.gz