pub trait HtCodeBlockDecoder {
// Required method
fn decode_code_block(
&mut self,
job: HtCodeBlockDecodeJob<'_>,
output: &mut [f32],
) -> Result<(), DecodeError>;
// Provided methods
fn decode_j2k_sub_band(
&mut self,
_job: J2kSubBandDecodeJob<'_>,
_output: &mut [f32],
) -> Result<bool, DecodeError> { ... }
fn decode_j2k_code_block(
&mut self,
_job: J2kCodeBlockDecodeJob<'_>,
_output: &mut [f32],
) -> Result<bool, DecodeError> { ... }
fn decode_sub_band(
&mut self,
_job: HtSubBandDecodeJob<'_>,
_output: &mut [f32],
) -> Result<bool, DecodeError> { ... }
fn decode_single_decomposition_idwt(
&mut self,
_job: J2kSingleDecompositionIdwtJob<'_>,
_output: &mut [f32],
) -> Result<bool, DecodeError> { ... }
fn decode_inverse_mct(
&mut self,
_job: J2kInverseMctJob<'_>,
) -> Result<bool, DecodeError> { ... }
fn decode_store_component(
&mut self,
_job: J2kStoreComponentJob<'_>,
) -> Result<bool, DecodeError> { ... }
}Expand description
Adapter HTJ2K code-block decode hook for backend experimentation.
Required Methods§
Sourcefn decode_code_block(
&mut self,
job: HtCodeBlockDecodeJob<'_>,
output: &mut [f32],
) -> Result<(), DecodeError>
fn decode_code_block( &mut self, job: HtCodeBlockDecodeJob<'_>, output: &mut [f32], ) -> Result<(), DecodeError>
Decode one HTJ2K code block into output, writing job.width samples per row.
Provided Methods§
Sourcefn decode_j2k_sub_band(
&mut self,
_job: J2kSubBandDecodeJob<'_>,
_output: &mut [f32],
) -> Result<bool, DecodeError>
fn decode_j2k_sub_band( &mut self, _job: J2kSubBandDecodeJob<'_>, _output: &mut [f32], ) -> Result<bool, DecodeError>
Optionally decode a full classic J2K sub-band in one batch.
Implementations should return Ok(true) if they handled the request and
wrote the decoded coefficients into output. Returning Ok(false)
falls back to per-code-block decode via decode_j2k_code_block.
Sourcefn decode_j2k_code_block(
&mut self,
_job: J2kCodeBlockDecodeJob<'_>,
_output: &mut [f32],
) -> Result<bool, DecodeError>
fn decode_j2k_code_block( &mut self, _job: J2kCodeBlockDecodeJob<'_>, _output: &mut [f32], ) -> Result<bool, DecodeError>
Optionally decode one classic J2K code block.
Implementations should return Ok(true) if they handled the request
and wrote the decoded coefficients into output. Returning Ok(false)
falls back to the scalar bitplane decoder.
Sourcefn decode_sub_band(
&mut self,
_job: HtSubBandDecodeJob<'_>,
_output: &mut [f32],
) -> Result<bool, DecodeError>
fn decode_sub_band( &mut self, _job: HtSubBandDecodeJob<'_>, _output: &mut [f32], ) -> Result<bool, DecodeError>
Optionally decode a full HTJ2K sub-band in one batch.
Implementations should return Ok(true) if they handled the request and
wrote the decoded coefficients into output. Returning Ok(false)
falls back to per-code-block decode via decode_code_block.
Sourcefn decode_single_decomposition_idwt(
&mut self,
_job: J2kSingleDecompositionIdwtJob<'_>,
_output: &mut [f32],
) -> Result<bool, DecodeError>
fn decode_single_decomposition_idwt( &mut self, _job: J2kSingleDecompositionIdwtJob<'_>, _output: &mut [f32], ) -> Result<bool, DecodeError>
Optionally decode one single-decomposition IDWT level on a backend.
Implementations should return Ok(true) if they handled the request
and wrote the transformed coefficients into output. Returning
Ok(false) falls back to the scalar/SIMD CPU IDWT path.
Sourcefn decode_inverse_mct(
&mut self,
_job: J2kInverseMctJob<'_>,
) -> Result<bool, DecodeError>
fn decode_inverse_mct( &mut self, _job: J2kInverseMctJob<'_>, ) -> Result<bool, DecodeError>
Optionally apply inverse MCT on a backend.
Implementations should return Ok(true) if they handled the request
and updated the component planes in place. Returning Ok(false) falls
back to the scalar/SIMD CPU MCT path.
Sourcefn decode_store_component(
&mut self,
_job: J2kStoreComponentJob<'_>,
) -> Result<bool, DecodeError>
fn decode_store_component( &mut self, _job: J2kStoreComponentJob<'_>, ) -> Result<bool, DecodeError>
Optionally store one component plane on a backend.
Implementations should return Ok(true) if they handled the request
and updated the destination plane in place. Returning Ok(false) falls
back to the CPU store path.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".