Skip to main content

Crate vtsampler

Crate vtsampler 

Source
Expand description

Cross-platform GPU video format conversion and scaling (wgpu compute).

Public API: one VTImage in, one VTImage out via VTSampler::process or VTSampler::encode. CPU pixels and render-target textures are handled internally with a scratch pool to avoid extra copies when GPU usages already match.

Re-exports§

pub use bridge::BridgeError;
pub use wgpu;

Modules§

bridge
Platform texture bridges (D3D11 / CVPixelBuffer+Metal → wgpu).

Structs§

PipelineKey
VTImage
User-facing “one image” (format + size + backing).
VTImageOwned
GPU image allocated by crate::VTSampler::allocate.
VTProcessOptions
VTSampler
GPU video convert + scale engine (one input image → one output image per call).
VTSamplerBuilder
Builds a VTSampler on a shared or external GPU device.

Enums§

PixelData
CPU-side pixel payload referenced by crate::VTImage.
VTColorSpace
YUV/RGB matrix selection for conversion shaders.
VTFormat
Logical pixel format for conversion and scaling.
VTSampleError
Errors surfaced by the conversion pipeline.
VTScaleFilter
Filtering used when input and output dimensions differ.
VTTextureRole
Describes how a GPU texture participates in a process pass.