f9562972bd
Pivoted from ampere-vp9-enablement (closed at structural impossibility
on rkvdec/vdpu381). Janet PIVOT verdict pointed at AV1 — verification
shows it works out-of-the-box on mainline 7.0.0-rc3:
- Kernel driver: drivers/media/platform/verisilicon/
rockchip_vpu981_hw_av1_dec.c (in-tree, loaded as hantro-vpu)
- Hardware: vpu981 dedicated AV1 IP at fdc70000 (separate from rkvdec)
- V4L2 node: /dev/video4 enumerates AV1F format
- Userspace: ffmpeg -hwaccel v4l2request kdirect path works
Verification: byte-compare HW (hantro-vpu) vs SW (libdav1d) on two
AOM test vectors:
- av1-1-b8-01-size-208x208.ivf (2 frames): 100.0000% exact match
- av1-1-b8-23-film_grain-50.ivf (10 frames): 100.0000% exact match
per frame, including AV1 film_grain post-processing
Pivot outcome:
- VP9 campaign: 10 iterations + 2 architect reviews → structural
impossibility (kernel-side gap that needs upstream/Collabora coord)
- AV1 verification: 0 iterations → bit-perfect first try
The "enablement campaign" framing is mostly inappropriate for AV1 —
this is a verification campaign. Real upstream work was done by
Verisilicon + Collabora; we just confirm it works on ampere.
Optional follow-ups (out of Phase 0 scope):
A. libva backend AV1 dispatch (enables VAAPI consumers)
B. Fluster AV1-TEST-VECTORS comprehensive validation
C. 1080p/4K real-world AV1 stress test
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
54 lines
2.5 KiB
Markdown
54 lines
2.5 KiB
Markdown
# ampere-av1-enablement
|
||
|
||
AV1 hardware decode verification on Rockchip RK3588 ampere (CoolPi CM5 GenBook).
|
||
|
||
## Status (2026-05-17 09:00)
|
||
|
||
**VERIFIED WORKING bit-perfect first-try** using mainline 7.0.0-rc3 + ffmpeg-v4l2request kdirect path on the hantro `vpu981` AV1 driver. Zero new code required.
|
||
|
||
Sibling campaign [ampere-vp9-enablement](https://git.reauktion.de/claude-noether/ampere-vp9-enablement) closed at structural-impossibility on rkvdec/vdpu381 VP9; Janet PIVOT verdict pointed to AV1; verification confirmed AV1 works out-of-the-box.
|
||
|
||
## Verification
|
||
|
||
```
|
||
$ ssh ampere
|
||
$ ffmpeg -hwaccel v4l2request -hwaccel_output_format drm_prime \
|
||
-i /tmp/av1_larger.ivf -vf 'hwdownload,format=nv12' \
|
||
-f rawvideo -pix_fmt nv12 /tmp/hw-av1-all.nv12
|
||
[AVHWFramesContext] Using V4L2 media driver hantro-vpu (7.0.0) for AV1F
|
||
```
|
||
|
||
Byte-compare against ffmpeg's libdav1d SW reference, all 10 frames of the av1-1-b8-23-film_grain-50.ivf test vector (352×288, includes film-grain feature):
|
||
|
||
```
|
||
frame 0: exact=100.0000%
|
||
frame 1: exact=100.0000%
|
||
...
|
||
frame 9: exact=100.0000%
|
||
```
|
||
|
||
Smaller test vector (av1-1-b8-01-size-208x208.ivf, 2 frames): also 100% match.
|
||
|
||
## Driver stack
|
||
|
||
- IP: `vpu981` (Rockchip's dedicated AV1 hardware on RK3588, MMIO at fdc70000)
|
||
- Kernel driver: `drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c` (in-tree)
|
||
- DT compatible: presumably `rockchip,rk3588-vpu981-av1-dec` (verified loaded via `lsmod | grep hantro_vpu`)
|
||
- V4L2 node: `/dev/video4` (enumerates AV1F format)
|
||
- Userspace path: ffmpeg `-hwaccel v4l2request` (kdirect, not libva)
|
||
|
||
## What's NOT done
|
||
|
||
- **libva-v4l2-request-fourier backend AV1 dispatch** — backend has no AV1 codec module. ffmpeg-v4l2request kdirect works without libva. Adding libva AV1 support would make AV1 available to other VAAPI consumers (VLC, mpv with VA-API, GStreamer-VAAPI, browsers via VAAPI/VDPAU). Estimated effort: 1-2 days mirroring the existing HEVC/H.264/VP9 dispatch patterns in `~/src/libva-v4l2-request-fourier/src/` (sibling repo).
|
||
- Fluster `AV1-TEST-VECTORS` comprehensive validation (only ran 2 of the AOM test vectors).
|
||
- Stress test (long bitstream, 1080p+, complex features beyond film_grain).
|
||
|
||
## Out of scope
|
||
|
||
- Adding AV1 to rkvdec/vdpu381 (would duplicate the working hantro-vpu981 path)
|
||
- Reviving the failed VP9 work from sibling campaign
|
||
|
||
## Process
|
||
|
||
This is a verification campaign more than an enablement campaign. The work was done upstream by Verisilicon + Collabora; this repo documents that it works on ampere out-of-the-box.
|