[PR #3154] [MERGED] libSceVideodec2: Fix sceVideodec2GetPictureInfo regressions #3267

Closed
opened 2026-02-27 22:03:04 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3154
Author: @StevenMiller123
Created: 6/24/2025
Status: Merged
Merged: 6/26/2025
Merged by: @georgemoralis

Base: mainHead: fix-vdec2-issues


📝 Commits (1)

  • de717c3 Add alternate code paths for handling legacy struct behavior in sceVideodec2GetPictureInfo

📊 Changes

4 files changed (+122 additions, -27 deletions)

View changed files

📝 src/core/libraries/videodec/videodec2.cpp (+29 -8)
📝 src/core/libraries/videodec/videodec2_avc.h (+53 -0)
📝 src/core/libraries/videodec/videodec2_impl.cpp (+39 -19)
📝 src/core/libraries/videodec/videodec2_impl.h (+1 -0)

📄 Description

After #3077 and #3087, it became clear that something was wrong with the outputted AvcPictureInfo in some games. After increasing the struct size, they were no longer able to access the picture data properly.

This PR takes a simple approach to resolving these regressions, keep the old AvcPictureInfo struct, and create a separate vector for storing picture infos using the legacy struct. The necessary struct can be determined using received OrbisVideodec2OutputInfo's thisSize parameter.

This fixes the recent regression in Uncharted: The Nathan Drake Collection™ (CUSA02320)

I'm open to cleaner solutions if anyone has better ideas for solving this, as this is a sort of brute-force solution.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/3154 **Author:** [@StevenMiller123](https://github.com/StevenMiller123) **Created:** 6/24/2025 **Status:** ✅ Merged **Merged:** 6/26/2025 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `fix-vdec2-issues` --- ### 📝 Commits (1) - [`de717c3`](https://github.com/shadps4-emu/shadPS4/commit/de717c34d844d4e5e958857c0c726ea76b08c231) Add alternate code paths for handling legacy struct behavior in sceVideodec2GetPictureInfo ### 📊 Changes **4 files changed** (+122 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/videodec/videodec2.cpp` (+29 -8) 📝 `src/core/libraries/videodec/videodec2_avc.h` (+53 -0) 📝 `src/core/libraries/videodec/videodec2_impl.cpp` (+39 -19) 📝 `src/core/libraries/videodec/videodec2_impl.h` (+1 -0) </details> ### 📄 Description After #3077 and #3087, it became clear that something was wrong with the outputted AvcPictureInfo in some games. After increasing the struct size, they were no longer able to access the picture data properly. This PR takes a simple approach to resolving these regressions, keep the old AvcPictureInfo struct, and create a separate vector for storing picture infos using the legacy struct. The necessary struct can be determined using received OrbisVideodec2OutputInfo's thisSize parameter. This fixes the recent regression in Uncharted: The Nathan Drake Collection™ (CUSA02320) I'm open to cleaner solutions if anyone has better ideas for solving this, as this is a sort of brute-force solution. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:03:04 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3267
No description provided.