Streamtools: Refactor rescaling code
[jpcrr.git] / streamtools / rescalers / simple.hpp
blob5181092b22881195e548d2e00425db9a052f018c
1 #ifndef _rescalers__simple__hpp__included__
2 #define _rescalers__simple__hpp__included__
4 #include <stdint.h>
5 #include <string>
6 #include "bound-method.hpp"
7 #include "rescalers/factory.hpp"
9 //The parameters in order are target, twidth, theight, source, swidth and sheight.
10 typedef bound_method<void, uint8_t*, uint32_t, uint32_t, const uint8_t*, uint32_t, uint32_t> bound_scaler_t;
12 class simple_rescaler : public rescaler_factory
14 public:
15 simple_rescaler(const std::string& type, bound_scaler_t _fn);
16 rescaler& make(const std::string& type);
17 private:
18 bound_scaler_t fn;
21 #endif