forge
Explore
Log in

Don't you dare go Hollow

Commits

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

2026-11-25

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.

2026-11-16

ec-hw: 10-bit HEVC encode, pipelined submit/flush, prime submit, CBR/VBR closed-loop rate correction; remove edith-sinkAhmet Kaan Gümüş · ccbbd43
ec-hw: 10-bit HEVC encode, pipelined submit/flush, prime submit, CBR/VBR closed-loop rate correction; remove edith-sink

- submit/submit_16/submit_prime + flush: DEPTH-3 pipelined encode, pool zero-filled
- submit_prime: GPU copy of an imported surface into a pool surface, padding zeroed (bit-identical to the CPU upload path)
- rate control: once-a-second bias + debt correction; mesa 26.2.6 / fw 20261019 overshoot 12-19% on detailed content (ffmpeg vaapi too)
- edith-sink removed: the MCP export path covers it

2026-10-23

Restore edith_codecs after local data loss (2026-10-23)Ahmet Kaan Gümüş · b7434a2
Restore edith_codecs after local data loss (2026-10-23)

On 2026-10-23 an automated agent ran `rm -rf $HOME` and deleted the local
repository with all of its history. This commit restores the working tree
from the newest surviving copy, the host-c server lane mirror. That mirror
matches local main as of the testcut Phase 2 reports, including the tool
cache, the nextest fast profile and changed-crates.sh. The history before
this commit was not recovered.

2026-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.