j2k_transcode/jpeg_to_htj2k/output.rs
1// SPDX-License-Identifier: MIT OR Apache-2.0
2
3use super::{BatchTranscodeReport, JpegToHtj2kError, TranscodeReport};
4
5/// Encoded transcode output and validation/report metadata.
6#[derive(Debug)]
7pub struct EncodedTranscode {
8 /// HTJ2K codestream bytes.
9 pub codestream: Vec<u8>,
10 /// Summary of the experimental path used.
11 pub report: TranscodeReport,
12}
13
14/// One JPEG tile input for batch transcode.
15#[derive(Debug, Clone, Copy)]
16pub struct JpegTileBatchInput<'a> {
17 /// JPEG codestream bytes for one tile.
18 pub bytes: &'a [u8],
19}
20
21/// Batch transcode output. Tile-level parse/encode failures are preserved so a
22/// WSI ingest queue can continue past isolated bad tiles.
23#[derive(Debug)]
24pub struct EncodedTranscodeBatch {
25 /// Per-input tile result in input order.
26 pub tiles: Vec<Result<EncodedTranscode, JpegToHtj2kError>>,
27 /// Aggregate batch report.
28 pub report: BatchTranscodeReport,
29}