Fix integer overflow in ft_rendered_size_line
[ilaris-y4m-tools.git] / fpschanger.hpp
blobc33fa669fafd3e956623724a8114178662b8b983
1 #ifndef _fpschanger_hpp_included_
2 #define _fpschanger_hpp_included_
4 #include <cstdint>
6 class fpschanger
8 public:
9 fpschanger(uint32_t tfps_n, uint32_t tfps_d, uint32_t sfps_n, uint32_t sfps_d);
10 void change_source_rate(uint32_t sfps_n, uint32_t sfps_d);
11 uint64_t duration(uint64_t sduration);
12 private:
13 uint64_t increment;
14 uint64_t decrement;
15 int64_t balance;
16 uint32_t tfps_n;
17 uint32_t tfps_d;
20 #endif