Commits
Commits on
5c8eff8ca5a0d547bfb22a690b3f7afb373da607Filtered to crates/ec-hw/src/enc/headers.rsClear filter2026-09-07
feat(ec-hw): AV1 hardware encode that two independent decoders agree onAhmet Kaan Gümüş · a518304
feat(ec-hw): AV1 hardware encode that two independent decoders agree on The AV1 encode path submitted parameters no header described: radeonsi parses the application's sequence and frame header OBUs and writes the stream from them, so without those OBUs the coded buffer meant nothing. This writes both (spec 5.5.1 / 5.9.1, the subset the driver advertises: one tile, one reference, no CDEF, no restoration, no superres), fills the picture parameter buffer to agree with them field for field, and prepends the temporal delimiter the driver does not emit. Gate: ec-av1 and ffmpeg's libdav1d decode every shown frame of a 640x384 and a 1920x1080 stream sample for sample, and the coded picture is within 60 dB of the one submitted.
2026-08-21
2026-08-20
feat(ec-hw): zero-copy decode-to-encode surface path, VUI colour descriptionAhmet Kaan Gümüş · fc705c7
feat(ec-hw): zero-copy decode-to-encode surface path, VUI colour description Encoder::encode_frame submits a Frame's decoded VA surface directly as the encoder's source picture, with no to_i420 CPU read-back and no re-upload — what the consumer's previous backend did for a decode-then-encode pipeline. Refuses a cross-Display frame, a 10-bit (P010) source (no Main10 profile is built here), or a coded-size mismatch with a typed Error. EncoderConfig::colour(primaries, transfer, matrix, full_range) reaches the VUI of both the H.264 and HEVC packed SPS writers (video_signal_type_present_flag / colour_description_present_flag), so an HDR or BT.709 export stops reading back as "unspecified". Live-GPU tests in gpu.rs cover both: encode_frame vs the CPU-path baseline on the same decoded frames (PSNR compared, further: they came back byte identical on this driver), and ffprobe reading BT.2020/PQ/BT.2020nc back off a written stream while the no-colour-set case stays deterministic.
2026-08-14
feat(hw): hardware encoding for H.264 and HEVC, AV1 behind an opt-inAhmet Kaan Gümüş · 7368f27
feat(hw): hardware encoding for H.264 and HEVC, AV1 behind an opt-in IDR-then-P with a single reference, CQP or CBR, one frame in and one coded frame out. HEVC encoding is in the tree rather than on a branch, which is the whole point of writing this one: the conformance window is a field of the sequence, so 1916x1080 comes out the size it went in. The packed headers are the application's job here. This driver advertises `SEQUENCE | PICTURE | SLICE` and then writes none of them itself, so the crate writes the H.264 parameter sets and slice headers, and reuses `ec-h265-syntax` for the HEVC ones — the same code that parses them. Two driver behaviours are pinned down by comment where they were found by measurement: the parameter sets only reach the stream when a slice header accompanies them, and the HEVC slice header this driver composes omits `slice_loop_filter_across_slices_enabled_flag`, so the PPS has to say the flag is absent or every P picture decodes as `alignment_bit_equal_to_one = 0`. AV1 encoding is refused unless a caller sets `allow_av1`. That guard is not caution for its own sake: a probe at the driver's own minimum encode size took the GPU down with a hard recovery on 2026-08-14, and there is no error to return from a context that no longer exists.