forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 7f487c10e98d32efa4e4b554b778d2eea5d16efdFiltered to vendor/cros-codecs/src/backend/vaapi/decoder.rsClear filter

2026-08-12

🐛 fix(decode): a film's grain is synthesized into a surface of its ownAhmet Kaan Gümüş · c52b667
🐛 fix(decode): a film's grain is synthesized into a surface of its own

An AV1 frame with `apply_grain` set is *displayed* from a second surface:
the driver writes the reconstructed picture into the render target, which
later frames reference, and the grain-synthesized one into a target the
decoder has to hand it. The vendored backend handed it none -- it passed
`VA_INVALID_SURFACE` as `current_display_picture` while still asking, in
the very same buffer, for the grain -- and radeonsi refuses that picture
outright: `vaEndPicture` answers VA_STATUS_ERROR_INVALID_SURFACE.

That is what killed the only AV1 film in the library at frame 49, its
first picture with grain; 1337 of the first 1504 have it, so AV1 playback
on real media had never worked. Every fixture that said otherwise was
grainless, which is why `test_av1_grain.mkv` is now beside them and why
its test decodes all ninety frames and then asks whether the grain
actually reached the picture -- turning `apply_grain` off would make the
decode succeed too, and would silently strip the film of its texture.

A grainy picture costs two pool frames rather than one, so a sequence
whose header admits grain gets a pool of twice the size; one that does
not is left exactly as it was, as are H.264, HEVC and VP9, which have no
such surface and read back the reconstructed one as always.

2026-08-10

✨ feat(import): a Matroska film opens, its 10-bit picture and its 5.1 sound alikeAhmet Kaan Gümüş · b083a3b
✨ feat(import): a Matroska film opens, its 10-bit picture and its 5.1 sound alike

mkv HEVC demux (Main/Main10), a P010 pool in the hardware path read back to
I420, mkv audio through symphonia's Matroska reader with rusty_aac decoding
what symphonia's own AAC refuses (anything wider than stereo), and a BS.775
fold of 5.1 down to the stereo the output device takes.

vendor/rusty_aac is 0.5.0 with one local patch: its decoder's IMDCT caches the
cosine matrix instead of calling cos() per term, 11x faster and the difference
between playable and not.

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