Skip to content

media: apple: stage AV1 frame ops and preserve open decode - #700

Closed
RyanTheTide wants to merge 5 commits into
aurora-wipfrom
avd/rewrite-av1
Closed

RyanTheTide wants to merge 5 commits into
aurora-wipfrom
avd/rewrite-av1

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

AV1 gains prepare/pack_cmd/retire, frame-owned scratch buffers, and reference-counted CDF/segmentation state. Keep the legacy run/completion/PP callbacks for the current open transports, including grain-less output for film-grain controls. Publish references using the source timestamp and preserve segmentation maps when MiCols/MiRows match.

The shared queue/transport integration is taken from #713 at 01de6ce703a1; avd-queue.h is unchanged from core. Ordinary integration commits preserve the published AV1 history, allowing a fast-forward update without merging or force-pushing. Open decode remains serial per AV1 context until its transports accept native frame operations.

This remains a partial implementation. The Borage packer stages the proved tile fields, command destinations, work-count limit, and fp+0x4f8 copy, and keeps unresolved fields in the sourced [C] table. Apple packing returns -EOPNOTSUPP because syntax/DVA mappings and flag/address encodings remain unspecified. T8140 retains its Daybreak-ledger TODO. Native preparation retry, producer-failure propagation, and end-to-end stream qualification also remain open.

Validation:

  • ASan/UBSan host tests pass: 64 byte-identical packing vectors, grain-less fallback, legacy multi-tile submission and PP counts, source timestamps, segmentation sizes, producer errors, dependency table, sixteen live slots, inherited state/capture reuse, allocation failures and bounds.
  • Core queue header matches the pinned integration copy byte-for-byte.
  • The revision-5 fixture replay passes the same host suite without changing production source.
  • Linux queue host test passes: 100,000 shuffled operations and 36,424 ordered retirements.
  • Arm64 external-module build passes with W=1, WERROR=1 and KCFLAGS=-Werror, including modpost and BTF generation.

The vectors are synthetic V4L2 controls, not SVT-AV1 streams or decoded-pixel validation. No target hardware was used.

Move AV1 instruction and scratch ownership into frames and retain inherited CDF and segmentation state through reference-counted DMA allocations. Wire the frame operations and preserve the proved Borage offsets while refusing incomplete Apple payloads.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Publish auxiliary producer status before completion and acquire it before accepting a finished reference. Extend the host oracle to inter frames and exercise capture reuse with inherited CDF and segmentation ownership.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The tile-group control carries a fixed 512-entry array. Validate that capacity covers the tile grid, and use the grid product for program work rather than treating unused array entries as tiles.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Resolve the AV1 conversion against avd/rewrite-integ at 01de6ce. Keep the core queue header verbatim, retain its transports and power management, and add the AV1 layout selectors to the integrated match data. Preserve the published AV1 ancestry with this ordinary integration snapshot so updating the draft needs neither a merge nor a force push.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Retain legacy run, completion and PP kick callbacks while open transports still reject native frame operations. Adapt the shared CPU builder using explicit segment boundaries and keep its scratch buffers alive until completion. Select the compatibility path after boot and bind retirement to that selection across backend resets.

Preserve grain-less decode for film-grain controls. Publish AV1 reference state with the source timestamp before core copies CAPTURE metadata, and retain segmentation maps for matching MiCols/MiRows. Cover backend selection, legacy submission and failure cleanup, CDF publication, segmentation sizing, 64 packing vectors and sixteen live slots with host tests.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide RyanTheTide changed the title media: apple: stage AV1 queued frame operations and isolated state media: apple: stage AV1 frame ops and preserve open decode Oct 31, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Closing per the one-PR-per-series rule. The branch stays and gets integrated into the AVD rewrite, which lands as one PR once it works on hardware.

@RyanTheTide RyanTheTide closed this Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant