Skip to content

media: apple: avd: start AV1 pictures at the CDF producer's VP completion - #800

Merged
RyanTheTide merged 1 commit into
aurora-wipfrom
avd/av1-stream-overlap
Nov 1, 2026
Merged

RyanTheTide merged 1 commit into
aurora-wipfrom
avd/av1-stream-overlap

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

One AV1 stream still decoded well below what the hardware does with two streams. On the J616s, 1080p ran at 1598 fps with one stream and 2236 with two. Most pictures in typical streams take their CDFs from the previous decode or the one before it. We released that dependency only at PP retirement, so picture N+1's VP stage waited for all of N.

Fix: each bank gets a private coherent CDF output, separate from its CDF input. Readiness of that output is published at the producer's tagged VP completion. A consumer snapshots it into its own bank, so it can start on another VP without waiting for PP. With disable_frame_end_update_cdf the output is seeded from the input. The saved CAPTURE tail is only updated at successful PP retirement. Segmentation and temporal MV dependencies keep their PP boundary. Banks, FIFOs, buffers and requests are still released only at PP retirement. Legacy firmware and single-bank programs are unchanged.

How tested: J616s, 7.3.0-aurora-fleet14g with avd-fw 6062e851 and the PMC floor, module-only swap, 3 passes per row, bit-exact against software decode, no DART or AVD kernel lines.

row before after
AV1 1080p Q16 1598 2304
AV1 1080p Q4 1331 1783
AV1 4K Q16 553 662
H.264 1080p / 4K 1897 / 483 1893 / 480
HEVC 1080p / 4K 2596 / 697 2594 / 698
VP9 1080p / 4K 879 / 245 878 / 244

macOS VideoToolbox on the same machine decodes one AV1 1080p stream at 2420 fps and reaches 2886 with two streams; AV1 4K reaches 749. Host tests and the AV1 program, queue and unicorn tests pass.

🤖 Generated with Claude Code

Give queued AV1 banks separate coherent CDF output, seeded from the
selected primary context. A consumer can snapshot it after the producer's
tagged VP completion, without reading a CAPTURE tail still owned by PP.
Save successful output to the existing CAPTURE tail at PP retirement;
discard failed output and retain segmentation and temporal-MV PP barriers.

Reuse and zero equal-sized scratch allocations only after a queued bank
is free, removing repeated DMA mapping work from prepare. Keep the
single-bank path unchanged. Extend production host fixtures for adaptive
output inheritance, completion barriers, PP persistence, errors, bank
reuse and scratch zeroing/resize.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide merged commit 3f0a44e into aurora-wip Nov 1, 2026
mchalunderscore pushed a commit to mchalunderscore/linux that referenced this pull request Nov 4, 2026
…tion/aurora

Bring integration/aurora up to aurora-wip 52f0a6b, the source of
7.3.0-aurora-fleet14h, promoted on all four machines on 2026-11-02.
The range also covers the fleet14g source b35adc7. It adds aurora-silicon#792,
aurora-silicon#750, aurora-silicon#783, aurora-silicon#784, aurora-silicon#793, aurora-silicon#774, aurora-silicon#794, aurora-silicon#796, aurora-silicon#798, aurora-silicon#800, aurora-silicon#802 and aurora-silicon#801.
No conflicts.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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