1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//! Vulkan Video decode backend (`VK_KHR_video_decode_queue` via `vulkanalia`).
//!
//! **This round: H.264 (general-GOP, hardware-verified) + HEVC (IDR-only,
//! hardware-verified) + AV1 (`KEY_FRAME`-only, single-tile, hardware-verified
//! — [`av1_params`], `adr/vulkan/0002`).**
//!
//! # Status (2026-08-19)
//!
//! [`probe::probe_video_decode_queue_families`] is real and hardware-verified:
//! this workspace's reference RTX 4090 **and** Intel UHD 770 both advertise
//! H.264/H.265/AV1 decode queue families.
//!
//! [`dpb`]/[`h264_params`]/[`h264_slice`]/[`hevc_params`]/[`hevc_slice`]/
//! [`av1_params`]/[`av1_refs`] (DPB sliding-window bookkeeping, per-codec
//! bitstream parsing, HEVC short-term RPS construction, AV1 OBU/sequence-
//! header/`KEY_FRAME`-uncompressed-header parsing) are all real, sans-io,
//! and unit-tested independent of any GPU.
//!
//! ## H.264 — hardware-verified end to end (general-GOP)
//!
//! `tests/vulkan/hardware_h264_decode.rs` decodes a hand-crafted IDR + P-frame
//! stream and asserts (hard `assert_eq!`, not a soft skip) exact pixel
//! values, including a real motion-compensated `P_Skip` reference read from
//! the DPB. Three real bugs in this crate's own Vulkan Video command
//! construction (reference-slot `slotIndex` activation protocol, decode
//! target image layout, a missing Annex-B start code) were found comparing
//! field-by-field against `FFmpeg`'s working `vulkan_decode.c`/`vulkan_h264.c`.
//!
//! ## HEVC — hardware-verified (IDR-only)
//!
//! `decoder_hevc.rs`/`session_command_hevc.rs` handle **IDR pictures only**
//! this round (P/B-slice HEVC decode is an explicit follow-up).
//! `tests/vulkan/hardware_hevc_decode.rs` chains this workspace's own
//! hardware-verified Vulkan HEVC **encoder** into this crate's decoder (no
//! hand-written CABAC). Root cause of an earlier all-zero-output bug: a
//! missing slice-header bit desyncing the driver's CABAC parser — see
//! [ADR-0001](../adr/0001-vulkan-video-decode.md)'s 2026-08-05 addendum.
//!
//! ## AV1 — hardware-verified (`KEY_FRAME`-only, single-tile)
//!
//! [`av1_params`]/`av1_params::av1_frame_header` parse the sequence header
//! and a `KEY_FRAME`'s full `uncompressed_header()` (segmentation,
//! quantization, loop filter, CDEF, loop restoration, tile info — all real,
//! not stubs). `decoder_av1.rs`/`session_command_av1.rs` handle `frame_type
//! == KEY_FRAME`/`show_frame == 1`/single-tile pictures only, rejecting
//! anything else with `DecodeError::Unsupported` — see
//! [ADR-0002](../adr/vulkan/0002-av1-decode-keyframe-first.md). No Annex-B
//! start code (AV1 has none); `frameHeaderOffset`/tile-offset framing is
//! this crate's own design (see `av1_frame_header.rs`'s module doc).
//! `tests/vulkan/hardware_av1_decode.rs` pushes a real `mediaway_sw::av1::Av1Encoder`
//! (`rav1e`-backed, pure-CPU) `KEY_FRAME` through the decoder and asserts
//! real decoded NV12 content — passed hardware verification on the first
//! attempt, unlike this workspace's AV1 Vulkan **encode** path (confirmed
//! driver-blocked, a different extension family — this driver generation's
//! AV1 *decode* does not share that bug).
//!
//! See [`docs/roadmap.md`](../docs/roadmap.md) for staged status.
pub use VulkanVideoDecoder;
pub use ;