AvPlayer: fix Crash Bandicoot 4 intro playback and green video padding #848
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!848
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/848/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Cosmo on GitHub · 2026-09-26 10:30 UTC · original
Cosmo:crash4-video-and-boot-fixes→main· +8 −8 · 1 files · 2 commits · merged 2026-09-26 16:39 UTCCrash Bandicoot 4: It's About Time (PPSA02433) could stall on the Unreal Engine logo because its final video frame is at 3267 ms, after the last audio frame at 3264 ms. Delivered audio now anchors the existing shared playback clock, which keeps advancing after audio ends and allows the remaining video to drain. This removes the separate audio timestamp gate.
The game also samples the padded columns of its NV12 video frames. Initialize those columns and padded rows with neutral black: Y=16 for limited range or Y=0 for full range, with Cb/Cr=128. Decoded picture pixels overwrite their visible regions. This removes the green strip while preserving pitch and crop metadata. The slight horizontal logo offset matches the real PS5 reference capture.
Validation: both fixes passed independent review and a final compactness audit. Built with the existing CMake configuration and ran through launch.json with Vulkan validation disabled. Intro videos advanced without the green strip or fade-out stall, and the game reached visibly advancing gameplay with increasing frame counts and no fatal exit during the observed run.
@coderabbitai[bot] on GitHub · 2026-09-26 10:38 UTC · original · edited 2026-09-26 16:41 UTC
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
📝 Walkthrough
Walkthrough
AV playback now advances its synchronization clock after audio ends and prepares padded video planes by extending edge pixels. Video pitch alignment and linear block width alignment also change. A new AV player integration test checks playback, padding, and texture pitch. GPU region ownership checks now exclude definitely CPU-dirty images, with updated tests for CPU writes and refresh behavior.
Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix
Merge Risk: 🟡 Moderate · up to
f3d8eThis fixes the Crash Bandicoot 4 intro videos, but it changes how GPU-written texture data is tracked and how 8- and 16-bit linear textures are laid out in all games. A partial CPU write can cause shaders to read stale texture data. The layout change has not been tested outside video planes. Address the ownership issue before merging.
Security Architecture Review
Security architecture risk: 🔵 Low · up to
f3d8eThe changes affect playback and graphics data ownership, but the reviewed paths do not establish a new security exposure. Some malformed-media and downstream-consumer behavior remains unverified.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❓ 1
❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Docstring Coverage
Explanation
Docstring coverage is 22.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 35 functions across 4 files. (2 skipped: 1 unsupported, 1 too large.)
Comment
@coderabbitai helpto get the list of available commands.@coderabbitai[bot] on GitHub · 2026-09-26 10:38 UTC · original
On
src/graphics/host_gpu/renderer/cache/textureCache.cppline 1869 (outdated):🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 42456
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 42813
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 42028
Preserve GPU ownership for untouched bytes.
A partial CPU write can mark the entire image definitely CPU-dirty.
TextureCache::IsRegionGpuModifiedthen returnsfalsefor disjoint GPU-written bytes.TryReadGpuCleanBackingcan consequently read stale guest backing during shader reads.Track CPU-dirty byte ranges, or preserve GPU ownership for bytes that the CPU did not overwrite.
@coderabbitai[bot] on GitHub · 2026-09-26 10:39 UTC · original · reviewed
Actionable comments posted: 1
🧹 Nitpick comments (1)
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
f94d6318-35f0-4ccb-bcb9-89f946584f8c📥 Commits
Reviewing files that changed from the base of the PR and between
fd2e15ee73and f3d8e1c50f60a066bed044c793aa7c331f553de9.📒 Files selected for processing (6)
CMakeLists.txtsrc/graphics/guest_gpu/tile.cppsrc/graphics/host_gpu/renderer/cache/textureCache.cppsrc/libs/avPlayer.cpptests/AvPlayerTests.cpptests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
@Nmzik on GitHub · 2026-09-26 16:39 UTC · original
@Cosmo The Unreal Engine logo is NOT centered on real PS5 (This is NOT a bug).
Valid fixes are: AVPlayer and NV12 green strip. Game now goes in-game. Thanks