diff options
| author | degasus <wickmarkus@web.de> | 2016-10-08 16:23:04 +0200 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2016-10-08 18:16:32 +0200 |
| commit | db0509560e06a15655b2839e3fe6ce87f0e417fe (patch) | |
| tree | c826d2fe520476545602426fed04847ae61af52a /Source/Core/VideoCommon | |
| parent | 8b38d5a1155c9d91036935b2abc388aaa1822e41 (diff) | |
AVIDump: Hard code rgba.
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/AVIDump.cpp | 16 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/AVIDump.h | 8 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.h | 4 |
4 files changed, 7 insertions, 27 deletions
diff --git a/Source/Core/VideoCommon/AVIDump.cpp b/Source/Core/VideoCommon/AVIDump.cpp index ab5b99c993..80af9f8d84 100644 --- a/Source/Core/VideoCommon/AVIDump.cpp +++ b/Source/Core/VideoCommon/AVIDump.cpp @@ -47,7 +47,6 @@ static u64 s_last_pts; static int s_current_width; static int s_current_height; static int s_file_index = 0; -static AVIDump::DumpFormat s_current_format; static const u8* s_stored_frame_data; static int s_stored_frame_width; static int s_stored_frame_height; @@ -63,18 +62,9 @@ static void InitAVCodec() } } -bool AVIDump::Start(int w, int h, DumpFormat format) +bool AVIDump::Start(int w, int h) { - if (format == DumpFormat::FORMAT_BGR) - { - s_pix_fmt = AV_PIX_FMT_BGR24; - } - else - { - s_pix_fmt = AV_PIX_FMT_RGBA; - } - - s_current_format = format; + s_pix_fmt = AV_PIX_FMT_RGBA; s_width = w; s_height = h; @@ -320,7 +310,7 @@ void AVIDump::CheckResolution(int width, int height) int temp_file_index = s_file_index; Stop(); s_file_index = temp_file_index + 1; - Start(width, height, s_current_format); + Start(width, height); s_current_width = width; s_current_height = height; } diff --git a/Source/Core/VideoCommon/AVIDump.h b/Source/Core/VideoCommon/AVIDump.h index a3b2ef4bd5..2d1dc89185 100644 --- a/Source/Core/VideoCommon/AVIDump.h +++ b/Source/Core/VideoCommon/AVIDump.h @@ -15,13 +15,7 @@ private: static void StoreFrameData(const u8* data, int width, int height, int stride); public: - enum class DumpFormat - { - FORMAT_BGR, - FORMAT_RGBA - }; - - static bool Start(int w, int h, DumpFormat format); + static bool Start(int w, int h); static void AddFrame(const u8* data, int width, int height, int stride); static void Stop(); static void DoState(); diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index e523fd8a67..4c0abf318a 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -555,8 +555,7 @@ bool Renderer::IsFrameDumping() return false; } -void Renderer::DumpFrameData(const u8* data, int w, int h, int stride, AVIDump::DumpFormat format, - bool swap_upside_down) +void Renderer::DumpFrameData(const u8* data, int w, int h, int stride, bool swap_upside_down) { #if defined(HAVE_LIBAV) || defined(_WIN32) if (w == 0 || h == 0) @@ -564,7 +563,6 @@ void Renderer::DumpFrameData(const u8* data, int w, int h, int stride, AVIDump:: m_last_framedump_width = w; m_last_framedump_height = h; - m_last_framedump_format = format; m_last_framedump_stride = stride; // TODO: Refactor this. Right now it's needed for the implace flipping of the image. @@ -572,7 +570,7 @@ void Renderer::DumpFrameData(const u8* data, int w, int h, int stride, AVIDump:: if (!m_last_frame_dumped) { - m_AVI_dumping = AVIDump::Start(w, h, format); + m_AVI_dumping = AVIDump::Start(w, h); if (!m_AVI_dumping) { OSD::AddMessage("AVIDump Start failed", 2000); diff --git a/Source/Core/VideoCommon/RenderBase.h b/Source/Core/VideoCommon/RenderBase.h index 9a78ce4a4b..e509d10530 100644 --- a/Source/Core/VideoCommon/RenderBase.h +++ b/Source/Core/VideoCommon/RenderBase.h @@ -148,8 +148,7 @@ protected: static void RecordVideoMemory(); bool IsFrameDumping(); - void DumpFrameData(const u8* data, int w, int h, int stride, AVIDump::DumpFormat format, - bool swap_upside_down = false); + void DumpFrameData(const u8* data, int w, int h, int stride, bool swap_upside_down = false); void FinishFrameData(); static volatile bool s_bScreenshot; @@ -195,7 +194,6 @@ private: int m_last_framedump_width = 0; int m_last_framedump_height = 0; int m_last_framedump_stride = 0; - AVIDump::DumpFormat m_last_framedump_format; }; extern std::unique_ptr<Renderer> g_renderer; |
