Commits
Commits on
b54b5355fc0e24afc3bc6bdbc2e50920cf0177232026-11-25
vk-video-ffi: H.265, AV1 and VP9 decode sessions use the driver's DPB slot and active reference maxima, as ffmpeg doesAhmet Kaan Gümüş · 9531d9eBrowse files
vk-video-ffi H.264 decode: create the session with the driver's DPB slot and active reference maximaAhmet Kaan Gümüş · 08bc65c
vk-video-ffi H.264 decode: create the session with the driver's DPB slot and active reference maxima The session was sized with the stream's DPB slot count and active reference count (5/5 for these streams). The driver sizes session memory from those numbers, and a session that is too small corrupts decoding after an earlier session on the same device. ffmpeg creates sessions with the driver caps. DPB image count stays stream-sized.
ec-hw: Vk Unsupported falls back to VA everywhere; VP9/AV1 refuse below minCodedExtent; VA checks real picture size against driver minimumAhmet Kaan Gümüş · 8af23f0Browse files
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: level tables and checks match ffmpeg (AV1 MainMbps, aspect bounds, NAL factors)Ahmet Kaan Gümüş · 5b6d329Browse files
vk-video-ffi: pad H.265 to driver min extent, H.264 sub-min Unsupported, decode-stage init barrierAhmet Kaan Gümüş · 1786477Browse files
ec-hw: one level selection per codec for VA and Vulkan; AV1 and HEVC VPS timing_info; VA H.264 High 8x8 transformAhmet Kaan Gümüş · ab12e5b
ec-hw: one level selection per codec for VA and Vulkan; AV1 and HEVC VPS timing_info; VA H.264 High 8x8 transform Level comes from crates/ec-hw/src/level.rs (smallest level fitting size, rate, DPB and bitrate; CQP ignores bitrate). The Vulkan shim takes the level and clamps it to the driver's maxLevel. AV1 sequence header carries timing_info (VA packed header, Vulkan OBU and std struct). HEVC VPS carries vps_timing_info when the SPS VUI does. VA H.264 High sets transform_8x8_mode_flag in the PPS and picture parameters.
Merge decode robustness: H.264 4:0:0 on Vk, clean VA refusals, VA pool growth, HEVC level 255, AMD HEVC CTB16 quirkAhmet Kaan Gümüş · 5d36862Browse files
ec-hw: 4:0:0 H.264 on Vulkan, VA surface growth, refuse VA 12-bit VP9 and AMD CTB16 HEVC, accept unknown H.265 levelsAhmet Kaan Gümüş · db3af7cBrowse files
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.
vk-video-ffi: report H.264 Constrained Baseline encode; hw_config checks Main and CB vs VAAhmet Kaan Gümüş · 42021c7Browse files
ec-hw: hw_oracle example, per-frame framecrc vs ffmpeg software decode, reports Vk fallbackAhmet Kaan Gümüş · a63faefBrowse files
vk-video-ffi: read encoded bitstream from cached host memoryAhmet Kaan Gümüş · e22e714
vk-video-ffi: read encoded bitstream from cached host memory The encode bitstream buffer was HOST_COHERENT only, so the per-frame copy-out ran at uncached speed: AV1 (~187 KB/frame) spent ~0.68 ms per frame in the readback, which serialized on the CPU. Prefer HOST_CACHED with an invalidate on read, matching the decode readback.
vk-video-ffi: AV1 encode matches VA tools: switchable interp, loop filter level 1, primary_ref_frame LAST on inter framesAhmet Kaan Gümüş · d7ce722Browse files
vk-video-ffi: two-object DMA-BUF import via single-plane images and internal NV12/P010 copyAhmet Kaan Gümüş · ba75450
vk-video-ffi: two-object DMA-BUF import via single-plane images and internal NV12/P010 copy Drop DISJOINT (RADV advertises no DISJOINT for DRM modifiers). Planes from two objects import as R8/R8G8 (P010: R16/R16G16) single-plane images, one bind each, then copy into an internal NV12/P010 image that the encoder reads like a host upload. Unsupported when the modifier lacks single-plane formats. Smoke example adds split NV12/P010 cases (linear and tiled) and a two-pass cache check.
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.
vk-video-ffi: defer ring store copy and chain it into the next readbackAhmet Kaan Gümüş · 9c38a59
vk-video-ffi: defer ring store copy and chain it into the next readback store records the copy as pending; the next decode, export or readback of another slot flushes it, a readback of the same slot records it in the same graphics submission, so each picture takes one graphics submit and wait instead of two.
HwDecoder::next_picture -> HwPicture (to_i420/to_i420_16/to_rgb/export_dmabuf per picture) on a reusable exportable output ring (stable fd inodes); old next_* as wrappers; CodecProfile H264ConstrainedBaseline/H264Main/Vp9Profile2Ahmet Kaan Gümüş · e12d32fBrowse files
Merge Vk encode config parity (H.264 profile, colour, gop, forced keyframes) and shared VA/Vk rate control (hrd_buffer_ms, RateFeedback), steered on pipelined submit/flush tooAhmet Kaan Gümüş · d0fd4cbBrowse files
Merge Vk decode DMA-BUF export, HwDecoder::reset, per-profile capabilities, grain for 16-bit/RGB; one DmaBufPlane type for import and exportAhmet Kaan Gümüş · 0df0354Browse files
Vk decode parity: DMA-BUF export, reset, AV1 film grain for 10-bit, per-profile capabilitiesAhmet Kaan Gümüş · f49eeb8Browse files
Merge branch 'worktree-agent-ab057528cdea26a6b'Ahmet Kaan Gümüş · 5d4b8b4
Merge branch 'worktree-agent-ab057528cdea26a6b' # Conflicts: # crates/ec-hw/src/hw.rs # shims/vk-video-ffi/src/av1_encode.rs # shims/vk-video-ffi/src/h264_encode.rs # shims/vk-video-ffi/src/h265_encode.rs # shims/vk-video-ffi/src/session.rs
vk: VA rate feedback and HRD buffer on Vulkan, H.264 profile, colour configAhmet Kaan Gümüş · ff39f7f
vk: VA rate feedback and HRD buffer on Vulkan, H.264 profile, colour config hrd_buffer_ms and RateFeedback move to a shared ec-hw rate module, used by the VA and Vulkan encoders. Vulkan CBR now runs the 1000 ms buffer for GOP >= 10 and applies the steered bitrate through set_rate, no IDR. The H.264 profile maps to profile_idc, constraint_set1 (Constrained Baseline), PPS transform_8x8_mode and entropy_coding_mode. A profile the driver rejects is Unsupported. The colour description goes into the H.264/H.265 VUI and the AV1 colour config, as VA writes it. Adds the hw_config example: H.264 Main, BT.601 full range, GOP 15, forced key frame at 7; Vulkan and VA match in ffprobe fields and key frames.
Depth-2 pipelined Vulkan encode: shim slots, ec-vk and ec-hw submit/flush, hw_pipeline exampleAhmet Kaan Gümüş · 87336a0Browse files
vk: NV12 and P010 DMA-BUF encode input (1 or 2 objects), per-session import cacheAhmet Kaan Gümüş · 7996a95
vk: NV12 and P010 DMA-BUF encode input (1 or 2 objects), per-session import cache
DmaBuf now lists fds, planes {fd, offset, pitch}, width, height, modifier
and a DmaBufFormat (Bgrx, Rgbx, Nv12, P010). NV12/P010 import as a
multi-planar DRM modifier image (DISJOINT with one object per plane) and
copy plane by plane into the encoder source. Imports are cached per
session (16 entries, LRU) keyed by fstat dev/inode, layout, modifier,
size and format; dmabuf_imports() reports the import count.
ec-hw gains DmaBufYuvFrame and encode_dmabuf_yuv (Vulkan only). The RGB
DmaBufFrame API is unchanged. dmabuf_smoke covers NV12 (H.264, H.265,
AV1) and P010 (H.265, AV1) byte-identical to host upload, plus the cache
case.Merge AV1 film grain on Vk (CPU synthesis via ec-av1 after clean GPU decode; shim told no grain), bit-exact vs ffmpeg and VAAhmet Kaan Gümüş · a9418faBrowse files
Merge 10-bit Vk encode (H.265 Main10, AV1 10-bit) and 16-bit decode output; VP9 decoder takes the shared ModeAhmet Kaan Gümüş · 59d3a02Browse files
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.
hw_parity example; intra_rate runs both backends; Vulkan device-lost maps to the GPU reset epochAhmet Kaan Gümüş · ca831ce
hw_parity example; intra_rate runs both backends; Vulkan device-lost maps to the GPU reset epoch vk-video-ffi: VK_ERROR_DEVICE_LOST surfaces as Error::DeviceLost, one helper for every Vk error mapping. ec-hw: DeviceLost bumps the reset epoch via report_gpu_reset; Vk sessions check the epoch on use, new Vk sessions wait out the grace period; the thread-local Gpu is reopened after an epoch change.
vk-video-ffi: HOST_CACHED readback memory (decode 6.6 -> 1.8 ms/frame at 720p), RGB decode converts from a device-local plane copy, DMA-BUF foreign acquire from GENERALAhmet Kaan Gümüş · c2d94daBrowse files
HwDecoder::open_rgb/next_rgb: GPU YUV->BGRA/RGBA with box downscale (nv12_to_rgb.comp), matrix from bitstream (601/709 limited), VA fallback via ec-dsp i420_to_packed with the same coefficients; hw_decode_rgb exampleAhmet Kaan Gümüş · b411317Browse files
vk-video-ffi: zero-copy DMA-BUF input (encode_dmabuf) for H.264/H.265/AV1, forwarded through ec-vk and ec-hwAhmet Kaan Gümüş · 2602aec
vk-video-ffi: zero-copy DMA-BUF input (encode_dmabuf) for H.264/H.265/AV1, forwarded through ec-vk and ec-hw Import the dma-buf as a VkImage (DRM format modifier explicit layout), acquire it from the foreign queue family and copy it into the RGB converter input buffer on the upload lane; the existing compute pass does the NV12 conversion and downscale. dmabuf_smoke: encode_dmabuf output is byte-identical to encode_rgb for linear and tiled modifiers, and for the 640x360 downscale. Co-Authored-By: Claude <noreply@anthropic.com>