# libde265 Main10 browser decoder — test09 Upstream: https://github.com/strukturag/libde265, v1.0.15, commit `17bb8d9fcea62db8cdeb0fc7ef8d15dbd19a22e4`. The unmodified upstream source is in [libde265-1.0.15-source.tar.gz](./libde265-1.0.15-source.tar.gz); SHA-256 `3b9fb6e7c51e543c4715254e19b12b73526800a14b73cdb9474c420a75c1a95d`. License: LGPL-3.0-or-later, see [COPYING](./COPYING) and the archive's license texts. The lab's [adapter.c](./adapter.c) exposes incremental Main10 4:2:0 decode, preserving libde265's picture PTS. It peeks/copies/releases each picture once, supports end-of-stream draining, checks plane geometry/depth/strides and bounds its decode loop. The JS adapter in `../../src/libde265-wasm.js` compares the returned picture PTS against the MP4 presentation timeline, checks frame counts and owns a copy of each frame. Rebuild using Emscripten 3.1.74, CMake, make and Python 3: ```sh # First activate your Emscripten 3.1.74 environment. sh build-decoder.sh /absolute/new-build-dir /absolute/output-dir ``` [build-decoder.sh](./build-decoder.sh) contains the complete configuration and link command. SIMD (`-O3 -msimd128`), no threads/native assembly, 256 MiB initial growable memory, 8 MiB stack, WASM_BIGINT, ASSERTIONS=2, STACK_OVERFLOW_CHECK=2. The stack size is necessary for this decoder. Generated files remain replaceable as separate `.mjs` and `.wasm` assets; the script permits relinking a modified library or adapter. No DRM or signature check restricts replacement.