claude-noether a87678bbbf Phase 2: field-mapping table — legacy rkvdec_regs → rkvdec_vdpu381_regs_vp9
The translation guide for porting rkvdec_vp9_run and its config_*
helpers from the flat vdpu34x register layout to the segmented vdpu381
layout. Each row maps a legacy field to its new location across the
4 segments (common, vp9_param, common_addr, vp9_addr).

Key semantic deltas captured:
- reg02.dec_mode → reg009_dec_mode.dec_mode (VDPU381_MODE_VP9=2)
- Per-ref indexed arrays (reg17_19[i], reg29_31[i], reg37_39[i],
  reg48_50[i]) become separate per-frame-slot registers
  (last/golden/altref triplets) in vdpu381
- Decode trigger moves from RKVDEC_REG_INTERRUPT=0x004 +
  RKVDEC_INTERRUPT_DEC_E mask to VDPU381_REG_DEC_E=0x028 +
  VDPU381_DEC_E_BIT (single bit)
- reg09.yuv_virstride dropped (legacy-only convenience field)
- reg51.lastref_yuv_virstride dropped (not in vdpu381 layout)
- NEW fields surfaced: reg103_frame_flags (intra_only, prob_update_en,
  refresh_en, allow_high_precision_mv, interp_filter_switch_en),
  reg064_cprheader.cprheader_offset, reg105.count_update_en

Also captures 5 open questions for the next code-writing session
(prob-index rotation, delta_prob_base aliasing, RCB integration,
timeout threshold sizing).

This document IS the load-bearing artifact for the Phase 2 backend
implementation. The .c file translation walks this table line-by-line.

Companion to commit 47431635801d (regs header VP9 struct definitions).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 23:15:11 +00:00

ampere-vp9-enablement

Stand-alone port + upstream-targeting work to enable VP9 hardware decode on Rockchip RK3588's rkvdec (vdpu381 register layout).

Status (2026-05-17 ~01:00)

Upstream RK3588 mainline rkvdec (Casanova v7.0 series, landed in Linux 7.0) supports H.264 + HEVC only. VP9 is on Collabora's stated roadmap but no WIP series has been posted to linux-media as of this campaign open. The legacy rkvdec-vp9.c (RK3399 / vdpu341 hardware) is feature-complete at 1042 lines but its register-config logic does not translate directly to vdpu381.

This campaign:

  1. Ports VP9 enablement to vdpu381 register layout (new file rkvdec-vdpu381-vp9.c)
  2. Registers VP9 V4L2 controls in vdpu38x_vp9_ctrl_descs[]
  3. Adds VP9 fmt to vdpu381_coded_fmts[] with the new ops
  4. Verifies bit-perfect HW vs SW decode (per feedback_compare_hw_against_sw_reference)
  5. Proposes upstream via linux-media

Sibling campaign: ampere-kernel-decoders closed at HEVC bit-perfect (kernel-agent#14 + #15 are the prerequisite kernel fixes).

Scope (out of)

  • VP9 on RK3399 (works via legacy rkvdec-vp9.c already in mainline)
  • VP9 on hantro (hantro decoder on RK3588 doesn't expose VP9; this campaign targets rkvdec)
  • AV1 on RK3588 (separate work; AV1 is on hantro fdc70000 already + per Collabora)
  • VP8 (already works via hantro)
  • HEVC (closed in ampere-kernel-decoders)

Process

8-phase loop (per ~/.claude/CLAUDE.md). All commits via claude-noether identity. Patches will be RFC-quality and routed via kernel-agent once ready.

S
Description
VP9 HW decode enablement on RK3588 rkvdec/vdpu381 — upstream-aligned port
Readme 78 KiB
Languages
Markdown 100%