spdl.io.decode_image_nvjpeg¶
- decode_image_nvjpeg(src: str | bytes | Sequence[bytes], *, device_config: CUDAConfig | None = None, scale_width: int = -1, scale_height: int = -1, pix_fmt: str = 'rgb', _zero_clear: bool = False) CUDABuffer[source]¶
[Experimental] Decode image with nvJPEG.
Warning
This API is exmperimental. The performance is not probed, and the specification might change.
Note
Unlike FFmpeg-based decoding, nvJPEG returns GPU buffer directly.
- Parameters:
- Returns:
A CUDABuffer object. Shape is
[C==3, H, W].