docs(videodec2): record public evidence for 10-bit output #2427

Closed
RipcuBAN wants to merge 1 commit from upstream-pr/2427 into main
RipcuBAN commented 2026-10-09 19:28:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by RipcuBAN on 2026-10-09T19:28:07Z.


What

Record public evidence that narrows the unknown Videodec2 10-bit output layout: distinct sample/byte pitches, contiguous Y and interleaved UV, and a shader factor consistent with low-bit samples in 16-bit words. Source links in the debt entry are pinned to EVO-PLAYER-PS5 commit 9ee9a5420c73b5be448610e5f0a90a29a75592f3.

This is a documentation-only contribution. Raw sample words, frameFormat and alignment remain unverified; frames deeper than 8 bits still throw. It does not implement Main10 or claim a hardware measurement. Standard P010 uses the high bits (Microsoft definition), so its name alone does not justify selecting an FFmpeg conversion.

In EVO, ro_harvest borrows the decoder buffer and sets the UV offset to byte pitch times coded height. The examined stage_plane path uses the buffer directly or copies rows (source). Its UNORM descriptors and SDR shader use the factor 64.0615844, approximately 65535 / 1023. A shader defect or a transformation outside the examined path is still possible.

Overlap: #2161 adds HEVC picture metadata for 8-bit output and updates the preceding decoder debt entry. This adds a separate item and changes no exports. Documentation conflicts can retain both entries. Searches for open PRs mentioning Videodec2 and P010 found no equivalent 10-bit evidence entry; this is not an exhaustive review of every open patch.

Tested

Windows, Python 3.11+: ran the local source extractor and arithmetic verifier; verified the downloaded pinned source bytes against the local inputs. Checked all 1,024 samples under both assumed R16 UNORM layouts. Maximum error against sample/1023: low bits 1.283588924e-8, high bits 63.0000008215. For sample 512 the results are approximately 0.500489 and 32.031281.

scale = 64.0615844
for shift in (0, 6):
    error = max(abs(((sample << shift) / 65535) * scale - sample / 1023)
                for sample in range(1024))
    print(shift, error, error <= 1e-6)

The local research tool passed 15 tests. Its Ghidra adapter uses simulated-engine tests; no real decompilation was performed. That tool is not included in this PR. No PS5/title test or full build was run for this documentation-only change. Repository conventions and git diff --check passed after updating to main 8b393b6e; the published file matches the locally checked file.

Checklist

  • Based on current main; no functions implemented (related PR overlap described above)
  • One topic per PR; follow-ups go in a new PR
  • No code comments added
  • Unimplemented paths still throw; no silent stubs added
  • No investigation files or images added to the repository; existing TechnicalDebt extended
  • No third-party code added
  • Generic evidence, not a workaround for one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4804938968 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2427). Originally posted by [RipcuBAN](https://github.com/RipcuBAN) on 2026-10-09T19:28:07Z. --- ### What Record public evidence that narrows the unknown Videodec2 10-bit output layout: distinct sample/byte pitches, contiguous Y and interleaved UV, and a shader factor consistent with low-bit samples in 16-bit words. Source links in the debt entry are pinned to EVO-PLAYER-PS5 commit `9ee9a5420c73b5be448610e5f0a90a29a75592f3`. This is a documentation-only contribution. Raw sample words, `frameFormat` and alignment remain unverified; frames deeper than 8 bits still throw. It does not implement Main10 or claim a hardware measurement. Standard P010 uses the high bits ([Microsoft definition](https://learn.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats#overview)), so its name alone does not justify selecting an FFmpeg conversion. In EVO, `ro_harvest` borrows the decoder buffer and sets the UV offset to byte pitch times coded height. The examined `stage_plane` path uses the buffer directly or copies rows ([source](https://github.com/sainsaji/EVO-PLAYER-PS5/blob/9ee9a5420c73b5be448610e5f0a90a29a75592f3/projects/evoplayer/media/src/evo_agc_runtime.c#L3003)). Its UNORM descriptors and SDR shader use the factor `64.0615844`, approximately `65535 / 1023`. A shader defect or a transformation outside the examined path is still possible. Overlap: #2161 adds HEVC picture metadata for 8-bit output and updates the preceding decoder debt entry. This adds a separate item and changes no exports. Documentation conflicts can retain both entries. Searches for open PRs mentioning Videodec2 and P010 found no equivalent 10-bit evidence entry; this is not an exhaustive review of every open patch. ### Tested Windows, Python 3.11+: ran the local source extractor and arithmetic verifier; verified the downloaded pinned source bytes against the local inputs. Checked all 1,024 samples under both assumed R16 UNORM layouts. Maximum error against sample/1023: low bits `1.283588924e-8`, high bits `63.0000008215`. For sample 512 the results are approximately 0.500489 and 32.031281. ```python scale = 64.0615844 for shift in (0, 6): error = max(abs(((sample << shift) / 65535) * scale - sample / 1023) for sample in range(1024)) print(shift, error, error <= 1e-6) ``` The local research tool passed 15 tests. Its Ghidra adapter uses simulated-engine tests; no real decompilation was performed. That tool is not included in this PR. No PS5/title test or full build was run for this documentation-only change. Repository conventions and `git diff --check` passed after updating to main `8b393b6e`; the published file matches the locally checked file. ### Checklist - [x] Based on current `main`; no functions implemented (related PR overlap described above) - [x] One topic per PR; follow-ups go in a new PR - [x] No code comments added - [x] Unimplemented paths still throw; no silent stubs added - [x] No investigation files or images added to the repository; existing TechnicalDebt extended - [x] No third-party code added - [x] Generic evidence, not a workaround for one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-09 19:28:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T19:28:16Z.


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6087801686 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2427#issuecomment-6087801686). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T19:28:16Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
boykopovar/AnyPS5!2427
No description provided.