2015-07-23 02:08:28 +00:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
2015-07-24 03:16:31 +00:00
|
|
|
#include "../Utilities/SimpleLock.h"
|
|
|
|
#include "EmulationSettings.h"
|
2015-07-23 02:08:28 +00:00
|
|
|
|
|
|
|
class VideoDecoder
|
|
|
|
{
|
|
|
|
private:
|
2015-07-24 03:16:31 +00:00
|
|
|
static unique_ptr<VideoDecoder> Instance;
|
2015-07-23 02:08:28 +00:00
|
|
|
|
2015-07-24 03:16:31 +00:00
|
|
|
OverscanDimensions _overscan;
|
|
|
|
uint32_t* _frameBuffer = nullptr;
|
|
|
|
SimpleLock _frameLock;
|
2015-07-23 02:08:28 +00:00
|
|
|
|
2015-07-24 03:16:31 +00:00
|
|
|
uint32_t ProcessIntensifyBits(uint16_t ppuPixel);
|
|
|
|
void UpdateBufferSize();
|
2015-07-23 02:08:28 +00:00
|
|
|
|
|
|
|
public:
|
2015-07-24 03:16:31 +00:00
|
|
|
static VideoDecoder* GetInstance();
|
|
|
|
~VideoDecoder();
|
|
|
|
|
|
|
|
uint32_t* DecodeFrame(uint16_t* inputBuffer);
|
|
|
|
void TakeScreenshot(string romFilename);
|
2015-08-09 02:36:39 +00:00
|
|
|
|
|
|
|
void DebugDecodeFrame(uint16_t* inputBuffer, uint32_t* outputBuffer, uint32_t length);
|
2015-07-23 02:08:28 +00:00
|
|
|
};
|