Repository navigation
emberwave v0.4.0
emberwave encodes: an encoder on the CPU and on the GPU whose streams upstream's decoder reads, at upstream's PSNR or above for the same bytes. On an Apple M3 Max the GPU encodes a 4K frame in about 4 ms, the CPU in about 240 ms.
Added
- An encoder on the CPU (#14):
emberwave_core::encode::Encoderturns 8-bit pictures into frames within a byte budget, andemberwave-cli encodeturns a Y4M video into a PWV1 file. Upstream's decoder reads its streams; at the same bytes its PSNR is upstream's encoder's or higher. It makes the same bytes on every system. - Writers for the formats the parsers read:
BlockHeader::to_words,SequenceHeader::start_of_frame_wordsandstream_words, andPwv1Header::to_bytes. - Test vectors of the encoder in
testdata/encoder/, with upstream's decode of them, andscripts/gen_encoder_vectors.shto make them.refgen encodecan write its pictures (--source) and encode a Y4M file (--input). - An encoder on the GPU (#14):
gpu::Encoderruns the CPU encoder's steps as compute shaders, the forward transform, quantisation, rate control and packing, with one upload and one read-back per frame. Its frames are the CPU encoder's, or differ in some blocks where the GPU rounds a coefficient differently, at the same PSNR; on an Apple M3 Max the committed vectors come out byte for byte, and a 4K frame takes about 4 ms.emberwave-cli encode --gpuuses it, with--backendand--softwareas for decoding.
Changed
emberwave-cli's Y4M reader keeps the range, the chroma siting and the frame rate of the header, readsC420paldvas chroma on the left, and reads a file a frame at a time where that is enough.GpuErrorhas a new variant,Encode, for the GPU encoder's refusals; amatchover every variant needs an arm for it.emberwave-cli encodeends with the mean, median and 99th percentile of the time per frame instead of the mean alone.