1mod accelerator_contracts;
6mod allocation;
7pub use self::accelerator_contracts::{
8 idct_blocks_to_signed_samples_rayon, CpuOnlyDctToWaveletStageAccelerator,
9 DctGridI16ToHtj2k97CodeBlockBatch, DctGridI16ToHtj2k97CodeBlockJob, DctGridToDwt53Job,
10 DctGridToDwt97Job, DctGridToHtj2k97CodeBlockJob, DctToWaveletStageAccelerator,
11 DctToWaveletStageCounterEvent, DctToWaveletStageCounters, EncodedHtJ2kCodeBlock,
12 Htj2k97CodeBlockOptions, IrreversibleQuantizationSubbandScales, J2kSubBandType,
13 PreencodedHtj2k97CodeBlock, PreencodedHtj2k97CompactBatch, PreencodedHtj2k97CompactBatchGroups,
14 PreencodedHtj2k97CompactCodeBlock, PreencodedHtj2k97CompactComponent,
15 PreencodedHtj2k97CompactImage, PreencodedHtj2k97CompactResolution,
16 PreencodedHtj2k97CompactSubband, PreencodedHtj2k97Component, PreencodedHtj2k97Resolution,
17 PreencodedHtj2k97Subband, PrequantizedHtj2k97CodeBlock, PrequantizedHtj2k97Component,
18 PrequantizedHtj2k97Image, PrequantizedHtj2k97Resolution, PrequantizedHtj2k97Subband,
19 RayonReversibleDwt53Accelerator, TranscodeStageDispatchMode,
20};
21
22#[doc(hidden)]
25pub mod accelerator {
26 pub use crate::{
27 idct_blocks_to_signed_samples_rayon, CpuOnlyDctToWaveletStageAccelerator,
28 DctGridI16ToHtj2k97CodeBlockBatch, DctGridI16ToHtj2k97CodeBlockJob, DctGridToDwt53Job,
29 DctGridToDwt97Job, DctGridToHtj2k97CodeBlockJob, DctGridToReversibleDwt53Job,
30 DctToWaveletStageAccelerator, DctToWaveletStageCounterEvent, DctToWaveletStageCounters,
31 Dwt97BatchStageTimings, EncodedHtJ2kCodeBlock, Htj2k97CodeBlockOptions,
32 IrreversibleQuantizationSubbandScales, J2kSubBandType, PreencodedHtj2k97CodeBlock,
33 PreencodedHtj2k97CompactBatch, PreencodedHtj2k97CompactBatchGroups,
34 PreencodedHtj2k97CompactCodeBlock, PreencodedHtj2k97CompactComponent,
35 PreencodedHtj2k97CompactImage, PreencodedHtj2k97CompactResolution,
36 PreencodedHtj2k97CompactSubband, PreencodedHtj2k97Component, PreencodedHtj2k97Resolution,
37 PreencodedHtj2k97Subband, PrequantizedHtj2k97CodeBlock, PrequantizedHtj2k97Component,
38 PrequantizedHtj2k97Image, PrequantizedHtj2k97Resolution, PrequantizedHtj2k97Subband,
39 RayonReversibleDwt53Accelerator, ReversibleDwt53FirstLevel, TranscodeStageDispatchMode,
40 TranscodeStageError,
41 };
42}
43
44#[derive(Debug, Clone, Copy)]
50pub struct DctGridToReversibleDwt53Job<'a> {
51 pub dequantized_blocks: &'a [[i16; 64]],
53 pub block_cols: usize,
55 pub block_rows: usize,
57 pub width: usize,
59 pub height: usize,
61}
62
63#[derive(Debug, PartialEq, Eq)]
65pub struct ReversibleDwt53FirstLevel {
66 pub ll: Vec<i32>,
68 pub hl: Vec<i32>,
70 pub lh: Vec<i32>,
72 pub hh: Vec<i32>,
74 pub low_width: usize,
76 pub low_height: usize,
78 pub high_width: usize,
80 pub high_height: usize,
82}
83
84#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
86pub struct Dwt97BatchStageTimings {
87 pub pack_upload_us: u128,
89 pub pack_upload_transfers: usize,
91 pub pack_upload_bytes: u64,
93 pub resident_dct_handoff_count: usize,
95 pub idct_row_lift_us: u128,
97 pub column_lift_us: u128,
99 pub resident_dwt_handoff_count: usize,
101 pub quantize_codeblock_us: u128,
103 pub ht_encode_us: u128,
105 pub ht_kernel_us: u128,
107 pub ht_status_readback_us: u128,
109 pub ht_status_readback_transfers: usize,
111 pub ht_status_readback_bytes: u64,
113 pub ht_compact_us: u128,
115 pub ht_output_readback_us: u128,
117 pub ht_output_readback_transfers: usize,
119 pub ht_output_readback_bytes: u64,
121 pub ht_codeblock_dispatches: usize,
123 pub readback_us: u128,
125 pub readback_transfers: usize,
127 pub readback_bytes: u64,
129}
130
131mod dct53_2d;
132mod dct97_2d;
133mod dct_grid;
134#[cfg(feature = "dev-support")]
135#[doc(hidden)]
136pub mod dev_support;
137mod htj2k97_codeblock_error;
138mod htj2k97_codeblock_oracle;
139#[doc(hidden)]
140mod jpeg_to_htj2k;
141#[doc(hidden)]
142pub mod metrics;
143mod pipeline_map;
144mod resident;
145mod reversible53;
146mod transcode_stage_error;
147
148pub use j2k::J2kProgressionOrder as EncodeProgressionOrder;
149
150#[derive(Debug, PartialEq)]
152pub struct Dwt53TwoDimensional<T> {
153 pub ll: Vec<T>,
155 pub hl: Vec<T>,
157 pub lh: Vec<T>,
159 pub hh: Vec<T>,
161 pub low_width: usize,
163 pub low_height: usize,
165 pub high_width: usize,
167 pub high_height: usize,
169}
170
171#[derive(Debug, PartialEq)]
173pub struct Dwt97TwoDimensional<T> {
174 pub ll: Vec<T>,
176 pub hl: Vec<T>,
178 pub lh: Vec<T>,
180 pub hh: Vec<T>,
182 pub low_width: usize,
184 pub low_height: usize,
186 pub high_width: usize,
188 pub high_height: usize,
190}
191
192pub use dct53_2d::{dct8x8_blocks_then_dwt53_float, dct8x8_blocks_to_dwt53_float_linear};
193pub use dct97_2d::dct8x8_blocks_then_dwt97_float;
194pub use dct97_2d::{dct8x8_blocks_then_dwt97_float_with_scratch, Dct97GridScratch};
195pub use dct_grid::{DctGridError, DctTransformError};
196pub use htj2k97_codeblock_error::{Htj2k97CodeBlockAxis, Htj2k97CodeBlockOptionsError};
197pub use htj2k97_codeblock_oracle::{
198 htj2k97_subband_delta, htj2k97_subband_total_bitplanes, validate_htj2k97_codeblock_options,
199};
200pub use jpeg_to_htj2k::{
201 jpeg_to_htj2k, jpeg_to_htj2k_batch, BatchTranscodeReport, EncodedTranscode,
202 EncodedTranscodeBatch, Htj2kEncodeError, Htj2kEncodeErrorKind, JpegTileBatchInput,
203 JpegToHtj2kCoefficientPath, JpegToHtj2kEncodeOptions, JpegToHtj2kError, JpegToHtj2kOptions,
204 JpegToHtj2kTranscoder, TranscodeBatchProfileRequest, TranscodeBatchProfileRow,
205 TranscodeComponentReport, TranscodeReport, TranscodeTimingReport,
206 TranscodeValidationClassification, TranscodeValidationMetrics,
207 JPEG_TO_HTJ2K_LOSSY_97_QUANTIZATION_SCALE,
208};
209pub use pipeline_map::{
210 TranscodePipelineMap, TranscodePipelineStageKind, TranscodePipelineStageReport,
211 TranscodeResidentStageRecommendation, TranscodeStageProcessor,
212};
213pub use resident::{
214 ResidentBufferRef, ResidentCodestreamBuffer, ResidentColorModel, ResidentComponentGeometry,
215 ResidentDctCoefficientOrder, ResidentDctGridLayout, ResidentDwtSubband, ResidentDwtSubbandKind,
216 ResidentDwtSubbandLayout, ResidentHandoffError, ResidentJpegDctGrid, ResidentSampleInfo,
217 ResidentSampling,
218};
219pub use transcode_stage_error::TranscodeStageError;