mirror of https://github.com/PCSX2/pcsx2.git
GSDX:
- Use float instead of int for the video framerate. - Use 59.94 instead of 60 for the ntsc framerate. This replaces a previous hackfix with a better one, but it's still not ideal. The ideal solution for the video encoding side would be to use an actual fraction (60000/1001) and pass this fraction to the encoder. The ideal solution for the gsdx side would be to deduce the real framerate from the timing parameters. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4925 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
3e162556b7
commit
119e9e7114
|
@ -68,8 +68,8 @@ public:
|
||||||
return r.rintersect(GSVector4i(0, 0, 1024, 512));
|
return r.rintersect(GSVector4i(0, 0, 1024, 512));
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetFPS()
|
float GetFPS()
|
||||||
{
|
{
|
||||||
return STATUS.ISPAL ? 50 : 60;
|
return STATUS.ISPAL ? 50 : 59.94;
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -173,7 +173,7 @@ GSSource : public CBaseFilter, private CCritSec, public IGSSource
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
GSSource(int w, int h, int fps, IUnknown* pUnk, HRESULT& hr, int colorspace)
|
GSSource(int w, int h, float fps, IUnknown* pUnk, HRESULT& hr, int colorspace)
|
||||||
: CBaseFilter(NAME("GSSource"), pUnk, this, __uuidof(this), &hr)
|
: CBaseFilter(NAME("GSSource"), pUnk, this, __uuidof(this), &hr)
|
||||||
, m_output(NULL)
|
, m_output(NULL)
|
||||||
, m_size(w, h)
|
, m_size(w, h)
|
||||||
|
@ -181,9 +181,6 @@ public:
|
||||||
, m_now(0)
|
, m_now(0)
|
||||||
{
|
{
|
||||||
m_output = new GSSourceOutputPin(m_size, m_atpf, this, this, hr, colorspace);
|
m_output = new GSSourceOutputPin(m_size, m_atpf, this, this, hr, colorspace);
|
||||||
|
|
||||||
// FIXME
|
|
||||||
if(fps == 60) m_atpf = 166834; // = 10000000i64 / 59.94
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~GSSource()
|
virtual ~GSSource()
|
||||||
|
@ -387,7 +384,7 @@ GSCapture::~GSCapture()
|
||||||
EndCapture();
|
EndCapture();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GSCapture::BeginCapture(int fps)
|
bool GSCapture::BeginCapture(float fps)
|
||||||
{
|
{
|
||||||
GSAutoLock lock(this);
|
GSAutoLock lock(this);
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
GSCapture();
|
GSCapture();
|
||||||
virtual ~GSCapture();
|
virtual ~GSCapture();
|
||||||
|
|
||||||
bool BeginCapture(int fps);
|
bool BeginCapture(float fps);
|
||||||
bool DeliverFrame(const void* bits, int pitch, bool rgba);
|
bool DeliverFrame(const void* bits, int pitch, bool rgba);
|
||||||
bool EndCapture();
|
bool EndCapture();
|
||||||
|
|
||||||
|
|
|
@ -383,9 +383,9 @@ bool GSState::IsEnabled(int i)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GSState::GetFPS()
|
float GSState::GetFPS()
|
||||||
{
|
{
|
||||||
return ((m_regs->SMODE1.CMOD & 1) ? 50 : 60) >> (1 - m_regs->SMODE2.INT);
|
return ((m_regs->SMODE1.CMOD & 1) ? 50 : 59.94) * pow(2.0f, (float)m_regs->SMODE2.INT-1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GIFPackedRegHandler*
|
// GIFPackedRegHandler*
|
||||||
|
|
|
@ -199,7 +199,7 @@ public:
|
||||||
|
|
||||||
bool IsEnabled(int i);
|
bool IsEnabled(int i);
|
||||||
|
|
||||||
int GetFPS();
|
float GetFPS();
|
||||||
|
|
||||||
virtual void Reset();
|
virtual void Reset();
|
||||||
virtual void Flush();
|
virtual void Flush();
|
||||||
|
|
Loading…
Reference in New Issue