| e8555c89 Andy McCall |
1 |
#ifndef DEFLICKER_HH |
| 2 |
#define DEFLICKER_HH |
| 3 |
|
| 4 |
#include "FrameSource.hh" |
| 5 |
|
| 6 |
#include <memory> |
| 7 |
#include <span> |
| 8 |
|
| 9 |
namespace openmsx { |
| 10 |
|
| 11 |
class RawFrame; |
| 12 |
|
| 13 |
class Deflicker final : public FrameSource |
| 14 |
{ |
| 15 |
public: |
| 16 |
explicit Deflicker(std::span<std::unique_ptr<RawFrame>, 4> lastFrames); |
| 17 |
Deflicker(const Deflicker&) = default; |
| 18 |
Deflicker(Deflicker&&) = default; |
| 19 |
Deflicker& operator=(const Deflicker&) = default; |
| 20 |
Deflicker& operator=(Deflicker&&) = default; |
| 21 |
~Deflicker() = default; |
| 22 |
|
| 23 |
void init(); |
| 24 |
|
| 25 |
[[nodiscard]] unsigned getLineWidth(unsigned line) const override; |
| 26 |
[[nodiscard]] std::span<const Pixel> getUnscaledLine( |
| 27 |
unsigned line, std::span<Pixel> helpBuf) const override; |
| 28 |
|
| 29 |
private: |
| 30 |
std::span<std::unique_ptr<RawFrame>, 4> lastFrames; |
| 31 |
}; |
| 32 |
|
| 33 |
} |
| 34 |
|
| 35 |
#endif |