| # | Model | Score | Steps | In tok | Out tok | Avg cost | Avg time |
|---|---|---|---|---|---|---|---|
| 1 | Claude Fable 5.1 | 0.4013 ±0.328 | 857 | 366.7M | 1.3M | $214.08 | 9.9h |
| 2 | GLM-5.3 | 0.1309 ±0.035 | 1,449 | 618.7M | 1.7M | $173.60 | 16.0h |
| 3 | Kimi K3 | 0.0790 ±0.052 | 1,044 | 437.6M | 1.2M | $155.23 | 19.0h |
| 4 | DeepSeek V4 Flash Exp | 0.0478 ±0.028 | 1,399 | 618.9M | 1.2M | $10.62 | 7.3h |
| 5 | Qwen3.8-Max | 0.0122 ±0.016 | 494 | 165.8M | 2.3M | $56.27 | 18.8h |
| 6 | Grok 4.6 | 0.0072 ±0.016 | 1,482 | 417.5M | 1.6M | $424.47 | 11.9h |
| 7 | Gemini 3.7 Flash | 0.0031 ±0.005 | 580 | 192.7M | 881k | $25.55 | 3.5h |
| 8 | GPT-5.6 | 0.0000 ±0.000 | 374 | 98.4M | 204k | $92.64 | 2.6h |
| 9 | Inkling | 0.0000 ±0.000 | 215 | 19.4M | 41k | $18.61 | 0.6h |
| 10 | Muse Spark 1.2 | 0.0000 ±0.000 | 312 | 120.6M | 519k | $21.59 | 1.7h |
libswscale is FFmpeg's image scaling and pixel-format conversion library: the code that turns YUV into RGB, packs and unpacks planes, and resamples frames, in some of the hottest loops in video processing. Re-implementing it means reproducing the numerics of decades-old scalar C (coefficient tables, rounding, chroma subsampling) closely enough to pass per-plane PSNR bars, across dozens of format pairs and three scaling algorithms, and then making it substantially faster.
The rewrite must be genuinely new work: it is written in Zig behind a small custom C ABI, FFmpeg's own code cannot be wrapped, linked, loaded, or embedded, and inline assembly is banned; the speed has to come from portable SIMD (Zig's @Vector) and better algorithms, not from recalling or repackaging the original.
Build libswscale_candidate.so from the sources in /app/swscale-impl/, exporting the three C-linkage functions in /app/swscale_api.h (swscale_create / swscale_process / swscale_destroy), covering ten pixel formats and three scaling algorithms.
/app/perf-check; the goal is beating the reference's per-workload numbers.dlopen/dlsym, and no FFmpeg code in any form; target x86-64-v3 (AVX2, FMA, BMI2) and no higher, since the measurement simulator has no AVX-512./app/swscale-impl/.A Zig starter scaffold at /app/scaffold/zig/ that already exports the three functions, the ABI header, and /app/libswscale_public_baseline.so: FFmpeg's scalar swscale (built with --disable-asm) behind the same ABI, the reference the output is compared against and whose work is being beaten. /app/perf-check rebuilds, compares output against the unmodified reference, and measures (--contract for the full 58-conversion sweep, --quick to skip measurement, or a named workload); reference numbers are baked in /app/baseline-work.json. The /app/driver C program that loads and exercises a library is usable under gdb/perf, the measurement stack is readable at /app/performance/, and FFmpeg's libswscale/libavutil C sources are at /reference/ffmpeg-src/ for study. The driver synthesizes deterministic source pixels, so there are no image files and every run sees the same input. The machine is offline.
A clean-room verifier, separate from the agent's environment, first strips every FFmpeg source and archive from the container, rebuilds the submission from source as a non-root user, and runs the full 58-conversion contract plus ten hidden held-out benchmark workloads: the same conversion families and size classes as the public set, at dimensions and format pairs the agent has not seen. Speed is not wall-clock: each workload's work is measured by callgrind-based per-opcode instruction pricing (a deterministic cost model derived from uops.info throughput data), so the score is independent of host speed.
2**u - 1 where u scales the geometric-mean work reduction across held-out workloads, reaching full credit at 20x; matching the baseline or regressing scores zero.| Base image | ubuntu:24.04 |
| Tools available | Zig, FFmpeg n7.1 sources and compiled scalar baseline, C/C++ toolchain, Python 3 |
| Compute | 8 CPUs · 32 GB RAM |
| Time limit | 20h |
This task is an improved revision of FFmpeg libswscale Re-implementation from FrontierSWE V1.
@Vector the portable-SIMD surface under test, with an explicit x86-64-v3 ceiling.perf-check --contract, with held-out sizes still hidden; V1 checked hidden workloads against the same PSNR bars without a visible contract list./app; the V2 scorer never imports agent code.libswscale/libavutil/compat source subtrees at tag n7.1, cloned at image build (nothing vendored) and baked read-only at /reference/ffmpeg-src/, plus a --disable-asm scalar build wrapped by a task-authored shim into the baseline shared library. No FFmpeg code reaches the driver, measurement, scaffolds, or verifier.