1#ifndef GLPOSTPROCESSOR_HH
2#define GLPOSTPROCESSOR_HH
18class DeinterlacedFrame;
21class EventDistributor;
27class SuperImposedFrame;
38 unsigned maxWidth,
unsigned height,
bool canDoInterlace);
55 std::unique_ptr<RawFrame> finishedFrame, EmuTime::param time);
64 superImposeVideoFrame = videoSource;
73 superImposeVdpFrame = vdpSource;
86 [[nodiscard]]
bool isRecording()
const {
return recorder !=
nullptr; }
104 void executeUntil(EmuTime::param time)
override;
108 [[nodiscard]]
static unsigned getLineWidth(
FrameSource* frame,
unsigned y,
unsigned step);
111 void createRegions();
113 void uploadBlock(
unsigned srcStartY,
unsigned srcEndY,
116 void preCalcNoise(
float factor);
118 void drawGlow(
int glow);
120 void preCalcMonitor3D(
float width);
121 void drawMonitor3D();
132 std::array<std::unique_ptr<RawFrame>, 4> lastFrames;
135 std::unique_ptr<DeinterlacedFrame> deinterlacedFrame;
138 std::unique_ptr<DoubledFrame> interlacedFrame;
141 std::unique_ptr<Deflicker> deflicker;
144 std::unique_ptr<SuperImposedFrame> superImposedFrame;
157 const RawFrame* superImposeVideoFrame =
nullptr;
160 int interleaveCount = 0;
161 int lastFramesCount = 0;
169 const bool canDoInterlace;
174 std::unique_ptr<GLScaler> currScaler;
181 std::array<StoredFrame, 2> renderedFrames;
186 float noiseX = 0.0f, noiseY = 0.0f;
191 [[nodiscard]]
unsigned width()
const {
return tex.
getWidth(); }
193 std::vector<TextureData> textures;
198 Region(
unsigned srcStartY_,
unsigned srcEndY_,
199 unsigned dstStartY_,
unsigned dstEndY_,
201 : srcStartY(srcStartY_)
203 , dstStartY(dstStartY_)
205 , lineWidth(lineWidth_) {}
212 std::vector<Region> regions;
214 unsigned frameCounter = 0;
226 bool storedFrame =
false;
Wrapper around an OpenGL program: a collection of vertex and fragment shaders.
Most basic/generic texture: only contains a texture ID.
Represents the output window/screen of openMSX.
Interface for getting lines from a video frame.
A frame buffer where pixels can be written to.
A post processor builds the frame that is displayed from the MSX frame, while applying effects such a...
std::unique_ptr< RawFrame > rotateFrames(std::unique_ptr< RawFrame > finishedFrame, EmuTime::param time)
Sets up the "abcdFrame" variables for a new frame.
PostProcessor(MSXMotherBoard &motherBoard, Display &display, OutputSurface &screen, const std::string &videoSource, unsigned maxWidth, unsigned height, bool canDoInterlace)
void takeRawScreenShot(unsigned height, const std::string &filename) override
Create a raw (=non-post-processed) screenshot.
void paint(OutputSurface &output) override
Paint this layer.
void setRecorder(AviRecorder *recorder_)
Start/stop recording.
void setSuperimposeVdpFrame(const FrameSource *vdpSource)
Set the VDP frame on which to superimpose the 'normal' output of this PostProcessor.
bool isRecording() const
Is recording active.
~PostProcessor() override
FrameSource * getPaintFrame() const
Get the frame that would be displayed.
void setSuperimposeVideoFrame(const RawFrame *videoSource)
Set the Video frame on which to superimpose the 'normal' output of this PostProcessor.
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Class containing all settings for renderers.
ScaleAlgorithm
Scaler algorithm.
Every class that wants to get scheduled at some point must inherit from this class.
This file implemented 3 utility functions:
size_t size(std::string_view utf8)