Repository navigation
emberwave v0.5.0
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-encodetimes an encoder on the frames of a Y4M video, in the waybenchtimes the decoder, andEncoder::encode_timedreturnsEncodeTimingswith the GPU time of each stage.refgen bench-encodetimes upstream's encoder the same way, at both of its precisions, andscripts/bench.shputs them inBENCHMARKS.md, with the pictures fromscripts/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_framesometimes 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, whichgpu_walldoes not include.gpu::Decoder::newandgpu::Encoder::newpanicked inside wgpu when the context's device had been lost, a destroyed device for one (#35). They now return an error,GpuError::DeviceLostas decoding and encoding do, andemberwave_decoder_createin the C API returnsEMBERWAVE_STATUS_DEVICE_LOSTrather thanEMBERWAVE_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::newandemberwave_context_createnow create one context at a time (decision D31).