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§
- Backend
Capabilities - Backend availability for a codec/runtime combination.
- Cache
Stats - Cache hit/miss counters reported by codec contexts.
- Coded
Unit Layout - Regular coded-unit grid layout for formats with independently coded units.
- CpuFeatures
- CPU SIMD feature flags detected for the current host.
- Decode
Outcome - Successful decode metadata plus non-fatal warnings.
- Decode
Request - Source-region and reduced-resolution shape requested during decode.
- Decoder
Context - Wrapper that owns codec context state for repeated decode calls.
- Device
Memory Range - Opaque byte range in accelerator-visible memory.
- Execution
Stats - 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.
- Passthrough
Candidate - A borrowed compressed frame/tile that may be copied unchanged.
- Passthrough
Requirements - Destination requirements for copying compressed bytes unchanged.
- Ready
Submission - Already-completed submission used by synchronous fallback paths.
- Rect
- Rectangle in source pixel coordinates.
- Tile
Batch Error - Error returned by tile batches, annotated with the failing input index.
- Tile
Batch Options - Worker configuration for CPU tile batches.
- Tile
Decode Job - One full-tile decode request.
- Tile
Layout - Regular tile grid layout for a compressed image.
- Tile
Region Decode Job - One region tile decode request.
- Tile
Region Scaled Decode Job - One region+scaled tile decode request.
- Tile
Scaled Decode Job - One scaled tile decode request.
- Unsupported
- Error for input or options unsupported by the current codec.
Enums§
- Backend
Failure Kind - Backend failure class used before mapping into codec-specific errors.
- Backend
Kind - Runtime backend that executes codec work.
- Backend
Request - Caller preference for backend selection.
- Buffer
Error - Buffer validation and copy errors.
- Colorspace
- Color interpretation of decoded samples.
- Compressed
Payload Kind - Encapsulation shape of the compressed bytes.
- Compressed
Transfer Syntax - Compressed syntax carried by a source frame or accepted by a destination.
- Decode
Rows Error - 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.
- Input
Error - Generic malformed or truncated input errors.
- Passthrough
Decision - Result of a passthrough eligibility check.
- Passthrough
Reject Reason - First reason a compressed payload was rejected for byte-preserving copy.
- Pixel
Format - Concrete interleaved pixel format.
- Pixel
Layout - Channel layout independent of sample width.
- Sample
Type - Integer sample width used by a pixel format or row sink.
- Surface
Residency - Residency of an accelerator-visible surface or buffer.
- Warning
Kind - Broad warning category for non-fatal decode issues.
Constants§
- DEFAULT_
MAX_ HOST_ ALLOCATION_ BYTES - Default cap for host-side codec-owned allocations.
Traits§
- Accelerator
Session - Shared session contract for caller-owned accelerator runtime state.
- Codec
Context - Reusable codec state cached across decode calls.
- Codec
Error - Shared error classification used by facade traits.
- Device
Submission - Submitted device decode operation that can be waited on for completion.
- Device
Submit Session - Mutable device session that tracks submitted backend work.
- Device
Surface - Decoded image data resident on a specific backend.
- GpuAbi
- Marker trait for host-side values whose memory layout is part of a GPU ABI.
- Image
Codec - Common associated types shared by image codecs.
- Image
Decode - Borrowed-image decode API for codecs that parse compressed bytes directly.
- Image
Decode Device - Synchronous device-output decode API.
- Image
Decode Rows - Row-streaming decode API for large images or stripe-oriented callers.
- Image
Decode Submit - 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.
- Scratch
Pool - Caller-owned reusable scratch allocations for codec implementations.
- Tile
Batch Decode - Stateless tile-batch decode helpers that reuse caller-owned context.
- Tile
Batch Decode Device - Tile-batch helpers that return synchronous device surfaces.
- Tile
Batch Decode Many Device - Full-tile batch helpers that decode many independent tiles to device surfaces.
- Tile
Batch Decode Submit - Tile-batch helpers that queue device submissions.
- Tile
Decompress - 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
lenif it is at or belowcap. - 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_lenandstridecan hold an image output.
Type Aliases§
- Indexed
Batch Result - Indexed result produced by one tile-batch worker.