- 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:
gigaherz 2011-10-08 13:05:15 +00:00
parent 3e162556b7
commit 119e9e7114
5 changed files with 8 additions and 11 deletions

View File

@ -68,8 +68,8 @@ public:
return r.rintersect(GSVector4i(0, 0, 1024, 512));
}
int GetFPS()
float GetFPS()
{
return STATUS.ISPAL ? 50 : 60;
return STATUS.ISPAL ? 50 : 59.94;
}
};

View File

@ -173,7 +173,7 @@ GSSource : public CBaseFilter, private CCritSec, public IGSSource
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)
, m_output(NULL)
, m_size(w, h)
@ -181,9 +181,6 @@ public:
, m_now(0)
{
m_output = new GSSourceOutputPin(m_size, m_atpf, this, this, hr, colorspace);
// FIXME
if(fps == 60) m_atpf = 166834; // = 10000000i64 / 59.94
}
virtual ~GSSource()
@ -387,7 +384,7 @@ GSCapture::~GSCapture()
EndCapture();
}
bool GSCapture::BeginCapture(int fps)
bool GSCapture::BeginCapture(float fps)
{
GSAutoLock lock(this);

View File

@ -44,7 +44,7 @@ public:
GSCapture();
virtual ~GSCapture();
bool BeginCapture(int fps);
bool BeginCapture(float fps);
bool DeliverFrame(const void* bits, int pitch, bool rgba);
bool EndCapture();

View File

@ -383,9 +383,9 @@ bool GSState::IsEnabled(int i)
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*

View File

@ -199,7 +199,7 @@ public:
bool IsEnabled(int i);
int GetFPS();
float GetFPS();
virtual void Reset();
virtual void Flush();