X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=resample_effect.h;h=ceae920aa71c98a0799a8423f173bc9e13c25876;hp=7538a68c143e8bd29cdac1078b94bd456bf2c9f6;hb=706365ccee2ad69c5bc3608e12ca8e9ada7ce954;hpb=1fb55b14a6c694e082f0261e86f26d4f82948821 diff --git a/resample_effect.h b/resample_effect.h index 7538a68..ceae920 100644 --- a/resample_effect.h +++ b/resample_effect.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include "effect.h" @@ -41,14 +40,15 @@ struct ScalingWeights { unsigned dst_samples, num_loops; // Exactly one of these is set. - std::unique_ptr[]> bilinear_weights_fp16; - std::unique_ptr[]> bilinear_weights_fp32; + Tap *bilinear_weights_fp16; + Tap *bilinear_weights_fp32; }; ScalingWeights calculate_scaling_weights(unsigned src_size, unsigned dst_size, float zoom, float offset); class ResampleEffect : public Effect { public: ResampleEffect(); + ~ResampleEffect(); virtual std::string effect_type_id() const { return "ResampleEffect"; } @@ -73,6 +73,9 @@ private: void update_size(); void update_offset_and_zoom(); + // Both of these are owned by us if owns_effects is true (before finalize()), + // and otherwise owned by the EffectChain. + bool owns_effects; SingleResamplePassEffect *hpass, *vpass; int input_width, input_height, output_width, output_height;