Skip to content

cellGem: fix RAW8 to RGBA_320x240 / fix cellGemReadExternalPortDeviceInfo - #18321

Merged
Megamouse merged 4 commits into
RPCS3:masterfrom
Megamouse:cellGemFixes
Mar 10, 2026
Merged

cellGem: fix RAW8 to RGBA_320x240 / fix cellGemReadExternalPortDeviceInfo#18321
Megamouse merged 4 commits into
RPCS3:masterfrom
Megamouse:cellGemFixes

Conversation

@Megamouse

Copy link
Copy Markdown
Contributor

This fixes a bunch of bugs in cellGem (ps move + camera image).

  • Remove a redundant check when passing a camera image to the ps move tracker
  • Fix memcpy in cellGemReadExternalPortDeviceInfo (The game may call this to e.g. get sharpshooter info)
    It was copying from dst to src, and the wrong size at that (2 bytes too many)
  • Fix the gain channels in the camera image conversion. I accidentally swapped the green and blue gain factors in some places.
    I didn't catch this sooner because my test app only supports a single gain for all channels.
  • Fix RAW8 to RGBA_320x240 camera image conversion.
    We were basically writing two rows into dst for each other src line. This means we were writing 480 lines in total instead of 240, overwriting one of the lines written in the previous iteration. This led to writing one line out of bounds in the last iteration.
    Let's just use a simple debayer technique instead which perfectly matches here. This also applies the previously missing gain factors.
    I also tried to first demosaic and then drop every other pixel. The result was comparatively blurred and the performance worse.

Thanks @RipleyTom for finding this.

We were basically writing two rows into dst for each other src line.
This means we were writing 480 lines in total instead of 240,
overwriting one of the lines written in the previous iteration.
This led to writing one line out of bounds last iteration.
Let's just use a simple debayer technique which perfectly matches here.
This also applies the previously missing gain factors.

I also tried to first demosaic and then drop every other pixel.
The result was comparatively blurred and the performance worse.
@Megamouse
Megamouse merged commit 71f0d5c into RPCS3:master Mar 10, 2026
10 checks passed
@Megamouse
Megamouse deleted the cellGemFixes branch March 10, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant