diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2024-04-13 03:39:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-13 03:39:37 +0200 |
| commit | b3939052b4319e7c93de6ce424bf1c5d71ea2d41 (patch) | |
| tree | a0f6e071f265953f1fd0829763151bb32020d53b /Source/Core/VideoCommon/FrameDumper.cpp | |
| parent | 107379bf74c1daf212c669abaa1d21f335abc62a (diff) | |
| parent | 2f13be5a2d05b41ba91a2abfa4af2c79a85bb34f (diff) | |
Merge pull request #12436 from Filoppi/frame-dump-raw-internal-resolution
Frame dump at raw internal resolution
Diffstat (limited to 'Source/Core/VideoCommon/FrameDumper.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/FrameDumper.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/FrameDumper.cpp b/Source/Core/VideoCommon/FrameDumper.cpp index db4ef5205e..30f6a40e10 100644 --- a/Source/Core/VideoCommon/FrameDumper.cpp +++ b/Source/Core/VideoCommon/FrameDumper.cpp @@ -18,6 +18,9 @@ #include "VideoCommon/Present.h" #include "VideoCommon/VideoConfig.h" +// The video encoder needs the image to be a multiple of x samples. +static constexpr int VIDEO_ENCODER_LCM = 4; + static bool DumpFrameToPNG(const FrameData& frame, const std::string& file_name) { return Common::ConvertRGBAToRGBAndSavePNG(file_name, frame.data, frame.width, frame.height, @@ -354,6 +357,13 @@ bool FrameDumper::IsFrameDumping() const return false; } +int FrameDumper::GetRequiredResolutionLeastCommonMultiple() const +{ + if (Config::Get(Config::MAIN_MOVIE_DUMP_FRAMES)) + return VIDEO_ENCODER_LCM; + return 1; +} + void FrameDumper::DoState(PointerWrap& p) { #ifdef HAVE_FFMPEG |
