[PR #3087] [MERGED] libSceVideodec2: Additional fixups #3212

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

📋 Pull Request Information

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

Base: mainHead: diva-x-fix


📝 Commits (1)

📊 Changes

1 file changed (+20 additions, -6 deletions)

View changed files

📝 src/core/libraries/videodec/videodec2_impl.cpp (+20 -6)

📄 Description

After updating the structs, a few issues with our current implementation became apparent.

  • Updating the outputInfo's thisSize field could change game behavior, since there's no longer one "expected" struct size.
  • Setting the outputInfo's frameFormat and framePitchInBytes unconditionally is dangerous, since those can be outside the bounds of the struct the game passes in.

This fixes these issues based on my own decompilation of libSceVideodec2, and fixes a recent regression noticed in Hatsune Miku: Project DIVA X (CUSA04518).


🔄 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/3087 **Author:** [@StevenMiller123](https://github.com/StevenMiller123) **Created:** 6/11/2025 **Status:** ✅ Merged **Merged:** 6/11/2025 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `diva-x-fix` --- ### 📝 Commits (1) - [`92ca25f`](https://github.com/shadps4-emu/shadPS4/commit/92ca25fd090331201c23096b91bfa47b64ce44e5) Struct update fixes ### 📊 Changes **1 file changed** (+20 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/videodec/videodec2_impl.cpp` (+20 -6) </details> ### 📄 Description After updating the structs, a few issues with our current implementation became apparent. - Updating the outputInfo's `thisSize` field could change game behavior, since there's no longer one "expected" struct size. - Setting the outputInfo's `frameFormat` and `framePitchInBytes` unconditionally is dangerous, since those can be outside the bounds of the struct the game passes in. This fixes these issues based on my own decompilation of libSceVideodec2, and fixes a recent regression noticed in Hatsune Miku: Project DIVA X (CUSA04518). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:02:51 +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#3212
No description provided.