]> git.sesse.net Git - movit/blob - resize_effect.h
54c2b31bcca6e20b7cdc409bd69a344e3d1ae22c
[movit] / resize_effect.h
1 #ifndef _RESIZE_EFFECT_H
2 #define _RESIZE_EFFECT_H 1
3
4 // An effect that simply resizes the picture to a given output size
5 // (set by the two integer parameters "width" and "height").
6 // Mostly useful as part of other algorithms.
7
8 #include "effect.h"
9
10 class ResizeEffect : public Effect {
11 public:
12         ResizeEffect();
13         std::string output_fragment_shader();
14
15         // We want processing done pre-filtering and mipmapped,
16         // in case we need to scale down a lot.
17         virtual bool need_texture_bounce() const { return true; }
18         virtual bool needs_mipmaps() const { return true; }
19
20         virtual bool changes_output_size() const { return true; }
21         virtual void get_output_size(unsigned *width, unsigned *height) const;
22
23 private:
24         int width, height;
25 };
26
27 #endif // !defined(_RESIZE_EFFECT_H)