Skip to main content

DctToWaveletStageAccelerator

Trait DctToWaveletStageAccelerator 

Source
pub trait DctToWaveletStageAccelerator {
Show 16 methods // Provided methods fn supports_dwt97_batch(&self) -> bool { ... } fn supports_htj2k97_codeblock_batch(&self) -> bool { ... } fn supports_htj2k97_i16_preencoded_batch(&self) -> bool { ... } fn supports_htj2k97_compact_preencoded_batch(&self) -> bool { ... } fn dct_grid_to_reversible_dwt53( &mut self, _job: DctGridToReversibleDwt53Job<'_>, ) -> Result<Option<ReversibleDwt53FirstLevel>, TranscodeStageError> { ... } fn dct_grid_to_reversible_dwt53_batch( &mut self, _jobs: &[DctGridToReversibleDwt53Job<'_>], ) -> Result<Option<Vec<ReversibleDwt53FirstLevel>>, TranscodeStageError> { ... } fn dct_grid_to_dwt53( &mut self, _job: DctGridToDwt53Job<'_>, ) -> Result<Option<Dwt53TwoDimensional<f64>>, TranscodeStageError> { ... } fn dct_grid_to_dwt97( &mut self, _job: DctGridToDwt97Job<'_>, ) -> Result<Option<Dwt97TwoDimensional<f64>>, TranscodeStageError> { ... } fn dct_grid_to_dwt97_batch( &mut self, _jobs: &[DctGridToDwt97Job<'_>], ) -> Result<Option<Vec<Dwt97TwoDimensional<f64>>>, TranscodeStageError> { ... } fn dct_grid_to_htj2k97_codeblock_batch( &mut self, _jobs: &[DctGridToHtj2k97CodeBlockJob<'_>], _options: Htj2k97CodeBlockOptions, ) -> Result<Option<Vec<PrequantizedHtj2k97Component>>, TranscodeStageError> { ... } fn dct_grid_to_htj2k97_preencoded_batch( &mut self, _jobs: &[DctGridToHtj2k97CodeBlockJob<'_>], _options: Htj2k97CodeBlockOptions, ) -> Result<Option<Vec<PreencodedHtj2k97Component>>, TranscodeStageError> { ... } fn dct_grid_i16_to_htj2k97_preencoded_batch( &mut self, _jobs: &[DctGridI16ToHtj2k97CodeBlockJob<'_>], _options: Htj2k97CodeBlockOptions, ) -> Result<Option<Vec<PreencodedHtj2k97Component>>, TranscodeStageError> { ... } fn dct_grid_i16_to_htj2k97_compact_preencoded_batch( &mut self, _jobs: &[DctGridI16ToHtj2k97CodeBlockJob<'_>], _options: Htj2k97CodeBlockOptions, ) -> Result<Option<PreencodedHtj2k97CompactBatch>, TranscodeStageError> { ... } fn dct_grid_i16_to_htj2k97_preencoded_batch_groups( &mut self, _groups: &[DctGridI16ToHtj2k97CodeBlockBatch<'_, '_>], _options: Htj2k97CodeBlockOptions, ) -> Result<Option<Vec<Vec<PreencodedHtj2k97Component>>>, TranscodeStageError> { ... } fn dct_grid_i16_to_htj2k97_compact_preencoded_batch_groups( &mut self, _groups: &[DctGridI16ToHtj2k97CodeBlockBatch<'_, '_>], _options: Htj2k97CodeBlockOptions, ) -> Result<Option<PreencodedHtj2k97CompactBatchGroups>, TranscodeStageError> { ... } fn last_dwt97_batch_stage_timings(&self) -> Option<Dwt97BatchStageTimings> { ... }
}
Expand description

Optional backend for SIMD, GPU, or other accelerated transform stages.

Provided Methods§

Source

fn supports_dwt97_batch(&self) -> bool

Whether this accelerator wants same-geometry 9/7 batch jobs offered.

The default is false so CPU-only fallback paths do not pay the memory cost of materializing batch-owned float DCT blocks before immediately falling back.

Source

fn supports_htj2k97_codeblock_batch(&self) -> bool

Whether this accelerator wants same-geometry 9/7 batches offered as prequantized HTJ2K code-block jobs before the float-band hook.

Source

fn supports_htj2k97_i16_preencoded_batch(&self) -> bool

Whether this accelerator wants same-geometry 9/7 preencoded HTJ2K batches offered with dequantized i16 DCT blocks before materializing the generic f64 block representation.

Source

fn supports_htj2k97_compact_preencoded_batch(&self) -> bool

Whether this accelerator wants the compact i16 preencoded HTJ2K batch hook offered before the owned preencoded hook.

Source

fn dct_grid_to_reversible_dwt53( &mut self, _job: DctGridToReversibleDwt53Job<'_>, ) -> Result<Option<ReversibleDwt53FirstLevel>, TranscodeStageError>

Optionally compute the direct DCT-grid to one-level reversible integer 5/3 projection.

Return Ok(Some(output)) when the backend handled the job bit-exactly relative to j2k’s scalar integer oracle. Return Ok(None) to use the scalar fallback.

Source

fn dct_grid_to_reversible_dwt53_batch( &mut self, _jobs: &[DctGridToReversibleDwt53Job<'_>], ) -> Result<Option<Vec<ReversibleDwt53FirstLevel>>, TranscodeStageError>

Optionally compute a same-geometry batch of direct DCT-grid to one-level reversible integer 5/3 projections.

Backends should return outputs in the same order as jobs. Return Ok(None) to use the scalar per-component fallback.

Source

fn dct_grid_to_dwt53( &mut self, _job: DctGridToDwt53Job<'_>, ) -> Result<Option<Dwt53TwoDimensional<f64>>, TranscodeStageError>

Optionally compute the direct DCT-grid to one-level 5/3 projection.

Return Ok(Some(output)) when the backend handled the job. Return Ok(None) to use the scalar fallback.

Source

fn dct_grid_to_dwt97( &mut self, _job: DctGridToDwt97Job<'_>, ) -> Result<Option<Dwt97TwoDimensional<f64>>, TranscodeStageError>

Optionally compute the direct DCT-grid to one-level 9/7 transform.

Return Ok(Some(output)) when the backend handled the job. Return Ok(None) to use the scalar fallback.

Source

fn dct_grid_to_dwt97_batch( &mut self, _jobs: &[DctGridToDwt97Job<'_>], ) -> Result<Option<Vec<Dwt97TwoDimensional<f64>>>, TranscodeStageError>

Optionally compute a same-geometry batch of direct DCT-grid to one-level 9/7 transforms.

Backends should return outputs in the same order as jobs. Return Ok(None) to use the scalar per-component fallback.

Source

fn dct_grid_to_htj2k97_codeblock_batch( &mut self, _jobs: &[DctGridToHtj2k97CodeBlockJob<'_>], _options: Htj2k97CodeBlockOptions, ) -> Result<Option<Vec<PrequantizedHtj2k97Component>>, TranscodeStageError>

Optionally compute same-geometry DCT-grid 9/7 jobs directly into prequantized HTJ2K code-block components.

Backends should return one component per input job in the same order as jobs. Return Ok(None) to use the float-band path.

Source

fn dct_grid_to_htj2k97_preencoded_batch( &mut self, _jobs: &[DctGridToHtj2k97CodeBlockJob<'_>], _options: Htj2k97CodeBlockOptions, ) -> Result<Option<Vec<PreencodedHtj2k97Component>>, TranscodeStageError>

Optionally compute same-geometry DCT-grid 9/7 jobs directly into preencoded HTJ2K code-block payloads.

Backends should return one component per input job in the same order as jobs. Return Ok(None) to use the prequantized or float-band path.

Source

fn dct_grid_i16_to_htj2k97_preencoded_batch( &mut self, _jobs: &[DctGridI16ToHtj2k97CodeBlockJob<'_>], _options: Htj2k97CodeBlockOptions, ) -> Result<Option<Vec<PreencodedHtj2k97Component>>, TranscodeStageError>

Optionally compute same-geometry dequantized i16 DCT-grid 9/7 jobs directly into preencoded HTJ2K code-block payloads.

Backends should return one component per input job in the same order as jobs. Return Ok(None) to use the generic f64 preencoded path.

Source

fn dct_grid_i16_to_htj2k97_compact_preencoded_batch( &mut self, _jobs: &[DctGridI16ToHtj2k97CodeBlockJob<'_>], _options: Htj2k97CodeBlockOptions, ) -> Result<Option<PreencodedHtj2k97CompactBatch>, TranscodeStageError>

Optionally compute same-geometry dequantized i16 DCT-grid 9/7 jobs into compact preencoded HTJ2K code-block payloads.

Backends should return one component per input job in the same order as jobs, with all component ranges pointing into the returned payload. Return Ok(None) to use the owned preencoded path.

Source

fn dct_grid_i16_to_htj2k97_preencoded_batch_groups( &mut self, _groups: &[DctGridI16ToHtj2k97CodeBlockBatch<'_, '_>], _options: Htj2k97CodeBlockOptions, ) -> Result<Option<Vec<Vec<PreencodedHtj2k97Component>>>, TranscodeStageError>

Optionally compute multiple same-geometry dequantized i16 DCT-grid batches directly into preencoded HTJ2K code-block payloads.

Each input batch is internally same-geometry, but different batches may have different component dimensions. Backends should return one output vector per input batch, in order. Return Ok(None) to use the per-group fallback hooks.

Source

fn dct_grid_i16_to_htj2k97_compact_preencoded_batch_groups( &mut self, _groups: &[DctGridI16ToHtj2k97CodeBlockBatch<'_, '_>], _options: Htj2k97CodeBlockOptions, ) -> Result<Option<PreencodedHtj2k97CompactBatchGroups>, TranscodeStageError>

Optionally compute multiple same-geometry dequantized i16 DCT-grid 9/7 batches into compact preencoded HTJ2K code-block payloads.

Each returned item corresponds to one input batch and contains one component per job in that batch. Return Ok(None) to use the owned preencoded grouped hook.

Source

fn last_dwt97_batch_stage_timings(&self) -> Option<Dwt97BatchStageTimings>

Return backend stage timings for the most recent 9/7 batch dispatch.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§