mirror of https://github.com/PCSX2/pcsx2.git
GSdx: capture - print recomended resolution and DAR to the console
This is the internal resolution which GSdx uses and recording at this resolution is optimal, i.e. without any dumb scaling, with all relevant pixels and without redundant pixels. The resulting clip still doesn't have the correct aspect ratio set, but that's just a property which can be set to the clip afterwards, which is where the DAR becomes useful. Since it's usually anamorphic, when muxing later with the audio use the DAR to set the playback aspect ratio.
This commit is contained in:
parent
3f81fc98dd
commit
4474d4391b
|
@ -391,8 +391,9 @@ GSCapture::~GSCapture()
|
|||
EndCapture();
|
||||
}
|
||||
|
||||
bool GSCapture::BeginCapture(float fps)
|
||||
bool GSCapture::BeginCapture(float fps, GSVector2i recomendedResolution, float aspect)
|
||||
{
|
||||
printf("Recomended resolution: %d x %d, DAR for muxing: %.4f\n", recomendedResolution.x, recomendedResolution.y, aspect);
|
||||
std::lock_guard<std::recursive_mutex> lock(m_lock);
|
||||
|
||||
ASSERT(fps != 0);
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
GSCapture();
|
||||
virtual ~GSCapture();
|
||||
|
||||
bool BeginCapture(float fps);
|
||||
bool BeginCapture(float fps, GSVector2i recomendedResolution, float aspect);
|
||||
bool DeliverFrame(const void* bits, int pitch, bool rgba);
|
||||
bool EndCapture();
|
||||
|
||||
|
|
|
@ -533,7 +533,10 @@ bool GSRenderer::MakeSnapshot(const string& path)
|
|||
|
||||
bool GSRenderer::BeginCapture()
|
||||
{
|
||||
return m_capture.BeginCapture(GetTvRefreshRate());
|
||||
GSVector4i disp = m_wnd->GetClientRect().fit(m_aspectratio);
|
||||
float aspect = (float)disp.width() / max(1, disp.height());
|
||||
|
||||
return m_capture.BeginCapture(GetTvRefreshRate(), GetInternalResolution(), aspect);
|
||||
}
|
||||
|
||||
void GSRenderer::EndCapture()
|
||||
|
|
|
@ -69,6 +69,9 @@ public:
|
|||
virtual void KeyEvent(GSKeyEventData* e);
|
||||
virtual bool CanUpscale() {return false;}
|
||||
virtual int GetUpscaleMultiplier() {return 1;}
|
||||
virtual GSVector2i GetInternalResolution() {
|
||||
return GSVector2i(GetDisplayRect().width(), GetDisplayRect().height());
|
||||
}
|
||||
void SetAspectRatio(int aspect) {m_aspectratio = aspect;}
|
||||
void SetVSync(bool enabled);
|
||||
void SetFrameLimit(bool limit);
|
||||
|
|
|
@ -100,6 +100,15 @@ int GSRendererHW::GetUpscaleMultiplier()
|
|||
return m_upscale_multiplier ? m_upscale_multiplier : 1;
|
||||
}
|
||||
|
||||
GSVector2i GSRendererHW::GetInternalResolution() {
|
||||
GSVector2i dr(GetDisplayRect().width(), GetDisplayRect().height());
|
||||
|
||||
if (m_upscale_multiplier)
|
||||
return GSVector2i(dr.x * m_upscale_multiplier, dr.y * m_upscale_multiplier);
|
||||
else
|
||||
return GSVector2i(m_width, m_height);
|
||||
}
|
||||
|
||||
void GSRendererHW::Reset()
|
||||
{
|
||||
// TODO: GSreset can come from the main thread too => crash
|
||||
|
|
|
@ -155,6 +155,7 @@ public:
|
|||
void SetGameCRC(uint32 crc, int options);
|
||||
bool CanUpscale();
|
||||
int GetUpscaleMultiplier();
|
||||
virtual GSVector2i GetInternalResolution();
|
||||
void SetScaling();
|
||||
|
||||
void Reset();
|
||||
|
|
Loading…
Reference in New Issue