]> git.sesse.net Git - casparcg/blobdiff - modules/image/util/image_algorithms.h
Fixed build errors under windows
[casparcg] / modules / image / util / image_algorithms.h
index a91f2539af5070f31c46946bd40b723ff65635d6..f8c23f3d692ce581635d387d1789ec355557055d 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <cmath>
 #include <cstdint>
-#include <boost/foreach.hpp>
 
 namespace caspar { namespace image {
 
@@ -35,14 +34,12 @@ namespace caspar { namespace image {
  */
 class rgba_weighting
 {
-       int r, g, b, a;
-       int total_weight;
+       int r = 0;
+       int g = 0;
+       int b = 0;
+       int a = 0;
+       int total_weight = 0;
 public:
-       rgba_weighting()
-               : r(0), g(0), b(0), a(0), total_weight(0)
-       {
-       }
-
        template<class RGBAPixel>
        inline void add_pixel(const RGBAPixel& pixel, uint8_t weight)
        {
@@ -65,7 +62,7 @@ public:
 };
 
 template<class T>
-std::vector<T> get_tweened_values(const core::tweener& tweener, size_t num_values, T from, T to)
+std::vector<T> get_tweened_values(const caspar::tweener& tweener, size_t num_values, T from, T to)
 {
        std::vector<T> result;
        result.reserve(num_values);
@@ -106,8 +103,8 @@ template<class SrcView, class DstView>
 void blur(
        const SrcView& src,
        DstView& dst,
-       const std::vector<std::pair<int, int>> motion_trail_coordinates, 
-       const core::tweener& tweener)
+       const std::vector<std::pair<int, int>>& motion_trail_coordinates, 
+       const caspar::tweener& tweener)
 {
        auto blur_px = motion_trail_coordinates.size();
        auto tweened_weights_y = get_tweened_values<uint8_t>(tweener, blur_px + 2, 255, 0);
@@ -170,7 +167,7 @@ void blur(
        DstView& dst,
        double angle_radians,
        int blur_px, 
-       const core::tweener& tweener)
+       const caspar::tweener& tweener)
 {
        auto motion_trail = get_line_points(blur_px, angle_radians);