Blob Blame Raw
From 97942616fc20c9f13d57a84b728b77f549c945a9 Mon Sep 17 00:00:00 2001
From: Bart Janssens <bart@bartjanssens.org>
Date: Mon, 14 Jan 2019 00:01:02 +0100
Subject: [PATCH 12/16] FIX: Update to Boost 1.68

---
 k3dsdk/bitmap.h                                  |  3 +++
 .../gil/boost/gil/extension/numeric/affine.hpp   |  6 +++---
 .../boost/gil/extension/numeric/algorithm.hpp    |  2 +-
 .../gil/boost/gil/extension/numeric/convolve.hpp | 16 ++++++++--------
 .../gil/boost/gil/extension/numeric/resample.hpp |  2 +-
 k3dsdk/istreaming_bitmap_source.h                |  1 +
 modules/jpeg_io/bitmap_importer.cpp              |  4 ++--
 modules/jpeg_io/bitmap_reader.cpp                |  4 ++--
 modules/jpeg_io/bitmap_writer.cpp                |  4 ++--
 modules/png_io/bitmap_importer.cpp               |  4 ++--
 modules/png_io/bitmap_reader.cpp                 |  4 ++--
 modules/png_io/bitmap_writer.cpp                 |  4 ++--
 modules/tiff_io/bitmap_exporter.cpp              |  4 ++--
 modules/tiff_io/bitmap_importer.cpp              |  4 ++--
 modules/tiff_io/bitmap_reader.cpp                |  4 ++--
 modules/tiff_io/bitmap_writer.cpp                |  4 ++--
 16 files changed, 37 insertions(+), 33 deletions(-)

diff --git a/k3dsdk/bitmap.h b/k3dsdk/bitmap.h
index 4fa6b1fa..b186fd5d 100644
--- a/k3dsdk/bitmap.h
+++ b/k3dsdk/bitmap.h
@@ -41,6 +41,9 @@ namespace boost
 namespace gil
 {
 
+typedef boost::uint8_t  bits8;
+typedef float32_t bits32f;
+
 template<>
 struct channel_traits<half>
 {
diff --git a/k3dsdk/gil/boost/gil/extension/numeric/affine.hpp b/k3dsdk/gil/boost/gil/extension/numeric/affine.hpp
index 55384585..011c5c7a 100755
--- a/k3dsdk/gil/boost/gil/extension/numeric/affine.hpp
+++ b/k3dsdk/gil/boost/gil/extension/numeric/affine.hpp
@@ -47,7 +47,7 @@ public:
     T a,b,c,d,e,f;
 };
 
-template <typename T> GIL_FORCEINLINE
+template <typename T> BOOST_FORCEINLINE
 matrix3x2<T> operator*(const matrix3x2<T>& m1, const matrix3x2<T>& m2) {
     return matrix3x2<T>(
                 m1.a * m2.a + m1.b * m2.c,
@@ -58,7 +58,7 @@ matrix3x2<T> operator*(const matrix3x2<T>& m1, const matrix3x2<T>& m2) {
                 m1.e * m2.b + m1.f * m2.d + m2.f );
 }
 
-template <typename T, typename F> GIL_FORCEINLINE
+template <typename T, typename F> BOOST_FORCEINLINE
 point2<F> operator*(const point2<T>& p, const matrix3x2<F>& m) {
     return point2<F>(m.a*p.x + m.c*p.y + m.e, m.b*p.x + m.d*p.y + m.f);
 }
@@ -83,7 +83,7 @@ struct mapping_traits<matrix3x2<F> > {
     typedef point2<F> result_type;
 };
 
-template <typename F, typename F2> GIL_FORCEINLINE
+template <typename F, typename F2> BOOST_FORCEINLINE
 point2<F> transform(const matrix3x2<F>& mat, const point2<F2>& src) { return src * mat; }
 
 } }  // namespace boost::gil
diff --git a/k3dsdk/gil/boost/gil/extension/numeric/algorithm.hpp b/k3dsdk/gil/boost/gil/extension/numeric/algorithm.hpp
index 22d4940e..5fc44f61 100755
--- a/k3dsdk/gil/boost/gil/extension/numeric/algorithm.hpp
+++ b/k3dsdk/gil/boost/gil/extension/numeric/algorithm.hpp
@@ -80,7 +80,7 @@ struct inner_product_k_t<0> {
 template <std::size_t Size,
           class _InputIterator1, class _InputIterator2, class _Tp,
           class _BinaryOperation1, class _BinaryOperation2>
-GIL_FORCEINLINE
+BOOST_FORCEINLINE
 _Tp inner_product_k(_InputIterator1 __first1, 
                     _InputIterator2 __first2,
                     _Tp __init, 
diff --git a/k3dsdk/gil/boost/gil/extension/numeric/convolve.hpp b/k3dsdk/gil/boost/gil/extension/numeric/convolve.hpp
index ef6c7c73..db962099 100755
--- a/k3dsdk/gil/boost/gil/extension/numeric/convolve.hpp
+++ b/k3dsdk/gil/boost/gil/extension/numeric/convolve.hpp
@@ -142,7 +142,7 @@ public:
 /// \ingroup ImageAlgorithms
 ///correlate a 1D variable-size kernel along the rows of an image
 template <typename PixelAccum,typename SrcView,typename Kernel,typename DstView>
-GIL_FORCEINLINE
+BOOST_FORCEINLINE
 void correlate_rows(const SrcView& src, const Kernel& ker, const DstView& dst,
                     convolve_boundary_option option=convolve_option_extend_zero) {
     detail::correlate_rows_imp<PixelAccum>(src,ker,dst,option,detail::correlator_n<PixelAccum>(ker.size()));
@@ -151,7 +151,7 @@ void correlate_rows(const SrcView& src, const Kernel& ker, const DstView& dst,
 /// \ingroup ImageAlgorithms
 ///correlate a 1D variable-size kernel along the columns of an image
 template <typename PixelAccum,typename SrcView,typename Kernel,typename DstView>
-GIL_FORCEINLINE
+BOOST_FORCEINLINE
 void correlate_cols(const SrcView& src, const Kernel& ker, const DstView& dst,
                     convolve_boundary_option option=convolve_option_extend_zero) {
     correlate_rows<PixelAccum>(transposed_view(src),ker,transposed_view(dst),option);
@@ -160,7 +160,7 @@ void correlate_cols(const SrcView& src, const Kernel& ker, const DstView& dst,
 /// \ingroup ImageAlgorithms
 ///convolve a 1D variable-size kernel along the rows of an image
 template <typename PixelAccum,typename SrcView,typename Kernel,typename DstView>
-GIL_FORCEINLINE
+BOOST_FORCEINLINE
 void convolve_rows(const SrcView& src, const Kernel& ker, const DstView& dst,
                    convolve_boundary_option option=convolve_option_extend_zero) {
     correlate_rows<PixelAccum>(src,reverse_kernel(ker),dst,option);
@@ -169,7 +169,7 @@ void convolve_rows(const SrcView& src, const Kernel& ker, const DstView& dst,
 /// \ingroup ImageAlgorithms
 ///convolve a 1D variable-size kernel along the columns of an image
 template <typename PixelAccum,typename SrcView,typename Kernel,typename DstView>
-GIL_FORCEINLINE
+BOOST_FORCEINLINE
 void convolve_cols(const SrcView& src, const Kernel& ker, const DstView& dst,
                    convolve_boundary_option option=convolve_option_extend_zero) {
     convolve_rows<PixelAccum>(transposed_view(src),ker,transposed_view(dst),option);
@@ -178,7 +178,7 @@ void convolve_cols(const SrcView& src, const Kernel& ker, const DstView& dst,
 /// \ingroup ImageAlgorithms
 ///correlate a 1D fixed-size kernel along the rows of an image
 template <typename PixelAccum,typename SrcView,typename Kernel,typename DstView>
-GIL_FORCEINLINE
+BOOST_FORCEINLINE
 void correlate_rows_fixed(const SrcView& src, const Kernel& ker, const DstView& dst,
                           convolve_boundary_option option=convolve_option_extend_zero) {
     detail::correlate_rows_imp<PixelAccum>(src,ker,dst,option,detail::correlator_k<Kernel::static_size,PixelAccum>());
@@ -187,7 +187,7 @@ void correlate_rows_fixed(const SrcView& src, const Kernel& ker, const DstView&
 /// \ingroup ImageAlgorithms
 ///correlate a 1D fixed-size kernel along the columns of an image
 template <typename PixelAccum,typename SrcView,typename Kernel,typename DstView>
-GIL_FORCEINLINE
+BOOST_FORCEINLINE
 void correlate_cols_fixed(const SrcView& src, const Kernel& ker, const DstView& dst,
                           convolve_boundary_option option=convolve_option_extend_zero) {
     correlate_rows_fixed<PixelAccum>(transposed_view(src),ker,transposed_view(dst),option);
@@ -196,7 +196,7 @@ void correlate_cols_fixed(const SrcView& src, const Kernel& ker, const DstView&
 /// \ingroup ImageAlgorithms
 ///convolve a 1D fixed-size kernel along the rows of an image
 template <typename PixelAccum,typename SrcView,typename Kernel,typename DstView>
-GIL_FORCEINLINE
+BOOST_FORCEINLINE
 void convolve_rows_fixed(const SrcView& src, const Kernel& ker, const DstView& dst,
                          convolve_boundary_option option=convolve_option_extend_zero) {
     correlate_rows_fixed<PixelAccum>(src,reverse_kernel(ker),dst,option);
@@ -205,7 +205,7 @@ void convolve_rows_fixed(const SrcView& src, const Kernel& ker, const DstView& d
 /// \ingroup ImageAlgorithms
 ///convolve a 1D fixed-size kernel along the columns of an image
 template <typename PixelAccum,typename SrcView,typename Kernel,typename DstView>
-GIL_FORCEINLINE
+BOOST_FORCEINLINE
 void convolve_cols_fixed(const SrcView& src, const Kernel& ker, const DstView& dst,
                          convolve_boundary_option option=convolve_option_extend_zero) {
     convolve_rows_fixed<PixelAccum>(transposed_view(src),ker,transposed_view(dst),option);
diff --git a/k3dsdk/gil/boost/gil/extension/numeric/resample.hpp b/k3dsdk/gil/boost/gil/extension/numeric/resample.hpp
index 3cef8a70..ebb39a51 100755
--- a/k3dsdk/gil/boost/gil/extension/numeric/resample.hpp
+++ b/k3dsdk/gil/boost/gil/extension/numeric/resample.hpp
@@ -68,7 +68,7 @@ namespace detail {
         Sampler _sampler;
         resample_pixels_fn(const MapFn& dst_to_src, const Sampler& sampler) : _dst_to_src(dst_to_src), _sampler(sampler) {}
 
-        template <typename SrcView, typename DstView> GIL_FORCEINLINE void apply_compatible(const SrcView& src, const DstView& dst)  const { 
+        template <typename SrcView, typename DstView> BOOST_FORCEINLINE void apply_compatible(const SrcView& src, const DstView& dst)  const { 
             resample_pixels(src, dst, _dst_to_src, _sampler); 
         }
     };
diff --git a/k3dsdk/istreaming_bitmap_source.h b/k3dsdk/istreaming_bitmap_source.h
index 973bd118..e8f86b2d 100644
--- a/k3dsdk/istreaming_bitmap_source.h
+++ b/k3dsdk/istreaming_bitmap_source.h
@@ -24,6 +24,7 @@
 	\author Tim Shead (tshead@k-3d.com)
 */
 
+#include <k3dsdk/bitmap.h>
 #include <k3dsdk/iunknown.h>
 #include <k3dsdk/signal_system.h>
 
diff --git a/modules/jpeg_io/bitmap_importer.cpp b/modules/jpeg_io/bitmap_importer.cpp
index b7a378af..7d881c12 100644
--- a/modules/jpeg_io/bitmap_importer.cpp
+++ b/modules/jpeg_io/bitmap_importer.cpp
@@ -28,7 +28,7 @@
 #include <k3dsdk/string_modifiers.h>
 
 #include <boost/assign/list_of.hpp>
-#include <boost/gil/extension/io/jpeg_io.hpp>
+#include <boost/gil/extension/io/jpeg.hpp>
 
 namespace module
 {
@@ -55,7 +55,7 @@ public:
 		try
 		{
 			k3d::log() << info << "Reading " << Path.native_console_string() << " using " << get_factory().name() << std::endl;
-			boost::gil::jpeg_read_and_convert_image(Path.native_filesystem_string(), Bitmap);
+			boost::gil::read_and_convert_image(Path.native_filesystem_string(), Bitmap, boost::gil::jpeg_tag());
 			return true;
 		}
 		catch(std::exception& e)
diff --git a/modules/jpeg_io/bitmap_reader.cpp b/modules/jpeg_io/bitmap_reader.cpp
index 491d269c..795dd3b2 100644
--- a/modules/jpeg_io/bitmap_reader.cpp
+++ b/modules/jpeg_io/bitmap_reader.cpp
@@ -28,7 +28,7 @@
 #include <k3dsdk/options.h>
 #include <k3dsdk/path.h>
 
-#include <boost/gil/extension/io/jpeg_io.hpp>
+#include <boost/gil/extension/io/jpeg.hpp>
 
 namespace module
 {
@@ -66,7 +66,7 @@ public:
 		try
 		{
 			k3d::log() << info << "Reading " << file.native_console_string() << " using " << get_factory().name() << std::endl;
-			boost::gil::jpeg_read_and_convert_image(file.native_filesystem_string(), Output);
+			boost::gil::read_and_convert_image(file.native_filesystem_string(), Output, boost::gil::jpeg_tag());
 		}
 		catch(std::exception& e)
 		{
diff --git a/modules/jpeg_io/bitmap_writer.cpp b/modules/jpeg_io/bitmap_writer.cpp
index 7ff23470..6720b659 100644
--- a/modules/jpeg_io/bitmap_writer.cpp
+++ b/modules/jpeg_io/bitmap_writer.cpp
@@ -26,7 +26,7 @@
 #include <k3dsdk/document_plugin_factory.h>
 #include <k3dsdk/node.h>
 
-#include <boost/gil/extension/io/jpeg_io.hpp>
+#include <boost/gil/extension/io/jpeg.hpp>
 
 namespace module
 {
@@ -78,7 +78,7 @@ public:
 		try
 		{
 			k3d::log() << info << "Writing " << file.native_console_string() << " using " << get_factory().name() << std::endl;
-			boost::gil::jpeg_write_view(file.native_filesystem_string(), boost::gil::color_converted_view<boost::gil::rgb8_pixel_t>(view(*bitmap), extract_rgb()));
+			boost::gil::write_view(file.native_filesystem_string(), boost::gil::color_converted_view<boost::gil::rgb8_pixel_t>(view(*bitmap), extract_rgb()), boost::gil::jpeg_tag());
 		}
 		catch(std::exception& e)
 		{
diff --git a/modules/png_io/bitmap_importer.cpp b/modules/png_io/bitmap_importer.cpp
index 724319c2..617f82c2 100644
--- a/modules/png_io/bitmap_importer.cpp
+++ b/modules/png_io/bitmap_importer.cpp
@@ -30,7 +30,7 @@
 #define int_p_NULL (int*)NULL
 
 #include <boost/assign/list_of.hpp>
-#include <boost/gil/extension/io/png_io.hpp>
+#include <boost/gil/extension/io/png.hpp>
 
 namespace module
 {
@@ -57,7 +57,7 @@ public:
 		try
 		{
 			k3d::log() << info << "Reading " << File.native_console_string() << " using " << get_factory().name() << std::endl;
-			boost::gil::png_read_and_convert_image(File.native_filesystem_string(), Bitmap);
+			boost::gil::read_and_convert_image(File.native_filesystem_string(), Bitmap, boost::gil::png_tag());
 			return true;
 		}
 		catch(std::exception& e)
diff --git a/modules/png_io/bitmap_reader.cpp b/modules/png_io/bitmap_reader.cpp
index b9772996..297b282c 100644
--- a/modules/png_io/bitmap_reader.cpp
+++ b/modules/png_io/bitmap_reader.cpp
@@ -31,7 +31,7 @@
 #define png_infopp_NULL (png_infopp)NULL
 #define int_p_NULL (int*)NULL
 
-#include <boost/gil/extension/io/png_io.hpp>
+#include <boost/gil/extension/io/png.hpp>
 
 namespace module
 {
@@ -69,7 +69,7 @@ public:
 		try
 		{
 			k3d::log() << info << "Reading " << file.native_console_string() << " using " << get_factory().name() << std::endl;
-			boost::gil::png_read_and_convert_image(file.native_filesystem_string(), Output);
+			boost::gil::read_and_convert_image(file.native_filesystem_string(), Output, boost::gil::png_tag());
 		}
 		catch(std::exception& e)
 		{
diff --git a/modules/png_io/bitmap_writer.cpp b/modules/png_io/bitmap_writer.cpp
index 373040f3..dce0287c 100644
--- a/modules/png_io/bitmap_writer.cpp
+++ b/modules/png_io/bitmap_writer.cpp
@@ -29,7 +29,7 @@
 #define png_infopp_NULL (png_infopp)NULL
 #define int_p_NULL (int*)NULL
 
-#include <boost/gil/extension/io/png_io.hpp>
+#include <boost/gil/extension/io/png.hpp>
 
 namespace module
 {
@@ -76,7 +76,7 @@ public:
 				throw std::runtime_error("bitmap with zero height");
 
 			k3d::log() << info << "Writing " << file.native_console_string() << " using " << get_factory().name() << std::endl;
-			boost::gil::png_write_view(file.native_filesystem_string(), boost::gil::color_converted_view<boost::gil::rgba8_pixel_t>(view(*bitmap)));
+			boost::gil::write_view(file.native_filesystem_string(), boost::gil::color_converted_view<boost::gil::rgba8_pixel_t>(view(*bitmap)), boost::gil::png_tag());
 		}
 		catch(std::exception& e)
 		{
diff --git a/modules/tiff_io/bitmap_exporter.cpp b/modules/tiff_io/bitmap_exporter.cpp
index 3e18649b..83e2dd76 100644
--- a/modules/tiff_io/bitmap_exporter.cpp
+++ b/modules/tiff_io/bitmap_exporter.cpp
@@ -28,7 +28,7 @@
 #include <k3dsdk/path.h>
 #include <k3dsdk/string_modifiers.h>
 
-#include <boost/gil/extension/io/tiff_io.hpp>
+#include <boost/gil/extension/io/tiff.hpp>
 
 namespace module
 {
@@ -55,7 +55,7 @@ public:
 		try
 		{
 			k3d::log() << info << "Writing " << Path.native_console_string() << " using " << get_factory().name() << std::endl;
-			boost::gil::tiff_write_view(Path.native_filesystem_string(), boost::gil::color_converted_view<boost::gil::rgb8_pixel_t>(const_view(Bitmap)));
+			boost::gil::write_view(Path.native_filesystem_string(), boost::gil::color_converted_view<boost::gil::rgb8_pixel_t>(const_view(Bitmap)), boost::gil::tiff_tag());
 			return true;
 		}
 		catch(std::exception& e)
diff --git a/modules/tiff_io/bitmap_importer.cpp b/modules/tiff_io/bitmap_importer.cpp
index f9281259..a5d32195 100644
--- a/modules/tiff_io/bitmap_importer.cpp
+++ b/modules/tiff_io/bitmap_importer.cpp
@@ -28,7 +28,7 @@
 #include <k3dsdk/string_modifiers.h>
 
 #include <boost/assign/list_of.hpp>
-#include <boost/gil/extension/io/tiff_io.hpp>
+#include <boost/gil/extension/io/tiff.hpp>
 
 namespace module
 {
@@ -55,7 +55,7 @@ public:
 		try
 		{
 			k3d::log() << info << "Reading " << Path.native_console_string() << " using " << get_factory().name() << std::endl;
-			boost::gil::tiff_read_and_convert_image(Path.native_filesystem_string(), Bitmap);
+			boost::gil::read_and_convert_image(Path.native_filesystem_string(), Bitmap, boost::gil::tiff_tag());
 			return true;
 		}
 		catch(std::exception& e)
diff --git a/modules/tiff_io/bitmap_reader.cpp b/modules/tiff_io/bitmap_reader.cpp
index 2eece977..373c7de4 100644
--- a/modules/tiff_io/bitmap_reader.cpp
+++ b/modules/tiff_io/bitmap_reader.cpp
@@ -28,7 +28,7 @@
 #include <k3dsdk/options.h>
 #include <k3dsdk/path.h>
 
-#include <boost/gil/extension/io/tiff_io.hpp>
+#include <boost/gil/extension/io/tiff.hpp>
 
 namespace module
 {
@@ -66,7 +66,7 @@ public:
 		try
 		{
 			k3d::log() << info << "Reading " << file.native_console_string() << " using " << get_factory().name() << std::endl;
-			boost::gil::tiff_read_and_convert_image(file.native_filesystem_string(), Output);
+			boost::gil::read_and_convert_image(file.native_filesystem_string(), Output, boost::gil::tiff_tag());
 		}
 		catch(std::exception& e)
 		{
diff --git a/modules/tiff_io/bitmap_writer.cpp b/modules/tiff_io/bitmap_writer.cpp
index 12cb8601..d58aafd2 100644
--- a/modules/tiff_io/bitmap_writer.cpp
+++ b/modules/tiff_io/bitmap_writer.cpp
@@ -26,7 +26,7 @@
 #include <k3dsdk/document_plugin_factory.h>
 #include <k3dsdk/node.h>
 
-#include <boost/gil/extension/io/tiff_io.hpp>
+#include <boost/gil/extension/io/tiff.hpp>
 
 namespace module
 {
@@ -78,7 +78,7 @@ public:
 		try
 		{
 			k3d::log() << info << "Writing " << file.native_console_string() << " using " << get_factory().name() << std::endl;
-			boost::gil::tiff_write_view(file.native_filesystem_string(), boost::gil::color_converted_view<boost::gil::rgb8_pixel_t>(view(*bitmap), extract_rgb()));
+			boost::gil::write_view(file.native_filesystem_string(), boost::gil::color_converted_view<boost::gil::rgb8_pixel_t>(view(*bitmap), extract_rgb()), boost::gil::tiff_tag());
 		}
 		catch(std::exception& e)
 		{
-- 
2.20.1