| # | 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 | Claude Sonnet 5.5 | 0.2582 ±0.255 | 1,336 | 636.5M | 3.0M | $166.36 | 15.1h |
| 3 | Claude Opus 5 | 0.2358 ±0.036 | 1,374 | 650.0M | 2.3M | $413.18 | 16.8h |
| 4 | Claude Opus 5.5 | 0.2259 ±0.350 | 972 | 448.7M | 1.9M | $140.84 | 10.4h |
| 5 | Claude Fable 5 | 0.2227 ±0.072 | 970 | 455.9M | 1.5M | $567.04 | 18.7h |
| 6 | GPT-6 Astra | 0.1936 ±0.057 | 395 | 128.5M | 348k | $265.38 | 2.6h |
| 7 | Claude Haiku 5.5 | 0.1399 ±0.102 | 837 | 360.5M | 1.9M | $23.45 | 7.4h |
| 8 | GLM-5.3 | 0.1309 ±0.035 | 1,449 | 618.7M | 1.7M | $173.60 | 16.0h |
| 9 | Muse Spark 1.3 | 0.1017 ±0.018 | 901 | 390.3M | 711k | $312.33 | 12.0h |
| 10 | GLM-5.3 Flash | 0.0822 ±0.026 | 911 | 372.4M | 1.1M | $13.05 | 12.8h |
| 11 | Kimi K3 | 0.0790 ±0.052 | 1,044 | 437.6M | 1.2M | $155.23 | 17.2h |
| 12 | Grok 4.7 | 0.0495 ±0.028 | 1,777 | 463.4M | 1.6M | $459.71 | 8.5h |
| 13 | DeepSeek V4 Flash Vision Exp | 0.0478 ±0.028 | 1,399 | 618.9M | 1.2M | $10.62 | 7.3h |
| 14 | Gemini 4 Argon | 0.0314 ±0.070 | 602 | 261.6M | 1.4M | $134.63* | 8.7h |
| 15 | Qwen3.8-Max | 0.0122 ±0.016 | 494 | 165.8M | 2.3M | $56.27 | 18.8h |
| 16 | Gemini 3.8 Flash | 0.0084 ±0.019 | 690 | 248.8M | 583k | $23.78 | 3.0h |
| 17 | Grok 4.6 | 0.0072 ±0.016 | 1,482 | 417.5M | 1.6M | $424.47 | 11.9h |
| 18 | Gemini 3.7 Flash | 0.0031 ±0.005 | 580 | 192.7M | 881k | $25.55 | 3.5h |
| 19 | GPT-5.6 Sol | 0.0000 ±0.000 | 374 | 98.4M | 204k | $92.64 | 2.6h |
| 20 | Inkling | 0.0000 ±0.000 | 215 | 19.4M | 41k | $18.61 | 0.6h |
| 21 | Muse Spark 1.2 | 0.0000 ±0.000 | 312 | 120.6M | 519k | $21.59 | 1.7h |
| 22 | Qwen3.8-Max-0902 | 0.0000 ±0.000 | 368 | 109.6M | 3.4M | $50.24 | 19.9h |
*Gemini 4 Argon: Cache hit rate is much lower due to a non-production setting.
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.