libswscale is the FFmpeg component responsible for image resizing and pixel-format conversion. Callers reach it through a stable C API, so this task is about reproducing both the library interface and the resulting image behavior.
The reference build used in the task is FFmpeg's scalar C path rather than its assembly-optimized variants, which keeps the comparison on a from-scratch rewrite instead of architecture-specific hand tuning that already exists upstream.
Starting from FFmpeg's libswscale reference (compiled without assembly optimizations), the agent must rebuild it as a C-compatible shared library in Zig or Rust. That includes both image scaling and pixel-format conversion, with enough fidelity that callers can treat the submission as a drop-in replacement.
The hidden verifier first runs correctness workloads covering format conversion and image scaling. Only submissions that clear per-plane PSNR thresholds are eligible for the benchmark phase. If any correctness workload fails, the score is zero; otherwise the verifier takes a geometric mean of hidden benchmark speedups against FFmpeg's scalar C baseline.
The task runs on CPUs only with 8 CPUs, 64 GB RAM, no GPUs, and no internet access. The reference library is compiled without assembly so the baseline is fair to a from-scratch rewrite rather than a duel against FFmpeg's most architecture-specific hand tuning.