mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-07-20 09:54:17 +00:00
VP9-improvements (#132)
- Improves MMNV request handling by tracking active clock requests per session and returning the effective requested rate for each module. - Treats sentinel clock requests (`0` / negative values) as request clears. - Preserves VP9 segment maps across inter frames, resetting them for key/intra/size-change cases. - Avoids stale VP9 motion-vector state by disabling previous MV lookup on key frames and clearing output MVs for intra-only frames. This fixes VP9 playback corruption seen in several Just Dance videos where stale segmentation/MV state could leak across frames and produce blocky/discolored output until a later refresh frame. The MMNV changes also make the service behavior closer to what games expect when requesting and clearing NvDec clocks, removing the stub spam for this service. Co-authored-by: MrKev312 <34964788+MrKev312@users.noreply.github.com> Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/132 Reviewed-by: sh0inx <sh0inx@noreply.git.ryujinx.app>
This commit is contained in:
@@ -5,22 +5,32 @@ namespace Ryujinx.Horizon.Sdk.MmNv
|
||||
public Module Module { get; }
|
||||
public uint Id { get; }
|
||||
public bool IsAutoClearEvent { get; }
|
||||
public uint ClockRateMin { get; private set; }
|
||||
public int ClockRateMax { get; private set; }
|
||||
public uint RequestedClockRate { get; private set; }
|
||||
public uint LastTimeout { get; private set; }
|
||||
public bool HasActiveRequest { get; private set; }
|
||||
|
||||
public Session(uint id, Module module, bool isAutoClearEvent)
|
||||
{
|
||||
Module = module;
|
||||
Id = id;
|
||||
IsAutoClearEvent = isAutoClearEvent;
|
||||
ClockRateMin = 0;
|
||||
ClockRateMax = -1;
|
||||
RequestedClockRate = 0;
|
||||
LastTimeout = uint.MaxValue;
|
||||
HasActiveRequest = false;
|
||||
}
|
||||
|
||||
public void SetAndWait(uint clockRateMin, int clockRateMax)
|
||||
public void SetAndWait(uint clockRate, uint timeout)
|
||||
{
|
||||
ClockRateMin = clockRateMin;
|
||||
ClockRateMax = clockRateMax;
|
||||
RequestedClockRate = clockRate;
|
||||
LastTimeout = timeout;
|
||||
HasActiveRequest = true;
|
||||
}
|
||||
|
||||
public void ClearRequest(uint timeout)
|
||||
{
|
||||
RequestedClockRate = 0;
|
||||
LastTimeout = timeout;
|
||||
HasActiveRequest = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user