forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to crates/ec-hw/src/vkdec_av1.rsClear filter

2026-11-25

ec-hw AV1 Vulkan: raw CDEF secondary strength, per-slot reference extents, odd frame sizes; VA refuses mono, 12-bit and non-4:2:0Ahmet Kaan Gümüş · d24d8b0
ec-hw AV1 Vulkan: raw CDEF secondary strength, per-slot reference extents, odd frame sizes; VA refuses mono, 12-bit and non-4:2:0

Vulkan std CDEF takes the coded 2-bit secondary strength (3 means 4), so the parser's adjusted value is mapped back before upload. This fixes the SVT-AV1 mismatches (lag0, hier3, grain, superres, resize).
Reference picture resources carry each slot's own size, clearing the DPB association validation error on resized streams.
Odd frame sizes decode at their real size; readback and I420 use the even-rounded pitch.
The VA AV1 path refuses monochrome, 12-bit and 4:2:2/4:4:4 cleanly.
ec-hw: Vulkan decode follows mid-stream size and DPB changesAhmet Kaan Gümüş · fc0a0f7
ec-hw: Vulkan decode follows mid-stream size and DPB changes

Flush the previous picture when an SPS arrives, so it is finished against
its own SPS. Rebuild the H.264/H.265 session when the coded size or DPB
size changes (H.265 also on bit depth), flushing pending output first.
AV1 sizes the session from the sequence header maximum.
ec-hw: export film-grained AV1 pictures as DMA-BUFAhmet Kaan Gümüş · 3b58935
ec-hw: export film-grained AV1 pictures as DMA-BUF

Grain is applied on the CPU on the first export and the grained NV12/P010
goes into a separate exportable ring slot, so the reference slot stays
ungrained. The picture holds that slot until it drops. The staging buffer
for the upload is created on first use.
ec-hw: AV1 film grain on the Vulkan pathAhmet Kaan Gümüş · b0a8e4e
ec-hw: AV1 film grain on the Vulkan path

RADV accepts filmGrainSupport=true but its output is the ungrained
decode, so grain is applied on the CPU after readback with ec-av1's
spec 7.18.3 synthesis. Shown frames are grained, references stay clean,
show_existing_frame re-applies the loaded parameters. 8-bit I420 only;
RGB and 10-bit grain still fall back to VA.

hw_decode gains a grain case (ffmpeg and VA: 0.000000).
vk: 10-bit H.265 Main10 and AV1 encode from P010, Vulkan 10-bit decode output; ec-hw encode_16 and HwDecoder::open_16/next_frame_16Ahmet Kaan Gümüş · 82a0fd5
vk: 10-bit H.265 Main10 and AV1 encode from P010, Vulkan 10-bit decode output; ec-hw encode_16 and HwDecoder::open_16/next_frame_16

Shim: P010 input plane upload, Main 10 / high_bitdepth parameter sets, encode_16 on H.265 and AV1 sessions; RGB and DMA-BUF input refused at 10 bits; 10-bit caps query maps to Unsupported.
ec-vk: bit_depth in H265/Av1 encoder configs, encode_16.
ec-hw: EncoderConfig.bit_depth 10 on Vulkan (H.264 stays Unsupported), HwEncoder::encode_16; Mode::I420_16 decode output for Vulkan and VA-API, shared fill_i420_16 in picture.rs.
examples/hw_ten: 30-frame 1280x720 round trip, PSNR and VA comparison.
vk-video-ffi, ec-hw: VP9 decode over Vulkan VideoAhmet Kaan Gümüş · 2134128
vk-video-ffi, ec-hw: VP9 decode over Vulkan Video

Profile 0 8-bit and profile 2 10-bit 4:2:0 on the Vulkan path, so VP9 no
longer needs VA-API. The shim takes the parsed uncompressed header and
builds StdVideoDecodeVP9PictureInfo. ec-hw reuses ec-vp9-syntax for
parsing and superframes, and the shared RefSlots (renamed from av1_refs)
for the eight reference slots. The VA VP9 decoder uses RefSlots too.

hw_decode example gains three libvpx VP9 streams (8-bit 640x360 with
hidden altrefs, 8-bit 720p realtime, 10-bit), all bit-exact against ffmpeg.