This repository was archived by the owner on Nov 22, 2026. It is now read-only.
Repository navigation
mojo-imkit v0.10.0
Released: 2026-11-10 · Commit: tag v0.10.0 · Previous: v0.9.0
What it does
An immediate-mode GUI for Mojo apps, drawn by one GPU compose kernel over the app frame. System SDL3 presents the window and FreeType builds the glyph atlas.
Highlights
- AVIF stills decode in pure Mojo:
image_decodeandpacknow take PNG, JPEG, WebP and AVIF. - The decoded YUV planes equal dav1d / avifdec sample for sample on 32 fixtures: 8, 10 and 12 bit, 4:2:0, 4:2:2, 4:4:4 and
monochrome, alpha, superres, film grain, intra block copy, palette, all intra tools and all three loop filters. avif_decode(bytes)returns RGBA in the same layout as the other decoders.
Changes
Added
imkit.avifrgb.avif_decode: AVIF to 8-bit RGBA (matrix and range from the file, bilinear chroma, alpha item).- AV1 intra decoder modules:
av1obu(OBU headers),av1sym(symbol decoder),av1tab(every spec table, generated from the
spec text bytools/av1_tables.mojo),av1tile/av1coef(tile syntax),av1recon,av1ipred,av1intrabc,av1lf,
av1cdef,av1lr,av1grain,av1dec.decode_frame(YUV planes);avifseq.avis_info(image sequence timing). - CI runs the AVIF gates on the runner; 32 AVIF / OBU fixtures committed (232 KB, our own encodes).
Changed
image_decodepicks AVIF by its ISO BMFFftypbox.
Verified
| Check | Result |
|---|---|
scripts/ci.sh (local, merged main) |
PASS, AVIF step included |
tests/avif_yuv_test.sh |
PASS: YUV planes equal avifdec / dav1d on every fixture |
tests/avif_yuv_mutants.sh |
15 of 18 mutants killed; 3 reached by no fixture (MV clamp border, sgr xqd clip, CFL MaxLumaW) |
tests/av1tile_test.sh |
PASS 40 tiles (each tile's symbol decoder ends exactly at its end), 18/18 mutants |
tests/avif_rgba_test.sh |
PASS 26 files: exact for 4:4:4 / mono / lossless / identity, within 2 levels at 8 bit, 3 at 10-12 bit; 8/8 mutants |
tests/av1sym_test.sh, avif_obu.sh, avif_container.sh, avif_seq_test.sh |
PASS (10/10, -, -, 6/6 mutants) |
| CI on GitHub (Ubuntu runner) | UNVERIFIED until the push: the runner's avifdec / dav1d versions make the references |
Known limits
- Inter frames are not decoded: an animated AVIF's first frame decodes, later frames raise;
avis_inforeads its timing. - RGBA is not bit-exact with avifdec for subsampled or high bit depth files (float conversion vs libyuv fixed point).
- Speed is untuned: 1280x720 4:4:4 in 0.12 s, 56 MB peak RSS (one run).
Upgrade / run
None: same build line. AVIF CI needs libavif-bin, dav1d and ffmpeg on the runner (the workflow installs them).
Commits
a7b256fdocs: AVIF in the README, the API reference and the shipped skille8d8a84fix(avif): avif_decode refuses more than 64 M pixels before decoding9ce33ddfeat(avif): avif_decode to 8-bit RGBA, and image_decode takes AVIFe1291c1ci: AVIF gates on the runner, fixtures committeda9889a8docs(avif): report 4:2:2, superres and coverage follow-upde98349test(avif): superres, 4:2:2 and delta_lf fixtures in the gates; a missing reference fails the mutant run7896cf2feat(avif): superres decode (upscaling 7.16, LR on the upscaled frame), pixel-exactaf49aecfeat(avif): 4:2:2 decode, pixel-exact on 8 and 10 bit fixtures1fe1aebdocs(avif): lane A report with gates, coverage, gaps and bytesad2f437docs(rules): lane A mistakes that cost a round8e36a60test(avif): pixel gate proves itself: 11 mutants killed, 3 no fixture reaches (listed), screen.avif added (2005 intrabc blocks)6084aaafeat(avif): stage 8, image sequence timing and sample table equal to avifdec --info16cc910test(avif): pixel gate covers alpha plane, real 4:2:0, 10/12 bit, 128 superblocks, LR, odd size, reduced tx sete165fdfdocs(avif): lane B report (recon and intra prediction)60a66c1docs(rules): lane B recon and intra mistakes6ee6eaafeat(avif): av1ipred intra, palette and chroma-from-luma prediction (7.11), gated9aafb2dtest(avif): stage 4 gate proves itself: 18 mutants of av1coef/av1tile/av1state/CDF tables all fail it3360ae1docs(avif): lane C report8c9e6a4docs(rules): lane C mistakes that cost a roundef0f992feat(avif): film grain params parser (5.9.30) and synthesis (7.18.3)9240874feat(avif): stage 4 tile parse rewritten against the spec: residual, intrabc MV stack, LR units, palette, var-tx576454ffeat(avif): AV1 loop restoration (spec 7.17) with oracle-pinned checksc576adffeat(avif): av1recon dequant and inverse transforms (7.12, 7.13), gated89e4f64feat(avif): AV1 CDEF (spec 7.15) with oracle-pinned checks1df50b6docs(rules): lane worktrees get skills linked and loaded before work788887dfeat(avif): AV1 deblocking loop filter (spec 7.14) with hand-computed checks1330708test(bench): scripts/bench.sh runs uibench 3 times30ba81ctest(avif): decode-to-planes gate against avifdec / dav1d y4m, written before the decoder63ece0dfeat(avif): av1frame planes shared by reconstruction, filters and outputd301a5ffeat(avif): generate the spec's numeric tables for reconstruction and filtersa3b74aefeat(avif): keep LoopRestorationSize and the remapped FrameRestorationTypeb46736bfeat(avif): generate the 32 coefficient scan tables too; av1cdf -> av1tab4cbc21dtest(avif): stage 4 tile-parse gate, written before the draftbdbc866feat(avif): default CDF tables from the AV1 spec, generated in the decoder's stored form35fb312fix(avif): six stage 2 header parse bugs, gate covers what the tile parser reads75976fcdocs(avif): lane status report, stages 1 to 3d53ecdftest(avif): stage 3 symbol decoder round-trip gate with mutants73fc046feat(avif): stage 2, AV1 OBU headers (DeepSeek draft, fixed by hand)4457c96test(avif): stage 2 OBU header gate against ffmpeg trace_headers34e803afeat(avif): stage 1, HEIF container parser (DeepSeek draft, fixed by hand)e576df0test(webp): commit the two filtered-alpha fixtures; libwebp versions pick filters differently52959d7test(webp): deterministic alpha-filter fixtures (ramps, not seeded plasma)f612cefci: run style, jpeg and webp suites; workflow installs imagemagick and libwebp7 (test oracles)2072717release: v0.9.0, JPEG and WebP decoders, 30 styles with assets, new widgets, contrast gateb995b3bdocs(readme): amarbaro and built-in shots, eight generated styles, WebP and styles modulese412c05feat(assets): amarbaro style background and icons (style-assets PASS, 30 styles)d8436c9docs(api): new widgets, amarbaro and generated themes, contrast, WebP78fa013feat: amarbaro themes, heading/caption/badge/kv/separator, 6 font sizes, visible controls21df275test(avif): stage 1 container gate against avifdec --info915d7c0docs(reports): webp lane report with fixture numbers, mutants and memoryee072ccdocs(rules): webp lane mistakesc534c5afeat(webp): lossy VP8 key frames and the ALPH chunk, bit exact against libwebp45b7228docs(jpeg): api, README row, rules, lane report961c027test(jpeg): bit-exact bar and a fuzz run2649441feat(assets): image_decode picks JPEG or PNG by signature, pack uses it7db7c88perf(jpeg): baseline blocks are transformed as they are decoded7603983feat(jpeg): pure Mojo baseline and progressive JPEG decodera91728dfeat(webp): pure Mojo VP8L lossless decoder with libwebp-oracle fixtures80179f5fix(gallery): preset buttons share the row equally24367b7fix(gallery): style button on its own row inside the panelc8c8a90feat(assets): 29 style backgrounds and 232 icons4307fb4feat(assets): style-assets.sh packs per-style backgrounds and icon atlasesad63dd5feat(styles): 29 theme presets measured from ComfyUI style swatchese263d25docs(rules): gpu-wait jobs get PATH and HOME passed explicitly5b978b9docs(plans): 28 style themes and assets from the ComfyUI stock styles26be1abdocs(readme): gallery screenshots in the three presets5a4432bchore(gallery): submit the render as a shared 2 GB GPU job495cf83fix(ci): resolve the CJK fallback font per distroca2e844docs(rules): bump pyproject version with every release