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 move_only;
144mod pipeline_map;
145mod resident;
146mod reversible53;
147mod transcode_stage_error;
148
149pub use j2k::J2kProgressionOrder as EncodeProgressionOrder;
150
151#[derive(Debug, PartialEq)]
153pub struct Dwt53TwoDimensional<T> {
154 pub ll: Vec<T>,
156 pub hl: Vec<T>,
158 pub lh: Vec<T>,
160 pub hh: Vec<T>,
162 pub low_width: usize,
164 pub low_height: usize,
166 pub high_width: usize,
168 pub high_height: usize,
170}
171
172#[derive(Debug, PartialEq)]
174pub struct Dwt97TwoDimensional<T> {
175 pub ll: Vec<T>,
177 pub hl: Vec<T>,
179 pub lh: Vec<T>,
181 pub hh: Vec<T>,
183 pub low_width: usize,
185 pub low_height: usize,
187 pub high_width: usize,
189 pub high_height: usize,
191}
192
193move_only::assert_move_only!(
194 ReversibleDwt53FirstLevel,
195 Dwt53TwoDimensional<f64>,
196 Dwt97TwoDimensional<f64>,
197);
198
199pub use dct53_2d::{dct8x8_blocks_then_dwt53_float, dct8x8_blocks_to_dwt53_float_linear};
200pub use dct97_2d::dct8x8_blocks_then_dwt97_float;
201pub use dct97_2d::{dct8x8_blocks_then_dwt97_float_with_scratch, Dct97GridScratch};
202pub use dct_grid::{DctGridError, DctTransformError};
203pub use htj2k97_codeblock_error::{Htj2k97CodeBlockAxis, Htj2k97CodeBlockOptionsError};
204pub use htj2k97_codeblock_oracle::{
205 htj2k97_subband_delta, htj2k97_subband_total_bitplanes, validate_htj2k97_codeblock_options,
206};
207pub use jpeg_to_htj2k::{
208 jpeg_to_htj2k, jpeg_to_htj2k_batch, BatchTranscodeReport, EncodedTranscode,
209 EncodedTranscodeBatch, Htj2kEncodeError, Htj2kEncodeErrorKind, JpegTileBatchInput,
210 JpegToHtj2kCoefficientPath, JpegToHtj2kEncodeOptions, JpegToHtj2kError, JpegToHtj2kOptions,
211 JpegToHtj2kTranscoder, TranscodeBatchProfileRequest, TranscodeBatchProfileRow,
212 TranscodeComponentReport, TranscodeReport, TranscodeTimingReport,
213 TranscodeValidationClassification, TranscodeValidationMetrics,
214 JPEG_TO_HTJ2K_LOSSY_97_QUANTIZATION_SCALE,
215};
216pub use pipeline_map::{
217 TranscodePipelineMap, TranscodePipelineStageKind, TranscodePipelineStageReport,
218 TranscodeResidentStageRecommendation, TranscodeStageProcessor,
219};
220pub use resident::{
221 ResidentBufferRef, ResidentCodestreamBuffer, ResidentColorModel, ResidentComponentGeometry,
222 ResidentDctCoefficientOrder, ResidentDctGridLayout, ResidentDwtSubband, ResidentDwtSubbandKind,
223 ResidentDwtSubbandLayout, ResidentHandoffError, ResidentJpegDctGrid, ResidentSampleInfo,
224 ResidentSampling,
225};
226pub use transcode_stage_error::TranscodeStageError;