Skip to main content

signinum_core/
lib.rs

1//! Shared traits and value types for the `signinum` workspace.
2//!
3//! Codec crates use this crate to expose common pixel formats, decode
4//! outcomes, row sinks, caller-owned scratch pools, and CPU/GPU backend
5//! selection contracts without depending on each other.
6
7#![no_std]
8#![warn(unreachable_pub)]
9
10extern crate alloc;
11
12/// Shared accelerator runtime contracts.
13pub mod accelerator;
14/// Backend selection and capability discovery.
15pub mod backend;
16/// Shared helpers for ordered tile-batch work.
17pub mod batch;
18mod buffer;
19/// Reusable codec context wrappers.
20pub mod context;
21/// Shared device-output request policies.
22pub mod device;
23/// Common error classifications and helper error types.
24pub mod error;
25/// Compressed-byte passthrough eligibility checks.
26pub mod passthrough;
27/// Pixel layout and format descriptors.
28pub mod pixel;
29/// Row-streaming output sink trait.
30pub mod row_sink;
31/// Integer sample type descriptors.
32pub mod sample;
33/// Decode downscale options.
34pub mod scale;
35/// Caller-owned scratch pool trait.
36pub mod scratch;
37/// Facade traits implemented by codec crates.
38pub mod traits;
39/// Shared metadata and geometry types.
40pub mod types;
41
42pub use accelerator::{
43    AcceleratorSession, BackendFailureKind, DeviceMemoryRange, ExecutionStats, GpuAbi,
44    SurfaceResidency,
45};
46pub use backend::{BackendCapabilities, BackendKind, BackendRequest, CpuFeatures};
47pub use batch::{
48    collect_indexed_batch_results, tile_batch_worker_count, IndexedBatchResult, TileBatchError,
49    TileBatchOptions, TileDecodeJob, TileRegionDecodeJob, TileRegionScaledDecodeJob,
50    TileScaledDecodeJob,
51};
52pub use buffer::{
53    copy_tight_pixels_to_strided_output, ensure_allocation_within_cap, strided_output_len,
54    strided_output_len_capped, validate_strided_output_buffer, DEFAULT_MAX_HOST_ALLOCATION_BYTES,
55};
56pub use context::{CacheStats, CodecContext, DecoderContext};
57pub use device::validate_cuda_surface_backend_request;
58pub use error::{BufferError, CodecError, InputError, NotImplemented, Unsupported};
59pub use passthrough::{
60    CompressedPayloadKind, CompressedTransferSyntax, PassthroughCandidate, PassthroughDecision,
61    PassthroughRejectReason, PassthroughRequirements,
62};
63pub use pixel::{PixelFormat, PixelLayout};
64pub use row_sink::RowSink;
65pub use sample::{Sample, SampleType};
66pub use scale::Downscale;
67pub use scratch::ScratchPool;
68pub use traits::{
69    submit_ready_device, DecodeRowsError, DeviceSubmission, DeviceSubmitSession, DeviceSurface,
70    ImageCodec, ImageDecode, ImageDecodeDevice, ImageDecodeRows, ImageDecodeSubmit,
71    ReadySubmission, TileBatchDecode, TileBatchDecodeDevice, TileBatchDecodeManyDevice,
72    TileBatchDecodeSubmit, TileDecompress,
73};
74pub use types::{
75    CodedUnitLayout, Colorspace, DecodeOutcome, DecodeRequest, Info, Rect, TileLayout, WarningKind,
76};