Skip to content

emberwave v0.5.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 23:31
· 78 commits to main since this release
e8d5742

The GPU encoder overtakes upstream's: on an Apple M3 Max it encodes a 4K frame in about 1.9 ms, against 3.4 ms for upstream's encoder at the same precision, and bench-encode measures both. Making a decoder or an encoder on a lost device, and making contexts on several threads with some Linux Vulkan loaders, no longer crash.

Added

  • Encoder benchmarks (#29): emberwave-cli bench-encode times an encoder on the frames of a Y4M video, in the way bench times the decoder, and Encoder::encode_timed returns EncodeTimings with the GPU time of each stage. refgen bench-encode times upstream's encoder the same way, at both of its precisions, and scripts/bench.sh puts them in BENCHMARKS.md, with the pictures from scripts/gen_bench_data.sh --sources.

Changed

  • The GPU encoder is faster (decision D30): on an Apple M3 Max a 4K frame encodes in about 1.9 ms instead of about 3.5 ms, against 3.4 ms for upstream's encoder at the same precision. The planes go through an upload buffer the encoder keeps from frame to frame, 12 MB of GPU memory at 4K that the old path allocated anew for every frame, and the quantisation adds each subblock's errors in registers. The CPU encoder adds its errors in the same grouping; its streams are the same as before.

Fixed

  • Decoder::time_frame sometimes reported the previous frame's time for its last stages, or none at all, on Metal: the timestamps were resolved in the frame's command buffer, before the GPU had written them. They are now resolved once the frame is done, in a submission of their own, which gpu_wall does not include.
  • gpu::Decoder::new and gpu::Encoder::new panicked inside wgpu when the context's device had been lost, a destroyed device for one (#35). They now return an error, GpuError::DeviceLost as decoding and encoding do, and emberwave_decoder_create in the C API returns EMBERWAVE_STATUS_DEVICE_LOST rather than EMBERWAVE_STATUS_INTERNAL.
  • On Linux with a Vulkan loader from 1.3.284 to 1.4.344, such as Debian 13's or Ubuntu 26.04's, creating contexts on several threads at once could crash the process inside the loader (#36). GpuContext::new and emberwave_context_create now create one context at a time (decision D31).