#[non_exhaustive]pub enum ReportEntry {
#[non_exhaustive] MissingTiles {
tiles: Range<u32>,
},
#[non_exhaustive] MissingPackets {
tile: u32,
complete_layers: u16,
complete_reduction: Option<u8>,
},
#[non_exhaustive] TruncatedTilePart {
tile: u32,
tile_part: u8,
declared: u64,
present: u64,
},
#[non_exhaustive] TilePartCountMismatch {
tile: u32,
declared: u16,
found: u16,
},
#[non_exhaustive] LeftoverBytes {
tile: u32,
tile_part: u8,
bytes: u64,
in_packed_headers: bool,
},
#[non_exhaustive] MissingEoc,
}Expand description
One thing a decode with strict off left
out or skipped, on DecodeReport::entries.
The enum and each of its variants are #[non_exhaustive]: a later version
can add variants and fields, so match with a _ arm and with
{ field, .. }, and MissingEoc as MissingEoc { .. }.
Tiles are numbered in raster order from 0, as the codestream’s Isot
numbers them, and a tile’s tile-parts from 0, as its TPsot does.
The Display text is a diagnostic for a log, not a stable
format: do not parse it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]MissingTiles
No tile-part of these tiles was found. Their samples are 0 in the
output, after the DC level shift, as opj_decompress -allow-partial
writes them: 0 for an unsigned component, not its mid-gray, and 0 for
a signed one. A JP2 palette then maps them as any other index 0.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]MissingPackets
Packets of this tile that the decode keeps were never read: the data
ended first, or the POC volumes leave them out. A missing packet
adds nothing to its code-blocks, so they decode from the layers that
were read, as a codestream truncated after those layers would.
A packet cut short keeps each code-block whose data is all there, and the rest of its code-blocks keep only their earlier layers. A packet whose header is cut adds nothing.
Fields
This variant is marked as non-exhaustive
complete_layers: u16How many of the leading quality layers are whole, counted over the resolutions this decode keeps.
complete_reduction: Option<u8>The smallest reduction at which this tile has every packet, as
DecodeReport::complete_reduction counts it, or None when even
the coarsest resolution of this tile has a packet missing.
#[non_exhaustive]TruncatedTilePart
The input ends inside this tile-part: its Psot declares more bytes
than remain. The bytes that are there are read.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]TilePartCountMismatch
The tile’s SOT markers declare a number of tile-parts (TNsot, after
OpenJPEG’s TPsot == TNsot correction when that applies) other than
the number found. The tile decodes from the parts found; any packets
they lack are reported as MissingPackets.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]LeftoverBytes
Bytes of this tile were not read: every packet the tile’s progression holds was read, and bytes were left after the last one.
The tile’s samples may be wrong: leftover bytes can mean the packets
were misread. Two encoder bugs leave them in valid tiles. OpenJPEG’s
encoder writes duplicate packets under overlapping progression changes,
which decode right, and a phantom packet under -TP R or -TP C with
empty resolutions, which does not. So the tile counts as incomplete at
every reduction.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]MissingEoc
The codestream ends without its EOC marker. On its own this changes
no sample.