#![deny(missing_docs)]
extern crate alloc;
mod backend;
mod batch;
mod decode;
mod encode;
mod metadata;
mod parallelism;
mod recode;
mod wrap;
mod context;
pub use context::J2kContext;
mod error;
pub use error::{BackendError, BackendErrorKind, J2kError, NativeBackendError};
mod scratch;
pub use scratch::J2kScratchPool;
mod adapter;
pub use adapter::device_plan::{DeviceDecodePlan, DeviceDecodeRequest};
#[doc(hidden)]
pub use adapter::encode_stage::{
CpuOnlyJ2kEncodeStageAccelerator, EncodedHtJ2kCodeBlock, EncodedJ2kCodeBlock,
IrreversibleQuantizationStep, IrreversibleQuantizationSubbandScales, J2kCodeBlockSegment,
J2kCodeBlockStyle, J2kDeinterleaveToF32Job, J2kEncodeDispatchReport, J2kEncodeStageAccelerator,
J2kEncodeStageError, J2kEncodeStageErrorKind, J2kEncodeStageResult, J2kForwardDwt53Job,
J2kForwardDwt53Level, J2kForwardDwt53Output, J2kForwardDwt97Job, J2kForwardDwt97Level,
J2kForwardDwt97Output, J2kForwardIctJob, J2kForwardRctJob, J2kHtCodeBlockEncodeJob,
J2kHtSubbandEncodeJob, J2kHtj2kTileEncodeJob, J2kPacketizationBlockCodingMode,
J2kPacketizationCodeBlock, J2kPacketizationEncodeJob, J2kPacketizationPacketDescriptor,
J2kPacketizationProgressionOrder, J2kPacketizationResolution, J2kPacketizationSubband,
J2kQuantizeSubbandJob, J2kResidentEncodeInput, J2kResidentEncodeInputError,
J2kResidentHtj2kTileEncodeJob, J2kSubBandType, J2kTier1CodeBlockEncodeJob,
PrecomputedHtj2k53Component, PrecomputedHtj2k53Image, PrecomputedHtj2k97Component,
PrecomputedHtj2k97Image, PreencodedHtj2k97CodeBlock, PreencodedHtj2k97CompactCodeBlock,
PreencodedHtj2k97CompactComponent, PreencodedHtj2k97CompactImage,
PreencodedHtj2k97CompactResolution, PreencodedHtj2k97CompactSubband,
PreencodedHtj2k97Component, PreencodedHtj2k97Image, PreencodedHtj2k97Resolution,
PreencodedHtj2k97Subband, PrequantizedHtj2k97CodeBlock, PrequantizedHtj2k97Component,
PrequantizedHtj2k97Image, PrequantizedHtj2k97Resolution, PrequantizedHtj2k97Subband,
};
mod view;
pub use view::{J2kCodec, J2kDecoder, J2kRowDecodeOptions, J2kView};
pub use batch::{
decode_tile_into_in_context, decode_tile_region_into_in_context,
decode_tile_region_scaled_into_in_context, decode_tile_scaled_into_in_context,
decode_tiles_into, decode_tiles_region_into, decode_tiles_region_scaled_into,
decode_tiles_scaled_into, TileBatchError, TileBatchOptions, TileDecodeJob, TileDecodeOutput,
TileRegionDecodeJob, TileRegionScaledDecodeJob, TileScaledDecodeJob,
};
pub use decode::{
J2kComponentPlane, J2kDecodeWarning, J2kDecodedColorSpace, J2kDecodedComponents,
J2kDecodedNativeComponents, J2kNativeComponentPlane,
};
pub use parallelism::CpuDecodeParallelism;
pub use metadata::{
J2kChannelAssociation, J2kChannelDefinition, J2kChannelType, J2kColorSpec, J2kComponentInfo,
J2kComponentMapping, J2kComponentMappingType, J2kFileMetadata, J2kPaletteColumn,
J2kPaletteMetadata, J2kSupportInfo,
};
pub use encode::{
encode_j2k_lossless, encode_j2k_lossless_components,
encode_j2k_lossless_resident_with_accelerator, encode_j2k_lossless_typed_components,
encode_j2k_lossless_with_accelerator, encode_j2k_lossless_with_roi_regions, encode_j2k_lossy,
encode_j2k_lossy_with_accelerator, encode_j2k_lossy_with_roi_regions,
j2k_lossless_decomposition_levels, j2k_lossless_decomposition_levels_for_options,
j2k_lossless_decomposition_levels_for_progression, EncodeBackendPreference, EncodedJ2k,
EncodedLossyJ2k, J2kBlockCodingMode, J2kEncodeValidation, J2kLosslessComponentPlane,
J2kLosslessComponentSamples, J2kLosslessEncodeOptions, J2kLosslessSamples,
J2kLosslessTypedComponentPlane, J2kLosslessTypedComponentSamples, J2kLossyEncodeOptions,
J2kLossyEncodeReport, J2kLossySamples, J2kMarkerSegment, J2kProgressionOrder, J2kQualityLayer,
J2kRateTarget, J2kRoiRegion, ReversibleTransform,
};
pub use recode::{
recode_j2k_to_htj2k_lossless, J2kToHtj2kMode, J2kToHtj2kOptions, J2kToHtj2kReport,
ReencodedHtj2k,
};
pub use wrap::{wrap_j2k_codestream, J2kFileBoxMetadata, J2kFileColorSpec, J2kFileWrapOptions};
pub use parse::{extract_j2k_codestream_payload, J2kCodestreamPayload};
pub use j2k_core::{
BackendKind, BackendRequest, BufferError, CodecError, CompressedPayloadKind,
CompressedTransferSyntax, DecodeOutcome, DecodeRowsError, DecoderContext, Downscale,
ImageCodec, ImageDecode, ImageDecodeRows, PassthroughCandidate, PassthroughDecision,
PassthroughRejectReason, PassthroughRequirements, PixelFormat, Rect, RowSink, TileBatchDecode,
};
pub(crate) mod parse;