mirror of
https://github.com/libretro/gambatte-libretro.git
synced 2024-11-23 07:49:48 +00:00
Stricter estimate deviation limit
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@173 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
This commit is contained in:
parent
f5faa3d139
commit
efd990ffff
@ -38,10 +38,10 @@ void FtEst::update(const usec_t t) {
|
||||
long oldFtAvg = ftAvg;
|
||||
ftAvg = (ftAvg * 31 + ft + 16) >> 5;
|
||||
|
||||
if (ftAvg > ((frameTime + (frameTime >> 5)) << COUNT_LOG2))
|
||||
ftAvg = (frameTime + (frameTime >> 5)) << COUNT_LOG2;
|
||||
else if (ftAvg < ((frameTime - (frameTime >> 5)) << COUNT_LOG2))
|
||||
ftAvg = (frameTime - (frameTime >> 5)) << COUNT_LOG2;
|
||||
if (ftAvg > ((frameTime + (frameTime >> 6)) << COUNT_LOG2))
|
||||
ftAvg = (frameTime + (frameTime >> 6)) << COUNT_LOG2;
|
||||
else if (ftAvg < ((frameTime - (frameTime >> 6)) << COUNT_LOG2))
|
||||
ftAvg = (frameTime - (frameTime >> 6)) << COUNT_LOG2;
|
||||
|
||||
ftVar = (ftVar * 15 + std::abs(ftAvg - oldFtAvg) + 8) >> 4;
|
||||
ft = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user