feat(libSceVideodec2): expose HEVC picture metadata #10959

Merged
AZLisme merged 7 commits from upstream-pr/10959 into main 2026-10-27 08:16:44 +00:00
AZLisme commented 2026-10-25 11:21:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AZLisme on 2026-10-25T11:21:28Z.


What

Implement HEVC picture metadata from actual decoded-frame snapshots through the typed and generic getters, using the 184-byte, 75-field ABI from pinned SharpProspero. Parameter sets, VUI, profile/level, timing and presence flags follow the existing H.265 parser; delayed/flush pictures retain their own timestamps and metadata.

All four named picture getters now share the ordered argument contract reported by the firmware 13.42 emulator checks and the unsigned-size clarification. A null first destination returns 0x811D0102 without touching the second. Otherwise both early four-byte validity/padding writes are guarded before either store, followed by the native pointer, structure-size, alignment, count and unsigned frameBufferSize > pictureCount * 0x400 checks. Destination versions are checked afterward; the second version is read only for two pictures with a non-null second destination. Later reads observe aliases, and metadata reads/copies support unaligned destinations.

Payload selection uses the owned decoded frame, without treating the caller's codecType as an argument gate. Known single-picture HEVC184 and VP9 88 metadata remain supported with bounded whole-record write guards; H264 decode and pixel ordering are retained. The partial 56-byte AVC record receives the native structure-size error after the earlier checks. Other accepted payload versions, full native AVC tails, two-picture projections and foreign/untracked metadata remain explicit NotImplemented paths in debt. The unnamed skip-size export is unchanged. No third-party dependency was added.

#10913 merged as 8ebd28b1c6149bf87762463e60fc1c70bbbec0fd, fulfilling the agreed first landing. This PR’s preserving rebase 6721b44a95ecbca7d58389242546a217dde317f7 on 74acfad65b3f0fd4eab653f3a3989d298fba1157 retains the parent implementation, canonical API, active regression and debt alongside the owned metadata/caller changes. The declared #10913 dependency remains as fulfilled landing history; applicable new-head CI and maintainer re-review still gate this PR.

The internal caller fix in e27f5dbfea4415bdb3a170f5269e398e755a67c4 keeps host-owned metadata retrieval separate from the guest argument contract. libSceVideodec Decode/Flush read PTS, attached data and crop from their emitted owned frame through the typed internal header helper. libSceVdecsw retrieves the full 88-byte VP9 snapshot through a handle-and-buffer lookup with decoder/codec ownership checks, retaining the queued pixels until metadata is copied. A shared internal header replaces duplicate type declarations. The guest getter validation, payload selection, write guards, public API headers and unknown-payload throws are unchanged; the partial 56-byte AVC record is still rejected by the guest API. The existing AVC fixture now also checks attached-data association in display order.

Internal snapshot cleanup now removes the unused crop accessor while retaining the shared crop type, normalizes the full typed VP9 snapshot size without reading destination capacity or changing the parser/cache, and removes the unreachable Vdecsw post-helper validity check. Handle, codec, buffer-ownership and parsing errors remain enforced; the public guest getter contract is unchanged.

Tested

Manual CI 40451431817, attempt 1, completed successfully for the ordered five-PR composition #10959 6721b44a95 → #10467 bcd99084b4 → #11235 08fa661766 → #11489 6ad4710217 → #11403 758952517c, on frozen main f5e3dc5e3b8202f7c214a224f4ac37c91181244a. This PR’s tested head is 6721b44a95ecbca7d58389242546a217dde317f7.

Release library job Passed Policy-approved skips Failed
Linux 122014900395 2,403 96 0
Windows 122014900488 1,784 826 0

Both jobs passed guest_hevc_metadata, guest_videodec, guest_videodec2, guest_videodec2_unimplemented, guest_vdecsw, all 65 public-header CTests and patched_libraries; both skip validators passed. This qualifies the recorded five-PR Release composition, not this PR alone, later main, library-ASan or physical-console behavior. #10913’s actual first landing remains fulfilled; existing dependency/integration/review requirements are unchanged. Earlier entries retain their original scopes; the four-test contributor report below does not supply guest_vdecsw evidence.

Contributor Windows report: BunnyFl reports exact head 6721b44a95ecbca7d58389242546a217dde317f7 merged with main 74acfad65b3f0fd4eab653f3a3989d298fba1157, on Windows 11 (10.0.26200), WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON. guest_hevc_metadata, guest_videodec, guest_videodec2 and guest_videodec2_unimplemented each passed three ctest -V runs. This report covers those four tests and that composition. Applicable full CI and maintainer re-review remain required.

Linux x86-64, Release, exact preserving head 6721b44a95ecbca7d58389242546a217dde317f7 on frozen main 74acfad65b3f0fd4eab653f3a3989d298fba1157, after #10913’s actual merge. The normal root CMake build and five existing decoder CTests pass 5/5, with zero failures/skips. The inherited discarded-frame flag regression and its active main invocation remain within guest_videodec2; the parent APIs, fixture and debt are preserved.

Fresh normal public-header checks pass 65/65 (691 compilation groups, 368 libraries / 12,368 exports), plus 7/7 focused C++ header units. The build produced 197 fresh objects: 153 required libc/kernel core, 34 vendor, five decoder and five fixture objects. The qualified artifacts are five PRXs, five fixture binaries and two fresh static archives.

Source/dependency inputs, generated artifacts and linkage were checked against the frozen source. The existing pinned source-built FFmpeg package and six linked FFmpeg archives were reverified and reused. One normal-root execution exited 0; no runtime repeat or old baseline rerun was needed. These results qualify this Linux decoder component only. New-head Windows, macOS, PS5, GPU and full-product CI were not run; older platform/full-CI results below retain their original scopes.

Earlier entries below retain their original source/base/platform scopes and former landing-status statements; they do not qualify this new head.

Earlier preserving rebase: 945cbaeb502b8e6f46c1f7820f41dc666b2303fe onto exact main f89559b4723285ee0f9d041d207408193fe85764. The only manual conflict was debt: the upstream #10091 PPSA02225 observation is retained verbatim once alongside all current gaps, without restoring obsolete HEVC-unimplemented claims. Production/test changes compose automatically; upstream’s generic Vdecsw getter and expanded cases are preserved, as are the native argument/ownership contract, typed VP9 snapshot and caller fixes. Fresh Linux GCC 16.2.1 Release builds of all three decoder PRXs and supporting libc/kernel/LibcInternal pass 5/5 focused tests with no skips, including upstream generic Vdecsw coverage. All 294 actual source/header inputs match the new head, including 274 core inputs matching the frozen base; 175 fresh objects and 11 artifacts are qualified. Existing pinned source-built FFmpeg/static dependencies were reverified and reused. Seven header units and the 368-library/12,234-export audit pass; conventions, whitespace and independent source-preservation review pass. This is new-head Linux component qualification; Windows and full maintainer CI have not been rerun for this rebase. The full run below qualifies its earlier e767/01cd batch only. #10913 remains first, followed by a preserving integration rebase and applicable checks/re-review.

Earlier maintainer full Linux/Windows CI: run 40308797242, attempt 1 succeeded for exact e7674114368f31cd341d4f43d6a2760529935d16 in the ordered batch #9097, #11100, #10426, #10836, #10959 merged onto main 01cd4a42df1359bfe568b03f967af487381ff61e, with each PR head checked before merging. Normal root Release builds and all five focused metadata/decoder/caller tests passed once on each platform, as did the public-header audit and all 64 header-compilation shards (65 header checks per platform); none of those focused or header checks skipped. Linux GCC 13.3.0 recorded 2,265 executed passes and 91 expected device-limit skips; Windows Server 2025 with WinLibs GCC 15.2.0 r7 recorded 1,649 passes and 811 expected GPU/display skips. Both skip validators passed. The overall run completed with six successful jobs and two conditional jobs skipped. This qualifies that exact batch/base, not latest main, macOS library runtime, or an updated #10913 composition. #10913 must still land first, followed by the preserving rebase and applicable checks/re-review.

Earlier cleanup revision: e7674114368f31cd341d4f43d6a2760529935d16, addressing the three internal findings. All 5/5 focused Linux tests pass through fresh builds of the three production decoder PRXs and five fixtures; 27 actual project inputs, 10 objects and eight binaries are bound to the commit with qualified frozen-401731067856 core/static and pinned source-built FFmpeg dependencies. Two focused internal/shared-header composition units pass. The real VP9 fixture verifies canonical snapshot size, a trailing canary, all metadata fields and independently expected frame/timestamp/attachment associations. A single run of that new fixture against the exact qualified old 83940ae6 backend fails at the new size/boundary assertion; loader traces bind the old binary, and the unchanged layout plus cached-zero source establish the size-field cause. Independent source/runtime review passes. Conventions, whitespace and a static merge pass against main 4e43321bd6ceccdc1ae28568bbbc35d9a6446464. Those isolated checks are Linux component qualification, separate from the maintainer batch above; they do not themselves qualify newer-main runtime or a new #10913 composition. The #10913-first landing and later preserving rebase/checks remain required.

thuanquang separately confirms the earlier E27 caller fix: exact e27f5dbfea merged onto main 14c99b52ac, Windows 11 26200, WinLibs GCC 15.2.0 r7 Release, all five focused tests in three rounds with no skips. That contributor report qualifies its exact earlier head/main/toolchain; Windows execution of the cleanup is established separately by the maintainer batch above.

Earlier test-only revision: 83940ae67e6aa2318fa984897123f1d80a96983c, following the review request. Unknown-SEI and replacement-metadata projections no longer have to throw. The sibling generic unknown-SEI probe is optional too, so it cannot retain the same placeholder requirement. Exception-only byte guards remain, with fresh sentinels for each wrapper; defined native argument/read-only checks and all decode/reset/lifetime/metadata-immutability checks remain strict. Only GuestHevcMetadata.cpp changed, and the entire production PRX tree is identical to E27. All 5/5 focused Linux tests pass with no skips after fresh builds of the three actual production PRXs and five fixtures (10 fresh translation units, 27 Git-bound inputs; only the HEVC fixture input differs from E27). Qualified frozen-401731067856 core/static and pinned source-built FFmpeg inputs were reverified. Independent source/runtime-evidence review passes. Conventions, whitespace and a static merge pass against main 14c99b52ace303eef1667764670d1d1540140b3d. Headers are unchanged and retain their earlier audit scope. This is Linux component qualification; earlier E27 Windows and private #10913 results remain historical to their exact fixtures, not executions of this revised fixture. #10913 still lands first, followed by the preserving rebase and focused checks.

Earlier caller-fix revision follows.

Earlier fixed revision: e27f5dbfea4415bdb3a170f5269e398e755a67c4. The broader Linux check reproduces thuanquang's internal-caller regression report: unmodified D6 (d6fd16ec67d3) passes only 3/5 tests, with guest_videodec failing “pictures out of display order” and guest_vdecsw failing “decoded picture has no VP9 picture info” under normal allocation. The fixed revision passes 5/5: guest_hevc_metadata, guest_videodec2, guest_videodec2_unimplemented, guest_videodec and guest_vdecsw. The original three-test scope missed these two internal callers.

Linux x86-64, GCC 16.2.1, Release: all three actual modules (libSceVideodec2, libSceVideodec, libSceVdecsw) and their five existing fixtures were built through their normal module CMake. The fixed build's 27 project inputs match the committed source; the reused runtime dependencies are qualified against frozen 401731067856, including 270 core source/header inputs and 78 static-library inputs. Existing pinned source-built FFmpeg archives were reused after checking the 32 actual transitive headers and all seven archive hashes. This is isolated component validation, not newer-main or full-product runtime qualification.

The expanded fixtures cover Decode/Flush display order, PTS and attached-data association for normal and cropped AVC, plus full VP9 timestamps, flags, dimensions, old-picture lifetime and reset behavior. All seven header composition units pass, including the three API headers, three umbrellas and their shared internal header; the public-header audit passes for 368 libraries/12,192 exports. Conventions and whitespace checks pass against refreshed main 9b197b6ce4583e64bf2427e6beb7270bcfa1528e; a static merge with that main is clean. This is a static check, separate from the frozen-base runtime qualification. Independent source/qualified-Linux peer review passes. The change comprises the three implementation files, one typed internal header and three added lines in the existing AVC fixture; it does not change guest APIs or the native argument contract.

Paired native Windows validation now confirms the caller fix. In baseline run 40269232821, attempt 1, D6 passes three tests and fails guest_videodec (display order) and guest_vdecsw (missing VP9 metadata) in both five-test runs; both CTest exits are 8 and the job remains failed. In fixed run 40270056504, attempt 1, E27 passes all five tests twice with no skips, both exits 0. Normal root Release configuration built all three production modules, libc/kernel and the five fixtures. The downloaded JUnit/log pairs, actual compile/link commands, artifact digests and source guards pass independent review: workflow-only 740b6768 has D6 as its sole parent, and 7930b601 has E27 as its sole parent. The fixed GuestVideodec fixture adds only three lines for attachment/display-order checking; the other four fixtures are byte-identical. Both separate hosted jobs report Windows Server 2025 / image 20261021.278.1, MSYS2 UCRT64 GCC/G++ 16.2.0, CMake 4.4.4 and Release. Matching recorded versions do not establish the same physical host or compiler-binary hashes. This qualifies the exact D6 and E27 source trees with their runtime base at 401731067856, not the reporter's WinLibs setup, other main revisions, an E27/#10913 composition, full-product behavior or physical PS5 execution.

An updated private Linux composition now covers E27 and #10913 294ab651deabaa45146d16341a77f19378807160: true two-parent merge 1dda4553d9b06abff5319a19dd05e5b9829de1c4, tree 2dd45d9cf15f023f43d2322b249a27bb32c56e20. The only manual resolution combines both debt entries. It preserves the predecessor’s discarded-frame flag and active fixture checks, E27’s caller metadata/header changes and attachment-order assertion, and the unchanged public guest getter contract. Fresh builds of all three production PRXs and all five fixtures pass 5/5 with no skips; seven header units and the 368-library/12,192-export audit pass. All 4,497 tracked source files match the private Git tree; 27 actual project inputs, 10 fresh objects, eight binaries and the normal module CMake/helper paths are qualified, with independent source/runtime-evidence review passing. Existing core/runtime at 401731067856 and pinned source-built FFmpeg dependencies were reverified and reused. This is separate from standalone E27 Windows validation: the private union was not run on Windows, newer main or a physical console. #10913 must still land first, followed by the integration rebase and focused checks.

Historical D6 evidence follows. Its three-test Linux and Windows results remain evidence for those three fixtures at D6, not validation of E27 or of the two newly included caller fixtures. The earlier private D6/#10913 composition likewise does not validate an E27/#10913 union; that integration still requires a rebase and focused checks after #10913 lands.

Contributor fix confirmation: wachi35676 reran exact head d6fd16ec67d3 merged onto main 0f34ebb85 on Windows with WinLibs GCC 15.2.0, Release. guest_hevc_metadata, guest_videodec2 and guest_videodec2_unimplemented passed all three runs. The reporter also observed no build warnings and confirmed the NOMINMAX redefinition was gone. This is attributed confirmation in the reporter's environment, separate from our exact-source MSYS2 CI below; it does not validate other main revisions, the private #10913 composition, full-product behavior or PS5 execution.

Historical revision: d6fd16ec67d3860984f3bbe746c2ce5a32930d20. Linux x86-64 Release with GCC 16.2.1; the actual library and all three focused fixtures were rebuilt through the module CMake. All 3/3 tests passed:

guest_hevc_metadata                 Passed
guest_videodec2                     Passed
guest_videodec2_unimplemented       Passed
100% tests passed out of 3

Command: ctest --test-dir build-post10005 --output-on-failure -V in the isolated module build. Coverage includes all four wrappers, error precedence, exact early writes/canaries, aliases, both picture-count size boundaries, unsigned high-bit sizes, conditional second-version reads, real mapped guest writes, unaligned metadata, actual owned HEVC/VP9 projection, ownership/concurrency/lifetime, and H264 decode/NV12 pixel order. These historical results predate the latest optional SEI/replacement-probe changes described above.

This run uses the branch's frozen 401731067856 core: 164 compiled objects and 270 project source/header inputs were checked against that base and the final view; core artifact hashes and pinned third-party archive/source inputs were rechecked. Existing pinned source-built FFmpeg 7.1.1 archives were reused after checking 32 transitive headers and all seven archive hashes; FFmpeg was not rebuilt locally. The complete actual module/fixture input set matches the committed source. This is isolated module validation, without a packaged or NID-patched full-product claim.

Public-header audit passes for 368 libraries/12,192 exports; three standalone header composition units compile with -Werror. Conventions and committed whitespace checks pass with zero findings, and independent source/qualified-runtime peer review passes. The historical D6 revision merges cleanly with refreshed main at 0f34ebb85391, which is a static integration check rather than a current-main runtime run.

The Windows report on the preceding ab8a8e6f1018 head by @wachi35676 covers its merge onto main 90f918fa7, WinLibs GCC 15.2.0 Release: guest_videodec2 and guest_videodec2_unimplemented passed, while guest_hevc_metadata failed twice before any HEVC call because VirtualProtect crossed separately mapped GuestArena views (ERROR_INVALID_ADDRESS, 487). The D6 fixture revision bounds each protection call to the committed region returned by VirtualQuery and guards the Windows macro definitions. The shared mapping, tracked permissions and all rejection/alias tests remain intact; production getter behavior is unchanged. A private source-extracted Win32 API model reproduces the old failure and passes seven boundary/failure cases with the fix. That model runs on Linux; actual Windows execution of D6 is recorded below.

Historical D6 native Windows validation passed in run 40262980830, attempt 1: Windows Server 2025 Datacenter 10.0.26100, MSYS2 UCRT64 GCC/G++ 16.2.0, CMake 4.4.4, Ninja 1.13.2, Release. CI commit 2421b35868d7e0374c7c01d75ed05a8d47e1b290 has this published d6fd16ec67d3860984f3bbe746c2ce5a32930d20 as its sole parent and adds only the isolated workflow; the on-run provenance check verifies identical core/build inputs. The normal production module and core dependencies were built, and all 3/3 focused tests passed twice, with zero skips. Downloaded JUnit, both execution records per test, actual compile/link commands and normal Windows unwind/PATH helpers were checked; this includes the shared-view read-only and cross-boundary rejection cases. The normal pinned FFmpeg archives were downloaded, not rebuilt from source in this run. This qualifies the exact D6 sources on this Windows toolchain; it is not the reporter's WinLibs 15.2.0 environment or a newer-main/#10913 composition run.

Historical private integration with #10913 294ab651deab and the D6 d6fd16ec67d3 head passed all 3/3 focused Linux tests, including the discarded-frame regression and the metadata/argument tests, at two-parent composition b507a381fccca6992b235f10f2389ada231d3f32. Both histories and all source/test additions are preserved; only the debt append needed manual union, retaining both topics. The actual module and fixtures were freshly built using source-qualified frozen 401731067856 core dependencies and the pinned static packages described above; their actual inputs/artifact hashes, headers and static checks pass independent peer review. This private composition is not a current-main runtime or Windows result. The #10913-first landing order remains unchanged; this private composition is Linux-only.

The native argument evidence is BunnyFl's firmware 13.42 native-code emulator report in PS5-process mode (module SHA256 5825514d06cee0b7fdc87de4f428065ff7c2b761b40443f95ee580e1be18776d); those native runs were not independently reproduced here. Native valid-metadata field equivalence, other firmware/process modes, physical PS5 hardware, macOS library runtime and packaged application/full-product runtime behavior remain unvalidated by these checks. The earlier-head Windows results are attributed above; the historical isolated native Windows result covers the exact D6 sources and Windows read-only cases, not E27. The private #10913 composition and other main combinations remain without Windows runtime proof here; the contributor confirmation is limited to the exact head/main pair stated above. The completed maintainer full Linux/Windows CI above covers its recorded batch only; the head resulting from the #10913-first integration rebase still needs applicable checks and maintainer re-review.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #10913 (shared-debt landing order; no runtime dependency)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5004248895 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10959). Originally posted by [AZLisme](https://github.com/AZLisme) on 2026-10-25T11:21:28Z. --- ### What Implement HEVC picture metadata from actual decoded-frame snapshots through the typed and generic getters, using the 184-byte, 75-field ABI from [pinned SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/Video/Videodec2.cs). Parameter sets, VUI, profile/level, timing and presence flags follow the existing H.265 parser; delayed/flush pictures retain their own timestamps and metadata. All four named picture getters now share the ordered argument contract reported by [the firmware 13.42 emulator checks](https://github.com/boykopovar/AnyPS5/pull/10959#issuecomment-6404011201) and [the unsigned-size clarification](https://github.com/boykopovar/AnyPS5/pull/10959#issuecomment-6404317631). A null first destination returns `0x811D0102` without touching the second. Otherwise both early four-byte validity/padding writes are guarded before either store, followed by the native pointer, structure-size, alignment, count and unsigned `frameBufferSize > pictureCount * 0x400` checks. Destination versions are checked afterward; the second version is read only for two pictures with a non-null second destination. Later reads observe aliases, and metadata reads/copies support unaligned destinations. Payload selection uses the owned decoded frame, without treating the caller's `codecType` as an argument gate. Known single-picture HEVC184 and VP9 88 metadata remain supported with bounded whole-record write guards; H264 decode and pixel ordering are retained. The partial 56-byte AVC record receives the native structure-size error after the earlier checks. Other accepted payload versions, full native AVC tails, two-picture projections and foreign/untracked metadata remain explicit `NotImplemented` paths in debt. The unnamed skip-size export is unchanged. No third-party dependency was added. #10913 merged as `8ebd28b1c6149bf87762463e60fc1c70bbbec0fd`, fulfilling the agreed first landing. This PR’s preserving rebase `6721b44a95ecbca7d58389242546a217dde317f7` on `74acfad65b3f0fd4eab653f3a3989d298fba1157` retains the parent implementation, canonical API, active regression and debt alongside the owned metadata/caller changes. The declared #10913 dependency remains as fulfilled landing history; applicable new-head CI and maintainer re-review still gate this PR. The internal caller fix in `e27f5dbfea4415bdb3a170f5269e398e755a67c4` keeps host-owned metadata retrieval separate from the guest argument contract. `libSceVideodec` Decode/Flush read PTS, attached data and crop from their emitted owned frame through the typed internal header helper. `libSceVdecsw` retrieves the full 88-byte VP9 snapshot through a handle-and-buffer lookup with decoder/codec ownership checks, retaining the queued pixels until metadata is copied. A shared internal header replaces duplicate type declarations. The guest getter validation, payload selection, write guards, public API headers and unknown-payload throws are unchanged; the partial 56-byte AVC record is still rejected by the guest API. The existing AVC fixture now also checks attached-data association in display order. Internal snapshot cleanup now removes the unused crop accessor while retaining the shared crop type, normalizes the full typed VP9 snapshot size without reading destination capacity or changing the parser/cache, and removes the unreachable Vdecsw post-helper validity check. Handle, codec, buffer-ownership and parsing errors remain enforced; the public guest getter contract is unchanged. ### Tested [Manual CI `40451431817`](https://github.com/boykopovar/AnyPS5/actions/runs/40451431817), attempt 1, completed successfully for the **ordered five-PR composition** #10959 `6721b44a95` → #10467 `bcd99084b4` → #11235 `08fa661766` → #11489 `6ad4710217` → #11403 `758952517c`, on frozen main `f5e3dc5e3b8202f7c214a224f4ac37c91181244a`. This PR’s tested head is `6721b44a95ecbca7d58389242546a217dde317f7`. | Release library job | Passed | Policy-approved skips | Failed | |---|---:|---:|---:| | [Linux `122014900395`](https://github.com/boykopovar/AnyPS5/actions/runs/40451431817/job/122014900395) | 2,403 | 96 | 0 | | [Windows `122014900488`](https://github.com/boykopovar/AnyPS5/actions/runs/40451431817/job/122014900488) | 1,784 | 826 | 0 | Both jobs passed `guest_hevc_metadata`, `guest_videodec`, `guest_videodec2`, `guest_videodec2_unimplemented`, `guest_vdecsw`, all 65 public-header CTests and `patched_libraries`; both skip validators passed. This qualifies the recorded five-PR Release composition, not this PR alone, later main, library-ASan or physical-console behavior. #10913’s actual first landing remains fulfilled; existing dependency/integration/review requirements are unchanged. Earlier entries retain their original scopes; the four-test contributor report below does not supply `guest_vdecsw` evidence. **Contributor Windows report:** [BunnyFl](https://github.com/boykopovar/AnyPS5/pull/10959#issuecomment-6430708863) reports exact head `6721b44a95ecbca7d58389242546a217dde317f7` merged with main `74acfad65b3f0fd4eab653f3a3989d298fba1157`, on Windows 11 (10.0.26200), WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, `BUILD_TESTING=ON`. `guest_hevc_metadata`, `guest_videodec`, `guest_videodec2` and `guest_videodec2_unimplemented` each passed three `ctest -V` runs. This report covers those four tests and that composition. Applicable full CI and maintainer re-review remain required. Linux x86-64, Release, exact preserving head `6721b44a95ecbca7d58389242546a217dde317f7` on frozen main `74acfad65b3f0fd4eab653f3a3989d298fba1157`, after #10913’s actual merge. The normal root CMake build and five existing decoder CTests pass **5/5**, with zero failures/skips. The inherited discarded-frame flag regression and its active main invocation remain within `guest_videodec2`; the parent APIs, fixture and debt are preserved. Fresh normal public-header checks pass **65/65** (691 compilation groups, 368 libraries / 12,368 exports), plus **7/7** focused C++ header units. The build produced 197 fresh objects: 153 required libc/kernel core, 34 vendor, five decoder and five fixture objects. The qualified artifacts are five PRXs, five fixture binaries and two fresh static archives. Source/dependency inputs, generated artifacts and linkage were checked against the frozen source. The existing pinned source-built FFmpeg package and six linked FFmpeg archives were reverified and reused. One normal-root execution exited 0; no runtime repeat or old baseline rerun was needed. These results qualify this Linux decoder component only. New-head Windows, macOS, PS5, GPU and full-product CI were not run; older platform/full-CI results below retain their original scopes. Earlier entries below retain their original source/base/platform scopes and former landing-status statements; they do not qualify this new head. Earlier preserving rebase: `945cbaeb502b8e6f46c1f7820f41dc666b2303fe` onto exact main `f89559b4723285ee0f9d041d207408193fe85764`. The only manual conflict was debt: the upstream #10091 PPSA02225 observation is retained verbatim once alongside all current gaps, without restoring obsolete HEVC-unimplemented claims. Production/test changes compose automatically; upstream’s generic Vdecsw getter and expanded cases are preserved, as are the native argument/ownership contract, typed VP9 snapshot and caller fixes. Fresh Linux GCC 16.2.1 Release builds of all three decoder PRXs and supporting libc/kernel/LibcInternal pass **5/5** focused tests with no skips, including upstream generic Vdecsw coverage. All 294 actual source/header inputs match the new head, including 274 core inputs matching the frozen base; 175 fresh objects and 11 artifacts are qualified. Existing pinned source-built FFmpeg/static dependencies were reverified and reused. Seven header units and the 368-library/12,234-export audit pass; conventions, whitespace and independent source-preservation review pass. This is new-head Linux component qualification; Windows and full maintainer CI have not been rerun for this rebase. The full run below qualifies its earlier e767/01cd batch only. #10913 remains first, followed by a preserving integration rebase and applicable checks/re-review. Earlier maintainer full Linux/Windows CI: [run 40308797242, attempt 1](https://github.com/boykopovar/AnyPS5/actions/runs/40308797242) succeeded for exact `e7674114368f31cd341d4f43d6a2760529935d16` in the ordered batch #9097, #11100, #10426, #10836, #10959 merged onto main `01cd4a42df1359bfe568b03f967af487381ff61e`, with each PR head checked before merging. Normal root Release builds and all five focused metadata/decoder/caller tests passed once on each platform, as did the public-header audit and all 64 header-compilation shards (65 header checks per platform); none of those focused or header checks skipped. Linux GCC 13.3.0 recorded 2,265 executed passes and 91 expected device-limit skips; Windows Server 2025 with WinLibs GCC 15.2.0 r7 recorded 1,649 passes and 811 expected GPU/display skips. Both skip validators passed. The overall run completed with six successful jobs and two conditional jobs skipped. This qualifies that exact batch/base, not latest main, macOS library runtime, or an updated #10913 composition. #10913 must still land first, followed by the preserving rebase and applicable checks/re-review. Earlier cleanup revision: `e7674114368f31cd341d4f43d6a2760529935d16`, addressing [the three internal findings](https://github.com/boykopovar/AnyPS5/pull/10959#issuecomment-6409726352). All **5/5** focused Linux tests pass through fresh builds of the three production decoder PRXs and five fixtures; 27 actual project inputs, 10 objects and eight binaries are bound to the commit with qualified frozen-`401731067856` core/static and pinned source-built FFmpeg dependencies. Two focused internal/shared-header composition units pass. The real VP9 fixture verifies canonical snapshot size, a trailing canary, all metadata fields and independently expected frame/timestamp/attachment associations. A single run of that new fixture against the exact qualified old `83940ae6` backend fails at the new size/boundary assertion; loader traces bind the old binary, and the unchanged layout plus cached-zero source establish the size-field cause. Independent source/runtime review passes. Conventions, whitespace and a static merge pass against main `4e43321bd6ceccdc1ae28568bbbc35d9a6446464`. Those isolated checks are Linux component qualification, separate from the maintainer batch above; they do not themselves qualify newer-main runtime or a new #10913 composition. The #10913-first landing and later preserving rebase/checks remain required. [thuanquang separately confirms the earlier E27 caller fix](https://github.com/boykopovar/AnyPS5/pull/10959#issuecomment-6409726352): exact `e27f5dbfea` merged onto main `14c99b52ac`, Windows 11 26200, WinLibs GCC 15.2.0 r7 Release, all five focused tests in three rounds with no skips. That contributor report qualifies its exact earlier head/main/toolchain; Windows execution of the cleanup is established separately by the maintainer batch above. Earlier test-only revision: `83940ae67e6aa2318fa984897123f1d80a96983c`, following [the review request](https://github.com/boykopovar/AnyPS5/pull/10959#issuecomment-6409313635). Unknown-SEI and replacement-metadata projections no longer have to throw. The sibling generic unknown-SEI probe is optional too, so it cannot retain the same placeholder requirement. Exception-only byte guards remain, with fresh sentinels for each wrapper; defined native argument/read-only checks and all decode/reset/lifetime/metadata-immutability checks remain strict. Only `GuestHevcMetadata.cpp` changed, and the entire production PRX tree is identical to E27. All **5/5** focused Linux tests pass with no skips after fresh builds of the three actual production PRXs and five fixtures (10 fresh translation units, 27 Git-bound inputs; only the HEVC fixture input differs from E27). Qualified frozen-`401731067856` core/static and pinned source-built FFmpeg inputs were reverified. Independent source/runtime-evidence review passes. Conventions, whitespace and a static merge pass against main `14c99b52ace303eef1667764670d1d1540140b3d`. Headers are unchanged and retain their earlier audit scope. This is Linux component qualification; earlier E27 Windows and private #10913 results remain historical to their exact fixtures, not executions of this revised fixture. #10913 still lands first, followed by the preserving rebase and focused checks. Earlier caller-fix revision follows. Earlier fixed revision: `e27f5dbfea4415bdb3a170f5269e398e755a67c4`. The broader Linux check reproduces [thuanquang's internal-caller regression report](https://github.com/boykopovar/AnyPS5/pull/10959#issuecomment-6408011788): unmodified D6 (`d6fd16ec67d3`) passes only **3/5** tests, with `guest_videodec` failing “pictures out of display order” and `guest_vdecsw` failing “decoded picture has no VP9 picture info” under normal allocation. The fixed revision passes **5/5**: `guest_hevc_metadata`, `guest_videodec2`, `guest_videodec2_unimplemented`, `guest_videodec` and `guest_vdecsw`. The original three-test scope missed these two internal callers. Linux x86-64, GCC 16.2.1, Release: all three actual modules (`libSceVideodec2`, `libSceVideodec`, `libSceVdecsw`) and their five existing fixtures were built through their normal module CMake. The fixed build's 27 project inputs match the committed source; the reused runtime dependencies are qualified against frozen `401731067856`, including 270 core source/header inputs and 78 static-library inputs. Existing pinned source-built FFmpeg archives were reused after checking the 32 actual transitive headers and all seven archive hashes. This is isolated component validation, not newer-main or full-product runtime qualification. The expanded fixtures cover Decode/Flush display order, PTS and attached-data association for normal and cropped AVC, plus full VP9 timestamps, flags, dimensions, old-picture lifetime and reset behavior. All seven header composition units pass, including the three API headers, three umbrellas and their shared internal header; the public-header audit passes for 368 libraries/12,192 exports. Conventions and whitespace checks pass against refreshed main `9b197b6ce4583e64bf2427e6beb7270bcfa1528e`; a static merge with that main is clean. This is a static check, separate from the frozen-base runtime qualification. Independent source/qualified-Linux peer review passes. The change comprises the three implementation files, one typed internal header and three added lines in the existing AVC fixture; it does not change guest APIs or the native argument contract. Paired native Windows validation now confirms the caller fix. In [baseline run 40269232821, attempt 1](https://github.com/AZLisme/AnyPS5/actions/runs/40269232821), D6 passes three tests and fails `guest_videodec` (display order) and `guest_vdecsw` (missing VP9 metadata) in **both five-test runs**; both CTest exits are 8 and the job remains **failed**. In [fixed run 40270056504, attempt 1](https://github.com/AZLisme/AnyPS5/actions/runs/40270056504), E27 passes **all five tests twice with no skips**, both exits 0. Normal root Release configuration built all three production modules, libc/kernel and the five fixtures. The downloaded JUnit/log pairs, actual compile/link commands, artifact digests and source guards pass independent review: workflow-only `740b6768` has D6 as its sole parent, and `7930b601` has E27 as its sole parent. The fixed `GuestVideodec` fixture adds only three lines for attachment/display-order checking; the other four fixtures are byte-identical. Both separate hosted jobs report Windows Server 2025 / image `20261021.278.1`, MSYS2 UCRT64 GCC/G++ 16.2.0, CMake 4.4.4 and Release. Matching recorded versions do not establish the same physical host or compiler-binary hashes. This qualifies the exact D6 and E27 source trees with their runtime base at `401731067856`, not the reporter's WinLibs setup, other main revisions, an E27/#10913 composition, full-product behavior or physical PS5 execution. An updated **private Linux composition** now covers E27 and #10913 `294ab651deabaa45146d16341a77f19378807160`: true two-parent merge `1dda4553d9b06abff5319a19dd05e5b9829de1c4`, tree `2dd45d9cf15f023f43d2322b249a27bb32c56e20`. The only manual resolution combines both debt entries. It preserves the predecessor’s discarded-frame flag and active fixture checks, E27’s caller metadata/header changes and attachment-order assertion, and the unchanged public guest getter contract. Fresh builds of all three production PRXs and all five fixtures pass **5/5 with no skips**; seven header units and the 368-library/12,192-export audit pass. All 4,497 tracked source files match the private Git tree; 27 actual project inputs, 10 fresh objects, eight binaries and the normal module CMake/helper paths are qualified, with independent source/runtime-evidence review passing. Existing core/runtime at `401731067856` and pinned source-built FFmpeg dependencies were reverified and reused. This is separate from standalone E27 Windows validation: the private union was not run on Windows, newer main or a physical console. #10913 must still land first, followed by the integration rebase and focused checks. Historical D6 evidence follows. Its three-test Linux and Windows results remain evidence for those three fixtures at D6, not validation of E27 or of the two newly included caller fixtures. The earlier private D6/#10913 composition likewise does not validate an E27/#10913 union; that integration still requires a rebase and focused checks after #10913 lands. Contributor fix confirmation: [wachi35676 reran exact head `d6fd16ec67d3` merged onto main `0f34ebb85`](https://github.com/boykopovar/AnyPS5/pull/10959#issuecomment-6407770088) on Windows with WinLibs GCC 15.2.0, Release. `guest_hevc_metadata`, `guest_videodec2` and `guest_videodec2_unimplemented` passed all three runs. The reporter also observed no build warnings and confirmed the `NOMINMAX` redefinition was gone. This is attributed confirmation in the reporter's environment, separate from our exact-source MSYS2 CI below; it does not validate other main revisions, the private #10913 composition, full-product behavior or PS5 execution. Historical revision: `d6fd16ec67d3860984f3bbe746c2ce5a32930d20`. Linux x86-64 Release with GCC 16.2.1; the actual library and all three focused fixtures were rebuilt through the module CMake. All **3/3** tests passed: ```text guest_hevc_metadata Passed guest_videodec2 Passed guest_videodec2_unimplemented Passed 100% tests passed out of 3 ``` Command: `ctest --test-dir build-post10005 --output-on-failure -V` in the isolated module build. Coverage includes all four wrappers, error precedence, exact early writes/canaries, aliases, both picture-count size boundaries, unsigned high-bit sizes, conditional second-version reads, real mapped guest writes, unaligned metadata, actual owned HEVC/VP9 projection, ownership/concurrency/lifetime, and H264 decode/NV12 pixel order. These historical results predate the latest optional SEI/replacement-probe changes described above. This run uses the branch's frozen `401731067856` core: 164 compiled objects and 270 project source/header inputs were checked against that base and the final view; core artifact hashes and pinned third-party archive/source inputs were rechecked. Existing pinned source-built FFmpeg 7.1.1 archives were reused after checking 32 transitive headers and all seven archive hashes; FFmpeg was not rebuilt locally. The complete actual module/fixture input set matches the committed source. This is isolated module validation, without a packaged or NID-patched full-product claim. Public-header audit passes for 368 libraries/12,192 exports; three standalone header composition units compile with `-Werror`. Conventions and committed whitespace checks pass with zero findings, and independent source/qualified-runtime peer review passes. The historical D6 revision merges cleanly with refreshed `main` at `0f34ebb85391`, which is a static integration check rather than a current-main runtime run. The [Windows report on the preceding `ab8a8e6f1018` head](https://github.com/boykopovar/AnyPS5/pull/10959#issuecomment-6405703700) by @wachi35676 covers its merge onto main `90f918fa7`, WinLibs GCC 15.2.0 Release: `guest_videodec2` and `guest_videodec2_unimplemented` passed, while `guest_hevc_metadata` failed twice before any HEVC call because `VirtualProtect` crossed separately mapped GuestArena views (`ERROR_INVALID_ADDRESS`, 487). The D6 fixture revision bounds each protection call to the committed region returned by `VirtualQuery` and guards the Windows macro definitions. The shared mapping, tracked permissions and all rejection/alias tests remain intact; production getter behavior is unchanged. A private source-extracted Win32 API model reproduces the old failure and passes seven boundary/failure cases with the fix. That model runs on Linux; actual Windows execution of D6 is recorded below. Historical D6 native Windows validation passed in [run 40262980830, attempt 1](https://github.com/AZLisme/AnyPS5/actions/runs/40262980830): Windows Server 2025 Datacenter 10.0.26100, MSYS2 UCRT64 GCC/G++ 16.2.0, CMake 4.4.4, Ninja 1.13.2, Release. CI commit `2421b35868d7e0374c7c01d75ed05a8d47e1b290` has this published `d6fd16ec67d3860984f3bbe746c2ce5a32930d20` as its sole parent and adds only the isolated workflow; the on-run provenance check verifies identical core/build inputs. The normal production module and core dependencies were built, and all **3/3 focused tests passed twice**, with zero skips. Downloaded JUnit, both execution records per test, actual compile/link commands and normal Windows unwind/PATH helpers were checked; this includes the shared-view read-only and cross-boundary rejection cases. The normal pinned FFmpeg archives were downloaded, not rebuilt from source in this run. This qualifies the exact D6 sources on this Windows toolchain; it is not the reporter's WinLibs 15.2.0 environment or a newer-main/#10913 composition run. Historical private integration with #10913 `294ab651deab` and the D6 `d6fd16ec67d3` head passed all **3/3 focused Linux tests**, including the discarded-frame regression and the metadata/argument tests, at two-parent composition `b507a381fccca6992b235f10f2389ada231d3f32`. Both histories and all source/test additions are preserved; only the debt append needed manual union, retaining both topics. The actual module and fixtures were freshly built using source-qualified frozen `401731067856` core dependencies and the pinned static packages described above; their actual inputs/artifact hashes, headers and static checks pass independent peer review. This private composition is not a current-main runtime or Windows result. The #10913-first landing order remains unchanged; this private composition is Linux-only. The native argument evidence is BunnyFl's firmware 13.42 native-code emulator report in PS5-process mode (module SHA256 `5825514d06cee0b7fdc87de4f428065ff7c2b761b40443f95ee580e1be18776d`); those native runs were not independently reproduced here. Native valid-metadata field equivalence, other firmware/process modes, physical PS5 hardware, macOS library runtime and packaged application/full-product runtime behavior remain unvalidated by these checks. The earlier-head Windows results are attributed above; the historical isolated native Windows result covers the exact D6 sources and Windows read-only cases, not E27. The private #10913 composition and other main combinations remain without Windows runtime proof here; the contributor confirmation is limited to the exact head/main pair stated above. The completed maintainer full Linux/Windows CI above covers its recorded batch only; the head resulting from the #10913-first integration rebase still needs applicable checks and maintainer re-review. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: <!-- #PR, or none --> #10913 (shared-debt landing order; no runtime dependency) - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes
MarcZX10 commented 2026-10-25 12:07:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T12:07:44Z.

Review: CHANGES_REQUESTED


There are two issues to address before this is ready:

  1. The new metadata output paths create GuestArena::HostWrite and then write without checking Open() (in the generic HEVC branch around GetPictureInfo, the new typed getter, and their invalid-picture fallbacks). On Windows, the guard returns false for a read-only guest mapping; these paths still assign the structure/isValid and can fault instead of reporting the failed guest write. Please handle the failed open before mutating output, and add a regression using a valid read-only guest view for the typed getter and generic HEVC getter.
  2. git diff --check upstream/main...refs/review/10959 reports a new blank line at EOF in core/libs/tests/GuestHevcMetadata.cpp:399; please remove it so the local whitespace check passes.

I inspected the parser and ABI integration, including bounded RBSP/SEI reads, VPS/SPS/PPS selection, picture association, delayed output storage and typed-vs-generic getter behavior. Hosted eligibility, intake, conventions, labels and report checks pass; product build jobs were skipped. The author reports 3/3 focused Linux tests, but I have not independently run them. This review is limited by the two concrete issues above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643138336 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10959#pullrequestreview-5643138336). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T12:07:44Z. **Review:** CHANGES_REQUESTED --- There are two issues to address before this is ready: 1. The new metadata output paths create `GuestArena::HostWrite` and then write without checking `Open()` (in the generic HEVC branch around `GetPictureInfo`, the new typed getter, and their invalid-picture fallbacks). On Windows, the guard returns false for a read-only guest mapping; these paths still assign the structure/`isValid` and can fault instead of reporting the failed guest write. Please handle the failed open before mutating output, and add a regression using a valid read-only guest view for the typed getter and generic HEVC getter. 2. `git diff --check upstream/main...refs/review/10959` reports a new blank line at EOF in `core/libs/tests/GuestHevcMetadata.cpp:399`; please remove it so the local whitespace check passes. I inspected the parser and ABI integration, including bounded RBSP/SEI reads, VPS/SPS/PPS selection, picture association, delayed output storage and typed-vs-generic getter behavior. Hosted eligibility, intake, conventions, labels and report checks pass; product build jobs were skipped. The author reports 3/3 focused Linux tests, but I have not independently run them. This review is limited by the two concrete issues above.
MarcZX10 commented 2026-10-25 13:25:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T13:25:35Z.

Review: APPROVED


Reviewed exact updated head 58e86995e54a9c7d77d7a2c0ef38c5e5b304b3ea. The generic and typed HEVC metadata paths now check HostWrite::Open() before copying a valid structure or changing isValid; refusal follows the existing unsupported path. The added guest-arena test checks mapped output values, canaries, write-watch reporting, invalid-picture fallback writes, and (on Windows) a structure spanning into a read-only view with no partial output mutation. The trailing whitespace issue is also removed.

I ran python3 tools/check_conventions.py --base upstream/main --head HEAD and git diff --check upstream/main...HEAD; both pass. The author reports a clean library build and three focused Linux runtime tests with write-watch coverage. Windows rejection tests are present but were not run on the author's Linux host; hosted product CI is skipped. The two requested issues are addressed, with no remaining blocker found in scope.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643379674 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10959#pullrequestreview-5643379674). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T13:25:35Z. **Review:** APPROVED --- Reviewed exact updated head `58e86995e54a9c7d77d7a2c0ef38c5e5b304b3ea`. The generic and typed HEVC metadata paths now check `HostWrite::Open()` before copying a valid structure or changing `isValid`; refusal follows the existing unsupported path. The added guest-arena test checks mapped output values, canaries, write-watch reporting, invalid-picture fallback writes, and (on Windows) a structure spanning into a read-only view with no partial output mutation. The trailing whitespace issue is also removed. I ran `python3 tools/check_conventions.py --base upstream/main --head HEAD` and `git diff --check upstream/main...HEAD`; both pass. The author reports a clean library build and three focused Linux runtime tests with write-watch coverage. Windows rejection tests are present but were not run on the author's Linux host; hosted product CI is skipped. The two requested issues are addressed, with no remaining blocker found in scope.
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!10959
No description provided.