Skip to main content

Crate j2k_core

Crate j2k_core 

Source
Expand description

Shared traits and value types for the j2k workspace.

Codec crates use this crate to expose common pixel formats, decode outcomes, row sinks, caller-owned scratch pools, and CPU/GPU backend selection contracts without depending on each other.

Re-exports§

pub use accelerator::AcceleratorSession;
pub use accelerator::DeviceMemoryRange;
pub use accelerator::ExecutionStats;
pub use accelerator::SurfaceMetadata;
pub use accelerator::SurfaceResidency;

Modules§

accelerator
Shared accelerator runtime contracts.

Structs§

BackendCapabilities
Backend availability for a codec/runtime combination.
CacheStats
Cache hit/miss counters reported by codec contexts.
CodedUnitLayout
Regular coded-unit grid layout for formats with independently coded units.
CpuFeatures
CPU SIMD feature flags detected for the current host.
DecodeOutcome
Successful decode metadata plus non-fatal warnings.
DecoderContext
Wrapper that owns codec context state for repeated decode calls.
Info
Basic image metadata returned by inspect/parse operations.
NotImplemented
Error for a valid request that is not implemented yet.
PassthroughCandidate
A borrowed compressed frame/tile that may be copied unchanged.
PassthroughRequirements
Destination requirements for copying compressed bytes unchanged.
Rect
Rectangle in source pixel coordinates.
TileBatchError
Error returned by tile batches, annotated with the failing input index.
TileBatchOptions
Worker configuration for CPU tile batches.
TileDecodeJob
One full-tile decode request.
TileLayout
Regular tile grid layout for a compressed image.
TileRegionDecodeJob
One region tile decode request.
TileRegionScaledDecodeJob
One region+scaled tile decode request.
TileRegionScaledDeviceDecodeRequest
One region+scaled tile device decode request.
TileScaledDecodeJob
One scaled tile decode request.
Unsupported
Error for input or options unsupported by the current codec.

Enums§

AdapterErrorKind
Backend-adapter-local error classification.
BackendKind
Runtime backend that executes codec work.
BackendRequest
Caller preference for backend selection.
BatchDecodeError
Error returned by a fallible batch boundary.
BatchInfrastructureError
Failure in batch scheduling, allocation, or worker-result collection.
BufferError
Buffer validation and copy errors.
Colorspace
Color interpretation of decoded samples.
CompressedPayloadKind
Encapsulation shape of the compressed bytes.
CompressedTransferSyntax
Compressed syntax carried by a source frame or accepted by a destination.
DecodeRowsError
Error wrapper used by row-streaming decode when either the codec or the caller-provided row sink can fail.
Downscale
Power-of-two downscale requested during decode.
InputError
Generic malformed or truncated input errors.
PassthroughDecision
Result of a passthrough eligibility check.
PassthroughRejectReason
First reason a compressed payload was rejected for byte-preserving copy.
PixelFormat
Concrete interleaved pixel format.
PixelLayout
Channel layout independent of sample width.
SampleType
Integer sample width used by a pixel format or row sink.

Constants§

DEFAULT_MAX_HOST_ALLOCATION_BYTES
Default cap for host-side codec-owned allocations.

Traits§

AdapterErrorParts
Variant mapping supplied by GPU adapter error enums.
CodecContext
Reusable codec state cached across decode calls.
CodecError
Shared error classification used by facade traits.
DeviceSubmission
Submitted device decode operation that can be waited on for completion.
DeviceSurface
Decoded image data resident on a specific backend.
ImageCodec
Common associated types shared by image codecs.
ImageDecode
Borrowed-image decode API for codecs that parse compressed bytes directly.
ImageDecodeDevice
Synchronous device-output decode API.
ImageDecodeRows
Row-streaming decode API for large images or stripe-oriented callers.
ImageDecodeSubmit
Decode API for implementations that can submit work to a device backend.
RowSink
Destination for row-streaming decode output.
Sample
Supported integer sample type for row-oriented APIs.
ScratchPool
Caller-owned reusable scratch allocations for codec implementations.
TileBatchDecode
Stateless tile-batch decode helpers that reuse caller-owned context.
TileBatchDecodeDevice
Tile-batch helpers that return synchronous device surfaces.
TileBatchDecodeManyDevice
Full-tile batch helpers that decode many independent tiles to device surfaces.
TileBatchDecodeSubmit
Tile-batch helpers that queue device submissions.
TileDecompress
Tile payload decompression API for container codecs such as Deflate, Zstd, LZW, and uncompressed data.