Skip to main content

Crate j2k_core

Crate j2k_core 

Source
Expand description

§j2k-core

Shared decode contracts and types for j2k.

This crate is the public j2k-core package name for the Signinum JPEG 2000 codec rename. It re-exports the current signinum-core API while the workspace moves to the shorter crate names.

Modules§

accelerator
Shared accelerator runtime contracts.
backend
Backend selection and capability discovery.
batch
Shared helpers for ordered tile-batch work.
context
Reusable codec context wrappers.
device
Shared device-output request policies.
error
Common error classifications and helper error types.
passthrough
Compressed-byte passthrough eligibility checks.
pixel
Pixel layout and format descriptors.
row_sink
Row-streaming output sink trait.
sample
Integer sample type descriptors.
scale
Decode downscale options.
scratch
Caller-owned scratch pool trait.
traits
Facade traits implemented by codec crates.
types
Shared metadata and geometry types.

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.
DecodeRequest
Source-region and reduced-resolution shape requested during decode.
DecoderContext
Wrapper that owns codec context state for repeated decode calls.
DeviceMemoryRange
Opaque byte range in accelerator-visible memory.
ExecutionStats
Execution counters reported by accelerator sessions and surfaces.
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.
ReadySubmission
Already-completed submission used by synchronous fallback paths.
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.
TileScaledDecodeJob
One scaled tile decode request.
Unsupported
Error for input or options unsupported by the current codec.

Enums§

BackendFailureKind
Backend failure class used before mapping into codec-specific errors.
BackendKind
Runtime backend that executes codec work.
BackendRequest
Caller preference for backend selection.
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.
SurfaceResidency
Residency of an accelerator-visible surface or buffer.
WarningKind
Broad warning category for non-fatal decode issues.

Constants§

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

Traits§

AcceleratorSession
Shared session contract for caller-owned accelerator runtime state.
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.
DeviceSubmitSession
Mutable device session that tracks submitted backend work.
DeviceSurface
Decoded image data resident on a specific backend.
GpuAbi
Marker trait for host-side values whose memory layout is part of a GPU ABI.
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.

Functions§

collect_indexed_batch_results
Restore successful indexed worker results to caller input order.
copy_tight_pixels_to_strided_output
Copy tightly packed pixel rows into a caller-provided strided output buffer.
ensure_allocation_within_cap
Returns len if it is at or below cap.
strided_output_len
Returns the number of bytes required for a strided image output buffer.
strided_output_len_capped
Returns the strided output byte length, rejecting requests over cap.
submit_ready_device
Record a device submission and wrap an immediate result as ready.
tile_batch_worker_count
Resolve the number of CPU workers for a tile batch.
validate_cuda_surface_backend_request
Validate a backend request for adapters that support CPU fallback and CUDA output.
validate_strided_output_buffer
Validates that out_len and stride can hold an image output.

Type Aliases§

IndexedBatchResult
Indexed result produced by one tile-batch worker.