Repository navigation
emberwave v0.6.0
Encoding for hosts: the encoder in the C API, with planes at any row stride and packets for the network, and in Rust from pictures that are on the GPU already, such as a screen capture's.
Added
- An encoder in the C API (#42):
emberwave_encoder_create,_encode,_infoand_destroyencode planes with row strides into a frame in the caller's buffer, with the colour signalling ofEmberwaveSignalling, andemberwave_frame_packetssplits a frame into packets for a decoder (decision D33).examples/c/encode.cshows them in use. gpu::Encoder::encode_stridedencodes planes whose rows are a stride apart, and a stride below the width is the newEncodeError::PlaneStride.- Encoding pictures that are on the GPU already (#33):
gpu::Encoder::encode_texturestakes aTexturePicture, threeR8Unormtextures or NV12's layout of anR8Unormand anRg8Unormtexture, and makes the bytesencodemakes of the same picture in CPU memory, without the CPU writing the planes (decision D32). An unsuitable texture is the newGpuError::Texture.emberwave-cli bench-encode --gpu --texturestimes it.
Changed
GpuErrorhas a new variant,Texture, andEncodeErrorone,PlaneStride; amatchover every variant needs arms for them.- A context asks for the adapter's largest 2D textures, as it asks for its largest buffers, so that the textures of pictures to encode can be as large as the pictures; one limited to WebGPU's guarantees keeps 8192.