Commits
Commits on
978e6857d64772912559c8d8a4e6ee7cd309bdccFiltered to vendor/cros-codecs/src/decoder/stateless/h264.rsClear filter2026-08-13
🐛 fix(decode): a seek into an open GOP is hardware's to finishAhmet Kaan Gümüş · 7652ada
🐛 fix(decode): a seek into an open GOP is hardware's to finish A Blu-ray remux codes its GOPs open: the I picture that opens one is stored ahead of the leading pictures that are *shown* before it, and those reference the GOP before. Restart decoding at that random access point -- which is what every seek, scrub and clip boundary does -- and the leading pictures have references nobody decoded, so the plugin failed its first frame, playback fell back to `rusty_h264`, and that decoder died on the file's I_PCM macroblocks. Seventeen of twenty scrub steps on a 5.27 GB AVC remux ended with no picture at all, and the three that survived cost 482 ms each in software. The pictures are not ours to show, so they are dropped and the decode walks on (bounded by `LEADING_LIMIT`, and only for a session that was positioned somewhere other than the file's own start). The refusal that the tolerance would otherwise swallow is kept at both ends: a stream read from frame 0 is still refused the moment its first picture will not decode, and the plugin probe now counts an immediate end of stream as a refusal rather than a pass -- a session that hands back no picture is the black-frame-and-instant-eof the probe exists to catch. The vendored H.264 decoder's own refusal goes with it: it failed a `frame_num` gap outright unless the stream declared gaps allowed, which is exactly the wrong reading here -- the gap is the editor's, made by starting in the middle of a film, and §8.2.5.2's non-existing frames are what stands in for it. The loop that builds them was already there, behind that flag. Twenty of twenty scrub steps on the remux now decode in hardware, 77 ms median against 482 ms; `seek_matches_linear_every_container` holds for every container, and `dump_frame <file> <n> <out> seek` is what a picture reached by a seek can be compared with the same picture reached by decoding from the start.
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