#include <epoxy/gl.h>
#include <assert.h>
#include <stddef.h>
-#include <memory>
#include <string>
#include "effect.h"
unsigned dst_samples, num_loops;
// Exactly one of these is set.
- std::unique_ptr<Tap<fp16_int_t>[]> bilinear_weights_fp16;
- std::unique_ptr<Tap<float>[]> bilinear_weights_fp32;
+ Tap<fp16_int_t> *bilinear_weights_fp16;
+ Tap<float> *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"; }
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;