Expand description
CUDA-facing device-output adapter for j2k.
This crate intentionally exposes the same backend-selection surface as the Metal adapter. CPU and auto requests return host-backed surfaces. Strict CUDA requests are reserved for CUDA-resident HTJ2K codestream decode and CUDA-resident HTJ2K encode inputs; the CPU-decode-then-upload path is exposed through explicit CPU-staged APIs.
Structs§
- Codec
- Marker type implementing tile-batch CUDA surface decode traits.
- Cuda
Batch Decode Result - CUDA batch successes plus indexed codec preflight failures.
- Cuda
Batch Decoder - Persistent CUDA batch decoder that reuses one
CudaSession. - Cuda
Batch Group - One successful homogeneous CUDA-resident output group.
- Cuda
Batch Group Error - Failure while executing one homogeneous CUDA group.
- Cuda
Decode Pool Diagnostics - Diagnostics for the two private pools retained by one CUDA codec session.
- Cuda
Decode Pool Snapshot - Stable retention snapshot for one internal CUDA decode buffer pool.
- Cuda
Encode Stage Accelerator - CUDA implementation of selected JPEG 2000 encode stages.
- Cuda
Encode Stage Timings - Cumulative CUDA encode-stage timings collected by
CudaEncodeStageAccelerator. - Cuda
Encoded J2k - CUDA lossless encode output with host metadata and CUDA-resident codestream bytes.
- Cuda
Encoded J2kMetadata - Host-visible metadata for a CUDA-resident encoded J2K codestream.
- Cuda
External Batch Group - Metadata for a homogeneous group decoded directly into caller-owned CUDA storage.
- Cuda
Lossless Encode Residency - Residency decisions used by a lossless CUDA device-buffer encode.
- Cuda
Lossless Encode Result - Opaque result from
CudaLosslessEncoder. - Cuda
Lossless Encode Tile - CUDA-resident lossless J2K/HTJ2K encode input tile.
- Cuda
Lossless Encoder - Reusable CUDA-aware lossless JPEG 2000 encoder.
- Cuda
Resident Batch Buffer - One codec-owned dense CUDA allocation containing a homogeneous batch.
- Cuda
Resident Codestream Buffer - CUDA-resident copy of codestream bytes returned by a CUDA lossless encode.
- Cuda
Session - Mutable CUDA adapter session reused across submissions.
- Cuda
Session Diagnostics - Combined runtime work counters and retained decode-pool state for one session.
- Cuda
Surface - Borrowed view of a CUDA-resident surface.
- J2kContext
- Reusable JPEG 2000 decode context and cache state.
- J2kDecoder
- CUDA-facing JPEG 2000 decoder wrapper.
- J2kScratch
Pool - Caller-owned reusable scratch for
j2k. - Native
Backend Error - Opaque, CUDA-adapter-owned source for native decoder failures.
- Submitted
Cuda External Batch - Asynchronously submitted CUDA external-destination batch.
- Submitted
Cuda Resident Batch - Asynchronously submitted codec-owned CUDA resident batch.
- Submitted
J2kLossless Cuda Encode - Submitted single-tile CUDA lossless encode.
- Submitted
J2kLossless Cuda Encode Batch - Submitted multi-tile CUDA lossless encode.
- Surface
- Host- or CUDA-backed decoded surface.
Enums§
- Cuda
Batch Error - Failure while preparing or executing an owned CUDA batch.
- Cuda
Encode Fallback Reason - Reason an
Autolossless encode completed on the CPU. - Cuda
External Batch TryFinish - Result of a nonblocking attempt to retire an external CUDA batch.
- Error
- Error returned by the CUDA JPEG 2000 adapter.
- Surface
Residency - Residency of an accelerator-visible surface or buffer.
Functions§
- encode_
j2k_ lossless_ with_ cuda - Encode lossless JPEG 2000/HTJ2K samples through the CUDA encode-stage adapter.
- encode_
lossless_ from_ cuda_ buffer - Encode one CUDA-resident tile into host codestream bytes.
- encode_
lossless_ from_ cuda_ buffer_ to_ cuda_ buffer - Encode one CUDA-resident tile and return a CUDA-resident codestream copy.
- encode_
lossless_ from_ cuda_ buffers - Encode multiple CUDA-resident tiles into host codestream bytes.
- encode_
lossless_ from_ cuda_ buffers_ to_ cuda_ buffers - Encode multiple CUDA-resident tiles and return CUDA-resident codestream copies.
- submit_
lossless_ from_ cuda_ buffer - Submit one CUDA-resident tile encode for later host-byte collection.
- submit_
lossless_ from_ cuda_ buffers - Submit multiple CUDA-resident tile encodes for later host-byte collection.