1 #include "rescalers/public.hpp"
2 #include "rescalers/factory.hpp"
3 #include "rescalers/simple.hpp"
9 class simple_rescaler_c
: public rescaler
12 simple_rescaler_c(bound_scaler_t _rescale_fn
)
14 rescale_fn
= _rescale_fn
;
17 void operator()(uint8_t* target
, uint32_t twidth
, uint32_t theight
,
18 const uint8_t* source
, uint32_t swidth
, uint32_t sheight
)
20 rescale_fn(target
, twidth
, theight
, source
, swidth
, sheight
);
24 bound_scaler_t rescale_fn
;
28 simple_rescaler::simple_rescaler(const std::string
& type
, bound_scaler_t _fn
)
29 : rescaler_factory(type
)
34 rescaler
& simple_rescaler::make(const std::string
& type
)
36 return *new simple_rescaler_c(fn
);