forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to crates/ec-hw/src/enc/hevc.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): 10-bit AV1 hardware encodeAhmet Kaan Gümüş · 98dcdcf
feat(ec-hw): 10-bit AV1 hardware encode

His whole AV1 library is yuv420p10le, so an 8-bit-only hardware encoder
does not serve his files. EncoderConfig gains a bit_depth (8, or 10 for
AV1: H264High and HEVCMain are 8-bit profiles by definition, which is a
fact about the profiles this crate configures, not a driver refusal), a
10-bit encoder allocates P010 surfaces, uploads through encode_16, sets
bit_depth_minus8 = 2 in the sequence parameters and high_bitdepth in the
sequence header OBU it packs. encode_frame now passes a 10-bit decoded
surface straight through when the encoder is 10-bit too, and VPPs only
when the depths or the sizes differ.

Gate av1_10bit_encode_agrees_between_two_decoders on film B's own
1920x1024 native crop: ec-av1 and libdav1d agree sample for sample on
all 10 frames, ffprobe reads yuv420p10le out of the sequence header,
decoded peak luma 610 (> 255), worst frame 48.09 dB from the source in
the 10-bit domain.

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.