mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Remove the PaceVideocodecDecode workaround for Ys I & II
The blit cost model now paces its movies at 30 fps without it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
7a675b42d5
commit
8f70003cce
7 files changed
+3
-37
No files matched your search
@@ -167,7 +167,6 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
|
|||||||
CheckSetting(iniFile, gameID, "SpriteBorderFix", &flags_.SpriteBorderFix);
|
CheckSetting(iniFile, gameID, "SpriteBorderFix", &flags_.SpriteBorderFix);
|
||||||
CheckSetting(iniFile, gameID, "TextureCLUTInShader", &flags_.TextureCLUTInShader);
|
CheckSetting(iniFile, gameID, "TextureCLUTInShader", &flags_.TextureCLUTInShader);
|
||||||
CheckSetting(iniFile, gameID, "DisableRangeCulling", &flags_.DisableRangeCulling);
|
CheckSetting(iniFile, gameID, "DisableRangeCulling", &flags_.DisableRangeCulling);
|
||||||
CheckSetting(iniFile, gameID, "PaceVideocodecDecode", &flags_.PaceVideocodecDecode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Compatibility::CheckVRSettings(IniFile &iniFile, const std::string &gameID) {
|
void Compatibility::CheckVRSettings(IniFile &iniFile, const std::string &gameID) {
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ struct CompatFlags {
|
|||||||
float SpriteBorderFix;
|
float SpriteBorderFix;
|
||||||
bool TextureCLUTInShader;
|
bool TextureCLUTInShader;
|
||||||
bool DisableRangeCulling;
|
bool DisableRangeCulling;
|
||||||
bool PaceVideocodecDecode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct VRCompat {
|
struct VRCompat {
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
#include "Core/Util/BlockAllocator.h"
|
#include "Core/Util/BlockAllocator.h"
|
||||||
#include "Core/HLE/sceMpeg.h"
|
#include "Core/HLE/sceMpeg.h"
|
||||||
#include "Core/HLE/sceMpegbase.h"
|
#include "Core/HLE/sceMpegbase.h"
|
||||||
|
#include "Core/HLE/scePower.h"
|
||||||
#include "Core/HW/AvcDecoder.h"
|
#include "Core/HW/AvcDecoder.h"
|
||||||
#include "Core/MemMap.h"
|
#include "Core/MemMap.h"
|
||||||
#include "Core/MIPS/MIPS.h"
|
#include "Core/MIPS/MIPS.h"
|
||||||
@@ -98,9 +99,6 @@ struct VideocodecCtx {
|
|||||||
u32 frameBuffersSize = 0;
|
u32 frameBuffersSize = 0;
|
||||||
int frameBufferWidth = 0;
|
int frameBufferWidth = 0;
|
||||||
int frameBufferHeight = 0;
|
int frameBufferHeight = 0;
|
||||||
// When the next decode may finish, for PaceVideocodecDecode. Not serialized: a restored state
|
|
||||||
// just paces from scratch.
|
|
||||||
s64 pacedUntilUs = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::map<u32, VideocodecCtx> g_videocodecCtxs;
|
static std::map<u32, VideocodecCtx> g_videocodecCtxs;
|
||||||
@@ -595,19 +593,9 @@ static int sceVideocodecDecode(u32 ctxAddr, int type) {
|
|||||||
// vblank wait rely on decode, colour conversion and blit adding up to more than a vblank.
|
// vblank wait rely on decode, colour conversion and blit adding up to more than a vblank.
|
||||||
int delayUs = 0;
|
int delayUs = 0;
|
||||||
if (gotFrame && width > 0 && height > 0) {
|
if (gotFrame && width > 0 && height > 0) {
|
||||||
delayUs = (int)(3400LL * width * height / (480 * 272));
|
delayUs = PowerScaleFromDefaultClock((int)(3400LL * width * height / (480 * 272)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a compat hack for games that do not seem to pace playback in any way, such as Ys I & II.
|
|
||||||
if (gotFrame && PSP_CoreParameter().compat.flags().PaceVideocodecDecode && vctx.decoder) {
|
|
||||||
const int period = vctx.decoder->FramePeriodUs();
|
|
||||||
if (period > 0) {
|
|
||||||
const s64 now = CoreTiming::GetGlobalTimeUs();
|
|
||||||
const int wait = (int)std::max((s64)0, vctx.pacedUntilUs - now);
|
|
||||||
vctx.pacedUntilUs = now + wait + period;
|
|
||||||
delayUs = std::max(delayUs, wait);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (delayUs > 0) {
|
if (delayUs > 0) {
|
||||||
return hleDelayResult(hleLogDebug(Log::ME, 0, "type %d, %d bytes -> frame %dx%d",
|
return hleDelayResult(hleLogDebug(Log::ME, 0, "type %d, %d bytes -> frame %dx%d",
|
||||||
type, auBytes, width, height), "videocodec decode", delayUs);
|
type, auBytes, width, height), "videocodec decode", delayUs);
|
||||||
|
|||||||
@@ -193,17 +193,6 @@ bool AvcDecoder::Decode(const u8 *data, int size) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int AvcDecoder::FramePeriodUs() const {
|
|
||||||
#ifdef USE_FFMPEG
|
|
||||||
if (!codecCtx_ || codecCtx_->framerate.num <= 0 || codecCtx_->framerate.den <= 0) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return (int)((s64)1000000 * codecCtx_->framerate.den / codecCtx_->framerate.num);
|
|
||||||
#else
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
const u8 *AvcDecoder::Plane(int index) const {
|
const u8 *AvcDecoder::Plane(int index) const {
|
||||||
#ifdef USE_FFMPEG
|
#ifdef USE_FFMPEG
|
||||||
if (!haveFrame_ || !frame_ || index < 0 || index >= 3) {
|
if (!haveFrame_ || !frame_ || index < 0 || index >= 3) {
|
||||||
|
|||||||
@@ -56,8 +56,6 @@ public:
|
|||||||
// necessarily the width.
|
// necessarily the width.
|
||||||
const u8 *Plane(int index) const;
|
const u8 *Plane(int index) const;
|
||||||
int Stride(int index) const;
|
int Stride(int index) const;
|
||||||
// The frame period the bitstream declares, in microseconds, or 0 if it says nothing useful.
|
|
||||||
int FramePeriodUs() const;
|
|
||||||
|
|
||||||
// True if we were built without ffmpeg, in which case nothing decodes.
|
// True if we were built without ffmpeg, in which case nothing decodes.
|
||||||
static bool IsAvailable();
|
static bool IsAvailable();
|
||||||
|
|||||||
@@ -2218,10 +2218,3 @@ UCJS10100 = true
|
|||||||
UCKS45127 = true
|
UCKS45127 = true
|
||||||
UCJS18055 = true
|
UCJS18055 = true
|
||||||
NPJG00027 = true
|
NPJG00027 = true
|
||||||
|
|
||||||
[PaceVideocodecDecode]
|
|
||||||
# Ys I & II Chronicles - the game never paces the video itself, so an instant decode runs
|
|
||||||
# the picture ahead of the audio and the movie ends early.
|
|
||||||
ULUS10547 = true
|
|
||||||
ULJM05475 = true
|
|
||||||
NPUH10091 = true
|
|
||||||
+1
-1
Submodule pspautotests updated: 2c804f5cb3...b3b8509b0a.
Reference in new issue
Block a user