]> git.sesse.net Git - movit/blobdiff - resample_effect.h
Remove the unused fields from ResampleEffect; if we make any changes here, it will...
[movit] / resample_effect.h
index a8e37e4083dac02a849e9e75a09ee43873d89d05..5906a3c44ca41f499b17340e3fcc36fdaec80dfc 100644 (file)
@@ -18,6 +18,7 @@
 #include <epoxy/gl.h>
 #include <assert.h>
 #include <stddef.h>
+#include <memory>
 #include <string>
 
 #include "effect.h"
@@ -40,8 +41,8 @@ struct ScalingWeights {
        unsigned dst_samples, num_loops;
 
        // Exactly one of these is set.
-       Tap<fp16_int_t> *bilinear_weights_fp16;
-       Tap<float> *bilinear_weights_fp32;
+       std::unique_ptr<Tap<fp16_int_t>[]> bilinear_weights_fp16;
+       std::unique_ptr<Tap<float>[]> bilinear_weights_fp32;
 };
 ScalingWeights calculate_scaling_weights(unsigned src_size, unsigned dst_size, float zoom, float offset);
 
@@ -82,7 +83,6 @@ private:
        float offset_x, offset_y;
        float zoom_x, zoom_y;
        float zoom_center_x, zoom_center_y;
-       float unused;
 };
 
 class SingleResamplePassEffect : public Effect {
@@ -132,7 +132,6 @@ private:
 
        int input_width, input_height, output_width, output_height;
        float offset, zoom;
-       float unused;
        int last_input_width, last_input_height, last_output_width, last_output_height;
        float last_offset, last_zoom;
        int src_bilinear_samples, num_loops;