Skip to main content

Crate j2k_cuda

Crate j2k_cuda 

Source
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.
CudaBatchDecodeResult
CUDA batch successes plus indexed codec preflight failures.
CudaBatchDecoder
Persistent CUDA batch decoder that reuses one CudaSession.
CudaBatchGroup
One successful homogeneous CUDA-resident output group.
CudaBatchGroupError
Failure while executing one homogeneous CUDA group.
CudaDecodePoolDiagnostics
Diagnostics for the two private pools retained by one CUDA codec session.
CudaDecodePoolSnapshot
Stable retention snapshot for one internal CUDA decode buffer pool.
CudaEncodeStageAccelerator
CUDA implementation of selected JPEG 2000 encode stages.
CudaEncodeStageTimings
Cumulative CUDA encode-stage timings collected by CudaEncodeStageAccelerator.
CudaEncodedJ2k
CUDA lossless encode output with host metadata and CUDA-resident codestream bytes.
CudaEncodedJ2kMetadata
Host-visible metadata for a CUDA-resident encoded J2K codestream.
CudaExternalBatchGroup
Metadata for a homogeneous group decoded directly into caller-owned CUDA storage.
CudaLosslessEncodeResidency
Residency decisions used by a lossless CUDA device-buffer encode.
CudaLosslessEncodeResult
Opaque result from CudaLosslessEncoder.
CudaLosslessEncodeTile
CUDA-resident lossless J2K/HTJ2K encode input tile.
CudaLosslessEncoder
Reusable CUDA-aware lossless JPEG 2000 encoder.
CudaResidentBatchBuffer
One codec-owned dense CUDA allocation containing a homogeneous batch.
CudaResidentCodestreamBuffer
CUDA-resident copy of codestream bytes returned by a CUDA lossless encode.
CudaSession
Mutable CUDA adapter session reused across submissions.
CudaSessionDiagnostics
Combined runtime work counters and retained decode-pool state for one session.
CudaSurface
Borrowed view of a CUDA-resident surface.
J2kContext
Reusable JPEG 2000 decode context and cache state.
J2kDecoder
CUDA-facing JPEG 2000 decoder wrapper.
J2kScratchPool
Caller-owned reusable scratch for j2k.
NativeBackendError
Opaque, CUDA-adapter-owned source for native decoder failures.
SubmittedCudaExternalBatch
Asynchronously submitted CUDA external-destination batch.
SubmittedCudaResidentBatch
Asynchronously submitted codec-owned CUDA resident batch.
SubmittedJ2kLosslessCudaEncode
Submitted single-tile CUDA lossless encode.
SubmittedJ2kLosslessCudaEncodeBatch
Submitted multi-tile CUDA lossless encode.
Surface
Host- or CUDA-backed decoded surface.

Enums§

CudaBatchError
Failure while preparing or executing an owned CUDA batch.
CudaEncodeFallbackReason
Reason an Auto lossless encode completed on the CPU.
CudaExternalBatchTryFinish
Result of a nonblocking attempt to retire an external CUDA batch.
Error
Error returned by the CUDA JPEG 2000 adapter.
SurfaceResidency
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.