forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 7f487c10e98d32efa4e4b554b778d2eea5d16efdFiltered to vendor/cros-codecs/src/encoder/h265.rsClear filter

2026-08-14

🐛 fix(engine-hw): the hardware HEVC seat says what its samples meanAhmet Kaan Gümüş · 9fdee6f
🐛 fix(engine-hw): the hardware HEVC seat says what its samples mean

The plugin's HEVC encoder wrote no VUI at all, so libavcodec read the
stream's colour as "unspecified" and rendered a 709 export through the
601 matrix -- the HEVC decoder takes the bitstream's answer and
overwrites the container's with it, which is why the mp4's `colr` box
and the Matroska's Colour element could not cover for it
(`export_color::every_format_signals_its_space_in_the_bitstream`, both
HEVC containers, whenever the plugin is on the path).

The three H.273 code points and the range flag now go in at the open,
from the same `ColorDescription::output` rule the software intra seat's
VUI and both muxers' tags come from, through the vendored `SpsBuilder`'s
own `video_signal_type`/`colour_description`. A symbol of its own,
`vh_enc_hevc_open_colour`, rather than four more arguments under the old
name: a plugin that predates it is then simply missing the seat and the
export falls back to the software encoder, which has always written the
VUI, instead of being called with a signature it does not have.

2026-08-13

🔧 chore(vendor): cros-codecs learns to write HEVC, from its own branchAhmet Kaan Gümüş · 75da480
🔧 chore(vendor): cros-codecs learns to write HEVC, from its own branch

The vendored 0.0.6 decodes HEVC and encodes H.264 and AV1; the seven
commits behind cros-codecs' `hevc-vaapi-encoder` branch are what give it
the third encoder, and they are carried here verbatim rather than
rewritten:

  * `codec/h264/nalu_writer` - emulation prevention after an escaped byte
    (the same >=5-zero-run bug the vendored H.264 writer had)
  * `codec/h265/nalu_writer` - the H.265 writer that fix belongs to
  * `codec/h265/parser` - VPS, SPS and PPS builders, the SPS deriving its
    own conformance window from the resolution it is given
  * `codec/h265/synthesizer` - the parameter sets written back out as
    NALUs, which is what a driver emitting no packed headers needs
  * `encoder/h265` + `encoder.rs` - initial tunings on the config
  * `encoder/stateless/h265` - the codec and its low-delay predictor
  * `encoder/stateless/h265/vaapi` - the VA-API backend

Applied with `git apply -3`; every hunk landed clean against the local
patches already here, the only file with drift being `parser.rs`, whose
entry-point-offset and sub-layer fixes sit far from the new builders.
The c2_wrapper commit is left out (nothing here uses it) and so is the
Cargo uprev (this tree is path-patched).

Upstream's own tests for the new code pass in the source checkout: 22 in
`codec::h265`, 4 in `codec::h264::nalu_writer`. They cannot run in
`vendor/` because the published crate ships no `src/**/test_data`.

2026-08-09

🎉 feat: MVP decode pipeline — mp4 → H.264 → gpui previewAhmet Kaan Gümüş · 0acbf8d
🎉 feat: MVP decode pipeline — mp4 → H.264 → gpui preview

- engine: mp4 demux → Annex-B, rusty_h264 software decode, BT.601
  I420→BGRA; decode on worker thread behind a bounded channel
- engine-hw: optional VA-API decode plugin (cros-codecs) behind a
  C ABI, dlopen'd at runtime with silent software fallback; the app
  binary keeps zero libva/gbm/drm linkage so it runs on any distro
- app: gpui window, per-frame RenderImage swap + drop_image
- vendor/: cros-libva + cros-codecs with 3 LOCAL PATCH fixes (libva
  1.23 struct init, radeonsi 64x64 min context, pub surface()) —
  upstream is dormant, so vendor/ is adopted code, not a temp fork
- fixtures are gitignored; scripts/gen_fixtures.sh regenerates them