mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-27 10:38:46 -04:00
scale_trace: actually apply the aliasing guard (the last commit did not)
The previous commit claimed two fixes and shipped one. Its patch script hit a
failed assertion on the third replacement and exited BEFORE writing the file,
so the two edits it had already made in memory were discarded — the same shape
as the probe fill that was written in memory and never saved. The commit
message described work that was not in the tree, which is worse than not doing
it, and only the tests I wrote alongside caught it.
Both edits are now in:
* every per-frame claim checks native_sampling, so "these steps are the
animation increment" cannot be printed over data the fallback produced
* a fallback run gets its own granularity label saying outright that its
steps are aliased and compare nothing
The reported document had native_sampling "free-running-fallback" AND
granularity "native-measured-per-frame" at once. That combination is now
unreachable.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+14
-1
@@ -495,7 +495,8 @@ def main(argv=None):
|
||||
print(f"\n Step sizes are comparable "
|
||||
f"(psx-runtime max {a['max_step']}, oracle max "
|
||||
f"{b['max_step']}), so the fade granularity matches too.")
|
||||
elif args.per_frame and a["samples"] >= 5:
|
||||
elif (args.per_frame and a["samples"] >= 5
|
||||
and doc.get("native_sampling") != "free-running-fallback"):
|
||||
doc["granularity"] = "native-measured-per-frame"
|
||||
print(f"\n psx-runtime, sampled on CONSECUTIVE frames, moves in "
|
||||
f"steps of up to {a['max_step']} (median "
|
||||
@@ -504,6 +505,18 @@ def main(argv=None):
|
||||
f"step is an upper bound only — but a per-frame increment "
|
||||
f"this large is a coarse fade regardless of what the oracle "
|
||||
f"does.")
|
||||
elif doc.get("native_sampling") == "free-running-fallback":
|
||||
# The claim that must never be made from aliased data: these steps
|
||||
# are an artefact of sampling ~90 frames apart, not the animation
|
||||
# increment. It was made anyway, because the guard sat on a
|
||||
# different branch than the one that fired.
|
||||
doc["granularity"] = "native-aliased"
|
||||
print(f"\n psx-runtime's numbers came from the free-running "
|
||||
f"fallback, so its steps (median {a['median_step']}, max "
|
||||
f"{a['max_step']}) are ALIASED — samples about ninety frames "
|
||||
f"apart — and are NOT an animation increment. The oracle's "
|
||||
f"are not frame-adjacent either. Nothing here compares HOW "
|
||||
f"either one moves.")
|
||||
else:
|
||||
doc["granularity"] = "too-few-samples"
|
||||
print(f"\n Too few samples ({a['samples']} vs {b['samples']}) to "
|
||||
|
||||
Reference in New Issue
Block a user