Commits
Commits on
c2d94dab62fc63b19f3abf4efefbb6e6131955b42026-11-25
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>
vk decode: 10-bit H.265 Main10 and AV1 on Vulkan (P010 session, bit depth from SPS/sequence header); P010 -> I420 via the shared picture conversion, bit-identical to VAAhmet Kaan Gümüş · cad917bBrowse files
vk-video-ffi: validation-layer clean (raw session memory reqs query with sType, AV1 encode feature enabled, no rate control in begin on reset frame, virtual buffer 25/12 ms, REGULAR_GOP with FLAT pattern, AV1 constantQIndex 0 under CBR, null segmentation)Ahmet Kaan Gümüş · fd663bdBrowse files
vk-video-ffi: shared session plumbing (session.rs: images, buffers, VideoSession, lanes, encode/decode runners, readback, caps) used by all six codec sessions; ~1900 fewer lines, outputs identicalAhmet Kaan Gümüş · ce0dca2Browse files
Vk runtime rate change: set_rate in the shim sessions (rate-control re-sent inside the coding scope, no new IDR), ec-vk set_rate, HwEncoder::tune for Vk and VA; hw_tune exampleAhmet Kaan Gümüş · 0c81983Browse files
ec-hw: hw_speed example (encode_rgb 1080p source, per-codec ms/frame)Ahmet Kaan Gümüş · a26af31Browse files
ec-hw: Vulkan AV1 decode behind HwDecoder (shared generic av1_refs), bit-exact vs ffmpeg on SVT, libaom (alt-ref/show_existing) and own Vk streams; shim converts LoopRestorationSize from samples to log2(size)-5Ahmet Kaan Gümüş · e5afa4eBrowse files
ec-hw: Vulkan H.265 decode behind HwDecoder (shared generic hevc_dpb), bit-exact vs ffmpeg on B-frame/multi-IRAP streams; HwDecoder falls back to VA (replaying the prefix) when Vulkan refuses a stream such as 10-bitAhmet Kaan Gümüş · a11df78Browse files
vk-video-ffi: Av1DecodeSession (Main 8-bit, distinct DPB/output, plain-struct sequence/frame headers); smoke example bit-exact vs ffmpeg on a key frameAhmet Kaan Gümüş · 6c86984Browse files
vk-video-ffi: H265DecodeSession (Main 8-bit, distinct DPB/output, resolved short-term RPS); smoke example bit-exact vs ffmpegAhmet Kaan Gümüş · 6f8f2a3Browse files
ec-hw: Vulkan H.264 decode behind HwDecoder (Vk first, VA fallback), shared dpb264 with slot surfaces; bit-exact vs ffmpeg on B-frame/multi-ref streams; hw_decode exampleAhmet Kaan Gümüş · 18fc857Browse files
encode_rgb scales: RGB source may be larger than the encoder (box/area downscale in the RGB->NV12 compute pass; VA path via ec_dsp::rgb_box_downscale); same-size output unchangedAhmet Kaan Gümüş · bb05374Browse files
vk-video-ffi: H264DecodeSession (distinct DPB/output, plain-struct SPS/PPS/refs, NV12 readback); smoke example bit-exact vs ffmpegAhmet Kaan Gümüş · 8defefbBrowse files
ec-hw: H.264 DPB generic over the surface type and ungated (dpb264.rs, h264_common.rs), for the Vulkan decoderAhmet Kaan Gümüş · c58ee89Browse files
RGB input: GPU compute RGB/BGR->NV12 (BT.709 limited, matches ec-dsp) for Vulkan H.264/H.265/AV1 encode; HwEncoder::encode_rgb (VA path converts on the CPU); ec-dsp bgra_to_i420_709; hw_rgb exampleAhmet Kaan Gümüş · e98bba9Browse files
ec-hw: HwEncoder (Vulkan first, VA fallback on Linux), HwDecoder (VA for now), capabilities() without opening an encoder; compiles on every OS; hw_caps exampleAhmet Kaan Gümüş · 274b9cbBrowse files
Vulkan H.265 and AV1 encode: vk-video-ffi H265EncodeSession (SPS/PPS per caps like ffmpeg hevc_vulkan) and Av1EncodeSession (sequence header serialized in the shim); ec-vk H265Encoder, Av1Encoder; examplesAhmet Kaan Gümüş · 4d688f2Browse files
ec-hw: compiles on every OS; VA (ec-va) is linux-only, pure config/frame types move to ungated types.rs/picture.rs with old paths re-exportedAhmet Kaan Gümüş · a588a1eBrowse files
Vulkan H.264 encode: vk-video-ffi H264EncodeSession (P-only, 1 ref, NV12 upload, CQP/CBR, VUI no-reorder); ec-vk H264Encoder (safe, GOP/force keyframe); h264_encode exampleAhmet Kaan Gümüş · 5c027c8Browse files
ec-h265: Decoder::end_picture finishes the access unit at once (no one-picture output delay on no-reorder streams); Frame::cropped applies the SPS conformance windowAhmet Kaan Gümüş · 9953355Browse files
vk-video-ffi: Vulkan Video shim core (the one crate with unsafe): loader, instance, device with video encode/decode/compute queues, codec caps; caps exampleAhmet Kaan Gümüş · d305564Browse files
ec-va: depend on the vendored cros-libva by path instead of a workspace [patch], so path and git consumers get the VPP use-after-free fix without patchingAhmet Kaan Gümüş · 24666c0Browse files
ec-av1: StreamDecoder, a persistent decoder fed one temporal unit at a time (decode / decode_temporal_unit), so inter frames decode across calls; decode_stream_with_threads is a wrapper over it; lanes: hwvideo charter (Vulkan Video first, VA frozen)Ahmet Kaan Gümüş · b63bf80Browse files
ec-h265: SequenceEncoder, a push-style IDR+P encoder (encode(frame, force_keyframe)), byte-identical to encode_sequence; forced IDRs restart the GOPAhmet Kaan Gümüş · 19320a9Browse files
ec-h264: Encoder::encode_with(frame, force_keyframe) codes an IDR on demand and restarts the GOP from itAhmet Kaan Gümüş · 7aaf710Browse files
ec-va: import_prime_raw / RawPrimeObject import DMA-BUFs by borrowed RawFd; cros-libva vendored in shims with Buffer owning its params, fixing a use-after-free of VAProcPipelineParameterBuffer regions that made every VPP region/scale convert render nothing (encode_surface/encode_frame of a size-mismatched source encoded black); ec-hw: submit_prime scales any source size to the encoder's size on the GPUAhmet Kaan Gümüş · d27d669Browse files
2026-11-24
ec-opus: CELT encoder replaced by a port of the libopus 1.6 float encoder (celt_flp: celt_encoder.c, bands, vq, quant_bands, pitch, MDCT/FFT); every Opus packet now byte-identical to libopus 1.6 across VoIP/Audio/LowDelay, mono/stereo, CBR/VBR, FEC on/off, 8-128 kb/s, 2.5-60 ms frames (CELT-only, hybrid, SILK, mode switches, redundancy)Ahmet Kaan Gümüş · e844676
ec-opus: CELT encoder replaced by a port of the libopus 1.6 float encoder (celt_flp: celt_encoder.c, bands, vq, quant_bands, pitch, MDCT/FFT); every Opus packet now byte-identical to libopus 1.6 across VoIP/Audio/LowDelay, mono/stereo, CBR/VBR, FEC on/off, 8-128 kb/s, 2.5-60 ms frames (CELT-only, hybrid, SILK, mode switches, redundancy) - tonality analysis bit-exact: opus_fft instead of the conjugate inverse FFT, double-precision log/log10/sqrt/floor where libopus uses them, input clamp at +6 dBFS, lsb_depth silence test; always on (libopus runs it at complexity >= 7), detected bandwidth always applied - libopus low-rate TOC-only packets; self-delimited and multistream 40/60 ms framing; CBR padding is zeros - hybrid HB_gain is 1 - 2^(-celt_rate/1024) (float SHR32 is a no-op); LowDelay runs dc_reject with total_buffer 0 - silk_LPC_fit chirp constant SILK_FIX_CONST(0.999, 16) = 65470 (was 65471), shared with the decoder - prev_channels tracked every frame, so stereo->mono switches take libopus's two-frame toMono path - i16 encode() uses lsb_depth 16 like opus_encode - old celt_enc.rs encoder, Encoder::last_celt_diag and the probe tests built on it removed
ec-opus: libopus 1.6 opus_encode_native decisions and switch mechanicsAhmet Kaan Gümüş · e7e5914
ec-opus: libopus 1.6 opus_encode_native decisions and switch mechanics - decide(): stateful port of the libopus mode/bandwidth/stream-channel logic (prev_mode +-4000 hysteresis, auto_bandwidth hysteresis, first, allowBandwidthSwitch / inWBmodeWithoutVariableLP gating, voice_ratio from analysis music prob, stereo_width, decide_fec, SILK<->hybrid by bandwidth); auto-mode configs match libopus on every frame (mono speech, VoIP/Audio, CBR/VBR, FEC on/off, 8-64 kb/s) - redundancy: 5 ms CELT redundant frames CELT->SILK and SILK->CELT, silk_bw_switch, compute_redundancy_bytes, SILK budget minus redundancy, redundancy signalling, rangeFinal ^= redundant_rng; SILK prefill on CELT->SILK and bandwidth switch; CELT reset + 2.5 ms prefill on mode change - stereo: stream_channels mono downmix in CELT (CELT_SET_CHANNELS) and SILK, toMono, TOC stereo bit, stereo width + stereo_fade - hybrid VBR: unconstrained CELT at max(501, bitrate - silk rate), SILK offset to CELT, HB_gain gain_fade; hybrid VBR bytes within 0.5% of libopus (was +10%) - 40/60 ms CELT/hybrid: per-20 ms budget, repacketizer code 1/2/3 + CBR padding, per-sub-frame analysis info - delay buffer moved to the Opus layer (libopus delay_buffer) - SILK-only stays byte-identical to libopus, including bandwidth-switch packets (except the CELT redundant tail)
ec-opus: SILK burg loop index no longer underflows in debug builds (cab[n + 1 - k]); SILK packets that bust their byte budget become a 1-byte PLC payload with final range 0 like libopus instead of indexing past the range buffer (CBR 6 kb/s 10 ms panicked in release too)Ahmet Kaan Gümüş · 7b15b46Browse files
ec-opus: SILK encoder replaced by a port of the libopus 1.6 float encoder (silk/float, enc_API.c, resampler, NSQ/NSQ_del_dec, LBRR, stereo LR->MS); SILK packets byte-identical to libopus for NB/MB/WB, mono/stereo, 10/20/40/60 ms, VBR and CBR (opus_packet_pad padding), FEC on; libopus Opus-level glue: SILK rate rules, VoIP hp_cutoff / dc_reject input filter feeding every layer, opusCanSwitch bandwidth switching, CBR <15 kb/s hybrid->WB cap, peak energy tracked every frame; CELT input alignment (312-sample delay) on by default except LowDelay, so CELT/SILK/hybrid share one look_ahead; hybrid CELT layer no longer starts every frame with 4 ms of zeros (HF +1..+5 dB bias gone); range coder clears its tail on done like ec_enc_done; silk_log2lin clamp and silk_ADD_POS_SAT32 semantics fixed; old SilkEncoder/SilkStereoEncoder API removedAhmet Kaan Gümüş · 3d2e08fBrowse files
ec-opus: SILK comfort noise (silk/CNG.c, bit-exact vs libopus 1.6 SILK PLC), Encoder::set_dtx (libopus DTX: TOC-only packets after 200 ms inactivity, 400 ms refresh), LBRR for stereo 10/20 ms and mono 40/60 ms, loss-driven LTP scaling (silk_LTP_scale_ctrl), MultistreamDecoder::conceal/decode_fec, MultistreamEncoder::set_inband_fec/set_packet_loss_perc; CELT noise PLC synthesizes long blocks like libopus; FEC-off output unchangedAhmet Kaan Gümüş · 237a87fBrowse files
ec-opus: SILK packet loss concealment (port of libopus silk/PLC.c: conceal, update, glue frames, BWE after loss, voiced->unvoiced transition); Decoder::conceal, decode_fec without LBRR and DTX frames now use it for SILK/hybrid; SilkDecoder::decode takes SilkFrameMode {Normal, Lbrr, Lost}Ahmet Kaan Gümüş · 86fb0f3Browse files
ec-opus: in-band FEC (SILK LBRR): Encoder::set_inband_fec/set_packet_loss_perc (libopus decide_fec, loss-aware equiv rate, FEC forces SILK/hybrid; mono SILK/hybrid 10/20 ms), Decoder::decode_fec (LBRR decode, hybrid CELT band concealment, PLC fallback); interop with libopus 1.6 both ways; FEC-off output unchangedAhmet Kaan Gümüş · 90e21f2Browse files
2026-11-23
ec-probe: AudioDecoder::reset keeps the AAC AudioSpecificConfig; raw mp4/mkv AAC no longer fails after a seekAhmet Kaan Gümüş · a31973fBrowse files
2026-11-17
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-11-15
2026-11-08
Encoder fixes from round-trip sweep follow-upAhmet Kaan Gümüş · f849ee9
Encoder fixes from round-trip sweep follow-up - ec-opus: 40/60 ms CELT/Hybrid as code-3 packets of 20 ms frames; self-delimited framing for code-3 packets (multistream 40/60 ms); multistream buffer sized for 60 ms - ec-image GIF: pixels turning transparent re-emit the previous frame with disposal 2 over the cleared area - ec-mp3: padding bit at 44.1/22.05/11.025 kHz - ec-aac: refuse bitrate 0 - ec-vorbis: refuse non-finite quality - ec-h264: refuse non-positive frame rate instead of clamping to 1 - ec-av1: with_pyramid doc matches behaviour (mini_gop > gop is clamped)
Encoder parameter-path fixes found by ffmpeg round-trip sweepsAhmet Kaan Gümüş · c561bfe
Encoder parameter-path fixes found by ffmpeg round-trip sweeps - ec-truehd: set nonrestart_substr on access units without major sync; ffmpeg rejected every AU after the first - ec-mp3: write the Xing/Info frame at a bitrate that holds the whole tag; at low bitrates the truncated tag made ffmpeg read gapless fields from audio frames (16 kHz/8 kbps decoded as noise, others shifted) - ec-aac: cap a frame at 6144 bits per channel; high bitrate per channel overflowed the decoder buffer and the 13-bit ADTS length - ec-av1: validate tiles against the superblock size actually coded (128), no shift overflow on huge log2, refuse base_q_idx 0 (lossless) up front - ec-ac3: 0 Hz no longer panics - ec-alac: refuse frame_length outside 1..=2^20 (0 hung) and 0 Hz